Update to ncurses-6.0
Change-Id: I98ab2ea8a5e13cca9f8b7cf6277b9b14a4da4299
diff --git a/Ada95/Makefile.in b/Ada95/Makefile.in
index b1743cf..4d80fe3 100644
--- a/Ada95/Makefile.in
+++ b/Ada95/Makefile.in
@@ -1,5 +1,6 @@
+# $Id: Makefile.in,v 1.22 2015/08/05 23:15:41 tom Exp $
##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -29,9 +30,10 @@
# Author: Juergen Pfeifer, 1996
#
# Version Control
-# $Revision: 1.15 $
+# $Revision: 1.22 $
#
-SHELL = /bin/sh
+SHELL = @SHELL@
+VPATH = @srcdir@
THIS = Makefile
SUBDIRS = @ADA_SUBDIRS@
@@ -61,7 +63,19 @@
for d in $(SUBDIRS); do \
(cd $$d ; $(MAKE) $(CF_MFLAGS) $@) ;\
done
- rm -f Makefile
+ rm -rf lib
+ for lib_kind in static dynamic; do \
+ rm -rf $${lib_kind}-ali; \
+ rm -rf $${lib_kind}-obj; \
+ done
+ -rm -f config.cache config.log config.status include/ncurses_cfg.h
+ -rm -f Makefile
+
+tags :
+ @
+
+preinstall :
+ @
install.data :
@
diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4
new file mode 100644
index 0000000..c83f6ac
--- /dev/null
+++ b/Ada95/aclocal.m4
@@ -0,0 +1,3966 @@
+dnl***************************************************************************
+dnl Copyright (c) 2010-2014,2015 Free Software Foundation, Inc. *
+dnl *
+dnl Permission is hereby granted, free of charge, to any person obtaining a *
+dnl copy of this software and associated documentation files (the *
+dnl "Software"), to deal in the Software without restriction, including *
+dnl without limitation the rights to use, copy, modify, merge, publish, *
+dnl distribute, distribute with modifications, sublicense, and/or sell *
+dnl copies of the Software, and to permit persons to whom the Software is *
+dnl furnished to do so, subject to the following conditions: *
+dnl *
+dnl The above copyright notice and this permission notice shall be included *
+dnl in all copies or substantial portions of the Software. *
+dnl *
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+dnl *
+dnl Except as contained in this notice, the name(s) of the above copyright *
+dnl holders shall not be used in advertising or otherwise to promote the *
+dnl sale, use or other dealings in this Software without prior written *
+dnl authorization. *
+dnl***************************************************************************
+dnl
+dnl Author: Thomas E. Dickey
+dnl
+dnl $Id: aclocal.m4,v 1.105 2015/08/08 14:25:40 tom Exp $
+dnl Macros used in NCURSES Ada95 auto-configuration script.
+dnl
+dnl These macros are maintained separately from NCURSES. The copyright on
+dnl this file applies to the aggregation of macros and does not affect use of
+dnl these macros in other applications.
+dnl
+dnl See http://invisible-island.net/autoconf/ for additional information.
+dnl
+dnl ---------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
+dnl CF_ACVERSION_CHECK version: 5 updated: 2014/06/04 19:11:49
+dnl ------------------
+dnl Conditionally generate script according to whether we're using a given autoconf.
+dnl
+dnl $1 = version to compare against
+dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
+dnl $3 = code to use if AC_ACVERSION is older than $1.
+define([CF_ACVERSION_CHECK],
+[
+ifdef([AC_ACVERSION], ,[ifdef([AC_AUTOCONF_VERSION],[m4_copy([AC_AUTOCONF_VERSION],[AC_ACVERSION])],[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])])dnl
+ifdef([m4_version_compare],
+[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
+[CF_ACVERSION_COMPARE(
+AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
+AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53
+dnl --------------------
+dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
+dnl MAJOR2, MINOR2, TERNARY2,
+dnl PRINTABLE2, not FOUND, FOUND)
+define([CF_ACVERSION_COMPARE],
+[ifelse(builtin([eval], [$2 < $5]), 1,
+[ifelse([$8], , ,[$8])],
+[ifelse([$9], , ,[$9])])])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADA_INCLUDE_DIRS version: 8 updated: 2013/10/14 04:24:07
+dnl -------------------
+dnl Construct the list of include-options for the C programs in the Ada95
+dnl binding.
+AC_DEFUN([CF_ADA_INCLUDE_DIRS],
+[
+ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
+if test "$srcdir" != "."; then
+ ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
+fi
+if test "$GCC" != yes; then
+ ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+elif test "$includedir" != "/usr/include"; then
+ if test "$includedir" = '${prefix}/include' ; then
+ if test x$prefix != x/usr ; then
+ ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+ fi
+ else
+ ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+ fi
+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: 12 updated: 2015/04/12 15:39:00
+dnl -------------
+dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
+dnl The second parameter if given makes this macro verbose.
+dnl
+dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
+dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
+dnl confused by the quotes (which require backslashes to keep them usable).
+AC_DEFUN([CF_ADD_CFLAGS],
+[
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $1
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+ CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+ ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+ ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+ ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+AC_SUBST(EXTRA_CPPFLAGS)
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_INCDIR version: 14 updated: 2015/05/25 20:53:04
+dnl -------------
+dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
+dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
+dnl but old versions (and some misinstalled ones) need that. To make things
+dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to
+dnl the include-path).
+AC_DEFUN([CF_ADD_INCDIR],
+[
+if test -n "$1" ; then
+ for cf_add_incdir in $1
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ AC_TRY_COMPILE([#include <stdio.h>],
+ [printf("Hello")],
+ [],
+ [cf_have_incdir=yes])
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ CF_VERBOSE(adding $cf_add_incdir to include-path)
+ ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_LIB version: 2 updated: 2010/06/02 05:03:05
+dnl ----------
+dnl Add a library, used to enforce consistency.
+dnl
+dnl $1 = library to add, without the "-l"
+dnl $2 = variable to update (default $LIBS)
+AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_LIBDIR version: 10 updated: 2015/04/18 08:56:57
+dnl -------------
+dnl Adds to the library-path
+dnl
+dnl Some machines have trouble with multiple -L options.
+dnl
+dnl $1 is the (list of) directory(s) to add
+dnl $2 is the optional name of the variable to update (default LDFLAGS)
+dnl
+AC_DEFUN([CF_ADD_LIBDIR],
+[
+if test -n "$1" ; then
+ for cf_add_libdir in $1
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ CF_VERBOSE(adding $cf_add_libdir to library-path)
+ ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])"
+ fi
+ fi
+ done
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_LIBS version: 2 updated: 2014/07/13 14:33:27
+dnl -----------
+dnl Add one or more libraries, used to enforce consistency. Libraries are
+dnl prepended to an existing list, since their dependencies are assumed to
+dnl already exist in the list.
+dnl
+dnl $1 = libraries to add, with the "-l", etc.
+dnl $2 = variable to update (default $LIBS)
+AC_DEFUN([CF_ADD_LIBS],[
+cf_add_libs="$1"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in [$]ifelse($2,,LIBS,[$2])
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+ifelse($2,,LIBS,[$2])="$cf_add_libs"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_SUBDIR_PATH version: 4 updated: 2013/10/08 17:47:05
+dnl ------------------
+dnl Append to a search-list for a nonstandard header/lib-file
+dnl $1 = the variable to return as result
+dnl $2 = the package name
+dnl $3 = the subdirectory, e.g., bin, include or lib
+dnl $4 = the directory under which we will test for subdirectories
+dnl $5 = a directory that we do not want $4 to match
+AC_DEFUN([CF_ADD_SUBDIR_PATH],
+[
+test "x$4" != "x$5" && \
+test -d "$4" && \
+ifelse([$5],NONE,,[(test -z "$5" || test x$5 = xNONE || test "x$4" != "x$5") &&]) {
+ test -n "$verbose" && echo " ... testing for $3-directories under $4"
+ test -d $4/$3 && $1="[$]$1 $4/$3"
+ test -d $4/$3/$2 && $1="[$]$1 $4/$3/$2"
+ test -d $4/$3/$2/$3 && $1="[$]$1 $4/$3/$2/$3"
+ test -d $4/$2/$3 && $1="[$]$1 $4/$2/$3"
+ test -d $4/$2/$3/$2 && $1="[$]$1 $4/$2/$3/$2"
+}
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
+dnl --------------
+dnl Allow user to disable a normally-on option.
+AC_DEFUN([CF_ARG_DISABLE],
+[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ARG_OPTION version: 5 updated: 2015/05/10 19:52:14
+dnl -------------
+dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
+dnl values.
+dnl
+dnl Parameters:
+dnl $1 = option name
+dnl $2 = help-string
+dnl $3 = action to perform if option is not default
+dnl $4 = action if perform if option is default
+dnl $5 = default option value (either 'yes' or 'no')
+AC_DEFUN([CF_ARG_OPTION],
+[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
+ if test "$enableval" != "$5" ; then
+ifelse([$3],,[ :]dnl
+,[ $3]) ifelse([$4],,,[
+ else
+ $4])
+ fi],[enableval=$5 ifelse([$4],,,[
+ $4
+])dnl
+])])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_AR_FLAGS version: 5 updated: 2010/05/20 20:24:29
+dnl -----------
+dnl Check for suitable "ar" (archiver) options for updating an archive.
+AC_DEFUN([CF_AR_FLAGS],[
+AC_REQUIRE([CF_PROG_AR])
+
+AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[
+ cf_cv_ar_flags=unknown
+ for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+ do
+
+ # check if $ARFLAGS already contains this choice
+ if test "x$ARFLAGS" != "x" ; then
+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
+ cf_cv_ar_flags=
+ break
+ fi
+ fi
+
+ rm -f conftest.$ac_cv_objext
+ rm -f conftest.a
+
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int testdata[[3]] = { 123, 456, 789 };
+EOF
+ if AC_TRY_EVAL(ac_compile) ; then
+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&AC_FD_CC
+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null
+ if test -f conftest.a ; then
+ cf_cv_ar_flags=$cf_ar_flags
+ break
+ fi
+ else
+ CF_VERBOSE(cannot compile test-program)
+ break
+ fi
+ done
+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
+])
+
+if test -n "$ARFLAGS" ; then
+ if test -n "$cf_cv_ar_flags" ; then
+ ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
+ fi
+else
+ ARFLAGS=$cf_cv_ar_flags
+fi
+
+AC_SUBST(ARFLAGS)
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_BUILD_CC version: 7 updated: 2012/10/06 15:31:55
+dnl -----------
+dnl If we're cross-compiling, allow the user to override the tools and their
+dnl options. The configure script is oriented toward identifying the host
+dnl compiler, etc., but we need a build compiler to generate parts of the
+dnl source.
+dnl
+dnl $1 = default for $CPPFLAGS
+dnl $2 = default for $LIBS
+AC_DEFUN([CF_BUILD_CC],[
+CF_ACVERSION_CHECK(2.52,,
+ [AC_REQUIRE([CF_PROG_EXT])])
+if test "$cross_compiling" = yes ; then
+
+ # defaults that we might want to override
+ : ${BUILD_CFLAGS:=''}
+ : ${BUILD_CPPFLAGS:='ifelse([$1],,,[$1])'}
+ : ${BUILD_LDFLAGS:=''}
+ : ${BUILD_LIBS:='ifelse([$2],,,[$2])'}
+ : ${BUILD_EXEEXT:='$x'}
+ : ${BUILD_OBJEXT:='o'}
+
+ AC_ARG_WITH(build-cc,
+ [ --with-build-cc=XXX the build C compiler ($BUILD_CC)],
+ [BUILD_CC="$withval"],
+ [AC_CHECK_PROGS(BUILD_CC, gcc cc cl)])
+ AC_MSG_CHECKING(for native build C compiler)
+ AC_MSG_RESULT($BUILD_CC)
+
+ AC_MSG_CHECKING(for native build C preprocessor)
+ AC_ARG_WITH(build-cpp,
+ [ --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)],
+ [BUILD_CPP="$withval"],
+ [BUILD_CPP='${BUILD_CC} -E'])
+ AC_MSG_RESULT($BUILD_CPP)
+
+ AC_MSG_CHECKING(for native build C flags)
+ AC_ARG_WITH(build-cflags,
+ [ --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)],
+ [BUILD_CFLAGS="$withval"])
+ AC_MSG_RESULT($BUILD_CFLAGS)
+
+ AC_MSG_CHECKING(for native build C preprocessor-flags)
+ AC_ARG_WITH(build-cppflags,
+ [ --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)],
+ [BUILD_CPPFLAGS="$withval"])
+ AC_MSG_RESULT($BUILD_CPPFLAGS)
+
+ AC_MSG_CHECKING(for native build linker-flags)
+ AC_ARG_WITH(build-ldflags,
+ [ --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)],
+ [BUILD_LDFLAGS="$withval"])
+ AC_MSG_RESULT($BUILD_LDFLAGS)
+
+ AC_MSG_CHECKING(for native build linker-libraries)
+ AC_ARG_WITH(build-libs,
+ [ --with-build-libs=XXX the build libraries (${BUILD_LIBS})],
+ [BUILD_LIBS="$withval"])
+ AC_MSG_RESULT($BUILD_LIBS)
+
+ # this assumes we're on Unix.
+ BUILD_EXEEXT=
+ BUILD_OBJEXT=o
+
+ : ${BUILD_CC:='${CC}'}
+
+ if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
+ AC_MSG_ERROR([Cross-build requires two compilers.
+Use --with-build-cc to specify the native compiler.])
+ fi
+
+else
+ : ${BUILD_CC:='${CC}'}
+ : ${BUILD_CPP:='${CPP}'}
+ : ${BUILD_CFLAGS:='${CFLAGS}'}
+ : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
+ : ${BUILD_LDFLAGS:='${LDFLAGS}'}
+ : ${BUILD_LIBS:='${LIBS}'}
+ : ${BUILD_EXEEXT:='$x'}
+ : ${BUILD_OBJEXT:='o'}
+fi
+
+AC_SUBST(BUILD_CC)
+AC_SUBST(BUILD_CPP)
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(BUILD_CPPFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+AC_SUBST(BUILD_LIBS)
+AC_SUBST(BUILD_EXEEXT)
+AC_SUBST(BUILD_OBJEXT)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CC_ENV_FLAGS version: 2 updated: 2015/04/12 15:39:00
+dnl ---------------
+dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
+dnl into CC. This will not help with broken scripts that wrap the compiler with
+dnl options, but eliminates a more common category of user confusion.
+AC_DEFUN([CF_CC_ENV_FLAGS],
+[
+# This should have been defined by AC_PROG_CC
+: ${CC:=cc}
+
+AC_MSG_CHECKING(\$CC variable)
+case "$CC" in
+(*[[\ \ ]]-[[IUD]]*)
+ AC_MSG_RESULT(broken)
+ AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
+ # humor him...
+ cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'`
+ CC=`echo "$CC" | sed -e 's/[[ ]].*//'`
+ CF_ADD_CFLAGS($cf_flags)
+ ;;
+(*)
+ AC_MSG_RESULT(ok)
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CFG_DEFAULTS version: 11 updated: 2015/04/17 21:13:04
+dnl ---------------
+dnl Determine the default configuration into which we'll install ncurses. This
+dnl can be overridden by the user's command-line options. There's two items to
+dnl look for:
+dnl 1. the prefix (e.g., /usr)
+dnl 2. the header files (e.g., /usr/include/ncurses)
+dnl We'll look for a previous installation of ncurses and use the same defaults.
+dnl
+dnl We don't use AC_PREFIX_DEFAULT, because it gets evaluated too soon, and
+dnl we don't use AC_PREFIX_PROGRAM, because we cannot distinguish ncurses's
+dnl programs from a vendor's.
+AC_DEFUN([CF_CFG_DEFAULTS],
+[
+AC_MSG_CHECKING(for prefix)
+if test "x$prefix" = "xNONE" ; then
+ case "$cf_cv_system_name" in
+ # non-vendor systems don't have a conflict
+ (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
+ prefix=/usr
+ ;;
+ (*) prefix=$ac_default_prefix
+ ;;
+ esac
+fi
+AC_MSG_RESULT($prefix)
+
+if test "x$prefix" = "xNONE" ; then
+AC_MSG_CHECKING(for default include-directory)
+test -n "$verbose" && echo 1>&AC_FD_MSG
+for cf_symbol in \
+ $includedir \
+ $includedir/ncurses \
+ $prefix/include \
+ $prefix/include/ncurses \
+ /usr/local/include \
+ /usr/local/include/ncurses \
+ /usr/include \
+ /usr/include/ncurses
+do
+ cf_dir=`eval echo $cf_symbol`
+ if test -f $cf_dir/curses.h ; then
+ if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
+ includedir="$cf_symbol"
+ test -n "$verbose" && echo $ac_n " found " 1>&AC_FD_MSG
+ break
+ fi
+ fi
+ test -n "$verbose" && echo " tested $cf_dir" 1>&AC_FD_MSG
+done
+AC_MSG_RESULT($includedir)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03
+dnl --------------
+dnl Check if we're accidentally using a cache from a different machine.
+dnl Derive the system name, as a check for reusing the autoconf cache.
+dnl
+dnl If we've packaged config.guess and config.sub, run that (since it does a
+dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow
+dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
+dnl which is useful in cross-compiles.
+dnl
+dnl Note: we would use $ac_config_sub, but that is one of the places where
+dnl autoconf 2.5x broke compatibility with autoconf 2.13
+AC_DEFUN([CF_CHECK_CACHE],
+[
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
+ ifelse([$1],,[AC_CANONICAL_HOST],[$1])
+ system_name="$host_os"
+else
+ system_name="`(uname -s -r) 2>/dev/null`"
+ if test -z "$system_name" ; then
+ system_name="`(hostname) 2>/dev/null`"
+ fi
+fi
+test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.])
+AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
+
+test -z "$system_name" && system_name="$cf_cv_system_name"
+test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
+
+if test ".$system_name" != ".$cf_cv_system_name" ; then
+ AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
+ AC_MSG_ERROR("Please remove config.cache and try again.")
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CLANG_COMPILER version: 2 updated: 2013/11/19 19:23:35
+dnl -----------------
+dnl Check if the given compiler is really clang. clang's C driver defines
+dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
+dnl not ignore some gcc options.
+dnl
+dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
+dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
+dnl the wrappers for gcc and g++ warnings.
+dnl
+dnl $1 = GCC (default) or GXX
+dnl $2 = CLANG_COMPILER (default)
+dnl $3 = CFLAGS (default) or CXXFLAGS
+AC_DEFUN([CF_CLANG_COMPILER],[
+ifelse([$2],,CLANG_COMPILER,[$2])=no
+
+if test "$ifelse([$1],,[$1],GCC)" = yes ; then
+ AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler)
+ cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
+ ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments"
+ AC_TRY_COMPILE([],[
+#ifdef __clang__
+#else
+make an error
+#endif
+],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
+],[])
+ ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
+ AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_CURSES_HEADER version: 5 updated: 2015/04/23 20:35:30
+dnl ----------------
+dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
+dnl variations of ncurses' installs.
+dnl
+dnl $1 = ncurses when looking for ncurses, or is empty
+AC_DEFUN([CF_CURSES_HEADER],[
+AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[
+cf_cv_ncurses_header=none
+for cf_header in \
+ ncurses.h ifelse($1,,,[$1/ncurses.h]) \
+ curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h ncurses/curses.h])
+do
+AC_TRY_COMPILE([#include <${cf_header}>],
+ [initscr(); tgoto("?", 0,0)],
+ [cf_cv_ncurses_header=$cf_header; break],[])
+done
+])
+
+if test "$cf_cv_ncurses_header" = none ; then
+ AC_MSG_ERROR(No curses header-files found)
+fi
+
+# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
+AC_CHECK_HEADERS($cf_cv_ncurses_header)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
+dnl ----------
+dnl "dirname" is not portable, so we fake it with a shell script.
+AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57
+dnl ---------------
+dnl You can always use "make -n" to see the actual options, but it's hard to
+dnl pick out/analyze warning messages when the compile-line is long.
+dnl
+dnl Sets:
+dnl ECHO_LT - symbol to control if libtool is verbose
+dnl ECHO_LD - symbol to prefix "cc -o" lines
+dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
+dnl SHOW_CC - symbol to put before explicit "cc -c" lines
+dnl ECHO_CC - symbol to put before any "cc" line
+dnl
+AC_DEFUN([CF_DISABLE_ECHO],[
+AC_MSG_CHECKING(if you want to see long compiling messages)
+CF_ARG_DISABLE(echo,
+ [ --disable-echo do not display "compiling" commands],
+ [
+ ECHO_LT='--silent'
+ ECHO_LD='@echo linking [$]@;'
+ RULE_CC='@echo compiling [$]<'
+ SHOW_CC='@echo compiling [$]@'
+ ECHO_CC='@'
+],[
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
+])
+AC_MSG_RESULT($enableval)
+AC_SUBST(ECHO_LT)
+AC_SUBST(ECHO_LD)
+AC_SUBST(RULE_CC)
+AC_SUBST(SHOW_CC)
+AC_SUBST(ECHO_CC)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_GNAT_PROJECTS version: 1 updated: 2014/06/01 11:34:00
+dnl ------------------------
+AC_DEFUN([CF_DISABLE_GNAT_PROJECTS],[
+AC_MSG_CHECKING(if we want to use GNAT projects)
+CF_ARG_DISABLE(gnat-projects,
+ [ --disable-gnat-projects test: disable GNAT projects even if usable],
+ [enable_gnat_projects=no],
+ [enable_gnat_projects=yes])
+AC_MSG_RESULT($enable_gnat_projects)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ENABLE_PC_FILES version: 12 updated: 2015/04/17 21:13:04
+dnl ------------------
+dnl This is the "--enable-pc-files" option, which is available if there is a
+dnl pkg-config configuration on the local machine.
+AC_DEFUN([CF_ENABLE_PC_FILES],[
+AC_REQUIRE([CF_PKG_CONFIG])
+AC_REQUIRE([CF_WITH_PKG_CONFIG_LIBDIR])
+
+if test "x$PKG_CONFIG" != xnone
+then
+ AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
+else
+ AC_MSG_CHECKING(if we should install .pc files)
+fi
+
+AC_ARG_ENABLE(pc-files,
+ [ --enable-pc-files generate and install .pc files for pkg-config],
+ [enable_pc_files=$enableval],
+ [enable_pc_files=no])
+AC_MSG_RESULT($enable_pc_files)
+
+if test "x$enable_pc_files" != xno
+then
+ case "x$PKG_CONFIG_LIBDIR" in
+ (xno|xyes)
+ AC_MSG_WARN(no PKG_CONFIG_LIBDIR was found)
+ MAKE_PC_FILES="#"
+ ;;
+ (*)
+ CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR)
+ MAKE_PC_FILES=
+ ;;
+ esac
+else
+ MAKE_PC_FILES="#"
+fi
+AC_SUBST(MAKE_PC_FILES)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
+dnl ---------------
+dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We
+dnl prefer a standard location, and use -L options only if we do not find the
+dnl library in the standard library location(s).
+dnl $1 = library name
+dnl $2 = library class, usually the same as library name
+dnl $3 = includes
+dnl $4 = code fragment to compile/link
+dnl $5 = corresponding function-name
+dnl $6 = flag, nonnull if failure should not cause an error-exit
+dnl
+dnl Sets the variable "$cf_libdir" as a side-effect, so we can see if we had
+dnl to use a -L option.
+AC_DEFUN([CF_FIND_LIBRARY],
+[
+ eval 'cf_cv_have_lib_'$1'=no'
+ cf_libdir=""
+ AC_CHECK_FUNC($5,
+ eval 'cf_cv_have_lib_'$1'=yes',[
+ cf_save_LIBS="$LIBS"
+ AC_MSG_CHECKING(for $5 in -l$1)
+ LIBS="-l$1 $LIBS"
+ AC_TRY_LINK([$3],[$4],
+ [AC_MSG_RESULT(yes)
+ eval 'cf_cv_have_lib_'$1'=yes'
+ ],
+ [AC_MSG_RESULT(no)
+ CF_LIBRARY_PATH(cf_search,$2)
+ for cf_libdir in $cf_search
+ do
+ AC_MSG_CHECKING(for -l$1 in $cf_libdir)
+ LIBS="-L$cf_libdir -l$1 $cf_save_LIBS"
+ AC_TRY_LINK([$3],[$4],
+ [AC_MSG_RESULT(yes)
+ eval 'cf_cv_have_lib_'$1'=yes'
+ break],
+ [AC_MSG_RESULT(no)
+ LIBS="$cf_save_LIBS"])
+ done
+ ])
+ ])
+eval 'cf_found_library=[$]cf_cv_have_lib_'$1
+ifelse($6,,[
+if test $cf_found_library = no ; then
+ AC_MSG_ERROR(Cannot link $1 library)
+fi
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_FIND_LINKAGE version: 20 updated: 2015/04/18 08:56:57
+dnl ---------------
+dnl Find a library (specifically the linkage used in the code fragment),
+dnl searching for it if it is not already in the library path.
+dnl See also CF_ADD_SEARCHPATH.
+dnl
+dnl Parameters (4-on are optional):
+dnl $1 = headers for library entrypoint
+dnl $2 = code fragment for library entrypoint
+dnl $3 = the library name without the "-l" option or ".so" suffix.
+dnl $4 = action to perform if successful (default: update CPPFLAGS, etc)
+dnl $5 = action to perform if not successful
+dnl $6 = module name, if not the same as the library name
+dnl $7 = extra libraries
+dnl
+dnl Sets these variables:
+dnl $cf_cv_find_linkage_$3 - yes/no according to whether linkage is found
+dnl $cf_cv_header_path_$3 - include-directory if needed
+dnl $cf_cv_library_path_$3 - library-directory if needed
+dnl $cf_cv_library_file_$3 - library-file if needed, e.g., -l$3
+AC_DEFUN([CF_FIND_LINKAGE],[
+
+# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
+# will be set on completion of the AC_TRY_LINK below.
+cf_cv_header_path_$3=
+cf_cv_library_path_$3=
+
+CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)])
+
+cf_save_LIBS="$LIBS"
+
+AC_TRY_LINK([$1],[$2],[
+ cf_cv_find_linkage_$3=yes
+ cf_cv_header_path_$3=/usr/include
+ cf_cv_library_path_$3=/usr/lib
+],[
+
+LIBS="-l$3 $7 $cf_save_LIBS"
+
+AC_TRY_LINK([$1],[$2],[
+ cf_cv_find_linkage_$3=yes
+ cf_cv_header_path_$3=/usr/include
+ cf_cv_library_path_$3=/usr/lib
+ cf_cv_library_file_$3="-l$3"
+],[
+ cf_cv_find_linkage_$3=no
+ LIBS="$cf_save_LIBS"
+
+ CF_VERBOSE(find linkage for $3 library)
+ CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)])
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_test_CPPFLAGS="$CPPFLAGS"
+
+ CF_HEADER_PATH(cf_search,ifelse([$6],,[$3],[$6]))
+ for cf_cv_header_path_$3 in $cf_search
+ do
+ if test -d $cf_cv_header_path_$3 ; then
+ CF_VERBOSE(... testing $cf_cv_header_path_$3)
+ CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_$3"
+ AC_TRY_COMPILE([$1],[$2],[
+ CF_VERBOSE(... found $3 headers in $cf_cv_header_path_$3)
+ cf_cv_find_linkage_$3=maybe
+ cf_test_CPPFLAGS="$CPPFLAGS"
+ break],[
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ ])
+ fi
+ done
+
+ if test "$cf_cv_find_linkage_$3" = maybe ; then
+
+ CF_MSG_LOG([Searching for $3 library in [FIND_LINKAGE]($3,$6)])
+
+ cf_save_LIBS="$LIBS"
+ cf_save_LDFLAGS="$LDFLAGS"
+
+ ifelse([$6],,,[
+ CPPFLAGS="$cf_test_CPPFLAGS"
+ LIBS="-l$3 $7 $cf_save_LIBS"
+ AC_TRY_LINK([$1],[$2],[
+ CF_VERBOSE(... found $3 library in system)
+ cf_cv_find_linkage_$3=yes])
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ ])
+
+ if test "$cf_cv_find_linkage_$3" != yes ; then
+ CF_LIBRARY_PATH(cf_search,$3)
+ for cf_cv_library_path_$3 in $cf_search
+ do
+ if test -d $cf_cv_library_path_$3 ; then
+ CF_VERBOSE(... testing $cf_cv_library_path_$3)
+ CPPFLAGS="$cf_test_CPPFLAGS"
+ LIBS="-l$3 $7 $cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3"
+ AC_TRY_LINK([$1],[$2],[
+ CF_VERBOSE(... found $3 library in $cf_cv_library_path_$3)
+ cf_cv_find_linkage_$3=yes
+ cf_cv_library_file_$3="-l$3"
+ break],[
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ ])
+ fi
+ done
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ fi
+
+ else
+ cf_cv_find_linkage_$3=no
+ fi
+ ],$7)
+])
+
+LIBS="$cf_save_LIBS"
+
+if test "$cf_cv_find_linkage_$3" = yes ; then
+ifelse([$4],,[
+ CF_ADD_INCDIR($cf_cv_header_path_$3)
+ CF_ADD_LIBDIR($cf_cv_library_path_$3)
+ CF_ADD_LIB($3)
+],[$4])
+else
+ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_FIXUP_ADAFLAGS version: 2 updated: 2015/04/17 21:13:04
+dnl -----------------
+dnl make ADAFLAGS consistent with CFLAGS
+AC_DEFUN([CF_FIXUP_ADAFLAGS],[
+ AC_MSG_CHECKING(optimization options for ADAFLAGS)
+ case "$CFLAGS" in
+ (*-g*)
+ CF_ADD_ADAFLAGS(-g)
+ ;;
+ esac
+ case "$CFLAGS" in
+ (*-O*)
+ cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[[ ]].*//'`
+ CF_ADD_ADAFLAGS($cf_O_flag)
+ ;;
+ esac
+ AC_MSG_RESULT($ADAFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00
+dnl -----------------
+dnl Test for availability of useful gcc __attribute__ directives to quiet
+dnl compiler warnings. Though useful, not all are supported -- and contrary
+dnl to documentation, unrecognized directives cause older compilers to barf.
+AC_DEFUN([CF_GCC_ATTRIBUTES],
+[
+if test "$GCC" = yes
+then
+cat > conftest.i <<EOF
+#ifndef GCC_PRINTF
+#define GCC_PRINTF 0
+#endif
+#ifndef GCC_SCANF
+#define GCC_SCANF 0
+#endif
+#ifndef GCC_NORETURN
+#define GCC_NORETURN /* nothing */
+#endif
+#ifndef GCC_UNUSED
+#define GCC_UNUSED /* nothing */
+#endif
+EOF
+if test "$GCC" = yes
+then
+ AC_CHECKING([for $CC __attribute__ directives])
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "${as_me:-configure}"
+#include "confdefs.h"
+#include "conftest.h"
+#include "conftest.i"
+#if GCC_PRINTF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#if GCC_SCANF
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+#else
+#define GCC_SCANFLIKE(fmt,var) /*nothing*/
+#endif
+extern void wow(char *,...) GCC_SCANFLIKE(1,2);
+extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern void foo(void) GCC_NORETURN;
+int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
+EOF
+ cf_printf_attribute=no
+ cf_scanf_attribute=no
+ for cf_attribute in scanf printf unused noreturn
+ do
+ CF_UPPER(cf_ATTRIBUTE,$cf_attribute)
+ cf_directive="__attribute__(($cf_attribute))"
+ echo "checking for $CC $cf_directive" 1>&AC_FD_CC
+
+ case $cf_attribute in
+ (printf)
+ cf_printf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ (scanf)
+ cf_scanf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ (*)
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE $cf_directive
+EOF
+ ;;
+ esac
+
+ if AC_TRY_EVAL(ac_compile); then
+ test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
+ cat conftest.h >>confdefs.h
+ case $cf_attribute in
+ (noreturn)
+ AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
+ ;;
+ (printf)
+ cf_value='/* nothing */'
+ if test "$cf_printf_attribute" != no ; then
+ cf_value='__attribute__((format(printf,fmt,var)))'
+ AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
+ fi
+ AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
+ ;;
+ (scanf)
+ cf_value='/* nothing */'
+ if test "$cf_scanf_attribute" != no ; then
+ cf_value='__attribute__((format(scanf,fmt,var)))'
+ AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
+ fi
+ AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
+ ;;
+ (unused)
+ AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
+ ;;
+ esac
+ fi
+ done
+else
+ fgrep define conftest.i >>confdefs.h
+fi
+rm -rf conftest*
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_VERSION version: 7 updated: 2012/10/18 06:46:33
+dnl --------------
+dnl Find version of gcc
+AC_DEFUN([CF_GCC_VERSION],[
+AC_REQUIRE([AC_PROG_CC])
+GCC_VERSION=none
+if test "$GCC" = yes ; then
+ AC_MSG_CHECKING(version of $CC)
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+ test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ AC_MSG_RESULT($GCC_VERSION)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_WARNINGS version: 32 updated: 2015/04/12 15:39:00
+dnl ---------------
+dnl Check if the compiler supports useful warning options. There's a few that
+dnl we don't use, simply because they're too noisy:
+dnl
+dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
+dnl -Wredundant-decls (system headers make this too noisy)
+dnl -Wtraditional (combines too many unrelated messages, only a few useful)
+dnl -Wwrite-strings (too noisy, but should review occasionally). This
+dnl is enabled for ncurses using "--enable-const".
+dnl -pedantic
+dnl
+dnl Parameter:
+dnl $1 is an optional list of gcc warning flags that a particular
+dnl application might want to use, e.g., "no-unused" for
+dnl -Wno-unused
+dnl Special:
+dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
+dnl
+AC_DEFUN([CF_GCC_WARNINGS],
+[
+AC_REQUIRE([CF_GCC_VERSION])
+CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
+CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
+
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "${as_me:-configure}"
+int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
+EOF
+
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
+# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #279: controlling expression is constant
+
+ AC_CHECKING([for $CC warning options])
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS="-Wall"
+ for cf_opt in \
+ wd1419 \
+ wd1683 \
+ wd1684 \
+ wd193 \
+ wd593 \
+ wd279 \
+ wd810 \
+ wd869 \
+ wd981
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if AC_TRY_EVAL(ac_compile); then
+ test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+
+elif test "$GCC" = yes
+then
+ AC_CHECKING([for $CC warning options])
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS=
+ cf_warn_CONST=""
+ test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+ cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
+ test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
+ for cf_opt in W Wall \
+ Wbad-function-cast \
+ Wcast-align \
+ Wcast-qual \
+ Wdeclaration-after-statement \
+ Wextra \
+ Winline \
+ Wmissing-declarations \
+ Wmissing-prototypes \
+ Wnested-externs \
+ Wpointer-arith \
+ Wshadow \
+ Wstrict-prototypes \
+ Wundef $cf_gcc_warnings $cf_warn_CONST $1
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if AC_TRY_EVAL(ac_compile); then
+ test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
+ case $cf_opt in
+ (Wcast-qual)
+ CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+ ;;
+ (Winline)
+ case $GCC_VERSION in
+ ([[34]].*)
+ CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
+ continue;;
+ esac
+ ;;
+ (Wpointer-arith)
+ case $GCC_VERSION in
+ ([[12]].*)
+ CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
+ continue;;
+ esac
+ ;;
+ esac
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+fi
+rm -rf conftest*
+
+AC_SUBST(EXTRA_CFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNATPREP_OPT_T version: 1 updated: 2014/08/02 18:37:25
+dnl -----------------
+AC_DEFUN([CF_GNATPREP_OPT_T],[
+AC_CACHE_CHECK(if GNATPREP supports -T option,cf_cv_gnatprep_opt_t,[
+cf_cv_gnatprep_opt_t=no
+gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
+])
+test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
+AC_SUBST(GNATPREP_OPTS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_GENERICS version: 3 updated: 2015/04/17 21:13:04
+dnl ----------------
+AC_DEFUN([CF_GNAT_GENERICS],
+[
+AC_REQUIRE([CF_GNAT_VERSION])
+
+AC_MSG_CHECKING(if GNAT supports generics)
+case $cf_gnat_version in
+(3.[[1-9]]*|[[4-9]].*)
+ cf_gnat_generics=yes
+ ;;
+(*)
+ cf_gnat_generics=no
+ ;;
+esac
+AC_MSG_RESULT($cf_gnat_generics)
+
+if test "$cf_gnat_generics" = yes
+then
+ cf_compile_generics=generics
+ cf_generic_objects="\${GENOBJS}"
+else
+ cf_compile_generics=
+ cf_generic_objects=
+fi
+
+AC_SUBST(cf_compile_generics)
+AC_SUBST(cf_generic_objects)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_PROJECTS version: 8 updated: 2015/04/17 21:13:04
+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])
+AC_REQUIRE([CF_DISABLE_GNAT_PROJECTS])
+
+cf_gnat_libraries=no
+cf_gnat_projects=no
+
+if test "$enable_gnat_projects" != no ; then
+AC_MSG_CHECKING(if GNAT supports project files)
+case $cf_gnat_version in
+(3.[[0-9]]*)
+ ;;
+(*)
+ case $cf_cv_system_name in
+ (cygwin*|msys*)
+ ;;
+ (*)
+ mkdir conftest.src conftest.bin conftest.lib
+ cd conftest.src
+ rm -rf conftest* *~conftest*
+ cat >>library.gpr <<CF_EOF
+project Library is
+ Kind := External ("LIB_KIND");
+ for Library_Name use "ConfTest";
+ for Object_Dir use ".";
+ for Library_ALI_Dir use External("LIBRARY_DIR");
+ for Library_Version use External ("SONAME");
+ for Library_Kind use Kind;
+ for Library_Dir use External("BUILD_DIR");
+ Source_Dir := External ("SOURCE_DIR");
+ for Source_Dirs use (Source_Dir);
+end Library;
+CF_EOF
+ cat >>confpackage.ads <<CF_EOF
+package ConfPackage is
+ procedure conftest;
+end ConfPackage;
+CF_EOF
+ cat >>confpackage.adb <<CF_EOF
+with Text_IO;
+package body ConfPackage is
+ procedure conftest is
+ begin
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ end conftest;
+end ConfPackage;
+CF_EOF
+ if ( $cf_ada_make $ADAFLAGS \
+ -Plibrary.gpr \
+ -XBUILD_DIR=`cd ../conftest.bin;pwd` \
+ -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
+ -XSOURCE_DIR=`pwd` \
+ -XSONAME=libConfTest.so.1 \
+ -XLIB_KIND=static 1>&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)
+fi # enable_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="#"
+ USE_GNAT_PROJECTS=""
+else
+ USE_OLD_MAKERULES=""
+ 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
+dnl ----------------
+dnl Verify that a test program compiles/links with GNAT.
+dnl $cf_ada_make is set to the program that compiles/links
+dnl $ADAFLAGS may be set to the GNAT flags.
+dnl
+dnl $1 is the text of the spec
+dnl $2 is the text of the body
+dnl $3 is the shell command to execute if successful
+dnl $4 is the shell command to execute if not successful
+AC_DEFUN([CF_GNAT_TRY_LINK],
+[
+rm -rf conftest* *~conftest*
+cat >>conftest.ads <<CF_EOF
+$1
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+$2
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&AC_FD_CC 2>&1 ) ; then
+ifelse($3,, :,[ $3])
+ifelse($4,,,[else
+ $4])
+fi
+rm -rf conftest* *~conftest*
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_TRY_RUN version: 5 updated: 2011/03/19 14:47:45
+dnl ---------------
+dnl Verify that a test program compiles and runs with GNAT
+dnl $cf_ada_make is set to the program that compiles/links
+dnl $ADAFLAGS may be set to the GNAT flags.
+dnl
+dnl $1 is the text of the spec
+dnl $2 is the text of the body
+dnl $3 is the shell command to execute if successful
+dnl $4 is the shell command to execute if not successful
+AC_DEFUN([CF_GNAT_TRY_RUN],
+[
+rm -rf conftest* *~conftest*
+cat >>conftest.ads <<CF_EOF
+$1
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+$2
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&AC_FD_CC 2>&1 ) ; then
+ if ( ./conftest 1>&AC_FD_CC 2>&1 ) ; then
+ifelse($3,, :,[ $3])
+ifelse($4,,,[ else
+ $4])
+ fi
+ifelse($4,,,[else
+ $4])
+fi
+rm -rf conftest* *~conftest*
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_VERSION version: 20 updated: 2015/04/18 08:56:57
+dnl ---------------
+dnl Verify version of GNAT.
+AC_DEFUN([CF_GNAT_VERSION],
+[
+AC_MSG_CHECKING(for gnat version)
+cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
+ grep '[[0-9]].[[0-9]][[0-9]]*' |\
+ sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'`
+AC_MSG_RESULT($cf_gnat_version)
+
+case $cf_gnat_version in
+(3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*|20[[0-9]][[0-9]])
+ cf_cv_prog_gnat_correct=yes
+ ;;
+(*)
+ AC_MSG_WARN(Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding.)
+ cf_cv_prog_gnat_correct=no
+ ;;
+esac
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
+dnl -------------
+dnl Check if we must define _GNU_SOURCE to get a reasonable value for
+dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
+dnl (or misfeature) of glibc2, which breaks portability of many applications,
+dnl since it is interwoven with GNU extensions.
+dnl
+dnl Well, yes we could work around it...
+AC_DEFUN([CF_GNU_SOURCE],
+[
+AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
+AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_gnu_source=no],
+ [cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_gnu_source=no],
+ [cf_cv_gnu_source=yes])
+ CPPFLAGS="$cf_save"
+ ])
+])
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_HEADER_PATH version: 13 updated: 2015/04/15 19:08:48
+dnl --------------
+dnl Construct a search-list of directories for a nonstandard header-file
+dnl
+dnl Parameters
+dnl $1 = the variable to return as result
+dnl $2 = the package name
+AC_DEFUN([CF_HEADER_PATH],
+[
+$1=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in
+ (-I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+ CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE)
+ cf_header_path_list="$cf_header_path_list [$]$1"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+CF_SUBDIR_PATH($1,$2,include)
+
+test "$includedir" != NONE && \
+test "$includedir" != "/usr/include" && \
+test -d "$includedir" && {
+ test -d $includedir && $1="[$]$1 $includedir"
+ test -d $includedir/$2 && $1="[$]$1 $includedir/$2"
+}
+
+test "$oldincludedir" != NONE && \
+test "$oldincludedir" != "/usr/include" && \
+test -d "$oldincludedir" && {
+ test -d $oldincludedir && $1="[$]$1 $oldincludedir"
+ test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2"
+}
+
+$1="[$]$1 $cf_header_path_list"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
+dnl ---------------
+dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
+AC_DEFUN([CF_HELP_MESSAGE],
+[AC_DIVERT_HELP([$1])dnl
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_INCLUDE_DIRS version: 10 updated: 2014/09/19 20:58:42
+dnl ---------------
+dnl Construct the list of include-options according to whether we're building
+dnl in the source directory or using '--srcdir=DIR' option.
+AC_DEFUN([CF_INCLUDE_DIRS],
+[
+if test "$srcdir" != "."; then
+ CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
+fi
+CPPFLAGS="-I../include $CPPFLAGS"
+if test "$srcdir" != "."; then
+ CPPFLAGS="-I\${srcdir} $CPPFLAGS"
+fi
+CPPFLAGS="-I. $CPPFLAGS"
+AC_SUBST(CPPFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_INTEL_COMPILER version: 7 updated: 2015/04/12 15:39:00
+dnl -----------------
+dnl Check if the given compiler is really the Intel compiler for Linux. It
+dnl tries to imitate gcc, but does not return an error when it finds a mismatch
+dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK.
+dnl
+dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
+dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
+dnl the wrappers for gcc and g++ warnings.
+dnl
+dnl $1 = GCC (default) or GXX
+dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
+dnl $3 = CFLAGS (default) or CXXFLAGS
+AC_DEFUN([CF_INTEL_COMPILER],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+ifelse([$2],,INTEL_COMPILER,[$2])=no
+
+if test "$ifelse([$1],,[$1],GCC)" = yes ; then
+ case $host_os in
+ (linux*|gnu*)
+ AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
+ cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
+ ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
+ AC_TRY_COMPILE([],[
+#ifdef __INTEL_COMPILER
+#else
+make an error
+#endif
+],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -we147"
+],[])
+ ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
+ AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2]))
+ ;;
+ esac
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LARGEFILE version: 9 updated: 2015/04/18 08:56:57
+dnl ------------
+dnl Add checks for large file support.
+AC_DEFUN([CF_LARGEFILE],[
+ifdef([AC_FUNC_FSEEKO],[
+ AC_SYS_LARGEFILE
+ if test "$enable_largefile" != no ; then
+ AC_FUNC_FSEEKO
+
+ # Normally we would collect these definitions in the config.h,
+ # but (like _XOPEN_SOURCE), some environments rely on having these
+ # defined before any of the system headers are included. Another
+ # case comes up with C++, e.g., on AIX the compiler compiles the
+ # header files by themselves before looking at the body files it is
+ # told to compile. For ncurses, those header files do not include
+ # the config.h
+ test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
+ test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
+ test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
+
+ AC_CACHE_CHECK(whether to use struct dirent64, cf_cv_struct_dirent64,[
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <dirent.h>
+ ],[
+ /* if transitional largefile support is setup, this is true */
+ extern struct dirent64 * readdir(DIR *);
+ struct dirent64 *x = readdir((DIR *)0);
+ struct dirent *y = readdir((DIR *)0);
+ int z = x - y;
+ ],
+ [cf_cv_struct_dirent64=yes],
+ [cf_cv_struct_dirent64=no])
+ ])
+ test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64,1,[Define to 1 if we have struct dirent64])
+ fi
+])
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_LD_RPATH_OPT version: 6 updated: 2015/04/12 15:39:00
+dnl ---------------
+dnl For the given system and compiler, find the compiler flags to pass to the
+dnl loader to use the "rpath" feature.
+AC_DEFUN([CF_LD_RPATH_OPT],
+[
+AC_REQUIRE([CF_CHECK_CACHE])
+
+LD_RPATH_OPT=
+AC_MSG_CHECKING(for an rpath option)
+case $cf_cv_system_name in
+(irix*)
+ if test "$GCC" = yes; then
+ LD_RPATH_OPT="-Wl,-rpath,"
+ else
+ LD_RPATH_OPT="-rpath "
+ fi
+ ;;
+(linux*|gnu*|k*bsd*-gnu)
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+(openbsd[[2-9]].*|mirbsd*)
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+(dragonfly*|freebsd*)
+ LD_RPATH_OPT="-rpath "
+ ;;
+(netbsd*)
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+(osf*|mls+*)
+ LD_RPATH_OPT="-rpath "
+ ;;
+(solaris2*)
+ LD_RPATH_OPT="-R"
+ ;;
+(*)
+ ;;
+esac
+AC_MSG_RESULT($LD_RPATH_OPT)
+
+case "x$LD_RPATH_OPT" in
+(x-R*)
+ AC_MSG_CHECKING(if we need a space after rpath option)
+ cf_save_LIBS="$LIBS"
+ CF_ADD_LIBS(${LD_RPATH_OPT}$libdir)
+ AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes)
+ LIBS="$cf_save_LIBS"
+ AC_MSG_RESULT($cf_rpath_space)
+ test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIBRARY_PATH version: 10 updated: 2015/04/15 19:08:48
+dnl ---------------
+dnl Construct a search-list of directories for a nonstandard library-file
+dnl
+dnl Parameters
+dnl $1 = the variable to return as result
+dnl $2 = the package name
+AC_DEFUN([CF_LIBRARY_PATH],
+[
+$1=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in
+ (-L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+ CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE)
+ cf_library_path_list="$cf_library_path_list [$]$1"
+ ;;
+ esac
+ done
+fi
+
+CF_SUBDIR_PATH($1,$2,lib)
+
+$1="$cf_library_path_list [$]$1"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIB_PREFIX version: 11 updated: 2015/04/18 08:56:57
+dnl -------------
+dnl Compute the library-prefix for the given host system
+dnl $1 = variable to set
+define([CF_LIB_PREFIX],
+[
+ case $cf_cv_system_name in
+ (OS/2*|os2*)
+ LIB_PREFIX=''
+ ;;
+ (*) LIB_PREFIX='lib'
+ ;;
+ esac
+ifelse($1,,,[$1=$LIB_PREFIX])
+ AC_SUBST(LIB_PREFIX)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIB_SUFFIX version: 25 updated: 2015/04/17 21:13:04
+dnl -------------
+dnl Compute the library file-suffix from the given model name
+dnl $1 = model name
+dnl $2 = variable to set (the nominal library suffix)
+dnl $3 = dependency variable to set (actual filename)
+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
+AC_DEFUN([CF_LIB_SUFFIX],
+[
+ case X$1 in
+ (Xlibtool)
+ $2='.la'
+ $3=[$]$2
+ ;;
+ (Xdebug)
+ $2='_g.a'
+ $3=[$]$2
+ ;;
+ (Xprofile)
+ $2='_p.a'
+ $3=[$]$2
+ ;;
+ (Xshared)
+ case $cf_cv_system_name in
+ (aix[[5-7]]*)
+ $2='.so'
+ $3=[$]$2
+ ;;
+ (cygwin*|msys*|mingw*)
+ $2='.dll'
+ $3='.dll.a'
+ ;;
+ (darwin*)
+ $2='.dylib'
+ $3=[$]$2
+ ;;
+ (hpux*)
+ case $target in
+ (ia64*)
+ $2='.so'
+ $3=[$]$2
+ ;;
+ (*)
+ $2='.sl'
+ $3=[$]$2
+ ;;
+ esac
+ ;;
+ (*)
+ $2='.so'
+ $3=[$]$2
+ ;;
+ esac
+ ;;
+ (*)
+ $2='.a'
+ $3=[$]$2
+ ;;
+ esac
+ if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
+ then
+ $2="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$2}"
+ $3="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$3}"
+ fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIB_TYPE version: 5 updated: 2015/04/17 21:13:04
+dnl -----------
+dnl Compute the string to append to -library from the given model name
+dnl $1 = model name
+dnl $2 = variable to set
+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
+AC_DEFUN([CF_LIB_TYPE],
+[
+ case $1 in
+ (libtool) $2='' ;;
+ (normal) $2='' ;;
+ (debug) $2='_g' ;;
+ (profile) $2='_p' ;;
+ (shared) $2='' ;;
+ esac
+ test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LINK_DATAONLY version: 10 updated: 2012/10/06 17:41:51
+dnl ----------------
+dnl Some systems have a non-ANSI linker that doesn't pull in modules that have
+dnl only data (i.e., no functions), for example NeXT. On those systems we'll
+dnl have to provide wrappers for global tables to ensure they're linked
+dnl properly.
+AC_DEFUN([CF_LINK_DATAONLY],
+[
+AC_MSG_CHECKING([if data-only library module links])
+AC_CACHE_VAL(cf_cv_link_dataonly,[
+ rm -f conftest.a
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int testdata[[3]] = { 123, 456, 789 };
+EOF
+ if AC_TRY_EVAL(ac_compile) ; then
+ mv conftest.o data.o && \
+ ( $AR $ARFLAGS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null
+ fi
+ rm -f conftest.$ac_ext data.o
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int testfunc()
+{
+#if defined(NeXT)
+ ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
+#else
+ extern int testdata[[3]];
+ return testdata[[0]] == 123
+ && testdata[[1]] == 456
+ && testdata[[2]] == 789;
+#endif
+}
+EOF
+ if AC_TRY_EVAL(ac_compile); then
+ mv conftest.o func.o && \
+ ( $AR $ARFLAGS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null
+ fi
+ rm -f conftest.$ac_ext func.o
+ ( eval $RANLIB conftest.a ) 2>&AC_FD_CC >/dev/null
+ cf_saveLIBS="$LIBS"
+ LIBS="conftest.a $LIBS"
+ AC_TRY_RUN([
+ int main()
+ {
+ extern int testfunc();
+ ${cf_cv_main_return:-return} (!testfunc());
+ }
+ ],
+ [cf_cv_link_dataonly=yes],
+ [cf_cv_link_dataonly=no],
+ [cf_cv_link_dataonly=unknown])
+ LIBS="$cf_saveLIBS"
+ ])
+AC_MSG_RESULT($cf_cv_link_dataonly)
+
+if test "$cf_cv_link_dataonly" = no ; then
+ AC_DEFINE(BROKEN_LINKER,1,[if data-only library module does not link])
+ BROKEN_LINKER=1
+fi
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MAKEFLAGS version: 17 updated: 2015/08/05 20:44:28
+dnl ------------
+dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
+dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
+dnl (GNU 'make' does both, something POSIX 'make', which happens to make the
+dnl ${MAKEFLAGS} variable incompatible because it adds the assignments :-)
+AC_DEFUN([CF_MAKEFLAGS],
+[
+AC_CACHE_CHECK(for makeflags variable, cf_cv_makeflags,[
+ cf_cv_makeflags=''
+ for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
+ do
+ cat >cf_makeflags.tmp <<CF_EOF
+SHELL = $SHELL
+all :
+ @ echo '.$cf_option'
+CF_EOF
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'`
+ case "$cf_result" in
+ (.*k|.*kw)
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
+ case "$cf_result" in
+ (.*CC=*) cf_cv_makeflags=
+ ;;
+ (*) cf_cv_makeflags=$cf_option
+ ;;
+ esac
+ break
+ ;;
+ (.-) ;;
+ (*) echo "given option \"$cf_option\", no match \"$cf_result\""
+ ;;
+ esac
+ done
+ rm -f cf_makeflags.tmp
+])
+
+AC_SUBST(cf_cv_makeflags)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32
+dnl ------------
+dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have
+dnl a monocase filesystem.
+AC_DEFUN([CF_MAKE_TAGS],[
+AC_REQUIRE([CF_MIXEDCASE_FILENAMES])
+
+AC_CHECK_PROGS(CTAGS, exctags ctags)
+AC_CHECK_PROGS(ETAGS, exetags etags)
+
+AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no)
+
+if test "$cf_cv_mixedcase" = yes ; then
+ AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no)
+else
+ MAKE_UPPER_TAGS=no
+fi
+
+if test "$MAKE_UPPER_TAGS" = yes ; then
+ MAKE_UPPER_TAGS=
+else
+ MAKE_UPPER_TAGS="#"
+fi
+
+if test "$MAKE_LOWER_TAGS" = yes ; then
+ MAKE_LOWER_TAGS=
+else
+ MAKE_LOWER_TAGS="#"
+fi
+
+AC_SUBST(CTAGS)
+AC_SUBST(ETAGS)
+
+AC_SUBST(MAKE_UPPER_TAGS)
+AC_SUBST(MAKE_LOWER_TAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MIXEDCASE_FILENAMES version: 7 updated: 2015/04/12 15:39:00
+dnl ----------------------
+dnl Check if the file-system supports mixed-case filenames. If we're able to
+dnl create a lowercase name and see it as uppercase, it doesn't support that.
+AC_DEFUN([CF_MIXEDCASE_FILENAMES],
+[
+AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
+if test "$cross_compiling" = yes ; then
+ case $target_alias in
+ (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
+ cf_cv_mixedcase=no
+ ;;
+ (*)
+ cf_cv_mixedcase=yes
+ ;;
+ esac
+else
+ rm -f conftest CONFTEST
+ echo test >conftest
+ if test -f CONFTEST ; then
+ cf_cv_mixedcase=no
+ else
+ cf_cv_mixedcase=yes
+ fi
+ rm -f conftest CONFTEST
+fi
+])
+test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MKSTEMP version: 9 updated: 2012/10/03 04:34:49
+dnl ----------
+dnl Check for a working mkstemp. This creates two files, checks that they are
+dnl successfully created and distinct (AmigaOS apparently fails on the last).
+AC_DEFUN([CF_MKSTEMP],[
+AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[
+rm -rf conftest*
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+int main()
+{
+ char *tmpl = "conftestXXXXXX";
+ char name[2][80];
+ int n;
+ int result = 0;
+ int fd;
+ struct stat sb;
+
+ umask(077);
+ for (n = 0; n < 2; ++n) {
+ strcpy(name[n], tmpl);
+ if ((fd = mkstemp(name[n])) >= 0) {
+ if (!strcmp(name[n], tmpl)
+ || stat(name[n], &sb) != 0
+ || (sb.st_mode & S_IFMT) != S_IFREG
+ || (sb.st_mode & 077) != 0) {
+ result = 1;
+ }
+ close(fd);
+ }
+ }
+ if (result == 0
+ && !strcmp(name[0], name[1]))
+ result = 1;
+ ${cf_cv_main_return:-return}(result);
+}
+],[cf_cv_func_mkstemp=yes
+],[cf_cv_func_mkstemp=no
+],[cf_cv_func_mkstemp=maybe])
+])
+if test "x$cf_cv_func_mkstemp" = xmaybe ; then
+ AC_CHECK_FUNC(mkstemp)
+fi
+if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
+ AC_DEFINE(HAVE_MKSTEMP,1,[Define to 1 if mkstemp() is available and working.])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32
+dnl ----------
+dnl Write a debug message to config.log, along with the line number in the
+dnl configure script.
+AC_DEFUN([CF_MSG_LOG],[
+echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_ADDON version: 5 updated: 2015/04/26 18:06:58
+dnl ----------------
+dnl Configure an ncurses add-on, built outside the ncurses tree.
+AC_DEFUN([CF_NCURSES_ADDON],[
+AC_REQUIRE([CF_NCURSES_CONFIG])
+
+AC_PROVIDE([CF_SUBST_NCURSES_VERSION])
+
+AC_MSG_CHECKING(if you want wide-character code)
+AC_ARG_ENABLE(widec,
+ [ --enable-widec compile with wide-char/UTF-8 code],
+ [with_widec=$enableval],
+ [with_widec=no])
+AC_MSG_RESULT($with_widec)
+if test "$with_widec" = yes ; then
+ CF_UTF8_LIB
+ CF_NCURSES_CONFIG(ncursesw)
+else
+ CF_NCURSES_CONFIG(ncurses)
+fi
+
+if test "$NCURSES_CONFIG_PKG" != none ; then
+ cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
+
+ NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
+ NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.//' -e 's/\..*//'`
+ NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.//'`
+
+ cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
+ if test -z "$cf_cv_abi_version"
+ then
+ cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
+ fi
+
+elif test "$NCURSES_CONFIG" != none ; then
+
+ cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
+
+ NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
+ NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.//' -e 's/\..*//'`
+ NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.//'`
+
+ # ABI version is not available from headers
+ cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
+
+else
+
+ for cf_name in MAJOR MINOR PATCH
+ do
+ cat >conftest.$ac_ext <<CF_EOF
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
+CF_EOF
+ cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
+ AC_TRY_EVAL(cf_try)
+ if test -f conftest.out ; then
+ cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[[ ]][[ ]]*//"`
+ eval NCURSES_$cf_name=\"$cf_result\"
+ # cat conftest.$ac_ext
+ # cat conftest.out
+ fi
+ done
+
+ cf_cv_abi_version=${NCURSES_MAJOR}
+
+fi
+
+cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
+
+dnl Show the computed version, for logging
+cf_cv_timestamp=`date`
+
+AC_MSG_RESULT(Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp))
+
+dnl We need these values in the generated headers
+AC_SUBST(NCURSES_MAJOR)
+AC_SUBST(NCURSES_MINOR)
+AC_SUBST(NCURSES_PATCH)
+
+dnl We need these values in the generated makefiles
+AC_SUBST(cf_cv_rel_version)
+AC_SUBST(cf_cv_abi_version)
+
+dnl FIXME - not needed for Ada95
+AC_SUBST(cf_cv_builtin_bool)
+AC_SUBST(cf_cv_header_stdbool_h)
+AC_SUBST(cf_cv_type_of_bool)dnl
+
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_CC_CHECK version: 4 updated: 2007/07/29 10:39:05
+dnl -------------------
+dnl Check if we can compile with ncurses' header file
+dnl $1 is the cache variable to set
+dnl $2 is the header-file to include
+dnl $3 is the root name (ncurses or ncursesw)
+AC_DEFUN([CF_NCURSES_CC_CHECK],[
+ AC_TRY_COMPILE([
+]ifelse($3,ncursesw,[
+#define _XOPEN_SOURCE_EXTENDED
+#undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
+#define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
+])[
+#include <$2>],[
+#ifdef NCURSES_VERSION
+]ifelse($3,ncursesw,[
+#ifndef WACS_BSSB
+ make an error
+#endif
+])[
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+ ]
+ ,[$1=$2]
+ ,[$1=no])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_CONFIG version: 17 updated: 2015/07/07 04:22:07
+dnl -----------------
+dnl Tie together the configure-script macros for ncurses, preferring these in
+dnl order:
+dnl a) ".pc" files for pkg-config, using $NCURSES_CONFIG_PKG
+dnl b) the "-config" script from ncurses, using $NCURSES_CONFIG
+dnl c) just plain libraries
+dnl
+dnl $1 is the root library name (default: "ncurses")
+AC_DEFUN([CF_NCURSES_CONFIG],[
+AC_REQUIRE([CF_PKG_CONFIG])
+cf_ncuconfig_root=ifelse($1,,ncurses,$1)
+cf_have_ncuconfig=no
+
+if test "x${PKG_CONFIG:=none}" != xnone; then
+ AC_MSG_CHECKING(pkg-config for $cf_ncuconfig_root)
+ if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
+ AC_MSG_RESULT(yes)
+
+ AC_MSG_CHECKING(if the $cf_ncuconfig_root package files work)
+ cf_have_ncuconfig=unknown
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_save_LIBS="$LIBS"
+
+ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
+ CF_ADD_LIBS(`$PKG_CONFIG --libs $cf_ncuconfig_root`)
+
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);],
+ [AC_TRY_RUN([#include <${cf_cv_ncurses_header:-curses.h}>
+ int main(void)
+ { char *xx = curses_version(); return (xx == 0); }],
+ [cf_have_ncuconfig=yes],
+ [cf_have_ncuconfig=no],
+ [cf_have_ncuconfig=maybe])],
+ [cf_have_ncuconfig=no])
+ AC_MSG_RESULT($cf_have_ncuconfig)
+ test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
+ if test "$cf_have_ncuconfig" != "yes"
+ then
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ NCURSES_CONFIG_PKG=none
+ else
+ AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+ NCURSES_CONFIG_PKG=$cf_ncuconfig_root
+ fi
+
+ else
+ AC_MSG_RESULT(no)
+ NCURSES_CONFIG_PKG=none
+ fi
+else
+ NCURSES_CONFIG_PKG=none
+fi
+
+if test "x$cf_have_ncuconfig" = "xno"; then
+ echo "Looking for ${cf_ncuconfig_root}-config"
+
+ CF_ACVERSION_CHECK(2.52,
+ [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)],
+ [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)])
+
+ if test "$NCURSES_CONFIG" != none ; then
+
+ CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
+ CF_ADD_LIBS(`$NCURSES_CONFIG --libs`)
+
+ # even with config script, some packages use no-override for curses.h
+ CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
+
+ dnl like CF_NCURSES_CPPFLAGS
+ AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+
+ dnl like CF_NCURSES_LIBS
+ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root)
+ AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
+
+ dnl like CF_NCURSES_VERSION
+ cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+
+ else
+
+ CF_NCURSES_CPPFLAGS(ifelse($1,,ncurses,$1))
+ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
+
+ fi
+else
+ NCURSES_CONFIG=none
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_CPPFLAGS version: 21 updated: 2012/10/06 08:57:51
+dnl -------------------
+dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting
+dnl the CPPFLAGS variable so we can include its header.
+dnl
+dnl The header files may be installed as either curses.h, or ncurses.h (would
+dnl be obsolete, except that some packagers prefer this name to distinguish it
+dnl from a "native" curses implementation). If not installed for overwrite,
+dnl the curses.h file would be in an ncurses subdirectory (e.g.,
+dnl /usr/include/ncurses), but someone may have installed overwriting the
+dnl vendor's curses. Only very old versions (pre-1.9.2d, the first autoconf'd
+dnl version) of ncurses don't define either __NCURSES_H or NCURSES_VERSION in
+dnl the header.
+dnl
+dnl If the installer has set $CFLAGS or $CPPFLAGS so that the ncurses header
+dnl is already in the include-path, don't even bother with this, since we cannot
+dnl easily determine which file it is. In this case, it has to be <curses.h>.
+dnl
+dnl The optional parameter gives the root name of the library, in case it is
+dnl not installed as the default curses library. That is how the
+dnl wide-character version of ncurses is installed.
+AC_DEFUN([CF_NCURSES_CPPFLAGS],
+[AC_REQUIRE([CF_WITH_CURSES_DIR])
+
+AC_PROVIDE([CF_CURSES_CPPFLAGS])dnl
+cf_ncuhdr_root=ifelse($1,,ncurses,$1)
+
+test -n "$cf_cv_curses_dir" && \
+test "$cf_cv_curses_dir" != "no" && { \
+ CF_ADD_INCDIR($cf_cv_curses_dir/include/$cf_ncuhdr_root)
+}
+
+AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[
+ cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
+ ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
+ for cf_header in $cf_header_list
+ do
+ CF_NCURSES_CC_CHECK(cf_cv_ncurses_h,$cf_header,$1)
+ test "$cf_cv_ncurses_h" != no && break
+ done
+])
+
+CF_NCURSES_HEADER
+CF_TERM_HEADER
+
+# some applications need this, but should check for NCURSES_VERSION
+AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+
+CF_NCURSES_VERSION
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_HEADER version: 4 updated: 2015/04/15 19:08:48
+dnl -----------------
+dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
+dnl variations of ncurses' installs.
+dnl
+dnl See also CF_CURSES_HEADER, which sets the same cache variable.
+AC_DEFUN([CF_NCURSES_HEADER],[
+
+if test "$cf_cv_ncurses_h" != no ; then
+ cf_cv_ncurses_header=$cf_cv_ncurses_h
+else
+
+AC_CACHE_CHECK(for $cf_ncuhdr_root include-path, cf_cv_ncurses_h2,[
+ test -n "$verbose" && echo
+ CF_HEADER_PATH(cf_search,$cf_ncuhdr_root)
+ test -n "$verbose" && echo search path $cf_search
+ cf_save2_CPPFLAGS="$CPPFLAGS"
+ for cf_incdir in $cf_search
+ do
+ CF_ADD_INCDIR($cf_incdir)
+ for cf_header in \
+ ncurses.h \
+ curses.h
+ do
+ CF_NCURSES_CC_CHECK(cf_cv_ncurses_h2,$cf_header,$1)
+ if test "$cf_cv_ncurses_h2" != no ; then
+ cf_cv_ncurses_h2=$cf_incdir/$cf_header
+ test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&AC_FD_MSG
+ break
+ fi
+ test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&AC_FD_MSG
+ done
+ CPPFLAGS="$cf_save2_CPPFLAGS"
+ test "$cf_cv_ncurses_h2" != no && break
+ done
+ test "$cf_cv_ncurses_h2" = no && AC_MSG_ERROR(not found)
+ ])
+
+ CF_DIRNAME(cf_1st_incdir,$cf_cv_ncurses_h2)
+ cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
+ if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
+ cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
+ fi
+ CF_ADD_INCDIR($cf_1st_incdir)
+
+fi
+
+# Set definitions to allow ifdef'ing for ncurses.h
+
+case $cf_cv_ncurses_header in
+(*ncurses.h)
+ AC_DEFINE(HAVE_NCURSES_H,1,[Define to 1 if we have ncurses.h])
+ ;;
+esac
+
+case $cf_cv_ncurses_header in
+(ncurses/curses.h|ncurses/ncurses.h)
+ AC_DEFINE(HAVE_NCURSES_NCURSES_H,1,[Define to 1 if we have ncurses/ncurses.h])
+ ;;
+(ncursesw/curses.h|ncursesw/ncurses.h)
+ AC_DEFINE(HAVE_NCURSESW_NCURSES_H,1,[Define to 1 if we have ncursesw/ncurses.h])
+ ;;
+esac
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_LIBS version: 17 updated: 2015/04/15 19:08:48
+dnl ---------------
+dnl Look for the ncurses library. This is a little complicated on Linux,
+dnl because it may be linked with the gpm (general purpose mouse) library.
+dnl Some distributions have gpm linked with (bsd) curses, which makes it
+dnl unusable with ncurses. However, we don't want to link with gpm unless
+dnl ncurses has a dependency, since gpm is normally set up as a shared library,
+dnl and the linker will record a dependency.
+dnl
+dnl The optional parameter gives the root name of the library, in case it is
+dnl not installed as the default curses library. That is how the
+dnl wide-character version of ncurses is installed.
+AC_DEFUN([CF_NCURSES_LIBS],
+[AC_REQUIRE([CF_NCURSES_CPPFLAGS])
+
+cf_nculib_root=ifelse($1,,ncurses,$1)
+ # This works, except for the special case where we find gpm, but
+ # ncurses is in a nonstandard location via $LIBS, and we really want
+ # to link gpm.
+cf_ncurses_LIBS=""
+cf_ncurses_SAVE="$LIBS"
+AC_CHECK_LIB(gpm,Gpm_Open,
+ [AC_CHECK_LIB(gpm,initscr,
+ [LIBS="$cf_ncurses_SAVE"],
+ [cf_ncurses_LIBS="-lgpm"])])
+
+case $host_os in
+(freebsd*)
+ # This is only necessary if you are linking against an obsolete
+ # version of ncurses (but it should do no harm, since it's static).
+ if test "$cf_nculib_root" = ncurses ; then
+ AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"])
+ fi
+ ;;
+esac
+
+CF_ADD_LIBS($cf_ncurses_LIBS)
+
+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+then
+ CF_ADD_LIBS(-l$cf_nculib_root)
+else
+ CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root,
+ [#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr()],
+ initscr)
+fi
+
+if test -n "$cf_ncurses_LIBS" ; then
+ AC_MSG_CHECKING(if we can link $cf_nculib_root without $cf_ncurses_LIBS)
+ cf_ncurses_SAVE="$LIBS"
+ for p in $cf_ncurses_LIBS ; do
+ q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
+ if test "$q" != "$LIBS" ; then
+ LIBS="$q"
+ fi
+ done
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ LIBS="$cf_ncurses_SAVE"])
+fi
+
+CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
+AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_VERSION version: 14 updated: 2012/10/06 08:57:51
+dnl ------------------
+dnl Check for the version of ncurses, to aid in reporting bugs, etc.
+dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use
+dnl AC_REQUIRE since that does not work with the shell's if/then/else/fi.
+AC_DEFUN([CF_NCURSES_VERSION],
+[
+AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
+AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[
+ cf_cv_ncurses_version=no
+ cf_tempfile=out$$
+ rm -f $cf_tempfile
+ AC_TRY_RUN([
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <stdio.h>
+int main()
+{
+ FILE *fp = fopen("$cf_tempfile", "w");
+#ifdef NCURSES_VERSION
+# ifdef NCURSES_VERSION_PATCH
+ fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
+# else
+ fprintf(fp, "%s\n", NCURSES_VERSION);
+# endif
+#else
+# ifdef __NCURSES_H
+ fprintf(fp, "old\n");
+# else
+ make an error
+# endif
+#endif
+ ${cf_cv_main_return:-return}(0);
+}],[
+ cf_cv_ncurses_version=`cat $cf_tempfile`],,[
+
+ # This will not work if the preprocessor splits the line after the
+ # Autoconf token. The 'unproto' program does that.
+ cat > conftest.$ac_ext <<EOF
+#include <${cf_cv_ncurses_header:-curses.h}>
+#undef Autoconf
+#ifdef NCURSES_VERSION
+Autoconf NCURSES_VERSION
+#else
+#ifdef __NCURSES_H
+Autoconf "old"
+#endif
+;
+#endif
+EOF
+ cf_try="$ac_cpp conftest.$ac_ext 2>&AC_FD_CC | grep '^Autoconf ' >conftest.out"
+ AC_TRY_EVAL(cf_try)
+ if test -f conftest.out ; then
+ cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[[^"]]*"%%' -e 's%".*%%'`
+ test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
+ rm -f conftest.out
+ fi
+])
+ rm -f $cf_tempfile
+])
+test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_OBJ_SUBDIR version: 7 updated: 2015/04/17 21:13:04
+dnl -------------
+dnl Compute the object-directory name from the given model name
+AC_DEFUN([CF_OBJ_SUBDIR],
+[
+ case $1 in
+ (libtool) $2='obj_lo' ;;
+ (normal) $2='objects' ;;
+ (debug) $2='obj_g' ;;
+ (profile) $2='obj_p' ;;
+ (shared)
+ case $cf_cv_system_name in
+ (cygwin|msys)
+ $2='objects' ;;
+ (*)
+ $2='obj_s' ;;
+ esac
+ esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PATHSEP version: 7 updated: 2015/04/12 15:39:00
+dnl ----------
+dnl Provide a value for the $PATH and similar separator (or amend the value
+dnl as provided in autoconf 2.5x).
+AC_DEFUN([CF_PATHSEP],
+[
+ AC_MSG_CHECKING(for PATH separator)
+ case $cf_cv_system_name in
+ (os2*) PATH_SEPARATOR=';' ;;
+ (*) ${PATH_SEPARATOR:=':'} ;;
+ esac
+ifelse([$1],,,[$1=$PATH_SEPARATOR])
+ AC_SUBST(PATH_SEPARATOR)
+ AC_MSG_RESULT($PATH_SEPARATOR)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PATH_SYNTAX version: 16 updated: 2015/04/18 08:56:57
+dnl --------------
+dnl Check the argument to see that it looks like a pathname. Rewrite it if it
+dnl begins with one of the prefix/exec_prefix variables, and then again if the
+dnl result begins with 'NONE'. This is necessary to work around autoconf's
+dnl delayed evaluation of those symbols.
+AC_DEFUN([CF_PATH_SYNTAX],[
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".[$]$1" in
+(.\[$]\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX
+ ;;
+(.\[$]{*prefix}*|.\[$]{*dir}*)
+ eval $1="[$]$1"
+ case ".[$]$1" in
+ (.NONE/*)
+ $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PKG_CONFIG version: 10 updated: 2015/04/26 18:06:58
+dnl -------------
+dnl Check for the package-config program, unless disabled by command-line.
+AC_DEFUN([CF_PKG_CONFIG],
+[
+AC_MSG_CHECKING(if you want to use pkg-config)
+AC_ARG_WITH(pkg-config,
+ [ --with-pkg-config{=path} enable/disable use of pkg-config],
+ [cf_pkg_config=$withval],
+ [cf_pkg_config=yes])
+AC_MSG_RESULT($cf_pkg_config)
+
+case $cf_pkg_config in
+(no)
+ PKG_CONFIG=none
+ ;;
+(yes)
+ CF_ACVERSION_CHECK(2.52,
+ [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
+ [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
+ ;;
+(*)
+ PKG_CONFIG=$withval
+ ;;
+esac
+
+test -z "$PKG_CONFIG" && PKG_CONFIG=none
+if test "$PKG_CONFIG" != none ; then
+ CF_PATH_SYNTAX(PKG_CONFIG)
+elif test "x$cf_pkg_config" != xno ; then
+ AC_MSG_WARN(pkg-config is not installed)
+fi
+
+AC_SUBST(PKG_CONFIG)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_POSIX_C_SOURCE version: 9 updated: 2015/04/12 15:39:00
+dnl -----------------
+dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
+dnl
+dnl POSIX.1-1990 _POSIX_SOURCE
+dnl POSIX.1-1990 and _POSIX_SOURCE and
+dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2
+dnl Bindings Option
+dnl POSIX.1b-1993 _POSIX_C_SOURCE=199309L
+dnl POSIX.1c-1996 _POSIX_C_SOURCE=199506L
+dnl X/Open 2000 _POSIX_C_SOURCE=200112L
+dnl
+dnl Parameters:
+dnl $1 is the nominal value for _POSIX_C_SOURCE
+AC_DEFUN([CF_POSIX_C_SOURCE],
+[
+cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1])
+
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+
+CF_REMOVE_DEFINE(cf_trim_CFLAGS,$cf_save_CFLAGS,_POSIX_C_SOURCE)
+CF_REMOVE_DEFINE(cf_trim_CPPFLAGS,$cf_save_CPPFLAGS,_POSIX_C_SOURCE)
+
+AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
+ CF_MSG_LOG(if the symbol is already defined go no further)
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],
+ [cf_cv_posix_c_source=no],
+ [cf_want_posix_source=no
+ case .$cf_POSIX_C_SOURCE in
+ (.[[12]]??*)
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ ;;
+ (.2)
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ cf_want_posix_source=yes
+ ;;
+ (.*)
+ cf_want_posix_source=yes
+ ;;
+ esac
+ if test "$cf_want_posix_source" = yes ; then
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _POSIX_SOURCE
+make an error
+#endif],[],
+ cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
+ fi
+ CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE)
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+ CF_MSG_LOG(if the second compile does not leave our definition intact error)
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],,
+ [cf_cv_posix_c_source=no])
+ CFLAGS="$cf_save_CFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ ])
+])
+
+if test "$cf_cv_posix_c_source" != no ; then
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
+ CF_ADD_CFLAGS($cf_cv_posix_c_source)
+fi
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_AR version: 1 updated: 2009/01/01 20:15:22
+dnl ----------
+dnl Check for archiver "ar".
+AC_DEFUN([CF_PROG_AR],[
+AC_CHECK_TOOL(AR, ar, ar)
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_AWK version: 1 updated: 2006/09/16 11:40:59
+dnl -----------
+dnl Check for awk, ensure that the check found something.
+AC_DEFUN([CF_PROG_AWK],
+[
+AC_PROG_AWK
+test -z "$AWK" && AC_MSG_ERROR(No awk program found)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_CC version: 4 updated: 2014/07/12 18:57:58
+dnl ----------
+dnl standard check for CC, plus followup sanity checks
+dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name
+AC_DEFUN([CF_PROG_CC],[
+ifelse($1,,[AC_PROG_CC],[AC_PROG_CC($1)])
+CF_GCC_VERSION
+CF_ACVERSION_CHECK(2.52,
+ [AC_PROG_CC_STDC],
+ [CF_ANSI_CC_REQD])
+CF_CC_ENV_FLAGS
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37
+dnl --------------
+dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that
+dnl the output file can be renamed, and allows for a shell variable that can
+dnl be used later. The parameter is either CC or CXX. The result is the
+dnl cache variable:
+dnl $cf_cv_prog_CC_c_o
+dnl $cf_cv_prog_CXX_c_o
+AC_DEFUN([CF_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_MSG_CHECKING([whether [$]$1 understands -c and -o together])
+AC_CACHE_VAL(cf_cv_prog_$1_c_o,
+[
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+ ${cf_cv_main_return:-return}(0);
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='[$]$1 -c conftest.$ac_ext -o conftest2.$ac_objext >&AC_FD_CC'
+if AC_TRY_EVAL(ac_try) &&
+ test -f conftest2.$ac_objext && AC_TRY_EVAL(ac_try);
+then
+ eval cf_cv_prog_$1_c_o=yes
+else
+ eval cf_cv_prog_$1_c_o=no
+fi
+rm -rf conftest*
+])dnl
+if test $cf_cv_prog_$1_c_o = yes; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_EGREP version: 2 updated: 2015/04/18 08:56:57
+dnl -------------
+dnl AC_PROG_EGREP was introduced in autoconf 2.53.
+dnl This macro adds a check to ensure the script found something.
+AC_DEFUN([CF_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+ [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+ test -z "$EGREP" && AC_MSG_ERROR(No egrep program found)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_EXT version: 13 updated: 2015/04/18 09:03:58
+dnl -----------
+dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
+AC_DEFUN([CF_PROG_EXT],
+[
+AC_REQUIRE([CF_CHECK_CACHE])
+case $cf_cv_system_name in
+(os2*)
+ CFLAGS="$CFLAGS -Zmt"
+ CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+ CXXFLAGS="$CXXFLAGS -Zmt"
+ # autoconf's macro sets -Zexe and suffix both, which conflict:w
+ LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+ ac_cv_exeext=.exe
+ ;;
+esac
+
+AC_EXEEXT
+AC_OBJEXT
+
+PROG_EXT="$EXEEXT"
+AC_SUBST(PROG_EXT)
+test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT",[Define to the program extension (normally blank)])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_GNAT version: 3 updated: 2015/04/18 08:56:57
+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=
+ cf_cv_prog_gnat_correct=no
+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_LN_S version: 2 updated: 2010/08/14 18:25:37
+dnl ------------
+dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f"
+dnl option if it is supported.
+AC_DEFUN([CF_PROG_LN_S],[
+AC_PROG_LN_S
+AC_MSG_CHECKING(if $LN_S -f options work)
+
+rm -f conf$$.src conf$$dst
+echo >conf$$.dst
+echo first >conf$$.src
+if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
+ cf_prog_ln_sf=yes
+else
+ cf_prog_ln_sf=no
+fi
+rm -f conf$$.dst conf$$src
+AC_MSG_RESULT($cf_prog_ln_sf)
+
+test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
+dnl ----------------
+dnl Remove all -U and -D options that refer to the given symbol from a list
+dnl of C compiler options. This works around the problem that not all
+dnl compilers process -U and -D options from left-to-right, so a -U option
+dnl cannot be used to cancel the effect of a preceding -D option.
+dnl
+dnl $1 = target (which could be the same as the source variable)
+dnl $2 = source (including '$')
+dnl $3 = symbol to remove
+define([CF_REMOVE_DEFINE],
+[
+$1=`echo "$2" | \
+ sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \
+ -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_REMOVE_LIB version: 1 updated: 2007/02/17 14:11:52
+dnl -------------
+dnl Remove the given library from the symbol
+dnl
+dnl $1 = target (which could be the same as the source variable)
+dnl $2 = source (including '$')
+dnl $3 = library to remove
+define([CF_REMOVE_LIB],
+[
+# remove $3 library from $2
+$1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'`
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SHARED_OPTS version: 88 updated: 2015/08/05 20:44:28
+dnl --------------
+dnl --------------
+dnl Attempt to determine the appropriate CC/LD options for creating a shared
+dnl library.
+dnl
+dnl Notes:
+dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within
+dnl the build-tree, i.e., by making use of the libraries that are compiled in
+dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the
+dnl shared library since that can lead to unexpected results at runtime.
+dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared
+dnl libraries are compiled in ../../lib
+dnl
+dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure
+dnl to install symbolic links to the rel/abi versions of shared libraries.
+dnl
+dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi
+dnl version when making symbolic links.
+dnl
+dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library
+dnl version numbers are infix (ex: libncurses.<ver>.dylib) or postfix
+dnl (ex: libncurses.so.<ver>).
+dnl
+dnl Some loaders leave 'so_locations' lying around. It's nice to clean up.
+AC_DEFUN([CF_SHARED_OPTS],
+[
+ AC_REQUIRE([CF_LD_RPATH_OPT])
+ RM_SHARED_OPTS=
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ LD_SHARED_OPTS=
+ INSTALL_LIB="-m 644"
+ : ${rel_builddir:=.}
+
+ shlibdir=$libdir
+ AC_SUBST(shlibdir)
+
+ MAKE_DLLS="#"
+ AC_SUBST(MAKE_DLLS)
+
+ cf_cv_do_symlinks=no
+ cf_ld_rpath_opt=
+ test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
+
+ AC_MSG_CHECKING(if release/abi version should be used for shared libs)
+ AC_ARG_WITH(shlib-version,
+ [ --with-shlib-version=X Specify rel or abi version for shared libs],
+ [test -z "$withval" && withval=auto
+ case $withval in
+ (yes)
+ cf_cv_shlib_version=auto
+ ;;
+ (rel|abi|auto|no)
+ cf_cv_shlib_version=$withval
+ ;;
+ (*)
+ AC_MSG_ERROR([option value must be one of: rel, abi, auto or no])
+ ;;
+ esac
+ ],[cf_cv_shlib_version=auto])
+ AC_MSG_RESULT($cf_cv_shlib_version)
+
+ cf_cv_rm_so_locs=no
+ cf_try_cflags=
+
+ # Some less-capable ports of gcc support only -fpic
+ CC_SHARED_OPTS=
+ if test "$GCC" = yes
+ then
+ AC_MSG_CHECKING(which $CC option to use)
+ cf_save_CFLAGS="$CFLAGS"
+ for CC_SHARED_OPTS in -fPIC -fpic ''
+ do
+ CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
+ AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[])
+ done
+ AC_MSG_RESULT($CC_SHARED_OPTS)
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+ cf_cv_shlib_version_infix=no
+
+ case $cf_cv_system_name in
+ (aix4.[3-9]*|aix[[5-7]]*)
+ if test "$GCC" = yes; then
+ CC_SHARED_OPTS='-Wl,-brtl'
+ MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ else
+ CC_SHARED_OPTS='-brtl'
+ # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
+ MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ fi
+ ;;
+ (beos*)
+ MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
+ ;;
+ (cygwin*)
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=cygdll
+ cf_cv_shlib_version_infix=cygdll
+ shlibdir=$bindir
+ MAKE_DLLS=
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!$SHELL
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ (msys*)
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=msysdll
+ cf_cv_shlib_version_infix=msysdll
+ shlibdir=$bindir
+ MAKE_DLLS=
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!$SHELL
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ (darwin*)
+ cf_try_cflags="no-cpp-precomp"
+ CC_SHARED_OPTS="-dynamic"
+ MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
+ cf_cv_shlib_version_infix=yes
+ AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [
+ cf_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ AC_TRY_LINK(, [int i;], cf_cv_ldflags_search_paths_first=yes, cf_cv_ldflags_search_paths_first=no)
+ LDFLAGS=$cf_save_LDFLAGS])
+ if test $cf_cv_ldflags_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
+ ;;
+ (hpux[[7-8]]*)
+ # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='+Z'
+ fi
+ MK_SHARED_LIB='${LD} -b -o $[@]'
+ INSTALL_LIB="-m 555"
+ ;;
+ (hpux*)
+ # (tested with gcc 2.7.2 -- I don't have c89)
+ if test "$GCC" = yes; then
+ LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
+ else
+ CC_SHARED_OPTS='+Z'
+ LD_SHARED_OPTS='-Wl,+b,${libdir}'
+ fi
+ MK_SHARED_LIB='${LD} +b ${libdir} -b -o $[@]'
+ # HP-UX shared libraries must be executable, and should be
+ # readonly to exploit a quirk in the memory manager.
+ INSTALL_LIB="-m 555"
+ ;;
+ (interix*)
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_shared_soname='`basename $@`'
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
+ ;;
+ (irix*)
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ # tested with IRIX 5.2 and 'cc'.
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]'
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ (linux*|gnu*|k*bsd*-gnu)
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ ;;
+ (mingw*)
+ cf_cv_shlib_version=mingw
+ cf_cv_shlib_version_infix=mingw
+ shlibdir=$bindir
+ MAKE_DLLS=
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,--enable-auto-import"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!$SHELL
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ (openbsd[[2-9]].*|mirbsd*)
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ ;;
+ (nto-qnx*|openbsd*|freebsd[[12]].*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ (dragonfly*|freebsd*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ ;;
+ (netbsd*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ if test "$cf_cv_shlib_version" = auto; then
+ if test -f /usr/libexec/ld.elf_so; then
+ cf_cv_shlib_version=abi
+ else
+ cf_cv_shlib_version=rel
+ fi
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]'
+ fi
+ ;;
+ (osf*|mls+*)
+ # tested with OSF/1 V3.2 and 'cc'
+ # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
+ # link with shared libs).
+ MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`'
+ case $host_os in
+ (osf4*)
+ MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
+ ;;
+ esac
+ MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
+ # tested with osr5.0.5
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-belf -KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@'
+ if test "$cf_cv_enable_rpath" = yes ; then
+ # only way is to set LD_RUN_PATH but no switch for it
+ RUN_PATH=$libdir
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ LINK_PROGS='LD_RUN_PATH=${libdir}'
+ LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
+ ;;
+ (sunos4*)
+ # tested with SunOS 4.1.1 and gcc 2.7.0
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -assert pure-text -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ (solaris2*)
+ # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
+ # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ if test "$GCC" != yes; then
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
+ do
+ CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ AC_TRY_COMPILE([#include <stdio.h>],[printf("Hello\n");],[break])
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ CC_SHARED_OPTS=$cf_shared_opts
+ MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ fi
+ ;;
+ (sysv5uw7*|unix_sv*)
+ # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -d y -G -o [$]@'
+ ;;
+ (*)
+ CC_SHARED_OPTS='unknown'
+ MK_SHARED_LIB='echo unknown'
+ ;;
+ esac
+
+ # This works if the last tokens in $MK_SHARED_LIB are the -o target.
+ case "$cf_cv_shlib_version" in
+ (rel|abi)
+ case "$MK_SHARED_LIB" in
+ (*'-o $[@]')
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ ;;
+ (*)
+ AC_MSG_WARN(ignored --with-shlib-version)
+ ;;
+ esac
+ ;;
+ esac
+
+ if test -n "$cf_try_cflags"
+ then
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "${as_me:-configure}"
+#include <stdio.h>
+int main(int argc, char *argv[[]])
+{
+ printf("hello\n");
+ return (argv[[argc-1]] == 0) ;
+}
+EOF
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_opt in $cf_try_cflags
+ do
+ CFLAGS="$cf_save_CFLAGS -$cf_opt"
+ AC_MSG_CHECKING(if CFLAGS option -$cf_opt works)
+ if AC_TRY_EVAL(ac_compile); then
+ AC_MSG_RESULT(yes)
+ cf_save_CFLAGS="$CFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+
+ # RPATH_LIST is a colon-separated list of directories
+ test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
+ test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
+
+ test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
+
+ CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS)
+ CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB)
+
+ AC_SUBST(CC_SHARED_OPTS)
+ AC_SUBST(LD_RPATH_OPT)
+ AC_SUBST(LD_SHARED_OPTS)
+ AC_SUBST(MK_SHARED_LIB)
+ AC_SUBST(RM_SHARED_OPTS)
+
+ AC_SUBST(LINK_PROGS)
+ AC_SUBST(LINK_TESTS)
+
+ AC_SUBST(EXTRA_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS2)
+
+ AC_SUBST(INSTALL_LIB)
+ AC_SUBST(RPATH_LIST)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43
+dnl ----------------
+dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname" for
+dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar)
+dnl option.
+dnl
+dnl $1 is the default that should be used for "$cf_cv_shlib_version".
+dnl If missing, use "rel".
+define([CF_SHARED_SONAME],
+[
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=ifelse($1,,rel,$1)
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $[@]`'
+ fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_STRIP_G_OPT version: 3 updated: 2002/12/21 19:25:52
+dnl --------------
+dnl Remove "-g" option from the compiler options
+AC_DEFUN([CF_STRIP_G_OPT],
+[$1=`echo ${$1} | sed -e 's%-g %%' -e 's%-g$%%'`])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SUBDIR_PATH version: 7 updated: 2014/12/04 04:33:06
+dnl --------------
+dnl Construct a search-list for a nonstandard header/lib-file
+dnl $1 = the variable to return as result
+dnl $2 = the package name
+dnl $3 = the subdirectory, e.g., bin, include or lib
+AC_DEFUN([CF_SUBDIR_PATH],
+[
+$1=
+
+CF_ADD_SUBDIR_PATH($1,$2,$3,$prefix,NONE)
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ [$]HOME
+do
+ CF_ADD_SUBDIR_PATH($1,$2,$3,$cf_subdir_prefix,$prefix)
+done
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TERM_HEADER version: 4 updated: 2015/04/15 19:08:48
+dnl --------------
+dnl Look for term.h, which is part of X/Open curses. It defines the interface
+dnl to terminfo database. Usually it is in the same include-path as curses.h,
+dnl but some packagers change this, breaking various applications.
+AC_DEFUN([CF_TERM_HEADER],[
+AC_CACHE_CHECK(for terminfo header, cf_cv_term_header,[
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
+ cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[[^.]]*\.h$%term.h%'`
+ ;;
+(*)
+ cf_term_header=term.h
+ ;;
+esac
+
+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+do
+AC_TRY_COMPILE([#include <stdio.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_test>
+],[int x = auto_left_margin],[
+ cf_cv_term_header="$cf_test"],[
+ cf_cv_term_header=unknown
+ ])
+ test "$cf_cv_term_header" != unknown && break
+done
+])
+
+# Set definitions to allow ifdef'ing to accommodate subdirectories
+
+case $cf_cv_term_header in
+(*term.h)
+ AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h])
+ ;;
+esac
+
+case $cf_cv_term_header in
+(ncurses/term.h)
+ AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
+ ;;
+(ncursesw/term.h)
+ AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h])
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TOP_BUILDDIR version: 2 updated: 2013/07/27 17:38:32
+dnl ---------------
+dnl Define a top_builddir symbol, for applications that need an absolute path.
+AC_DEFUN([CF_TOP_BUILDDIR],
+[
+top_builddir=ifelse($1,,`pwd`,$1)
+AC_SUBST(top_builddir)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
+dnl -------------------
+dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
+dnl can define it successfully.
+AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
+AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
+ CPPFLAGS="$cf_save"
+ ])
+])
+
+if test "$cf_cv_xopen_source" != no ; then
+ CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
+ CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ CF_ADD_CFLAGS($cf_temp_xopen_source)
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
+dnl --------
+dnl Make an uppercase version of a variable
+dnl $1=uppercase($2)
+AC_DEFUN([CF_UPPER],
+[
+$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_UTF8_LIB version: 8 updated: 2012/10/06 08:57:51
+dnl -----------
+dnl Check for multibyte support, and if not found, utf8 compatibility library
+AC_DEFUN([CF_UTF8_LIB],
+[
+AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
+ cf_save_LIBS="$LIBS"
+ AC_TRY_LINK([
+#include <stdlib.h>],[putwc(0,0);],
+ [cf_cv_utf8_lib=yes],
+ [CF_FIND_LINKAGE([
+#include <libutf8.h>],[putwc(0,0);],utf8,
+ [cf_cv_utf8_lib=add-on],
+ [cf_cv_utf8_lib=no])
+])])
+
+# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
+# ncurses/ncursesw:
+if test "$cf_cv_utf8_lib" = "add-on" ; then
+ AC_DEFINE(HAVE_LIBUTF8_H,1,[Define to 1 if we should include libutf8.h])
+ CF_ADD_INCDIR($cf_cv_header_path_utf8)
+ CF_ADD_LIBDIR($cf_cv_library_path_utf8)
+ CF_ADD_LIBS($cf_cv_library_file_utf8)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
+dnl ----------
+dnl Use AC_VERBOSE w/o the warnings
+AC_DEFUN([CF_VERBOSE],
+[test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
+CF_MSG_LOG([$1])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WEAK_SYMBOLS version: 1 updated: 2008/08/16 19:18:06
+dnl ---------------
+dnl Check for compiler-support for weak symbols.
+dnl This works with "recent" gcc.
+AC_DEFUN([CF_WEAK_SYMBOLS],[
+AC_CACHE_CHECK(if $CC supports weak symbols,cf_cv_weak_symbols,[
+
+AC_TRY_COMPILE([
+#include <stdio.h>],
+[
+#if defined(__GNUC__)
+# if defined __USE_ISOC99
+# define _cat_pragma(exp) _Pragma(#exp)
+# define _weak_pragma(exp) _cat_pragma(weak name)
+# else
+# define _weak_pragma(exp)
+# endif
+# define _declare(name) __extension__ extern __typeof__(name) name
+# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
+#endif
+
+weak_symbol(fopen);
+],[cf_cv_weak_symbols=yes],[cf_cv_weak_symbols=no])
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+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: 4 updated: 2014/05/31 21:08:37
+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=soname build shared-library (requires GNAT projects)],
+ [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_CURSES_DIR version: 3 updated: 2010/11/20 17:02:38
+dnl ------------------
+dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses
+dnl libraries.
+AC_DEFUN([CF_WITH_CURSES_DIR],[
+
+AC_MSG_CHECKING(for specific curses-directory)
+AC_ARG_WITH(curses-dir,
+ [ --with-curses-dir=DIR directory in which (n)curses is installed],
+ [cf_cv_curses_dir=$withval],
+ [cf_cv_curses_dir=no])
+AC_MSG_RESULT($cf_cv_curses_dir)
+
+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+then
+ CF_PATH_SYNTAX(withval)
+ if test -d "$cf_cv_curses_dir"
+ then
+ CF_ADD_INCDIR($cf_cv_curses_dir/include)
+ CF_ADD_LIBDIR($cf_cv_curses_dir/lib)
+ fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_LIB_PREFIX version: 1 updated: 2012/01/21 19:28:10
+dnl ------------------
+dnl Allow the library-prefix to be overridden. OS/2 EMX originally had no
+dnl "lib" prefix, e.g., because it used the dll naming convention.
+dnl
+dnl $1 = variable to set
+AC_DEFUN([CF_WITH_LIB_PREFIX],
+[
+AC_MSG_CHECKING(if you want to have a library-prefix)
+AC_ARG_WITH(lib-prefix,
+ [ --with-lib-prefix override library-prefix],
+ [with_lib_prefix=$withval],
+ [with_lib_prefix=auto])
+AC_MSG_RESULT($with_lib_prefix)
+
+if test $with_lib_prefix = auto
+then
+ CF_LIB_PREFIX($1)
+elif test $with_lib_prefix = no
+then
+ LIB_PREFIX=
+else
+ LIB_PREFIX=$with_lib_prefix
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_PATH version: 11 updated: 2012/09/29 15:04:19
+dnl ------------
+dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
+dnl defaulting to yes/no.
+dnl
+dnl $1 = option name
+dnl $2 = help-text
+dnl $3 = environment variable to set
+dnl $4 = default value, shown in the help-message, must be a constant
+dnl $5 = default value, if it's an expression & cannot be in the help-message
+dnl
+AC_DEFUN([CF_WITH_PATH],
+[AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),,
+ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl
+if ifelse([$5],,true,[test -n "$5"]) ; then
+CF_PATH_SYNTAX(withval)
+fi
+eval $3="$withval"
+AC_SUBST($3)dnl
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_PKG_CONFIG_LIBDIR version: 9 updated: 2015/06/06 19:26:44
+dnl -------------------------
+dnl Allow the choice of the pkg-config library directory to be overridden.
+AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
+if test "x$PKG_CONFIG" = xnone ; then
+ PKG_CONFIG_LIBDIR=no
+else
+ AC_MSG_CHECKING(for $PKG_CONFIG library directory)
+ AC_ARG_WITH(pkg-config-libdir,
+ [ --with-pkg-config-libdir=XXX use given directory for installing pc-files],
+ [PKG_CONFIG_LIBDIR=$withval],
+ [PKG_CONFIG_LIBDIR=yes])
+fi
+
+case x$PKG_CONFIG_LIBDIR in
+(x/*)
+ ;;
+(xyes)
+ # Look for the library directory using the same prefix as the executable
+ if test "x$PKG_CONFIG" = xnone
+ then
+ cf_path=$prefix
+ else
+ cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`
+ fi
+
+ # If you don't like using the default architecture, you have to specify the
+ # intended library directory and corresponding compiler/linker options.
+ #
+ # This case allows for Debian's 2014-flavor of multiarch, along with the
+ # most common variations before that point. Some other variants spell the
+ # directory differently, e.g., "pkg-config", and put it in unusual places.
+ # pkg-config has always been poorly standardized, which is ironic...
+ case x`(arch) 2>/dev/null` in
+ (*64)
+ cf_search_path="\
+ $cf_path/lib/*64-linux-gnu \
+ $cf_path/share \
+ $cf_path/lib64 \
+ $cf_path/lib32 \
+ $cf_path/lib"
+ ;;
+ (*)
+ cf_search_path="\
+ $cf_path/lib/*-linux-gnu \
+ $cf_path/share \
+ $cf_path/lib32 \
+ $cf_path/lib \
+ $cf_path/libdata"
+ ;;
+ esac
+
+ CF_VERBOSE(list...)
+ for cf_config in $cf_search_path
+ do
+ CF_VERBOSE(checking $cf_config/pkgconfig)
+ if test -d $cf_config/pkgconfig
+ then
+ PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
+ AC_MSG_CHECKING(done)
+ break
+ fi
+ done
+ ;;
+(*)
+ ;;
+esac
+
+if test "x$PKG_CONFIG" != xnone ; then
+ AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
+fi
+
+AC_SUBST(PKG_CONFIG_LIBDIR)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_PTHREAD version: 7 updated: 2015/04/18 08:56:57
+dnl ---------------
+dnl Check for POSIX thread library.
+AC_DEFUN([CF_WITH_PTHREAD],
+[
+AC_MSG_CHECKING(if you want to link with the pthread library)
+AC_ARG_WITH(pthread,
+ [ --with-pthread use POSIX thread library],
+ [with_pthread=$withval],
+ [with_pthread=no])
+AC_MSG_RESULT($with_pthread)
+
+if test "$with_pthread" != no ; then
+ AC_CHECK_HEADER(pthread.h,[
+ AC_DEFINE(HAVE_PTHREADS_H,1,[Define to 1 if we have pthreads.h header])
+
+ for cf_lib_pthread in pthread c_r
+ do
+ AC_MSG_CHECKING(if we can link with the $cf_lib_pthread library)
+ cf_save_LIBS="$LIBS"
+ CF_ADD_LIB($cf_lib_pthread)
+ AC_TRY_LINK([
+#include <pthread.h>
+],[
+ int rc = pthread_create(0,0,0,0);
+ int r2 = pthread_mutexattr_settype(0, 0);
+],[with_pthread=yes],[with_pthread=no])
+ LIBS="$cf_save_LIBS"
+ AC_MSG_RESULT($with_pthread)
+ test "$with_pthread" = yes && break
+ done
+
+ if test "$with_pthread" = yes ; then
+ CF_ADD_LIB($cf_lib_pthread)
+ AC_DEFINE(HAVE_LIBPTHREADS,1,[Define to 1 if we have pthreads library])
+ else
+ AC_MSG_ERROR(Cannot link with pthread library)
+ fi
+ ])
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_SYSTYPE version: 1 updated: 2013/01/26 16:26:12
+dnl ---------------
+dnl For testing, override the derived host system-type which is used to decide
+dnl things such as the linker commands used to build shared libraries. This is
+dnl normally chosen automatically based on the type of system which you are
+dnl building on. We use it for testing the configure script.
+dnl
+dnl This is different from the --host option: it is used only for testing parts
+dnl of the configure script which would not be reachable with --host since that
+dnl relies on the build environment being real, rather than mocked up.
+AC_DEFUN([CF_WITH_SYSTYPE],[
+CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
+AC_ARG_WITH(system-type,
+ [ --with-system-type=XXX test: override derived host system-type],
+[AC_MSG_WARN(overriding system type to $withval)
+ cf_cv_system_name=$withval
+ host_os=$withval
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00
+dnl ---------------
+dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
+dnl or adapt to the vendor's definitions to get equivalent functionality,
+dnl without losing the common non-POSIX features.
+dnl
+dnl Parameters:
+dnl $1 is the nominal value for _XOPEN_SOURCE
+dnl $2 is the nominal value for _POSIX_C_SOURCE
+AC_DEFUN([CF_XOPEN_SOURCE],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
+cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
+cf_xopen_source=
+
+case $host_os in
+(aix[[4-7]]*)
+ cf_xopen_source="-D_ALL_SOURCE"
+ ;;
+(cygwin|msys)
+ cf_XOPEN_SOURCE=600
+ ;;
+(darwin[[0-8]].*)
+ cf_xopen_source="-D_APPLE_C_SOURCE"
+ ;;
+(darwin*)
+ cf_xopen_source="-D_DARWIN_C_SOURCE"
+ cf_XOPEN_SOURCE=
+ ;;
+(freebsd*|dragonfly*)
+ # 5.x headers associate
+ # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
+ # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
+ cf_POSIX_C_SOURCE=200112L
+ cf_XOPEN_SOURCE=600
+ cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+(hpux11*)
+ cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
+ ;;
+(hpux*)
+ cf_xopen_source="-D_HPUX_SOURCE"
+ ;;
+(irix[[56]].*)
+ cf_xopen_source="-D_SGI_SOURCE"
+ cf_XOPEN_SOURCE=
+ ;;
+(linux*|gnu*|mint*|k*bsd*-gnu)
+ CF_GNU_SOURCE
+ ;;
+(minix*)
+ cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
+ ;;
+(mirbsd*)
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
+ cf_XOPEN_SOURCE=
+ CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ ;;
+(netbsd*)
+ cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ ;;
+(openbsd[[4-9]]*)
+ # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
+ cf_xopen_source="-D_BSD_SOURCE"
+ cf_XOPEN_SOURCE=600
+ ;;
+(openbsd*)
+ # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+ ;;
+(osf[[45]]*)
+ cf_xopen_source="-D_OSF_SOURCE"
+ ;;
+(nto-qnx*)
+ cf_xopen_source="-D_QNX_SOURCE"
+ ;;
+(sco*)
+ # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+ ;;
+(solaris2.*)
+ cf_xopen_source="-D__EXTENSIONS__"
+ cf_cv_xopen_source=broken
+ ;;
+(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
+ cf_XOPEN_SOURCE=
+ cf_POSIX_C_SOURCE=
+ ;;
+(*)
+ CF_TRY_XOPEN_SOURCE
+ CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+ ;;
+esac
+
+if test -n "$cf_xopen_source" ; then
+ CF_ADD_CFLAGS($cf_xopen_source,true)
+fi
+
+dnl In anything but the default case, we may have system-specific setting
+dnl which is still not guaranteed to provide all of the entrypoints that
+dnl _XOPEN_SOURCE would yield.
+if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
+ AC_MSG_CHECKING(if _XOPEN_SOURCE really is set)
+ AC_TRY_COMPILE([#include <stdlib.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_XOPEN_SOURCE_set=yes],
+ [cf_XOPEN_SOURCE_set=no])
+ AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
+ if test $cf_XOPEN_SOURCE_set = yes
+ then
+ AC_TRY_COMPILE([#include <stdlib.h>],[
+#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+make an error
+#endif],
+ [cf_XOPEN_SOURCE_set_ok=yes],
+ [cf_XOPEN_SOURCE_set_ok=no])
+ if test $cf_XOPEN_SOURCE_set_ok = no
+ then
+ AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
+ fi
+ else
+ CF_TRY_XOPEN_SOURCE
+ fi
+fi
+])
diff --git a/Ada95/configure b/Ada95/configure
new file mode 100755
index 0000000..501e71e
--- /dev/null
+++ b/Ada95/configure
@@ -0,0 +1,14908 @@
+#! /bin/sh
+# From configure.in Revision: 1.60 .
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by Autoconf 2.52.20141204.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+cross_compiling=no
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+ac_unique_file="gen/gen.c"
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${datarootdir}/info'
+mandir='${datarootdir}/man'
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: should be removed in autoconf 3.0.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<EOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+EOF
+
+ cat <<EOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+EOF
+
+ cat <<\EOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+EOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\EOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+
+ --with-system-type=XXX test: override derived host system-type
+ --with-pkg-config{=path} enable/disable use of pkg-config
+ --with-pkg-config-libdir=XXX use given directory for installing pc-files
+ --without-tests suppress build with test-programs
+ --enable-mixed-case tic should assume mixed-case filenames
+ --with-install-prefix prefixes actual install-location ($DESTDIR)
+Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
+ --with-build-cc=XXX the build C compiler ($BUILD_CC)
+ --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
+ --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
+ --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
+ --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
+ --with-build-libs=XXX the build libraries (${BUILD_LIBS})
+Options to Specify the Libraries Built/Used:
+ --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
+ --with-curses-dir=DIR directory in which (n)curses is installed
+ --enable-widec compile with wide-char/UTF-8 code
+ --with-lib-prefix override library-prefix
+ --with-shlib-version=X Specify rel or abi version for shared libs
+ --enable-rpath-link link sample programs with rpath option
+Fine-Tuning Your Configuration:
+ --enable-broken_linker compile with broken-linker support code
+ --disable-largefile omit support for large files
+ --with-rcs-ids compile-in RCS identifiers
+Extensions:
+ --disable-ext-funcs disable function-extensions
+ --enable-const compile with extra/non-standard const
+Development Code:
+ --without-develop disable development options
+Experimental Code:
+ --with-pthread use POSIX thread library
+ --enable-weak-symbols enable weak-symbols for pthreads
+ --enable-reentrant compile with experimental reentrant code
+ --with-wrap-prefix=XXX override prefix used for public variables
+Testing/development Options:
+ --disable-echo do not display "compiling" commands
+ --enable-warnings build: turn on GCC compiler warnings
+ --enable-assertions test: turn on generation of assertion code
+ --enable-expanded test: generate functions for certain macros
+ --disable-macros test: use functions rather than macros
+ --with-trace test: add trace() function to all models of ncurses
+ --disable-gnat-projects test: disable GNAT projects even if usable
+Ada95 Binding Options:
+ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
+ --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
+ --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
+ --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+EOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
+ cd $ac_subdir
+ # A "../" for each directory in /$ac_subdir.
+ ac_dots=`echo $ac_subdir |
+ sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
+
+ case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_subdir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_sub_srcdir/configure; then
+ echo
+ $SHELL $ac_sub_srcdir/configure --help=recursive
+ elif test -f $ac_sub_srcdir/configure.ac ||
+ test -f $ac_sub_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\EOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+EOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<EOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.52.20141204. Invocation command line was
+
+ $ $0 $@
+
+EOF
+{
+cat <<_ASUNAME
+## ---------- ##
+## Platform. ##
+## ---------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+PATH = $PATH
+
+_ASUNAME
+} >&5
+
+cat >&5 <<EOF
+## ------------ ##
+## Core tests. ##
+## ------------ ##
+
+EOF
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=" " ;;
+ *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
+ ac_sep=" " ;;
+ esac
+ # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ echo >&5
+ echo "## ----------------- ##" >&5
+ echo "## Cache variables. ##" >&5
+ echo "## ----------------- ##" >&5
+ echo >&5
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} >&5
+ sed "/^$/d" confdefs.h >conftest.log
+ if test -s conftest.log; then
+ echo >&5
+ echo "## ------------ ##" >&5
+ echo "## confdefs.h. ##" >&5
+ echo "## ------------ ##" >&5
+ echo >&5
+ cat conftest.log >&5
+ fi
+ (echo; echo) >&5
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal" >&5
+ echo "$as_me: exit $exit_status" >&5
+ rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:895: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ cat "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:906: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:914: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:930: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:934: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:940: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:942: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:944: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status. It doesn't matter if
+ # we pass some twice (in addition to the command line arguments).
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
+ ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:963: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:965: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_main_return=return
+
+case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
+ ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+echo "#! $SHELL" >conftest.sh
+echo "exit 0" >>conftest.sh
+chmod +x conftest.sh
+if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
+ (PATH=".;."; conftest.sh) 2>&5
+ ac_status=$?
+ echo "$as_me:989: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ ac_path_separator=';'
+else
+ ac_path_separator=:
+fi
+PATH_SEPARATOR="$ac_path_separator"
+rm -f conftest.sh
+
+ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
+
+top_builddir=`pwd`
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:1019: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:1029: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:1033: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:1042: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:1046: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1051: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+echo "$as_me:1058: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1072: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
+ echo "$as_me:1080: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:1089: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1094: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+ system_name="$host_os"
+else
+ system_name="`(uname -s -r) 2>/dev/null`"
+ if test -z "$system_name" ; then
+ system_name="`(hostname) 2>/dev/null`"
+ fi
+fi
+test -n "$system_name" &&
+cat >>confdefs.h <<EOF
+#define SYSTEM_NAME "$system_name"
+EOF
+
+if test "${cf_cv_system_name+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cf_cv_system_name="$system_name"
+fi
+
+test -z "$system_name" && system_name="$cf_cv_system_name"
+test -n "$cf_cv_system_name" && echo "$as_me:1126: result: Configuring for $cf_cv_system_name" >&5
+echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
+
+if test ".$system_name" != ".$cf_cv_system_name" ; then
+ echo "$as_me:1130: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
+ { { echo "$as_me:1132: error: \"Please remove config.cache and try again.\"" >&5
+echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Check whether --with-system-type or --without-system-type was given.
+if test "${with_system_type+set}" = set; then
+ withval="$with_system_type"
+ { echo "$as_me:1140: WARNING: overriding system type to $withval" >&5
+echo "$as_me: WARNING: overriding system type to $withval" >&2;}
+ cf_cv_system_name=$withval
+ host_os=$withval
+
+fi;
+
+### Save the given $CFLAGS to allow user-override.
+cf_user_CFLAGS="$CFLAGS"
+
+### Default install-location
+
+echo "$as_me:1152: checking for prefix" >&5
+echo $ECHO_N "checking for prefix... $ECHO_C" >&6
+if test "x$prefix" = "xNONE" ; then
+ case "$cf_cv_system_name" in
+ # non-vendor systems don't have a conflict
+ (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
+ prefix=/usr
+ ;;
+ (*) prefix=$ac_default_prefix
+ ;;
+ esac
+fi
+echo "$as_me:1164: result: $prefix" >&5
+echo "${ECHO_T}$prefix" >&6
+
+if test "x$prefix" = "xNONE" ; then
+echo "$as_me:1168: checking for default include-directory" >&5
+echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
+test -n "$verbose" && echo 1>&6
+for cf_symbol in \
+ $includedir \
+ $includedir/ncurses \
+ $prefix/include \
+ $prefix/include/ncurses \
+ /usr/local/include \
+ /usr/local/include/ncurses \
+ /usr/include \
+ /usr/include/ncurses
+do
+ cf_dir=`eval echo $cf_symbol`
+ if test -f $cf_dir/curses.h ; then
+ if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
+ includedir="$cf_symbol"
+ test -n "$verbose" && echo $ac_n " found " 1>&6
+ break
+ fi
+ fi
+ test -n "$verbose" && echo " tested $cf_dir" 1>&6
+done
+echo "$as_me:1191: result: $includedir" >&5
+echo "${ECHO_T}$includedir" >&6
+fi
+
+### Checks for programs.
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_main_return=return
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in gnatgcc gcc cc
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:1208: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+echo "$as_me:1223: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1231: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1234: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in gnatgcc gcc cc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:1247: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="$ac_prog"
+echo "$as_me:1262: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1270: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1273: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+test -z "$CC" && { { echo "$as_me:1283: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:1288:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:1291: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1294: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1296: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1299: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1301: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1304: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 1308 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:1324: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:1327: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:1330: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ a.out ) # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1353: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:1359: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1364: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:1370: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1373: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:1380: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:1388: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1395: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:1397: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:1400: checking for executable suffix" >&5
+echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+if { (eval echo "$as_me:1402: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:1405: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:1421: error: cannot compute EXEEXT: cannot compile and link" >&5
+echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:1427: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:1433: checking for object suffix" >&5
+echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1439 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:1451: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1454: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1466: error: cannot compute OBJEXT: cannot compile" >&5
+echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:1473: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:1477: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1483 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1498: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1501: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1504: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1507: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:1519: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:1525: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1531 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1543: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1546: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1549: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1552: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:1562: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1592: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1595: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1598: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1610 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1626: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1629: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1632: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1642 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1654: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1657: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1660: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1663: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -rf conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_main_return=return
+
+GCC_VERSION=none
+if test "$GCC" = yes ; then
+ echo "$as_me:1693: checking version of $CC" >&5
+echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
+ test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ echo "$as_me:1697: result: $GCC_VERSION" >&5
+echo "${ECHO_T}$GCC_VERSION" >&6
+fi
+
+echo "$as_me:1701: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line 1709 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1758: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1761: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1764: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1767: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:1784: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:1787: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# This should have been defined by AC_PROG_CC
+: ${CC:=cc}
+
+echo "$as_me:1795: checking \$CC variable" >&5
+echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
+case "$CC" in
+(*[\ \ ]-[IUD]*)
+ echo "$as_me:1799: result: broken" >&5
+echo "${ECHO_T}broken" >&6
+ { echo "$as_me:1801: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
+echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
+ # humor him...
+ cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
+ CC=`echo "$CC" | sed -e 's/[ ].*//'`
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_flags
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+ ;;
+(*)
+ echo "$as_me:1887: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+ ;;
+esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_main_return=return
+echo "$as_me:1898: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1919 "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:1924: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:1930: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1953 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:1957: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:1963: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:2000: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2010 "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:2015: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2021: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2044 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2048: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2054: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:2082: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_main_return=return
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ echo "$as_me:2095: checking whether $CC needs -traditional" >&5
+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2102 "configure"
+#include "confdefs.h"
+#include <sgtty.h>
+int Autoconf = TIOCGETP;
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+else
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -rf conftest*
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2117 "configure"
+#include "confdefs.h"
+#include <termio.h>
+int Autoconf = TCGETA;
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -rf conftest*
+
+ fi
+fi
+echo "$as_me:2130: result: $ac_cv_prog_gcc_traditional" >&5
+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+echo "$as_me:2137: checking whether $CC understands -c and -o together" >&5
+echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
+if test "${cf_cv_prog_CC_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+ ${cf_cv_main_return:-return}(0);
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+if { (eval echo "$as_me:2153: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2156: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest2.$ac_objext && { (eval echo "$as_me:2158: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2161: \$? = $ac_status" >&5
+ (exit $ac_status); };
+then
+ eval cf_cv_prog_CC_c_o=yes
+else
+ eval cf_cv_prog_CC_c_o=no
+fi
+rm -rf conftest*
+
+fi
+if test $cf_cv_prog_CC_c_o = yes; then
+ echo "$as_me:2172: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:2175: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+for ac_prog in mawk gawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:2196: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AWK="$ac_prog"
+echo "$as_me:2211: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:2219: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:2222: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+test -z "$AWK" && { { echo "$as_me:2229: error: No awk program found" >&5
+echo "$as_me: error: No awk program found" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:2233: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:2243: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+ test -z "$EGREP" && { { echo "$as_me:2247: error: No egrep program found" >&5
+echo "$as_me: error: No egrep program found" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:2263: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ for ac_dir in $PATH; do
+ IFS=$ac_save_IFS
+ # Account for people who put trailing slashes in PATH elements.
+ case $ac_dir/ in
+ / | ./ | .// | /cC/* \
+ | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
+ | /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if $as_executable_p "$ac_dir/$ac_prog"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:2312: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:2323: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:2327: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:2330: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+echo "$as_me:2334: checking if $LN_S -f options work" >&5
+echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
+
+rm -f conf$$.src conf$$dst
+echo >conf$$.dst
+echo first >conf$$.src
+if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
+ cf_prog_ln_sf=yes
+else
+ cf_prog_ln_sf=no
+fi
+rm -f conf$$.dst conf$$src
+echo "$as_me:2346: result: $cf_prog_ln_sf" >&5
+echo "${ECHO_T}$cf_prog_ln_sf" >&6
+
+test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
+
+echo "$as_me:2351: checking for long file names" >&5
+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
+if test "${ac_cv_sys_long_file_names+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+# . the current directory, where building will happen
+# $prefix/lib where we will be installing things
+# $exec_prefix/lib likewise
+# eval it to expand exec_prefix.
+# $TMPDIR if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+# /tmp where it might want to write temporary files
+# /var/tmp likewise
+# /usr/tmp likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+ ac_tmpdirs=$TMPDIR
+else
+ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+ test -d $ac_dir || continue
+ test -w $ac_dir || continue # It is less confusing to not echo anything here.
+ ac_xdir=$ac_dir/cf$$
+ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
+ ac_tf1=$ac_xdir/conftest9012345
+ ac_tf2=$ac_xdir/conftest9012346
+ (echo 1 >$ac_tf1) 2>/dev/null
+ (echo 2 >$ac_tf2) 2>/dev/null
+ ac_val=`cat $ac_tf1 2>/dev/null`
+ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+ ac_cv_sys_long_file_names=no
+ rm -rf $ac_xdir 2>/dev/null
+ break
+ fi
+ rm -rf $ac_xdir 2>/dev/null
+done
+fi
+echo "$as_me:2390: result: $ac_cv_sys_long_file_names" >&5
+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+if test $ac_cv_sys_long_file_names = yes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_LONG_FILE_NAMES 1
+EOF
+
+fi
+
+# if we find pkg-config, check if we should install the ".pc" files.
+
+echo "$as_me:2402: checking if you want to use pkg-config" >&5
+echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
+
+# Check whether --with-pkg-config or --without-pkg-config was given.
+if test "${with_pkg_config+set}" = set; then
+ withval="$with_pkg_config"
+ cf_pkg_config=$withval
+else
+ cf_pkg_config=yes
+fi;
+echo "$as_me:2412: result: $cf_pkg_config" >&5
+echo "${ECHO_T}$cf_pkg_config" >&6
+
+case $cf_pkg_config in
+(no)
+ PKG_CONFIG=none
+ ;;
+(yes)
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+echo "$as_me:2424: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
+ echo "$as_me:2441: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+ echo "$as_me:2452: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+ echo "$as_me:2455: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:2464: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
+ echo "$as_me:2481: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+
+if test -n "$ac_pt_PKG_CONFIG"; then
+ echo "$as_me:2493: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+else
+ echo "$as_me:2496: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+ ;;
+(*)
+ PKG_CONFIG=$withval
+ ;;
+esac
+
+test -z "$PKG_CONFIG" && PKG_CONFIG=none
+if test "$PKG_CONFIG" != none ; then
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$PKG_CONFIG" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval PKG_CONFIG="$PKG_CONFIG"
+ case ".$PKG_CONFIG" in
+ (.NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:2539: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
+echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+elif test "x$cf_pkg_config" != xno ; then
+ { echo "$as_me:2546: WARNING: pkg-config is not installed" >&5
+echo "$as_me: WARNING: pkg-config is not installed" >&2;}
+fi
+
+if test "x$PKG_CONFIG" = xnone ; then
+ PKG_CONFIG_LIBDIR=no
+else
+ echo "$as_me:2553: checking for $PKG_CONFIG library directory" >&5
+echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
+
+# Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
+if test "${with_pkg_config_libdir+set}" = set; then
+ withval="$with_pkg_config_libdir"
+ PKG_CONFIG_LIBDIR=$withval
+else
+ PKG_CONFIG_LIBDIR=yes
+fi;
+fi
+
+case x$PKG_CONFIG_LIBDIR in
+(x/*)
+ ;;
+(xyes)
+ # Look for the library directory using the same prefix as the executable
+ if test "x$PKG_CONFIG" = xnone
+ then
+ cf_path=$prefix
+ else
+ cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
+ fi
+
+ # If you don't like using the default architecture, you have to specify the
+ # intended library directory and corresponding compiler/linker options.
+ #
+ # This case allows for Debian's 2014-flavor of multiarch, along with the
+ # most common variations before that point. Some other variants spell the
+ # directory differently, e.g., "pkg-config", and put it in unusual places.
+ # pkg-config has always been poorly standardized, which is ironic...
+ case x`(arch) 2>/dev/null` in
+ (*64)
+ cf_search_path="\
+ $cf_path/lib/*64-linux-gnu \
+ $cf_path/share \
+ $cf_path/lib64 \
+ $cf_path/lib32 \
+ $cf_path/lib"
+ ;;
+ (*)
+ cf_search_path="\
+ $cf_path/lib/*-linux-gnu \
+ $cf_path/share \
+ $cf_path/lib32 \
+ $cf_path/lib \
+ $cf_path/libdata"
+ ;;
+ esac
+
+ test -n "$verbose" && echo " list..." 1>&6
+
+echo "${as_me:-configure}:2605: testing list... ..." 1>&5
+
+ for cf_config in $cf_search_path
+ do
+ test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
+
+echo "${as_me:-configure}:2611: testing checking $cf_config/pkgconfig ..." 1>&5
+
+ if test -d $cf_config/pkgconfig
+ then
+ PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
+ echo "$as_me:2616: checking done" >&5
+echo $ECHO_N "checking done... $ECHO_C" >&6
+ break
+ fi
+ done
+ ;;
+(*)
+ ;;
+esac
+
+if test "x$PKG_CONFIG" != xnone ; then
+ echo "$as_me:2627: result: $PKG_CONFIG_LIBDIR" >&5
+echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
+fi
+
+echo "$as_me:2631: checking if you want to build test-programs" >&5
+echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
+
+# Check whether --with-tests or --without-tests was given.
+if test "${with_tests+set}" = set; then
+ withval="$with_tests"
+ cf_with_tests=$withval
+else
+ cf_with_tests=yes
+fi;
+echo "$as_me:2641: result: $cf_with_tests" >&5
+echo "${ECHO_T}$cf_with_tests" >&6
+
+echo "$as_me:2644: checking if we should assume mixed-case filenames" >&5
+echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
+
+# Check whether --enable-mixed-case or --disable-mixed-case was given.
+if test "${enable_mixed_case+set}" = set; then
+ enableval="$enable_mixed_case"
+ enable_mixedcase=$enableval
+else
+ enable_mixedcase=auto
+fi;
+echo "$as_me:2654: result: $enable_mixedcase" >&5
+echo "${ECHO_T}$enable_mixedcase" >&6
+if test "$enable_mixedcase" = "auto" ; then
+
+echo "$as_me:2658: checking if filesystem supports mixed-case filenames" >&5
+echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
+if test "${cf_cv_mixedcase+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "$cross_compiling" = yes ; then
+ case $target_alias in
+ (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
+ cf_cv_mixedcase=no
+ ;;
+ (*)
+ cf_cv_mixedcase=yes
+ ;;
+ esac
+else
+ rm -f conftest CONFTEST
+ echo test >conftest
+ if test -f CONFTEST ; then
+ cf_cv_mixedcase=no
+ else
+ cf_cv_mixedcase=yes
+ fi
+ rm -f conftest CONFTEST
+fi
+
+fi
+echo "$as_me:2685: result: $cf_cv_mixedcase" >&5
+echo "${ECHO_T}$cf_cv_mixedcase" >&6
+test "$cf_cv_mixedcase" = yes &&
+cat >>confdefs.h <<\EOF
+#define MIXEDCASE_FILENAMES 1
+EOF
+
+else
+ cf_cv_mixedcase=$enable_mixedcase
+ if test "$enable_mixedcase" = "yes" ; then
+ cat >>confdefs.h <<\EOF
+#define MIXEDCASE_FILENAMES 1
+EOF
+
+ fi
+fi
+
+# do this after mixed-case option (tags/TAGS is not as important as tic).
+echo "$as_me:2703: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:2723: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:2727: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+for ac_prog in exctags ctags
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:2736: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CTAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CTAGS"; then
+ ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CTAGS="$ac_prog"
+echo "$as_me:2751: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CTAGS=$ac_cv_prog_CTAGS
+if test -n "$CTAGS"; then
+ echo "$as_me:2759: result: $CTAGS" >&5
+echo "${ECHO_T}$CTAGS" >&6
+else
+ echo "$as_me:2762: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CTAGS" && break
+done
+
+for ac_prog in exetags etags
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:2773: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ETAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ETAGS"; then
+ ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ETAGS="$ac_prog"
+echo "$as_me:2788: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ETAGS=$ac_cv_prog_ETAGS
+if test -n "$ETAGS"; then
+ echo "$as_me:2796: result: $ETAGS" >&5
+echo "${ECHO_T}$ETAGS" >&6
+else
+ echo "$as_me:2799: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ETAGS" && break
+done
+
+# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
+set dummy ${CTAGS:-ctags}; ac_word=$2
+echo "$as_me:2808: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKE_LOWER_TAGS"; then
+ ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_MAKE_LOWER_TAGS="yes"
+echo "$as_me:2823: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
+fi
+fi
+MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
+if test -n "$MAKE_LOWER_TAGS"; then
+ echo "$as_me:2832: result: $MAKE_LOWER_TAGS" >&5
+echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
+else
+ echo "$as_me:2835: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$cf_cv_mixedcase" = yes ; then
+ # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
+set dummy ${ETAGS:-etags}; ac_word=$2
+echo "$as_me:2842: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKE_UPPER_TAGS"; then
+ ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_MAKE_UPPER_TAGS="yes"
+echo "$as_me:2857: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
+fi
+fi
+MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
+if test -n "$MAKE_UPPER_TAGS"; then
+ echo "$as_me:2866: result: $MAKE_UPPER_TAGS" >&5
+echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
+else
+ echo "$as_me:2869: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+else
+ MAKE_UPPER_TAGS=no
+fi
+
+if test "$MAKE_UPPER_TAGS" = yes ; then
+ MAKE_UPPER_TAGS=
+else
+ MAKE_UPPER_TAGS="#"
+fi
+
+if test "$MAKE_LOWER_TAGS" = yes ; then
+ MAKE_LOWER_TAGS=
+else
+ MAKE_LOWER_TAGS="#"
+fi
+
+echo "$as_me:2889: checking for makeflags variable" >&5
+echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
+if test "${cf_cv_makeflags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_makeflags=''
+ for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
+ do
+ cat >cf_makeflags.tmp <<CF_EOF
+SHELL = $SHELL
+all :
+ @ echo '.$cf_option'
+CF_EOF
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
+ case "$cf_result" in
+ (.*k|.*kw)
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
+ case "$cf_result" in
+ (.*CC=*) cf_cv_makeflags=
+ ;;
+ (*) cf_cv_makeflags=$cf_option
+ ;;
+ esac
+ break
+ ;;
+ (.-) ;;
+ (*) echo "given option \"$cf_option\", no match \"$cf_result\""
+ ;;
+ esac
+ done
+ rm -f cf_makeflags.tmp
+
+fi
+echo "$as_me:2923: result: $cf_cv_makeflags" >&5
+echo "${ECHO_T}$cf_cv_makeflags" >&6
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:2929: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+echo "$as_me:2944: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:2952: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:2955: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:2964: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_RANLIB="ranlib"
+echo "$as_me:2979: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:2988: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:2991: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ld; ac_word=$2
+echo "$as_me:3003: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_LD="${ac_tool_prefix}ld"
+echo "$as_me:3018: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+ echo "$as_me:3026: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:3029: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+ ac_ct_LD=$LD
+ # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+echo "$as_me:3038: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_LD"; then
+ ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_LD="ld"
+echo "$as_me:3053: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
+fi
+fi
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+ echo "$as_me:3062: result: $ac_ct_LD" >&5
+echo "${ECHO_T}$ac_ct_LD" >&6
+else
+ echo "$as_me:3065: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ LD=$ac_ct_LD
+else
+ LD="$ac_cv_prog_LD"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:3077: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AR="${ac_tool_prefix}ar"
+echo "$as_me:3092: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:3100: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:3103: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:3112: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_AR="ar"
+echo "$as_me:3127: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:3136: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:3139: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:3151: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AR="${ac_tool_prefix}ar"
+echo "$as_me:3166: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:3174: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:3177: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:3186: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_AR="ar"
+echo "$as_me:3201: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:3210: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:3213: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+echo "$as_me:3222: checking for options to update archives" >&5
+echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
+if test "${cf_cv_ar_flags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_ar_flags=unknown
+ for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+ do
+
+ # check if $ARFLAGS already contains this choice
+ if test "x$ARFLAGS" != "x" ; then
+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
+ cf_cv_ar_flags=
+ break
+ fi
+ fi
+
+ rm -f conftest.$ac_cv_objext
+ rm -f conftest.a
+
+ cat >conftest.$ac_ext <<EOF
+#line 3245 "configure"
+int testdata[3] = { 123, 456, 789 };
+EOF
+ if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3251: \$? = $ac_status" >&5
+ (exit $ac_status); } ; then
+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
+ if test -f conftest.a ; then
+ cf_cv_ar_flags=$cf_ar_flags
+ break
+ fi
+ else
+ test -n "$verbose" && echo " cannot compile test-program" 1>&6
+
+echo "${as_me:-configure}:3262: testing cannot compile test-program ..." 1>&5
+
+ break
+ fi
+ done
+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
+
+fi
+echo "$as_me:3270: result: $cf_cv_ar_flags" >&5
+echo "${ECHO_T}$cf_cv_ar_flags" >&6
+
+if test -n "$ARFLAGS" ; then
+ if test -n "$cf_cv_ar_flags" ; then
+ ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
+ fi
+else
+ ARFLAGS=$cf_cv_ar_flags
+fi
+
+ echo "$as_me:3281: checking for PATH separator" >&5
+echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
+ case $cf_cv_system_name in
+ (os2*) PATH_SEPARATOR=';' ;;
+ (*) ${PATH_SEPARATOR:=':'} ;;
+ esac
+
+ echo "$as_me:3288: result: $PATH_SEPARATOR" >&5
+echo "${ECHO_T}$PATH_SEPARATOR" >&6
+
+echo "$as_me:3291: checking if you have specified an install-prefix" >&5
+echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
+
+# Check whether --with-install-prefix or --without-install-prefix was given.
+if test "${with_install_prefix+set}" = set; then
+ withval="$with_install_prefix"
+ case "$withval" in
+ (yes|no)
+ ;;
+ (*) DESTDIR="$withval"
+ ;;
+ esac
+fi;
+echo "$as_me:3304: result: $DESTDIR" >&5
+echo "${ECHO_T}$DESTDIR" >&6
+
+###############################################################################
+
+# If we're cross-compiling, allow the user to override the tools and their
+# options. The configure script is oriented toward identifying the host
+# compiler, etc., but we need a build compiler to generate parts of the source.
+
+if test "$cross_compiling" = yes ; then
+
+ # defaults that we might want to override
+ : ${BUILD_CFLAGS:=''}
+ : ${BUILD_CPPFLAGS:=''}
+ : ${BUILD_LDFLAGS:=''}
+ : ${BUILD_LIBS:=''}
+ : ${BUILD_EXEEXT:='$x'}
+ : ${BUILD_OBJEXT:='o'}
+
+# Check whether --with-build-cc or --without-build-cc was given.
+if test "${with_build_cc+set}" = set; then
+ withval="$with_build_cc"
+ BUILD_CC="$withval"
+else
+ for ac_prog in gcc cc cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:3332: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_BUILD_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$BUILD_CC"; then
+ ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_BUILD_CC="$ac_prog"
+echo "$as_me:3347: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+BUILD_CC=$ac_cv_prog_BUILD_CC
+if test -n "$BUILD_CC"; then
+ echo "$as_me:3355: result: $BUILD_CC" >&5
+echo "${ECHO_T}$BUILD_CC" >&6
+else
+ echo "$as_me:3358: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$BUILD_CC" && break
+done
+
+fi;
+ echo "$as_me:3366: checking for native build C compiler" >&5
+echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
+ echo "$as_me:3368: result: $BUILD_CC" >&5
+echo "${ECHO_T}$BUILD_CC" >&6
+
+ echo "$as_me:3371: checking for native build C preprocessor" >&5
+echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
+
+# Check whether --with-build-cpp or --without-build-cpp was given.
+if test "${with_build_cpp+set}" = set; then
+ withval="$with_build_cpp"
+ BUILD_CPP="$withval"
+else
+ BUILD_CPP='${BUILD_CC} -E'
+fi;
+ echo "$as_me:3381: result: $BUILD_CPP" >&5
+echo "${ECHO_T}$BUILD_CPP" >&6
+
+ echo "$as_me:3384: checking for native build C flags" >&5
+echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
+
+# Check whether --with-build-cflags or --without-build-cflags was given.
+if test "${with_build_cflags+set}" = set; then
+ withval="$with_build_cflags"
+ BUILD_CFLAGS="$withval"
+fi;
+ echo "$as_me:3392: result: $BUILD_CFLAGS" >&5
+echo "${ECHO_T}$BUILD_CFLAGS" >&6
+
+ echo "$as_me:3395: checking for native build C preprocessor-flags" >&5
+echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
+
+# Check whether --with-build-cppflags or --without-build-cppflags was given.
+if test "${with_build_cppflags+set}" = set; then
+ withval="$with_build_cppflags"
+ BUILD_CPPFLAGS="$withval"
+fi;
+ echo "$as_me:3403: result: $BUILD_CPPFLAGS" >&5
+echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
+
+ echo "$as_me:3406: checking for native build linker-flags" >&5
+echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
+
+# Check whether --with-build-ldflags or --without-build-ldflags was given.
+if test "${with_build_ldflags+set}" = set; then
+ withval="$with_build_ldflags"
+ BUILD_LDFLAGS="$withval"
+fi;
+ echo "$as_me:3414: result: $BUILD_LDFLAGS" >&5
+echo "${ECHO_T}$BUILD_LDFLAGS" >&6
+
+ echo "$as_me:3417: checking for native build linker-libraries" >&5
+echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
+
+# Check whether --with-build-libs or --without-build-libs was given.
+if test "${with_build_libs+set}" = set; then
+ withval="$with_build_libs"
+ BUILD_LIBS="$withval"
+fi;
+ echo "$as_me:3425: result: $BUILD_LIBS" >&5
+echo "${ECHO_T}$BUILD_LIBS" >&6
+
+ # this assumes we're on Unix.
+ BUILD_EXEEXT=
+ BUILD_OBJEXT=o
+
+ : ${BUILD_CC:='${CC}'}
+
+ if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
+ { { echo "$as_me:3435: error: Cross-build requires two compilers.
+Use --with-build-cc to specify the native compiler." >&5
+echo "$as_me: error: Cross-build requires two compilers.
+Use --with-build-cc to specify the native compiler." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+else
+ : ${BUILD_CC:='${CC}'}
+ : ${BUILD_CPP:='${CPP}'}
+ : ${BUILD_CFLAGS:='${CFLAGS}'}
+ : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
+ : ${BUILD_LDFLAGS:='${LDFLAGS}'}
+ : ${BUILD_LIBS:='${LIBS}'}
+ : ${BUILD_EXEEXT:='$x'}
+ : ${BUILD_OBJEXT:='o'}
+fi
+
+###############################################################################
+
+### Options to allow the user to specify the set of libraries which are used.
+### Use "--without-normal --with-shared" to allow the default model to be
+### shared, for example.
+cf_list_models=""
+
+echo "$as_me:3460: checking if you want to build shared C-objects" >&5
+echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
+
+# Check whether --with-shared or --without-shared was given.
+if test "${with_shared+set}" = set; then
+ withval="$with_shared"
+ with_shared=$withval
+else
+ with_shared=no
+fi;
+echo "$as_me:3470: result: $with_shared" >&5
+echo "${ECHO_T}$with_shared" >&6
+test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
+
+echo "$as_me:3474: checking for specified models" >&5
+echo $ECHO_N "checking for specified models... $ECHO_C" >&6
+test -z "$cf_list_models" && cf_list_models=normal
+echo "$as_me:3477: result: $cf_list_models" >&5
+echo "${ECHO_T}$cf_list_models" >&6
+
+### Use the first model as the default, and save its suffix for use in building
+### up test-applications.
+echo "$as_me:3482: checking for default model" >&5
+echo $ECHO_N "checking for default model... $ECHO_C" >&6
+DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
+echo "$as_me:3485: result: $DFT_LWR_MODEL" >&5
+echo "${ECHO_T}$DFT_LWR_MODEL" >&6
+
+DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+echo "$as_me:3490: checking for specific curses-directory" >&5
+echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
+
+# Check whether --with-curses-dir or --without-curses-dir was given.
+if test "${with_curses_dir+set}" = set; then
+ withval="$with_curses_dir"
+ cf_cv_curses_dir=$withval
+else
+ cf_cv_curses_dir=no
+fi;
+echo "$as_me:3500: result: $cf_cv_curses_dir" >&5
+echo "${ECHO_T}$cf_cv_curses_dir" >&6
+
+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+then
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$withval" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval withval="$withval"
+ case ".$withval" in
+ (.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:3531: error: expected a pathname, not \"$withval\"" >&5
+echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+ if test -d "$cf_cv_curses_dir"
+ then
+
+if test -n "$cf_cv_curses_dir/include" ; then
+ for cf_add_incdir in $cf_cv_curses_dir/include
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3564 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3576: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3579: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3582: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3585: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:3602: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+if test -n "$cf_cv_curses_dir/lib" ; then
+ for cf_add_libdir in $cf_cv_curses_dir/lib
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+
+echo "${as_me:-configure}:3638: testing adding $cf_add_libdir to library-path ..." 1>&5
+
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
+fi
+
+ fi
+fi
+
+cf_ncuconfig_root=ncurses
+cf_have_ncuconfig=no
+
+if test "x${PKG_CONFIG:=none}" != xnone; then
+ echo "$as_me:3653: checking pkg-config for $cf_ncuconfig_root" >&5
+echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
+ if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
+ echo "$as_me:3656: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+ echo "$as_me:3659: checking if the $cf_ncuconfig_root package files work" >&5
+echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
+ cf_have_ncuconfig=unknown
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_save_LIBS="$LIBS"
+
+ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
+
+cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3685 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3697: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3700: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3703: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3706: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if test "$cross_compiling" = yes; then
+ cf_have_ncuconfig=maybe
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3712 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+ int main(void)
+ { char *xx = curses_version(); return (xx == 0); }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:3719: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3722: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:3724: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3727: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_have_ncuconfig=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:3744: result: $cf_have_ncuconfig" >&5
+echo "${ECHO_T}$cf_have_ncuconfig" >&6
+ test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
+ if test "$cf_have_ncuconfig" != "yes"
+ then
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ NCURSES_CONFIG_PKG=none
+ else
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+ NCURSES_CONFIG_PKG=$cf_ncuconfig_root
+ fi
+
+ else
+ echo "$as_me:3762: result: no" >&5
+echo "${ECHO_T}no" >&6
+ NCURSES_CONFIG_PKG=none
+ fi
+else
+ NCURSES_CONFIG_PKG=none
+fi
+
+if test "x$cf_have_ncuconfig" = "xno"; then
+ echo "Looking for ${cf_ncuconfig_root}-config"
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:3778: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NCURSES_CONFIG"; then
+ ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
+echo "$as_me:3793: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
+if test -n "$NCURSES_CONFIG"; then
+ echo "$as_me:3801: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
+else
+ echo "$as_me:3804: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$NCURSES_CONFIG" && break
+ done
+fi
+if test -z "$NCURSES_CONFIG"; then
+ ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
+ for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:3817: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_NCURSES_CONFIG"; then
+ ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
+echo "$as_me:3832: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
+if test -n "$ac_ct_NCURSES_CONFIG"; then
+ echo "$as_me:3840: result: $ac_ct_NCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
+else
+ echo "$as_me:3843: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_NCURSES_CONFIG" && break
+done
+test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
+
+ NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
+fi
+
+ if test "$NCURSES_CONFIG" != none ; then
+
+ CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
+
+cf_add_libs="`$NCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ # even with config script, some packages use no-override for curses.h
+
+echo "$as_me:3876: checking if we have identified curses headers" >&5
+echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
+if test "${cf_cv_ncurses_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_cv_ncurses_header=none
+for cf_header in \
+ ncurses.h ncurses/ncurses.h \
+ curses.h ncurses/curses.h
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 3888 "configure"
+#include "confdefs.h"
+#include <${cf_header}>
+int
+main ()
+{
+initscr(); tgoto("?", 0,0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3900: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3903: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3906: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3909: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_header=$cf_header; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:3920: result: $cf_cv_ncurses_header" >&5
+echo "${ECHO_T}$cf_cv_ncurses_header" >&6
+
+if test "$cf_cv_ncurses_header" = none ; then
+ { { echo "$as_me:3924: error: No curses header-files found" >&5
+echo "$as_me: error: No curses header-files found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
+
+for ac_header in $cf_cv_ncurses_header
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:3934: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3940 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:3944: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3950: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:3969: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+
+ else
+
+cf_ncuhdr_root=ncurses
+
+test -n "$cf_cv_curses_dir" && \
+test "$cf_cv_curses_dir" != "no" && { \
+
+if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
+ for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4022 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4034: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4037: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4040: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4043: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:4060: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+}
+
+echo "$as_me:4079: checking for $cf_ncuhdr_root header in include-path" >&5
+echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
+if test "${cf_cv_ncurses_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
+ ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
+ for cf_header in $cf_header_list
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4091 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main ()
+{
+
+#ifdef NCURSES_VERSION
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4115: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4118: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4121: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4124: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ test "$cf_cv_ncurses_h" != no && break
+ done
+
+fi
+echo "$as_me:4139: result: $cf_cv_ncurses_h" >&5
+echo "${ECHO_T}$cf_cv_ncurses_h" >&6
+
+if test "$cf_cv_ncurses_h" != no ; then
+ cf_cv_ncurses_header=$cf_cv_ncurses_h
+else
+
+echo "$as_me:4146: checking for $cf_ncuhdr_root include-path" >&5
+echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
+if test "${cf_cv_ncurses_h2+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ test -n "$verbose" && echo
+
+cf_search=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in
+ (-I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+
+test "x$cf_header_path" != "xNONE" && \
+test -d "$cf_header_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
+ test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
+ test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
+ test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+ cf_header_path_list="$cf_header_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $prefix"
+ test -d $prefix/include && cf_search="$cf_search $prefix/include"
+ test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
+ test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+done
+
+test "$includedir" != NONE && \
+test "$includedir" != "/usr/include" && \
+test -d "$includedir" && {
+ test -d $includedir && cf_search="$cf_search $includedir"
+ test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
+}
+
+test "$oldincludedir" != NONE && \
+test "$oldincludedir" != "/usr/include" && \
+test -d "$oldincludedir" && {
+ test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
+ test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
+}
+
+cf_search="$cf_search $cf_header_path_list"
+
+ test -n "$verbose" && echo search path $cf_search
+ cf_save2_CPPFLAGS="$CPPFLAGS"
+ for cf_incdir in $cf_search
+ do
+
+if test -n "$cf_incdir" ; then
+ for cf_add_incdir in $cf_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4264 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4276: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4279: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4282: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4285: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:4302: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+ for cf_header in \
+ ncurses.h \
+ curses.h
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4325 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main ()
+{
+
+#ifdef NCURSES_VERSION
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4349: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4352: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4355: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4358: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h2=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h2=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ if test "$cf_cv_ncurses_h2" != no ; then
+ cf_cv_ncurses_h2=$cf_incdir/$cf_header
+ test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
+ break
+ fi
+ test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
+ done
+ CPPFLAGS="$cf_save2_CPPFLAGS"
+ test "$cf_cv_ncurses_h2" != no && break
+ done
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4379: error: not found" >&5
+echo "$as_me: error: not found" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:4384: result: $cf_cv_ncurses_h2" >&5
+echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
+
+ cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
+ cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
+ if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
+ cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
+ fi
+
+if test -n "$cf_1st_incdir" ; then
+ for cf_add_incdir in $cf_1st_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4417 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4429: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4432: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4435: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4438: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:4455: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+fi
+
+# Set definitions to allow ifdef'ing for ncurses.h
+
+case $cf_cv_ncurses_header in
+(*ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_ncurses_header in
+(ncurses/curses.h|ncurses/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_NCURSES_H 1
+EOF
+
+ ;;
+(ncursesw/curses.h|ncursesw/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+echo "$as_me:4503: checking for terminfo header" >&5
+echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
+if test "${cf_cv_term_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
+ cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
+ ;;
+(*)
+ cf_term_header=term.h
+ ;;
+esac
+
+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 4521 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_test>
+
+int
+main ()
+{
+int x = auto_left_margin
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4536: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4539: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4542: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4545: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_term_header="$cf_test"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_cv_term_header=unknown
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ test "$cf_cv_term_header" != unknown && break
+done
+
+fi
+echo "$as_me:4561: result: $cf_cv_term_header" >&5
+echo "${ECHO_T}$cf_cv_term_header" >&6
+
+# Set definitions to allow ifdef'ing to accommodate subdirectories
+
+case $cf_cv_term_header in
+(*term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_TERM_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_term_header in
+(ncurses/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_TERM_H 1
+EOF
+
+ ;;
+(ncursesw/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_TERM_H 1
+EOF
+
+ ;;
+esac
+
+# some applications need this, but should check for NCURSES_VERSION
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+echo "$as_me:4599: checking for ncurses version" >&5
+echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
+if test "${cf_cv_ncurses_version+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_ncurses_version=no
+ cf_tempfile=out$$
+ rm -f $cf_tempfile
+ if test "$cross_compiling" = yes; then
+
+ # This will not work if the preprocessor splits the line after the
+ # Autoconf token. The 'unproto' program does that.
+ cat > conftest.$ac_ext <<EOF
+#include <${cf_cv_ncurses_header:-curses.h}>
+#undef Autoconf
+#ifdef NCURSES_VERSION
+Autoconf NCURSES_VERSION
+#else
+#ifdef __NCURSES_H
+Autoconf "old"
+#endif
+;
+#endif
+EOF
+ cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
+ { (eval echo "$as_me:4625: \"$cf_try\"") >&5
+ (eval $cf_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4628: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ if test -f conftest.out ; then
+ cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
+ test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
+ rm -f conftest.out
+ fi
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4638 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <stdio.h>
+int main()
+{
+ FILE *fp = fopen("$cf_tempfile", "w");
+#ifdef NCURSES_VERSION
+# ifdef NCURSES_VERSION_PATCH
+ fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
+# else
+ fprintf(fp, "%s\n", NCURSES_VERSION);
+# endif
+#else
+# ifdef __NCURSES_H
+ fprintf(fp, "old\n");
+# else
+ make an error
+# endif
+#endif
+ ${cf_cv_main_return:-return}(0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4666: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:4668: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4671: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_ncurses_version=`cat $cf_tempfile`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ rm -f $cf_tempfile
+
+fi
+echo "$as_me:4685: result: $cf_cv_ncurses_version" >&5
+echo "${ECHO_T}$cf_cv_ncurses_version" >&6
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+cf_nculib_root=ncurses
+ # This works, except for the special case where we find gpm, but
+ # ncurses is in a nonstandard location via $LIBS, and we really want
+ # to link gpm.
+cf_ncurses_LIBS=""
+cf_ncurses_SAVE="$LIBS"
+echo "$as_me:4698: checking for Gpm_Open in -lgpm" >&5
+echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4706 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char Gpm_Open ();
+int
+main ()
+{
+Gpm_Open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4725: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4728: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4731: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4734: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_Gpm_Open=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_Gpm_Open=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:4745: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
+if test $ac_cv_lib_gpm_Gpm_Open = yes; then
+ echo "$as_me:4748: checking for initscr in -lgpm" >&5
+echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_initscr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4756 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+int
+main ()
+{
+initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4775: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4778: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4781: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4784: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:4795: result: $ac_cv_lib_gpm_initscr" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
+if test $ac_cv_lib_gpm_initscr = yes; then
+ LIBS="$cf_ncurses_SAVE"
+else
+ cf_ncurses_LIBS="-lgpm"
+fi
+
+fi
+
+case $host_os in
+(freebsd*)
+ # This is only necessary if you are linking against an obsolete
+ # version of ncurses (but it should do no harm, since it's static).
+ if test "$cf_nculib_root" = ncurses ; then
+ echo "$as_me:4810: checking for tgoto in -lmytinfo" >&5
+echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
+if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmytinfo $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4818 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgoto ();
+int
+main ()
+{
+tgoto ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4837: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4840: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4843: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4846: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_mytinfo_tgoto=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_mytinfo_tgoto=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:4857: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
+if test $ac_cv_lib_mytinfo_tgoto = yes; then
+ cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
+fi
+
+ fi
+ ;;
+esac
+
+cf_add_libs="$cf_ncurses_LIBS"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+then
+
+cf_add_libs="-l$cf_nculib_root"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+else
+
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
+ cf_libdir=""
+ echo "$as_me:4906: checking for initscr" >&5
+echo $ECHO_N "checking for initscr... $ECHO_C" >&6
+if test "${ac_cv_func_initscr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4912 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char initscr (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_initscr) || defined (__stub___initscr)
+choke me
+#else
+f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4943: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4946: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4949: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4952: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:4962: result: $ac_cv_func_initscr" >&5
+echo "${ECHO_T}$ac_cv_func_initscr" >&6
+if test $ac_cv_func_initscr = yes; then
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+else
+
+ cf_save_LIBS="$LIBS"
+ echo "$as_me:4969: checking for initscr in -l$cf_nculib_root" >&5
+echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
+ LIBS="-l$cf_nculib_root $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4973 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4985: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4988: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4991: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4994: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:4996: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5003: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cf_search=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in
+ (-L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+
+test "x$cf_library_path" != "xNONE" && \
+test -d "$cf_library_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
+ test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
+ test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
+ test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+ cf_library_path_list="$cf_library_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
+ test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
+ test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
+ test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+done
+
+cf_search="$cf_library_path_list $cf_search"
+
+ for cf_libdir in $cf_search
+ do
+ echo "$as_me:5071: checking for -l$cf_nculib_root in $cf_libdir" >&5
+echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
+ LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5075 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5087: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5090: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5093: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5096: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:5098: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5105: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_save_LIBS"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
+
+if test $cf_found_library = no ; then
+ { { echo "$as_me:5120: error: Cannot link $cf_nculib_root library" >&5
+echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+if test -n "$cf_ncurses_LIBS" ; then
+ echo "$as_me:5128: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
+ cf_ncurses_SAVE="$LIBS"
+ for p in $cf_ncurses_LIBS ; do
+ q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
+ if test "$q" != "$LIBS" ; then
+ LIBS="$q"
+ fi
+ done
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5138 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5150: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5153: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5156: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5159: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:5161: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:5166: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_ncurses_SAVE"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ fi
+else
+ NCURSES_CONFIG=none
+fi
+
+echo "$as_me:5184: checking if you want wide-character code" >&5
+echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
+
+# Check whether --enable-widec or --disable-widec was given.
+if test "${enable_widec+set}" = set; then
+ enableval="$enable_widec"
+ with_widec=$enableval
+else
+ with_widec=no
+fi;
+echo "$as_me:5194: result: $with_widec" >&5
+echo "${ECHO_T}$with_widec" >&6
+if test "$with_widec" = yes ; then
+
+echo "$as_me:5198: checking for multibyte character support" >&5
+echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
+if test "${cf_cv_utf8_lib+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_save_LIBS="$LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5206 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+int
+main ()
+{
+putwc(0,0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5219: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5222: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5225: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5228: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_utf8_lib=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
+# will be set on completion of the AC_TRY_LINK below.
+cf_cv_header_path_utf8=
+cf_cv_library_path_utf8=
+
+echo "${as_me:-configure}:5240: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+
+cf_save_LIBS="$LIBS"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 5245 "configure"
+#include "confdefs.h"
+
+#include <libutf8.h>
+int
+main ()
+{
+putwc(0,0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5258: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5261: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5264: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5267: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_find_linkage_utf8=yes
+ cf_cv_header_path_utf8=/usr/include
+ cf_cv_library_path_utf8=/usr/lib
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+LIBS="-lutf8 $cf_save_LIBS"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 5281 "configure"
+#include "confdefs.h"
+
+#include <libutf8.h>
+int
+main ()
+{
+putwc(0,0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5294: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5297: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5300: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5303: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_find_linkage_utf8=yes
+ cf_cv_header_path_utf8=/usr/include
+ cf_cv_library_path_utf8=/usr/lib
+ cf_cv_library_file_utf8="-lutf8"
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_cv_find_linkage_utf8=no
+ LIBS="$cf_save_LIBS"
+
+ test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
+
+echo "${as_me:-configure}:5320: testing find linkage for utf8 library ..." 1>&5
+
+echo "${as_me:-configure}:5322: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_test_CPPFLAGS="$CPPFLAGS"
+
+cf_search=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in
+ (-I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+
+test "x$cf_header_path" != "xNONE" && \
+test -d "$cf_header_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
+ test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
+ test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
+ test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
+ test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
+ test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
+}
+
+ cf_header_path_list="$cf_header_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $prefix"
+ test -d $prefix/include && cf_search="$cf_search $prefix/include"
+ test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
+ test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
+ test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
+ test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
+ test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
+ test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
+ test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
+}
+
+done
+
+test "$includedir" != NONE && \
+test "$includedir" != "/usr/include" && \
+test -d "$includedir" && {
+ test -d $includedir && cf_search="$cf_search $includedir"
+ test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
+}
+
+test "$oldincludedir" != NONE && \
+test "$oldincludedir" != "/usr/include" && \
+test -d "$oldincludedir" && {
+ test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
+ test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
+}
+
+cf_search="$cf_search $cf_header_path_list"
+
+ for cf_cv_header_path_utf8 in $cf_search
+ do
+ if test -d $cf_cv_header_path_utf8 ; then
+ test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
+
+echo "${as_me:-configure}:5413: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+
+ CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5417 "configure"
+#include "confdefs.h"
+
+#include <libutf8.h>
+int
+main ()
+{
+putwc(0,0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5430: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5433: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5436: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5439: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
+
+echo "${as_me:-configure}:5444: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+
+ cf_cv_find_linkage_utf8=maybe
+ cf_test_CPPFLAGS="$CPPFLAGS"
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+ done
+
+ if test "$cf_cv_find_linkage_utf8" = maybe ; then
+
+echo "${as_me:-configure}:5462: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+
+ cf_save_LIBS="$LIBS"
+ cf_save_LDFLAGS="$LDFLAGS"
+
+ if test "$cf_cv_find_linkage_utf8" != yes ; then
+
+cf_search=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in
+ (-L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+
+test "x$cf_library_path" != "xNONE" && \
+test -d "$cf_library_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
+ test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
+ test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
+ test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
+ test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
+ test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
+}
+
+ cf_library_path_list="$cf_library_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
+ test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
+ test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
+ test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
+ test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
+ test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
+ test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
+ test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
+ test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
+}
+
+done
+
+cf_search="$cf_library_path_list $cf_search"
+
+ for cf_cv_library_path_utf8 in $cf_search
+ do
+ if test -d $cf_cv_library_path_utf8 ; then
+ test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
+
+echo "${as_me:-configure}:5537: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
+
+ CPPFLAGS="$cf_test_CPPFLAGS"
+ LIBS="-lutf8 $cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5543 "configure"
+#include "confdefs.h"
+
+#include <libutf8.h>
+int
+main ()
+{
+putwc(0,0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5556: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5559: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5562: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5565: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
+
+echo "${as_me:-configure}:5570: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+
+ cf_cv_find_linkage_utf8=yes
+ cf_cv_library_file_utf8="-lutf8"
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS"
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+ done
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ fi
+
+ else
+ cf_cv_find_linkage_utf8=no
+ fi
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+LIBS="$cf_save_LIBS"
+
+if test "$cf_cv_find_linkage_utf8" = yes ; then
+cf_cv_utf8_lib=add-on
+else
+cf_cv_utf8_lib=no
+fi
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:5612: result: $cf_cv_utf8_lib" >&5
+echo "${ECHO_T}$cf_cv_utf8_lib" >&6
+
+# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
+# ncurses/ncursesw:
+if test "$cf_cv_utf8_lib" = "add-on" ; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_LIBUTF8_H 1
+EOF
+
+if test -n "$cf_cv_header_path_utf8" ; then
+ for cf_add_incdir in $cf_cv_header_path_utf8
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5647 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5659: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5662: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5665: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5668: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:5685: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+if test -n "$cf_cv_library_path_utf8" ; then
+ for cf_add_libdir in $cf_cv_library_path_utf8
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+
+echo "${as_me:-configure}:5721: testing adding $cf_add_libdir to library-path ..." 1>&5
+
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
+fi
+
+cf_add_libs="$cf_cv_library_file_utf8"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+fi
+
+cf_ncuconfig_root=ncursesw
+cf_have_ncuconfig=no
+
+if test "x${PKG_CONFIG:=none}" != xnone; then
+ echo "$as_me:5751: checking pkg-config for $cf_ncuconfig_root" >&5
+echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
+ if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
+ echo "$as_me:5754: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+ echo "$as_me:5757: checking if the $cf_ncuconfig_root package files work" >&5
+echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
+ cf_have_ncuconfig=unknown
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_save_LIBS="$LIBS"
+
+ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
+
+cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5783 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5795: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5798: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5801: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5804: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if test "$cross_compiling" = yes; then
+ cf_have_ncuconfig=maybe
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5810 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+ int main(void)
+ { char *xx = curses_version(); return (xx == 0); }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:5817: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5820: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:5822: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5825: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_have_ncuconfig=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:5842: result: $cf_have_ncuconfig" >&5
+echo "${ECHO_T}$cf_have_ncuconfig" >&6
+ test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
+ if test "$cf_have_ncuconfig" != "yes"
+ then
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ NCURSES_CONFIG_PKG=none
+ else
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+ NCURSES_CONFIG_PKG=$cf_ncuconfig_root
+ fi
+
+ else
+ echo "$as_me:5860: result: no" >&5
+echo "${ECHO_T}no" >&6
+ NCURSES_CONFIG_PKG=none
+ fi
+else
+ NCURSES_CONFIG_PKG=none
+fi
+
+if test "x$cf_have_ncuconfig" = "xno"; then
+ echo "Looking for ${cf_ncuconfig_root}-config"
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:5876: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NCURSES_CONFIG"; then
+ ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
+echo "$as_me:5891: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
+if test -n "$NCURSES_CONFIG"; then
+ echo "$as_me:5899: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
+else
+ echo "$as_me:5902: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$NCURSES_CONFIG" && break
+ done
+fi
+if test -z "$NCURSES_CONFIG"; then
+ ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
+ for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:5915: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_NCURSES_CONFIG"; then
+ ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
+echo "$as_me:5930: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
+if test -n "$ac_ct_NCURSES_CONFIG"; then
+ echo "$as_me:5938: result: $ac_ct_NCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
+else
+ echo "$as_me:5941: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_NCURSES_CONFIG" && break
+done
+test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
+
+ NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
+fi
+
+ if test "$NCURSES_CONFIG" != none ; then
+
+ CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
+
+cf_add_libs="`$NCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ # even with config script, some packages use no-override for curses.h
+
+echo "$as_me:5974: checking if we have identified curses headers" >&5
+echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
+if test "${cf_cv_ncurses_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_cv_ncurses_header=none
+for cf_header in \
+ ncurses.h ncursesw/ncurses.h \
+ curses.h ncursesw/curses.h
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 5986 "configure"
+#include "confdefs.h"
+#include <${cf_header}>
+int
+main ()
+{
+initscr(); tgoto("?", 0,0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5998: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6001: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6004: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6007: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_header=$cf_header; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:6018: result: $cf_cv_ncurses_header" >&5
+echo "${ECHO_T}$cf_cv_ncurses_header" >&6
+
+if test "$cf_cv_ncurses_header" = none ; then
+ { { echo "$as_me:6022: error: No curses header-files found" >&5
+echo "$as_me: error: No curses header-files found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
+
+for ac_header in $cf_cv_ncurses_header
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:6032: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6038 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:6042: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:6048: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:6067: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+
+ else
+
+cf_ncuhdr_root=ncursesw
+
+test -n "$cf_cv_curses_dir" && \
+test "$cf_cv_curses_dir" != "no" && { \
+
+if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
+ for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6120 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6132: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6135: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6138: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6141: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:6158: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+}
+
+echo "$as_me:6177: checking for $cf_ncuhdr_root header in include-path" >&5
+echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
+if test "${cf_cv_ncurses_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
+ ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
+ for cf_header in $cf_header_list
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6189 "configure"
+#include "confdefs.h"
+
+#define _XOPEN_SOURCE_EXTENDED
+#undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
+#define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
+
+#include <$cf_header>
+int
+main ()
+{
+
+#ifdef NCURSES_VERSION
+
+#ifndef WACS_BSSB
+ make an error
+#endif
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6221: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6224: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6227: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6230: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ test "$cf_cv_ncurses_h" != no && break
+ done
+
+fi
+echo "$as_me:6245: result: $cf_cv_ncurses_h" >&5
+echo "${ECHO_T}$cf_cv_ncurses_h" >&6
+
+if test "$cf_cv_ncurses_h" != no ; then
+ cf_cv_ncurses_header=$cf_cv_ncurses_h
+else
+
+echo "$as_me:6252: checking for $cf_ncuhdr_root include-path" >&5
+echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
+if test "${cf_cv_ncurses_h2+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ test -n "$verbose" && echo
+
+cf_search=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in
+ (-I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+
+test "x$cf_header_path" != "xNONE" && \
+test -d "$cf_header_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
+ test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
+ test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
+ test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+ cf_header_path_list="$cf_header_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $prefix"
+ test -d $prefix/include && cf_search="$cf_search $prefix/include"
+ test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
+ test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+done
+
+test "$includedir" != NONE && \
+test "$includedir" != "/usr/include" && \
+test -d "$includedir" && {
+ test -d $includedir && cf_search="$cf_search $includedir"
+ test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
+}
+
+test "$oldincludedir" != NONE && \
+test "$oldincludedir" != "/usr/include" && \
+test -d "$oldincludedir" && {
+ test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
+ test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
+}
+
+cf_search="$cf_search $cf_header_path_list"
+
+ test -n "$verbose" && echo search path $cf_search
+ cf_save2_CPPFLAGS="$CPPFLAGS"
+ for cf_incdir in $cf_search
+ do
+
+if test -n "$cf_incdir" ; then
+ for cf_add_incdir in $cf_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6370 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6382: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6385: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6388: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6391: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:6408: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+ for cf_header in \
+ ncurses.h \
+ curses.h
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6431 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main ()
+{
+
+#ifdef NCURSES_VERSION
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6455: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6458: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6461: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6464: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h2=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h2=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ if test "$cf_cv_ncurses_h2" != no ; then
+ cf_cv_ncurses_h2=$cf_incdir/$cf_header
+ test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
+ break
+ fi
+ test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
+ done
+ CPPFLAGS="$cf_save2_CPPFLAGS"
+ test "$cf_cv_ncurses_h2" != no && break
+ done
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6485: error: not found" >&5
+echo "$as_me: error: not found" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:6490: result: $cf_cv_ncurses_h2" >&5
+echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
+
+ cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
+ cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
+ if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
+ cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
+ fi
+
+if test -n "$cf_1st_incdir" ; then
+ for cf_add_incdir in $cf_1st_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6523 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6535: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6538: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6541: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6544: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:6561: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+fi
+
+# Set definitions to allow ifdef'ing for ncurses.h
+
+case $cf_cv_ncurses_header in
+(*ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_ncurses_header in
+(ncurses/curses.h|ncurses/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_NCURSES_H 1
+EOF
+
+ ;;
+(ncursesw/curses.h|ncursesw/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+echo "$as_me:6609: checking for terminfo header" >&5
+echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
+if test "${cf_cv_term_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
+ cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
+ ;;
+(*)
+ cf_term_header=term.h
+ ;;
+esac
+
+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 6627 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_test>
+
+int
+main ()
+{
+int x = auto_left_margin
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6642: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6645: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6648: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6651: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_term_header="$cf_test"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_cv_term_header=unknown
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ test "$cf_cv_term_header" != unknown && break
+done
+
+fi
+echo "$as_me:6667: result: $cf_cv_term_header" >&5
+echo "${ECHO_T}$cf_cv_term_header" >&6
+
+# Set definitions to allow ifdef'ing to accommodate subdirectories
+
+case $cf_cv_term_header in
+(*term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_TERM_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_term_header in
+(ncurses/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_TERM_H 1
+EOF
+
+ ;;
+(ncursesw/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_TERM_H 1
+EOF
+
+ ;;
+esac
+
+# some applications need this, but should check for NCURSES_VERSION
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+echo "$as_me:6705: checking for ncurses version" >&5
+echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
+if test "${cf_cv_ncurses_version+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_ncurses_version=no
+ cf_tempfile=out$$
+ rm -f $cf_tempfile
+ if test "$cross_compiling" = yes; then
+
+ # This will not work if the preprocessor splits the line after the
+ # Autoconf token. The 'unproto' program does that.
+ cat > conftest.$ac_ext <<EOF
+#include <${cf_cv_ncurses_header:-curses.h}>
+#undef Autoconf
+#ifdef NCURSES_VERSION
+Autoconf NCURSES_VERSION
+#else
+#ifdef __NCURSES_H
+Autoconf "old"
+#endif
+;
+#endif
+EOF
+ cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
+ { (eval echo "$as_me:6731: \"$cf_try\"") >&5
+ (eval $cf_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6734: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ if test -f conftest.out ; then
+ cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
+ test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
+ rm -f conftest.out
+ fi
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 6744 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <stdio.h>
+int main()
+{
+ FILE *fp = fopen("$cf_tempfile", "w");
+#ifdef NCURSES_VERSION
+# ifdef NCURSES_VERSION_PATCH
+ fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
+# else
+ fprintf(fp, "%s\n", NCURSES_VERSION);
+# endif
+#else
+# ifdef __NCURSES_H
+ fprintf(fp, "old\n");
+# else
+ make an error
+# endif
+#endif
+ ${cf_cv_main_return:-return}(0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:6769: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6772: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:6774: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6777: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_ncurses_version=`cat $cf_tempfile`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ rm -f $cf_tempfile
+
+fi
+echo "$as_me:6791: result: $cf_cv_ncurses_version" >&5
+echo "${ECHO_T}$cf_cv_ncurses_version" >&6
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+cf_nculib_root=ncursesw
+ # This works, except for the special case where we find gpm, but
+ # ncurses is in a nonstandard location via $LIBS, and we really want
+ # to link gpm.
+cf_ncurses_LIBS=""
+cf_ncurses_SAVE="$LIBS"
+echo "$as_me:6804: checking for Gpm_Open in -lgpm" >&5
+echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6812 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char Gpm_Open ();
+int
+main ()
+{
+Gpm_Open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6831: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6834: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:6837: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6840: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_Gpm_Open=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_Gpm_Open=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6851: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
+if test $ac_cv_lib_gpm_Gpm_Open = yes; then
+ echo "$as_me:6854: checking for initscr in -lgpm" >&5
+echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_initscr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6862 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+int
+main ()
+{
+initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6884: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:6887: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6890: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6901: result: $ac_cv_lib_gpm_initscr" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
+if test $ac_cv_lib_gpm_initscr = yes; then
+ LIBS="$cf_ncurses_SAVE"
+else
+ cf_ncurses_LIBS="-lgpm"
+fi
+
+fi
+
+case $host_os in
+(freebsd*)
+ # This is only necessary if you are linking against an obsolete
+ # version of ncurses (but it should do no harm, since it's static).
+ if test "$cf_nculib_root" = ncurses ; then
+ echo "$as_me:6916: checking for tgoto in -lmytinfo" >&5
+echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
+if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmytinfo $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6924 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgoto ();
+int
+main ()
+{
+tgoto ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6943: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6946: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:6949: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6952: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_mytinfo_tgoto=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_mytinfo_tgoto=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:6963: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
+if test $ac_cv_lib_mytinfo_tgoto = yes; then
+ cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
+fi
+
+ fi
+ ;;
+esac
+
+cf_add_libs="$cf_ncurses_LIBS"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+then
+
+cf_add_libs="-l$cf_nculib_root"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+else
+
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
+ cf_libdir=""
+ echo "$as_me:7012: checking for initscr" >&5
+echo $ECHO_N "checking for initscr... $ECHO_C" >&6
+if test "${ac_cv_func_initscr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7018 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char initscr (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_initscr) || defined (__stub___initscr)
+choke me
+#else
+f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7049: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7052: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7055: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7058: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7068: result: $ac_cv_func_initscr" >&5
+echo "${ECHO_T}$ac_cv_func_initscr" >&6
+if test $ac_cv_func_initscr = yes; then
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+else
+
+ cf_save_LIBS="$LIBS"
+ echo "$as_me:7075: checking for initscr in -l$cf_nculib_root" >&5
+echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
+ LIBS="-l$cf_nculib_root $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7079 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7091: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7094: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7097: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7100: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:7102: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:7109: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cf_search=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in
+ (-L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+
+test "x$cf_library_path" != "xNONE" && \
+test -d "$cf_library_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
+ test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
+ test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
+ test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+ cf_library_path_list="$cf_library_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
+ test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
+ test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
+ test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+done
+
+cf_search="$cf_library_path_list $cf_search"
+
+ for cf_libdir in $cf_search
+ do
+ echo "$as_me:7177: checking for -l$cf_nculib_root in $cf_libdir" >&5
+echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
+ LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7181 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7193: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7196: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7199: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7202: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:7204: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:7211: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_save_LIBS"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
+
+if test $cf_found_library = no ; then
+ { { echo "$as_me:7226: error: Cannot link $cf_nculib_root library" >&5
+echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+if test -n "$cf_ncurses_LIBS" ; then
+ echo "$as_me:7234: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
+ cf_ncurses_SAVE="$LIBS"
+ for p in $cf_ncurses_LIBS ; do
+ q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
+ if test "$q" != "$LIBS" ; then
+ LIBS="$q"
+ fi
+ done
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7244 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7256: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7259: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7262: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7265: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:7267: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:7272: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_ncurses_SAVE"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ fi
+else
+ NCURSES_CONFIG=none
+fi
+
+else
+
+cf_ncuconfig_root=ncurses
+cf_have_ncuconfig=no
+
+if test "x${PKG_CONFIG:=none}" != xnone; then
+ echo "$as_me:7296: checking pkg-config for $cf_ncuconfig_root" >&5
+echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
+ if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
+ echo "$as_me:7299: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+ echo "$as_me:7302: checking if the $cf_ncuconfig_root package files work" >&5
+echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
+ cf_have_ncuconfig=unknown
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_save_LIBS="$LIBS"
+
+ CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
+
+cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7328 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7340: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7343: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7346: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7349: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if test "$cross_compiling" = yes; then
+ cf_have_ncuconfig=maybe
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7355 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+ int main(void)
+ { char *xx = curses_version(); return (xx == 0); }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:7362: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7365: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:7367: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7370: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_have_ncuconfig=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:7387: result: $cf_have_ncuconfig" >&5
+echo "${ECHO_T}$cf_have_ncuconfig" >&6
+ test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
+ if test "$cf_have_ncuconfig" != "yes"
+ then
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ NCURSES_CONFIG_PKG=none
+ else
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+ NCURSES_CONFIG_PKG=$cf_ncuconfig_root
+ fi
+
+ else
+ echo "$as_me:7405: result: no" >&5
+echo "${ECHO_T}no" >&6
+ NCURSES_CONFIG_PKG=none
+ fi
+else
+ NCURSES_CONFIG_PKG=none
+fi
+
+if test "x$cf_have_ncuconfig" = "xno"; then
+ echo "Looking for ${cf_ncuconfig_root}-config"
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:7421: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NCURSES_CONFIG"; then
+ ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
+echo "$as_me:7436: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
+if test -n "$NCURSES_CONFIG"; then
+ echo "$as_me:7444: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
+else
+ echo "$as_me:7447: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$NCURSES_CONFIG" && break
+ done
+fi
+if test -z "$NCURSES_CONFIG"; then
+ ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
+ for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:7460: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_NCURSES_CONFIG"; then
+ ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
+echo "$as_me:7475: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
+if test -n "$ac_ct_NCURSES_CONFIG"; then
+ echo "$as_me:7483: result: $ac_ct_NCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
+else
+ echo "$as_me:7486: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_NCURSES_CONFIG" && break
+done
+test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
+
+ NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
+fi
+
+ if test "$NCURSES_CONFIG" != none ; then
+
+ CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
+
+cf_add_libs="`$NCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ # even with config script, some packages use no-override for curses.h
+
+echo "$as_me:7519: checking if we have identified curses headers" >&5
+echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
+if test "${cf_cv_ncurses_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_cv_ncurses_header=none
+for cf_header in \
+ ncurses.h ncurses/ncurses.h \
+ curses.h ncurses/curses.h
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 7531 "configure"
+#include "confdefs.h"
+#include <${cf_header}>
+int
+main ()
+{
+initscr(); tgoto("?", 0,0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7543: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7546: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:7549: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7552: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_header=$cf_header; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:7563: result: $cf_cv_ncurses_header" >&5
+echo "${ECHO_T}$cf_cv_ncurses_header" >&6
+
+if test "$cf_cv_ncurses_header" = none ; then
+ { { echo "$as_me:7567: error: No curses header-files found" >&5
+echo "$as_me: error: No curses header-files found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
+
+for ac_header in $cf_cv_ncurses_header
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:7577: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7583 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:7587: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:7593: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:7612: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+
+ else
+
+cf_ncuhdr_root=ncurses
+
+test -n "$cf_cv_curses_dir" && \
+test "$cf_cv_curses_dir" != "no" && { \
+
+if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
+ for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7665 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7677: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7680: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:7683: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7686: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:7703: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+}
+
+echo "$as_me:7722: checking for $cf_ncuhdr_root header in include-path" >&5
+echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
+if test "${cf_cv_ncurses_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
+ ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
+ for cf_header in $cf_header_list
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7734 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main ()
+{
+
+#ifdef NCURSES_VERSION
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7758: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7761: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:7764: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7767: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ test "$cf_cv_ncurses_h" != no && break
+ done
+
+fi
+echo "$as_me:7782: result: $cf_cv_ncurses_h" >&5
+echo "${ECHO_T}$cf_cv_ncurses_h" >&6
+
+if test "$cf_cv_ncurses_h" != no ; then
+ cf_cv_ncurses_header=$cf_cv_ncurses_h
+else
+
+echo "$as_me:7789: checking for $cf_ncuhdr_root include-path" >&5
+echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
+if test "${cf_cv_ncurses_h2+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ test -n "$verbose" && echo
+
+cf_search=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in
+ (-I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+
+test "x$cf_header_path" != "xNONE" && \
+test -d "$cf_header_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
+ test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
+ test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
+ test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+ cf_header_path_list="$cf_header_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $prefix"
+ test -d $prefix/include && cf_search="$cf_search $prefix/include"
+ test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
+ test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+done
+
+test "$includedir" != NONE && \
+test "$includedir" != "/usr/include" && \
+test -d "$includedir" && {
+ test -d $includedir && cf_search="$cf_search $includedir"
+ test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
+}
+
+test "$oldincludedir" != NONE && \
+test "$oldincludedir" != "/usr/include" && \
+test -d "$oldincludedir" && {
+ test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
+ test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
+}
+
+cf_search="$cf_search $cf_header_path_list"
+
+ test -n "$verbose" && echo search path $cf_search
+ cf_save2_CPPFLAGS="$CPPFLAGS"
+ for cf_incdir in $cf_search
+ do
+
+if test -n "$cf_incdir" ; then
+ for cf_add_incdir in $cf_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7907 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7922: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:7925: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7928: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:7945: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+ for cf_header in \
+ ncurses.h \
+ curses.h
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7968 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main ()
+{
+
+#ifdef NCURSES_VERSION
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7992: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7995: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:7998: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8001: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h2=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h2=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ if test "$cf_cv_ncurses_h2" != no ; then
+ cf_cv_ncurses_h2=$cf_incdir/$cf_header
+ test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
+ break
+ fi
+ test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
+ done
+ CPPFLAGS="$cf_save2_CPPFLAGS"
+ test "$cf_cv_ncurses_h2" != no && break
+ done
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8022: error: not found" >&5
+echo "$as_me: error: not found" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:8027: result: $cf_cv_ncurses_h2" >&5
+echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
+
+ cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
+ cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
+ if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
+ cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
+ fi
+
+if test -n "$cf_1st_incdir" ; then
+ for cf_add_incdir in $cf_1st_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8060 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8072: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8075: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8078: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8081: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:8098: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+fi
+
+# Set definitions to allow ifdef'ing for ncurses.h
+
+case $cf_cv_ncurses_header in
+(*ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_ncurses_header in
+(ncurses/curses.h|ncurses/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_NCURSES_H 1
+EOF
+
+ ;;
+(ncursesw/curses.h|ncursesw/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+echo "$as_me:8146: checking for terminfo header" >&5
+echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
+if test "${cf_cv_term_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
+ cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
+ ;;
+(*)
+ cf_term_header=term.h
+ ;;
+esac
+
+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 8164 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_test>
+
+int
+main ()
+{
+int x = auto_left_margin
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8179: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8182: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8185: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8188: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_term_header="$cf_test"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_cv_term_header=unknown
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ test "$cf_cv_term_header" != unknown && break
+done
+
+fi
+echo "$as_me:8204: result: $cf_cv_term_header" >&5
+echo "${ECHO_T}$cf_cv_term_header" >&6
+
+# Set definitions to allow ifdef'ing to accommodate subdirectories
+
+case $cf_cv_term_header in
+(*term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_TERM_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_term_header in
+(ncurses/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_TERM_H 1
+EOF
+
+ ;;
+(ncursesw/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_TERM_H 1
+EOF
+
+ ;;
+esac
+
+# some applications need this, but should check for NCURSES_VERSION
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+echo "$as_me:8242: checking for ncurses version" >&5
+echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
+if test "${cf_cv_ncurses_version+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_ncurses_version=no
+ cf_tempfile=out$$
+ rm -f $cf_tempfile
+ if test "$cross_compiling" = yes; then
+
+ # This will not work if the preprocessor splits the line after the
+ # Autoconf token. The 'unproto' program does that.
+ cat > conftest.$ac_ext <<EOF
+#include <${cf_cv_ncurses_header:-curses.h}>
+#undef Autoconf
+#ifdef NCURSES_VERSION
+Autoconf NCURSES_VERSION
+#else
+#ifdef __NCURSES_H
+Autoconf "old"
+#endif
+;
+#endif
+EOF
+ cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
+ { (eval echo "$as_me:8268: \"$cf_try\"") >&5
+ (eval $cf_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8271: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ if test -f conftest.out ; then
+ cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
+ test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
+ rm -f conftest.out
+ fi
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8281 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <stdio.h>
+int main()
+{
+ FILE *fp = fopen("$cf_tempfile", "w");
+#ifdef NCURSES_VERSION
+# ifdef NCURSES_VERSION_PATCH
+ fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
+# else
+ fprintf(fp, "%s\n", NCURSES_VERSION);
+# endif
+#else
+# ifdef __NCURSES_H
+ fprintf(fp, "old\n");
+# else
+ make an error
+# endif
+#endif
+ ${cf_cv_main_return:-return}(0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:8306: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8309: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:8311: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8314: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_ncurses_version=`cat $cf_tempfile`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ rm -f $cf_tempfile
+
+fi
+echo "$as_me:8328: result: $cf_cv_ncurses_version" >&5
+echo "${ECHO_T}$cf_cv_ncurses_version" >&6
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+cf_nculib_root=ncurses
+ # This works, except for the special case where we find gpm, but
+ # ncurses is in a nonstandard location via $LIBS, and we really want
+ # to link gpm.
+cf_ncurses_LIBS=""
+cf_ncurses_SAVE="$LIBS"
+echo "$as_me:8341: checking for Gpm_Open in -lgpm" >&5
+echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 8349 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char Gpm_Open ();
+int
+main ()
+{
+Gpm_Open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8368: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8371: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8374: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8377: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_Gpm_Open=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_Gpm_Open=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:8388: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
+if test $ac_cv_lib_gpm_Gpm_Open = yes; then
+ echo "$as_me:8391: checking for initscr in -lgpm" >&5
+echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_initscr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 8399 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+int
+main ()
+{
+initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8418: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8421: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8424: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8427: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:8438: result: $ac_cv_lib_gpm_initscr" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
+if test $ac_cv_lib_gpm_initscr = yes; then
+ LIBS="$cf_ncurses_SAVE"
+else
+ cf_ncurses_LIBS="-lgpm"
+fi
+
+fi
+
+case $host_os in
+(freebsd*)
+ # This is only necessary if you are linking against an obsolete
+ # version of ncurses (but it should do no harm, since it's static).
+ if test "$cf_nculib_root" = ncurses ; then
+ echo "$as_me:8453: checking for tgoto in -lmytinfo" >&5
+echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
+if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmytinfo $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 8461 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char tgoto ();
+int
+main ()
+{
+tgoto ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8480: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8483: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8486: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8489: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_mytinfo_tgoto=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_mytinfo_tgoto=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:8500: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
+if test $ac_cv_lib_mytinfo_tgoto = yes; then
+ cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
+fi
+
+ fi
+ ;;
+esac
+
+cf_add_libs="$cf_ncurses_LIBS"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+then
+
+cf_add_libs="-l$cf_nculib_root"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+else
+
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
+ cf_libdir=""
+ echo "$as_me:8549: checking for initscr" >&5
+echo $ECHO_N "checking for initscr... $ECHO_C" >&6
+if test "${ac_cv_func_initscr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8555 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char initscr (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_initscr) || defined (__stub___initscr)
+choke me
+#else
+f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8586: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8589: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8592: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8595: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:8605: result: $ac_cv_func_initscr" >&5
+echo "${ECHO_T}$ac_cv_func_initscr" >&6
+if test $ac_cv_func_initscr = yes; then
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+else
+
+ cf_save_LIBS="$LIBS"
+ echo "$as_me:8612: checking for initscr in -l$cf_nculib_root" >&5
+echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
+ LIBS="-l$cf_nculib_root $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8616 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8628: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8631: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8634: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8637: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:8639: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:8646: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cf_search=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in
+ (-L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+
+test "x$cf_library_path" != "xNONE" && \
+test -d "$cf_library_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
+ test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
+ test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
+ test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+ cf_library_path_list="$cf_library_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
+ test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
+ test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
+ test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+done
+
+cf_search="$cf_library_path_list $cf_search"
+
+ for cf_libdir in $cf_search
+ do
+ echo "$as_me:8714: checking for -l$cf_nculib_root in $cf_libdir" >&5
+echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
+ LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8718 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8730: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8733: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8736: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8739: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:8741: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:8748: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_save_LIBS"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
+
+if test $cf_found_library = no ; then
+ { { echo "$as_me:8763: error: Cannot link $cf_nculib_root library" >&5
+echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+if test -n "$cf_ncurses_LIBS" ; then
+ echo "$as_me:8771: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
+ cf_ncurses_SAVE="$LIBS"
+ for p in $cf_ncurses_LIBS ; do
+ q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
+ if test "$q" != "$LIBS" ; then
+ LIBS="$q"
+ fi
+ done
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8781 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main ()
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8793: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8796: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8799: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8802: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:8804: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:8809: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_ncurses_SAVE"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ fi
+else
+ NCURSES_CONFIG=none
+fi
+
+fi
+
+if test "$NCURSES_CONFIG_PKG" != none ; then
+ cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
+
+ NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
+ NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
+ NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
+
+ cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
+ if test -z "$cf_cv_abi_version"
+ then
+ cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
+ fi
+
+elif test "$NCURSES_CONFIG" != none ; then
+
+ cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
+
+ NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
+ NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
+ NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
+
+ # ABI version is not available from headers
+ cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
+
+else
+
+ for cf_name in MAJOR MINOR PATCH
+ do
+ cat >conftest.$ac_ext <<CF_EOF
+ #include <${cf_cv_ncurses_header:-curses.h}>
+ AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
+CF_EOF
+ cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
+ { (eval echo "$as_me:8862: \"$cf_try\"") >&5
+ (eval $cf_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8865: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ if test -f conftest.out ; then
+ cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
+ eval NCURSES_$cf_name=\"$cf_result\"
+ # cat conftest.$ac_ext
+ # cat conftest.out
+ fi
+ done
+
+ cf_cv_abi_version=${NCURSES_MAJOR}
+
+fi
+
+cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
+
+cf_cv_timestamp=`date`
+
+echo "$as_me:8883: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
+echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
+
+echo "$as_me:8886: checking if you want to have a library-prefix" >&5
+echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
+
+# Check whether --with-lib-prefix or --without-lib-prefix was given.
+if test "${with_lib_prefix+set}" = set; then
+ withval="$with_lib_prefix"
+ with_lib_prefix=$withval
+else
+ with_lib_prefix=auto
+fi;
+echo "$as_me:8896: result: $with_lib_prefix" >&5
+echo "${ECHO_T}$with_lib_prefix" >&6
+
+if test $with_lib_prefix = auto
+then
+
+ case $cf_cv_system_name in
+ (OS/2*|os2*)
+ LIB_PREFIX=''
+ ;;
+ (*) LIB_PREFIX='lib'
+ ;;
+ esac
+cf_prefix=$LIB_PREFIX
+
+elif test $with_lib_prefix = no
+then
+ LIB_PREFIX=
+else
+ LIB_PREFIX=$with_lib_prefix
+fi
+
+LIB_SUFFIX=
+
+###############################################################################
+
+if test X"$CC_G_OPT" = X"" ; then
+ CC_G_OPT='-g'
+ test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
+fi
+
+echo "$as_me:8927: checking for default loader flags" >&5
+echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
+case $DFT_LWR_MODEL in
+(normal) LD_MODEL='' ;;
+(debug) LD_MODEL=$CC_G_OPT ;;
+(profile) LD_MODEL='-pg';;
+(shared) LD_MODEL='' ;;
+esac
+echo "$as_me:8935: result: $LD_MODEL" >&5
+echo "${ECHO_T}$LD_MODEL" >&6
+
+LD_RPATH_OPT=
+echo "$as_me:8939: checking for an rpath option" >&5
+echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
+case $cf_cv_system_name in
+(irix*)
+ if test "$GCC" = yes; then
+ LD_RPATH_OPT="-Wl,-rpath,"
+ else
+ LD_RPATH_OPT="-rpath "
+ fi
+ ;;
+(linux*|gnu*|k*bsd*-gnu)
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+(openbsd[2-9].*|mirbsd*)
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+(dragonfly*|freebsd*)
+ LD_RPATH_OPT="-rpath "
+ ;;
+(netbsd*)
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+(osf*|mls+*)
+ LD_RPATH_OPT="-rpath "
+ ;;
+(solaris2*)
+ LD_RPATH_OPT="-R"
+ ;;
+(*)
+ ;;
+esac
+echo "$as_me:8970: result: $LD_RPATH_OPT" >&5
+echo "${ECHO_T}$LD_RPATH_OPT" >&6
+
+case "x$LD_RPATH_OPT" in
+(x-R*)
+ echo "$as_me:8975: checking if we need a space after rpath option" >&5
+echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
+ cf_save_LIBS="$LIBS"
+
+cf_add_libs="${LD_RPATH_OPT}$libdir"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8996 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9008: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9011: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9014: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9017: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_rpath_space=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_rpath_space=yes
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$cf_save_LIBS"
+ echo "$as_me:9027: result: $cf_rpath_space" >&5
+echo "${ECHO_T}$cf_rpath_space" >&6
+ test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
+ ;;
+esac
+
+ RM_SHARED_OPTS=
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ LD_SHARED_OPTS=
+ INSTALL_LIB="-m 644"
+ : ${rel_builddir:=.}
+
+ shlibdir=$libdir
+
+ MAKE_DLLS="#"
+
+ cf_cv_do_symlinks=no
+ cf_ld_rpath_opt=
+ test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
+
+ echo "$as_me:9048: checking if release/abi version should be used for shared libs" >&5
+echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
+
+# Check whether --with-shlib-version or --without-shlib-version was given.
+if test "${with_shlib_version+set}" = set; then
+ withval="$with_shlib_version"
+ test -z "$withval" && withval=auto
+ case $withval in
+ (yes)
+ cf_cv_shlib_version=auto
+ ;;
+ (rel|abi|auto|no)
+ cf_cv_shlib_version=$withval
+ ;;
+ (*)
+ { { echo "$as_me:9063: error: option value must be one of: rel, abi, auto or no" >&5
+echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ cf_cv_shlib_version=auto
+fi;
+ echo "$as_me:9072: result: $cf_cv_shlib_version" >&5
+echo "${ECHO_T}$cf_cv_shlib_version" >&6
+
+ cf_cv_rm_so_locs=no
+ cf_try_cflags=
+
+ # Some less-capable ports of gcc support only -fpic
+ CC_SHARED_OPTS=
+ if test "$GCC" = yes
+ then
+ echo "$as_me:9082: checking which $CC option to use" >&5
+echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ for CC_SHARED_OPTS in -fPIC -fpic ''
+ do
+ CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9089 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+int x = 1
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9104: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9107: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9110: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ echo "$as_me:9119: result: $CC_SHARED_OPTS" >&5
+echo "${ECHO_T}$CC_SHARED_OPTS" >&6
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+ cf_cv_shlib_version_infix=no
+
+ case $cf_cv_system_name in
+ (aix4.3-9*|aix[5-7]*)
+ if test "$GCC" = yes; then
+ CC_SHARED_OPTS='-Wl,-brtl'
+ MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
+ else
+ CC_SHARED_OPTS='-brtl'
+ # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
+ MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
+ fi
+ ;;
+ (beos*)
+ MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
+ ;;
+ (cygwin*)
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=cygdll
+ cf_cv_shlib_version_infix=cygdll
+ shlibdir=$bindir
+ MAKE_DLLS=
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!$SHELL
+ SHARED_LIB=\$1
+ IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \$SHARED_LIB
+ ** IMPORT_LIB \$IMPORT_LIB
+EOF
+ exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ (msys*)
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=msysdll
+ cf_cv_shlib_version_infix=msysdll
+ shlibdir=$bindir
+ MAKE_DLLS=
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!$SHELL
+ SHARED_LIB=\$1
+ IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \$SHARED_LIB
+ ** IMPORT_LIB \$IMPORT_LIB
+EOF
+ exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ (darwin*)
+ cf_try_cflags="no-cpp-precomp"
+ CC_SHARED_OPTS="-dynamic"
+ MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
+ cf_cv_shlib_version_infix=yes
+ echo "$as_me:9190: checking if ld -search_paths_first works" >&5
+echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
+if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9199 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9211: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9214: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9217: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9220: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ldflags_search_paths_first=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ldflags_search_paths_first=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$cf_save_LDFLAGS
+fi
+echo "$as_me:9231: result: $cf_cv_ldflags_search_paths_first" >&5
+echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
+ if test $cf_cv_ldflags_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
+ ;;
+ (hpux[7-8]*)
+ # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='+Z'
+ fi
+ MK_SHARED_LIB='${LD} -b -o $@'
+ INSTALL_LIB="-m 555"
+ ;;
+ (hpux*)
+ # (tested with gcc 2.7.2 -- I don't have c89)
+ if test "$GCC" = yes; then
+ LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
+ else
+ CC_SHARED_OPTS='+Z'
+ LD_SHARED_OPTS='-Wl,+b,${libdir}'
+ fi
+ MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
+ # HP-UX shared libraries must be executable, and should be
+ # readonly to exploit a quirk in the memory manager.
+ INSTALL_LIB="-m 555"
+ ;;
+ (interix*)
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_shared_soname='`basename `'
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
+ ;;
+ (irix*)
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ # tested with IRIX 5.2 and 'cc'.
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
+ else
+ MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ (linux*|gnu*|k*bsd*-gnu)
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $@`'
+ fi
+
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ ;;
+ (mingw*)
+ cf_cv_shlib_version=mingw
+ cf_cv_shlib_version_infix=mingw
+ shlibdir=$bindir
+ MAKE_DLLS=
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,--enable-auto-import"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!$SHELL
+ SHARED_LIB=\$1
+ IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \$SHARED_LIB
+ ** IMPORT_LIB \$IMPORT_LIB
+EOF
+ exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ (openbsd[2-9].*|mirbsd*)
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $@`'
+ fi
+
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ ;;
+ (nto-qnx*|openbsd*|freebsd[12].*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='${LD} -Bshareable -o $@'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ (dragonfly*|freebsd*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $@`'
+ fi
+
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ ;;
+ (netbsd*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ if test "$cf_cv_shlib_version" = auto; then
+ if test -f /usr/libexec/ld.elf_so; then
+ cf_cv_shlib_version=abi
+ else
+ cf_cv_shlib_version=rel
+ fi
+ fi
+
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $@`'
+ fi
+
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
+ else
+ MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
+ fi
+ ;;
+ (osf*|mls+*)
+ # tested with OSF/1 V3.2 and 'cc'
+ # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
+ # link with shared libs).
+ MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
+ case $host_os in
+ (osf4*)
+ MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
+ ;;
+ esac
+ MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
+ # tested with osr5.0.5
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-belf -KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
+ if test "$cf_cv_enable_rpath" = yes ; then
+ # only way is to set LD_RUN_PATH but no switch for it
+ RUN_PATH=$libdir
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ LINK_PROGS='LD_RUN_PATH=${libdir}'
+ LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
+ ;;
+ (sunos4*)
+ # tested with SunOS 4.1.1 and gcc 2.7.0
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -assert pure-text -o $@'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ (solaris2*)
+ # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
+ # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
+ fi
+
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $@`'
+ fi
+
+ if test "$GCC" != yes; then
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
+ do
+ CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9456 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello\n");
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9468: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9471: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9474: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9477: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ CC_SHARED_OPTS=$cf_shared_opts
+ MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
+ else
+ MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
+ fi
+ ;;
+ (sysv5uw7*|unix_sv*)
+ # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -d y -G -o $@'
+ ;;
+ (*)
+ CC_SHARED_OPTS='unknown'
+ MK_SHARED_LIB='echo unknown'
+ ;;
+ esac
+
+ # This works if the last tokens in $MK_SHARED_LIB are the -o target.
+ case "$cf_cv_shlib_version" in
+ (rel|abi)
+ case "$MK_SHARED_LIB" in
+ (*'-o $@')
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ ;;
+ (*)
+ { echo "$as_me:9514: WARNING: ignored --with-shlib-version" >&5
+echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
+ ;;
+ esac
+ ;;
+ esac
+
+ if test -n "$cf_try_cflags"
+ then
+cat > conftest.$ac_ext <<EOF
+#line 9524 "${as_me:-configure}"
+#include <stdio.h>
+int main(int argc, char *argv[])
+{
+ printf("hello\n");
+ return (argv[argc-1] == 0) ;
+}
+EOF
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_opt in $cf_try_cflags
+ do
+ CFLAGS="$cf_save_CFLAGS -$cf_opt"
+ echo "$as_me:9536: checking if CFLAGS option -$cf_opt works" >&5
+echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
+ if { (eval echo "$as_me:9538: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9541: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ echo "$as_me:9543: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ else
+ echo "$as_me:9547: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+ # RPATH_LIST is a colon-separated list of directories
+ test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
+ test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
+
+ test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
+
+ test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
+
+echo "${as_me:-configure}:9562: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
+
+ test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
+
+echo "${as_me:-configure}:9566: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
+
+# The test/sample programs in the original tree link using rpath option.
+# Make it optional for packagers.
+if test -n "$LOCAL_LDFLAGS"
+then
+ echo "$as_me:9572: checking if you want to link sample programs with rpath option" >&5
+echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
+
+# Check whether --enable-rpath-link or --disable-rpath-link was given.
+if test "${enable_rpath_link+set}" = set; then
+ enableval="$enable_rpath_link"
+ with_rpath_link=$enableval
+else
+ with_rpath_link=yes
+fi;
+ echo "$as_me:9582: result: $with_rpath_link" >&5
+echo "${ECHO_T}$with_rpath_link" >&6
+ if test "$with_rpath_link" = no
+ then
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ fi
+fi
+
+###############################################################################
+
+### use option --enable-broken-linker to force on use of broken-linker support
+echo "$as_me:9594: checking if you want broken-linker support code" >&5
+echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
+
+# Check whether --enable-broken_linker or --disable-broken_linker was given.
+if test "${enable_broken_linker+set}" = set; then
+ enableval="$enable_broken_linker"
+ with_broken_linker=$enableval
+else
+ with_broken_linker=${BROKEN_LINKER:-no}
+fi;
+echo "$as_me:9604: result: $with_broken_linker" >&5
+echo "${ECHO_T}$with_broken_linker" >&6
+
+BROKEN_LINKER=0
+if test "$with_broken_linker" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define BROKEN_LINKER 1
+EOF
+
+ BROKEN_LINKER=1
+elif test "$DFT_LWR_MODEL" = shared ; then
+ case $cf_cv_system_name in
+ (cygwin*)
+ cat >>confdefs.h <<\EOF
+#define BROKEN_LINKER 1
+EOF
+
+ BROKEN_LINKER=1
+ test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
+
+echo "${as_me:-configure}:9624: testing cygwin linker is broken anyway ..." 1>&5
+
+ ;;
+ esac
+fi
+
+# Check to define _XOPEN_SOURCE "automatically"
+
+cf_XOPEN_SOURCE=500
+cf_POSIX_C_SOURCE=199506L
+cf_xopen_source=
+
+case $host_os in
+(aix[4-7]*)
+ cf_xopen_source="-D_ALL_SOURCE"
+ ;;
+(cygwin|msys)
+ cf_XOPEN_SOURCE=600
+ ;;
+(darwin[0-8].*)
+ cf_xopen_source="-D_APPLE_C_SOURCE"
+ ;;
+(darwin*)
+ cf_xopen_source="-D_DARWIN_C_SOURCE"
+ cf_XOPEN_SOURCE=
+ ;;
+(freebsd*|dragonfly*)
+ # 5.x headers associate
+ # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
+ # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
+ cf_POSIX_C_SOURCE=200112L
+ cf_XOPEN_SOURCE=600
+ cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+(hpux11*)
+ cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
+ ;;
+(hpux*)
+ cf_xopen_source="-D_HPUX_SOURCE"
+ ;;
+(irix[56].*)
+ cf_xopen_source="-D_SGI_SOURCE"
+ cf_XOPEN_SOURCE=
+ ;;
+(linux*|gnu*|mint*|k*bsd*-gnu)
+
+echo "$as_me:9670: checking if we must define _GNU_SOURCE" >&5
+echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_gnu_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 9677 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9695: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9698: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9701: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_gnu_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9710 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9725: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9728: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9731: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9734: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_gnu_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_gnu_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:9749: result: $cf_cv_gnu_source" >&5
+echo "${ECHO_T}$cf_cv_gnu_source" >&6
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+
+ ;;
+(minix*)
+ cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
+ ;;
+(mirbsd*)
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
+ cf_XOPEN_SOURCE=
+
+cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
+
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+
+cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+echo "$as_me:9774: checking if we should define _POSIX_C_SOURCE" >&5
+echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_posix_c_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+echo "${as_me:-configure}:9780: testing if the symbol is already defined go no further ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9783 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9801: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9804: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9807: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_posix_c_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_want_posix_source=no
+ case .$cf_POSIX_C_SOURCE in
+ (.[12]??*)
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ ;;
+ (.2)
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ cf_want_posix_source=yes
+ ;;
+ (.*)
+ cf_want_posix_source=yes
+ ;;
+ esac
+ if test "$cf_want_posix_source" = yes ; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9828 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _POSIX_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9843: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9846: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9849: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9852: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+
+echo "${as_me:-configure}:9863: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+
+echo "${as_me:-configure}:9868: testing if the second compile does not leave our definition intact error ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9871 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9886: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9889: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9892: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9895: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:9911: result: $cf_cv_posix_c_source" >&5
+echo "${ECHO_T}$cf_cv_posix_c_source" >&6
+
+if test "$cf_cv_posix_c_source" != no ; then
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_cv_posix_c_source
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
+ ;;
+(netbsd*)
+ cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ ;;
+(openbsd[4-9]*)
+ # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
+ cf_xopen_source="-D_BSD_SOURCE"
+ cf_XOPEN_SOURCE=600
+ ;;
+(openbsd*)
+ # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+ ;;
+(osf[45]*)
+ cf_xopen_source="-D_OSF_SOURCE"
+ ;;
+(nto-qnx*)
+ cf_xopen_source="-D_QNX_SOURCE"
+ ;;
+(sco*)
+ # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+ ;;
+(solaris2.*)
+ cf_xopen_source="-D__EXTENSIONS__"
+ cf_cv_xopen_source=broken
+ ;;
+(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
+ cf_XOPEN_SOURCE=
+ cf_POSIX_C_SOURCE=
+ ;;
+(*)
+
+echo "$as_me:10029: checking if we should define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10036 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10055: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10058: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10061: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10064: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10073 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10092: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10095: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10098: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10101: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=$cf_XOPEN_SOURCE
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:10116: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+
+if test "$cf_cv_xopen_source" != no ; then
+
+CFLAGS=`echo "$CFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_temp_xopen_source
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
+cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
+
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+
+cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+echo "$as_me:10224: checking if we should define _POSIX_C_SOURCE" >&5
+echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_posix_c_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+echo "${as_me:-configure}:10230: testing if the symbol is already defined go no further ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10233 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10251: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10254: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10257: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_posix_c_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_want_posix_source=no
+ case .$cf_POSIX_C_SOURCE in
+ (.[12]??*)
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ ;;
+ (.2)
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ cf_want_posix_source=yes
+ ;;
+ (.*)
+ cf_want_posix_source=yes
+ ;;
+ esac
+ if test "$cf_want_posix_source" = yes ; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10278 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _POSIX_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10293: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10296: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10299: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10302: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+
+echo "${as_me:-configure}:10313: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+
+echo "${as_me:-configure}:10318: testing if the second compile does not leave our definition intact error ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10321 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10336: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10339: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10342: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10345: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:10361: result: $cf_cv_posix_c_source" >&5
+echo "${ECHO_T}$cf_cv_posix_c_source" >&6
+
+if test "$cf_cv_posix_c_source" != no ; then
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_cv_posix_c_source
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
+ ;;
+esac
+
+if test -n "$cf_xopen_source" ; then
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_xopen_source
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+ test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
+
+echo "${as_me:-configure}:10519: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+ test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
+
+echo "${as_me:-configure}:10527: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+ test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
+
+echo "${as_me:-configure}:10535: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
+if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
+ echo "$as_me:10543: checking if _XOPEN_SOURCE really is set" >&5
+echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10546 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10561: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10564: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10567: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10570: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_XOPEN_SOURCE_set=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_XOPEN_SOURCE_set=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:10579: result: $cf_XOPEN_SOURCE_set" >&5
+echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
+ if test $cf_XOPEN_SOURCE_set = yes
+ then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10584 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+int
+main ()
+{
+
+#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10602: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10605: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10608: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_XOPEN_SOURCE_set_ok=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_XOPEN_SOURCE_set_ok=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ if test $cf_XOPEN_SOURCE_set_ok = no
+ then
+ { echo "$as_me:10619: WARNING: _XOPEN_SOURCE is lower than requested" >&5
+echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
+ fi
+ else
+
+echo "$as_me:10624: checking if we should define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10631 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10650: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10653: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10656: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10659: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10668 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10687: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10690: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10693: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10696: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=$cf_XOPEN_SOURCE
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:10711: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+
+if test "$cf_cv_xopen_source" != no ; then
+
+CFLAGS=`echo "$CFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_temp_xopen_source
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
+ fi
+fi
+
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval="$enable_largefile"
+
+fi;
+if test "$enable_largefile" != no; then
+
+ echo "$as_me:10816: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10828 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10848: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10851: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10854: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10857: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10867: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10870: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10873: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10876: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+echo "$as_me:10890: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ echo "$as_me:10896: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ ac_cv_sys_file_offset_bits=no
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10904 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10924: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10927: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10930: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10933: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10942 "configure"
+#include "confdefs.h"
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10963: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10966: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10969: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10972: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sys_file_offset_bits=64; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ break
+done
+fi
+echo "$as_me:10983: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
+if test "$ac_cv_sys_file_offset_bits" != no; then
+
+cat >>confdefs.h <<EOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+EOF
+
+fi
+rm -rf conftest*
+ echo "$as_me:10993: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_large_files+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ ac_cv_sys_large_files=no
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11001 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11021: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11024: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11027: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11030: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11039 "configure"
+#include "confdefs.h"
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11063: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11066: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11069: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sys_large_files=1; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ break
+done
+fi
+echo "$as_me:11080: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
+if test "$ac_cv_sys_large_files" != no; then
+
+cat >>confdefs.h <<EOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+EOF
+
+fi
+rm -rf conftest*
+fi
+
+ if test "$enable_largefile" != no ; then
+ echo "$as_me:11093: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ ac_cv_sys_largefile_source=no
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11101 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+return !fseeko;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11113: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11116: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11119: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11122: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11131 "configure"
+#include "confdefs.h"
+#define _LARGEFILE_SOURCE 1
+#include <stdio.h>
+int
+main ()
+{
+return !fseeko;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11144: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11147: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11150: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11153: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sys_largefile_source=1; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ break
+done
+fi
+echo "$as_me:11164: result: $ac_cv_sys_largefile_source" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
+if test "$ac_cv_sys_largefile_source" != no; then
+
+cat >>confdefs.h <<EOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+EOF
+
+fi
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+echo "$as_me:11178: checking for fseeko" >&5
+echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
+if test "${ac_cv_func_fseeko+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11184 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+return fseeko && fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11196: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11199: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11202: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11205: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fseeko=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_fseeko=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11215: result: $ac_cv_func_fseeko" >&5
+echo "${ECHO_T}$ac_cv_func_fseeko" >&6
+if test $ac_cv_func_fseeko = yes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_FSEEKO 1
+EOF
+
+fi
+
+ # Normally we would collect these definitions in the config.h,
+ # but (like _XOPEN_SOURCE), some environments rely on having these
+ # defined before any of the system headers are included. Another
+ # case comes up with C++, e.g., on AIX the compiler compiles the
+ # header files by themselves before looking at the body files it is
+ # told to compile. For ncurses, those header files do not include
+ # the config.h
+ test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
+ test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
+ test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
+
+ echo "$as_me:11236: checking whether to use struct dirent64" >&5
+echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
+if test "${cf_cv_struct_dirent64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11243 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <dirent.h>
+
+int
+main ()
+{
+
+ /* if transitional largefile support is setup, this is true */
+ extern struct dirent64 * readdir(DIR *);
+ struct dirent64 *x = readdir((DIR *)0);
+ struct dirent *y = readdir((DIR *)0);
+ int z = x - y;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11267: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11270: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11273: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_struct_dirent64=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_struct_dirent64=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:11284: result: $cf_cv_struct_dirent64" >&5
+echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
+ test "$cf_cv_struct_dirent64" = yes &&
+cat >>confdefs.h <<\EOF
+#define HAVE_STRUCT_DIRENT64 1
+EOF
+
+ fi
+
+### Enable compiling-in rcs id's
+echo "$as_me:11294: checking if RCS identifiers should be compiled-in" >&5
+echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
+
+# Check whether --with-rcs-ids or --without-rcs-ids was given.
+if test "${with_rcs_ids+set}" = set; then
+ withval="$with_rcs_ids"
+ with_rcs_ids=$withval
+else
+ with_rcs_ids=no
+fi;
+echo "$as_me:11304: result: $with_rcs_ids" >&5
+echo "${ECHO_T}$with_rcs_ids" >&6
+test "$with_rcs_ids" = yes &&
+cat >>confdefs.h <<\EOF
+#define USE_RCS_IDS 1
+EOF
+
+###############################################################################
+
+### Note that some functions (such as const) are normally disabled anyway.
+echo "$as_me:11314: checking if you want to build with function extensions" >&5
+echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
+
+# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
+if test "${enable_ext_funcs+set}" = set; then
+ enableval="$enable_ext_funcs"
+ with_ext_funcs=$enableval
+else
+ with_ext_funcs=yes
+fi;
+echo "$as_me:11324: result: $with_ext_funcs" >&5
+echo "${ECHO_T}$with_ext_funcs" >&6
+if test "$with_ext_funcs" = yes ; then
+ NCURSES_EXT_FUNCS=1
+
+cat >>confdefs.h <<\EOF
+#define HAVE_USE_DEFAULT_COLORS 1
+EOF
+
+cat >>confdefs.h <<\EOF
+#define NCURSES_EXT_FUNCS 1
+EOF
+
+else
+ NCURSES_EXT_FUNCS=0
+fi
+
+### use option --enable-const to turn on use of const beyond that in XSI.
+echo "$as_me:11342: checking for extended use of const keyword" >&5
+echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
+
+# Check whether --enable-const or --disable-const was given.
+if test "${enable_const+set}" = set; then
+ enableval="$enable_const"
+ with_ext_const=$enableval
+else
+ with_ext_const=no
+fi;
+echo "$as_me:11352: result: $with_ext_const" >&5
+echo "${ECHO_T}$with_ext_const" >&6
+NCURSES_CONST='/*nothing*/'
+if test "$with_ext_const" = yes ; then
+ NCURSES_CONST=const
+fi
+
+###############################################################################
+# These options are relatively safe to experiment with.
+
+echo "$as_me:11362: checking if you want all development code" >&5
+echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
+
+# Check whether --with-develop or --without-develop was given.
+if test "${with_develop+set}" = set; then
+ withval="$with_develop"
+ with_develop=$withval
+else
+ with_develop=no
+fi;
+echo "$as_me:11372: result: $with_develop" >&5
+echo "${ECHO_T}$with_develop" >&6
+
+###############################################################################
+# These are just experimental, probably should not be in a package:
+
+# This is still experimental (20080329), but should ultimately be moved to
+# the script-block --with-normal, etc.
+
+echo "$as_me:11381: checking if you want to link with the pthread library" >&5
+echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
+
+# Check whether --with-pthread or --without-pthread was given.
+if test "${with_pthread+set}" = set; then
+ withval="$with_pthread"
+ with_pthread=$withval
+else
+ with_pthread=no
+fi;
+echo "$as_me:11391: result: $with_pthread" >&5
+echo "${ECHO_T}$with_pthread" >&6
+
+if test "$with_pthread" != no ; then
+ echo "$as_me:11395: checking for pthread.h" >&5
+echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11401 "configure"
+#include "confdefs.h"
+#include <pthread.h>
+_ACEOF
+if { (eval echo "$as_me:11405: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:11411: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_pthread_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_pthread_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:11430: result: $ac_cv_header_pthread_h" >&5
+echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
+if test $ac_cv_header_pthread_h = yes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_PTHREADS_H 1
+EOF
+
+ for cf_lib_pthread in pthread c_r
+ do
+ echo "$as_me:11440: checking if we can link with the $cf_lib_pthread library" >&5
+echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
+ cf_save_LIBS="$LIBS"
+
+cf_add_libs="-l$cf_lib_pthread"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11461 "configure"
+#include "confdefs.h"
+
+#include <pthread.h>
+
+int
+main ()
+{
+
+ int rc = pthread_create(0,0,0,0);
+ int r2 = pthread_mutexattr_settype(0, 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11478: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11481: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11484: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11487: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ with_pthread=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+with_pthread=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$cf_save_LIBS"
+ echo "$as_me:11497: result: $with_pthread" >&5
+echo "${ECHO_T}$with_pthread" >&6
+ test "$with_pthread" = yes && break
+ done
+
+ if test "$with_pthread" = yes ; then
+
+cf_add_libs="-l$cf_lib_pthread"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+cat >>confdefs.h <<\EOF
+#define HAVE_LIBPTHREADS 1
+EOF
+
+ else
+ { { echo "$as_me:11525: error: Cannot link with pthread library" >&5
+echo "$as_me: error: Cannot link with pthread library" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+fi
+
+fi
+
+echo "$as_me:11534: checking if you want to use weak-symbols for pthreads" >&5
+echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
+
+# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
+if test "${enable_weak_symbols+set}" = set; then
+ enableval="$enable_weak_symbols"
+ use_weak_symbols=$withval
+else
+ use_weak_symbols=no
+fi;
+echo "$as_me:11544: result: $use_weak_symbols" >&5
+echo "${ECHO_T}$use_weak_symbols" >&6
+if test "$use_weak_symbols" = yes ; then
+
+echo "$as_me:11548: checking if $CC supports weak symbols" >&5
+echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
+if test "${cf_cv_weak_symbols+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 11555 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+int
+main ()
+{
+
+#if defined(__GNUC__)
+# if defined __USE_ISOC99
+# define _cat_pragma(exp) _Pragma(#exp)
+# define _weak_pragma(exp) _cat_pragma(weak name)
+# else
+# define _weak_pragma(exp)
+# endif
+# define _declare(name) __extension__ extern __typeof__(name) name
+# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
+#endif
+
+weak_symbol(fopen);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11581: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11584: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11587: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11590: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_weak_symbols=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_weak_symbols=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:11601: result: $cf_cv_weak_symbols" >&5
+echo "${ECHO_T}$cf_cv_weak_symbols" >&6
+
+else
+ cf_cv_weak_symbols=no
+fi
+
+if test $cf_cv_weak_symbols = yes ; then
+
+cat >>confdefs.h <<\EOF
+#define USE_WEAK_SYMBOLS 1
+EOF
+
+fi
+
+PTHREAD=
+if test "$with_pthread" = "yes" ; then
+
+cat >>confdefs.h <<\EOF
+#define USE_PTHREADS 1
+EOF
+
+ enable_reentrant=yes
+ if test $cf_cv_weak_symbols = yes ; then
+ PTHREAD=-lpthread
+ fi
+fi
+
+# OpenSUSE is installing ncurses6, using reentrant option.
+echo "$as_me:11630: checking for _nc_TABSIZE" >&5
+echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
+if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11636 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _nc_TABSIZE (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _nc_TABSIZE ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
+choke me
+#else
+f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11667: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11670: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11673: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11676: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func__nc_TABSIZE=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func__nc_TABSIZE=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11686: result: $ac_cv_func__nc_TABSIZE" >&5
+echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
+if test $ac_cv_func__nc_TABSIZE = yes; then
+ assume_reentrant=yes
+else
+ assume_reentrant=no
+fi
+
+# Reentrant code has to be opaque; there's little advantage to making ncurses
+# opaque outside of that, so there is no --enable-opaque option. We can use
+# this option without --with-pthreads, but this will be always set for
+# pthreads.
+echo "$as_me:11698: checking if you want experimental reentrant code" >&5
+echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
+
+# Check whether --enable-reentrant or --disable-reentrant was given.
+if test "${enable_reentrant+set}" = set; then
+ enableval="$enable_reentrant"
+ with_reentrant=$enableval
+else
+ with_reentrant=$assume_reentrant
+fi;
+echo "$as_me:11708: result: $with_reentrant" >&5
+echo "${ECHO_T}$with_reentrant" >&6
+if test "$with_reentrant" = yes ; then
+ cf_cv_enable_reentrant=1
+ if test $cf_cv_weak_symbols = yes ; then
+
+# remove pthread library from $LIBS
+LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
+
+ elif test "$assume_reentrant" = no ; then
+ LIB_SUFFIX="t${LIB_SUFFIX}"
+ fi
+
+cat >>confdefs.h <<\EOF
+#define USE_REENTRANT 1
+EOF
+
+else
+ cf_cv_enable_reentrant=0
+fi
+
+### Allow using a different wrap-prefix
+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
+ echo "$as_me:11731: checking for prefix used to wrap public variables" >&5
+echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
+
+# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
+if test "${with_wrap_prefix+set}" = set; then
+ withval="$with_wrap_prefix"
+ NCURSES_WRAP_PREFIX=$withval
+else
+ NCURSES_WRAP_PREFIX=_nc_
+fi;
+ echo "$as_me:11741: result: $NCURSES_WRAP_PREFIX" >&5
+echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
+else
+ NCURSES_WRAP_PREFIX=_nc_
+fi
+
+cat >>confdefs.h <<EOF
+#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
+EOF
+
+###############################################################################
+
+### use option --disable-echo to suppress full display compiling commands
+
+echo "$as_me:11755: checking if you want to see long compiling messages" >&5
+echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
+
+# Check whether --enable-echo or --disable-echo was given.
+if test "${enable_echo+set}" = set; then
+ enableval="$enable_echo"
+ test "$enableval" != no && enableval=yes
+ if test "$enableval" != "yes" ; then
+
+ ECHO_LT='--silent'
+ ECHO_LD='@echo linking $@;'
+ RULE_CC='@echo compiling $<'
+ SHOW_CC='@echo compiling $@'
+ ECHO_CC='@'
+
+ else
+
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
+
+ fi
+else
+ enableval=yes
+
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
+
+fi;
+echo "$as_me:11789: result: $enableval" >&5
+echo "${ECHO_T}$enableval" >&6
+
+### use option --enable-warnings to turn on all gcc warnings
+echo "$as_me:11793: checking if you want to see compiler warnings" >&5
+echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
+
+# Check whether --enable-warnings or --disable-warnings was given.
+if test "${enable_warnings+set}" = set; then
+ enableval="$enable_warnings"
+ with_warnings=$enableval
+fi;
+echo "$as_me:11801: result: $with_warnings" >&5
+echo "${ECHO_T}$with_warnings" >&6
+
+if test "x$with_warnings" = "xyes"; then
+
+ ADAFLAGS="$ADAFLAGS -gnatg"
+
+INTEL_COMPILER=no
+
+if test "$GCC" = yes ; then
+ case $host_os in
+ (linux*|gnu*)
+ echo "$as_me:11813: checking if this is really Intel C compiler" >&5
+echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -no-gcc"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11818 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+#ifdef __INTEL_COMPILER
+#else
+make an error
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11835: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11838: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11841: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11844: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ INTEL_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -we147"
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ echo "$as_me:11855: result: $INTEL_COMPILER" >&5
+echo "${ECHO_T}$INTEL_COMPILER" >&6
+ ;;
+ esac
+fi
+
+CLANG_COMPILER=no
+
+if test "$GCC" = yes ; then
+ echo "$as_me:11864: checking if this is really Clang C compiler" >&5
+echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Qunused-arguments"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11869 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+#ifdef __clang__
+#else
+make an error
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11886: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11889: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11892: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11895: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ CLANG_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ echo "$as_me:11906: result: $CLANG_COMPILER" >&5
+echo "${ECHO_T}$CLANG_COMPILER" >&6
+fi
+
+cat > conftest.$ac_ext <<EOF
+#line 11911 "${as_me:-configure}"
+int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
+EOF
+
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
+# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #279: controlling expression is constant
+
+ { echo "$as_me:11928: checking for $CC warning options..." >&5
+echo "$as_me: checking for $CC warning options..." >&6;}
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS="-Wall"
+ for cf_opt in \
+ wd1419 \
+ wd1683 \
+ wd1684 \
+ wd193 \
+ wd593 \
+ wd279 \
+ wd810 \
+ wd869 \
+ wd981
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if { (eval echo "$as_me:11944: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11947: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:11949: result: ... -$cf_opt" >&5
+echo "${ECHO_T}... -$cf_opt" >&6
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+
+elif test "$GCC" = yes
+then
+ { echo "$as_me:11958: checking for $CC warning options..." >&5
+echo "$as_me: checking for $CC warning options..." >&6;}
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS=
+ cf_warn_CONST=""
+ test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+ cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
+ test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
+ for cf_opt in W Wall \
+ Wbad-function-cast \
+ Wcast-align \
+ Wcast-qual \
+ Wdeclaration-after-statement \
+ Wextra \
+ Winline \
+ Wmissing-declarations \
+ Wmissing-prototypes \
+ Wnested-externs \
+ Wpointer-arith \
+ Wshadow \
+ Wstrict-prototypes \
+ Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if { (eval echo "$as_me:11982: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11985: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:11987: result: ... -$cf_opt" >&5
+echo "${ECHO_T}... -$cf_opt" >&6
+ case $cf_opt in
+ (Wcast-qual)
+ CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+ ;;
+ (Winline)
+ case $GCC_VERSION in
+ ([34].*)
+ test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
+
+echo "${as_me:-configure}:11998: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+
+ continue;;
+ esac
+ ;;
+ (Wpointer-arith)
+ case $GCC_VERSION in
+ ([12].*)
+ test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
+
+echo "${as_me:-configure}:12008: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+
+ continue;;
+ esac
+ ;;
+ esac
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+fi
+rm -rf conftest*
+
+fi
+
+if test "$GCC" = yes
+then
+cat > conftest.i <<EOF
+#ifndef GCC_PRINTF
+#define GCC_PRINTF 0
+#endif
+#ifndef GCC_SCANF
+#define GCC_SCANF 0
+#endif
+#ifndef GCC_NORETURN
+#define GCC_NORETURN /* nothing */
+#endif
+#ifndef GCC_UNUSED
+#define GCC_UNUSED /* nothing */
+#endif
+EOF
+if test "$GCC" = yes
+then
+ { echo "$as_me:12041: checking for $CC __attribute__ directives..." >&5
+echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
+cat > conftest.$ac_ext <<EOF
+#line 12044 "${as_me:-configure}"
+#include "confdefs.h"
+#include "conftest.h"
+#include "conftest.i"
+#if GCC_PRINTF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#if GCC_SCANF
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+#else
+#define GCC_SCANFLIKE(fmt,var) /*nothing*/
+#endif
+extern void wow(char *,...) GCC_SCANFLIKE(1,2);
+extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern void foo(void) GCC_NORETURN;
+int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
+EOF
+ cf_printf_attribute=no
+ cf_scanf_attribute=no
+ for cf_attribute in scanf printf unused noreturn
+ do
+
+cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cf_directive="__attribute__(($cf_attribute))"
+ echo "checking for $CC $cf_directive" 1>&5
+
+ case $cf_attribute in
+ (printf)
+ cf_printf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ (scanf)
+ cf_scanf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ (*)
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE $cf_directive
+EOF
+ ;;
+ esac
+
+ if { (eval echo "$as_me:12093: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12096: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:12098: result: ... $cf_attribute" >&5
+echo "${ECHO_T}... $cf_attribute" >&6
+ cat conftest.h >>confdefs.h
+ case $cf_attribute in
+ (noreturn)
+
+cat >>confdefs.h <<EOF
+#define GCC_NORETURN $cf_directive
+EOF
+
+ ;;
+ (printf)
+ cf_value='/* nothing */'
+ if test "$cf_printf_attribute" != no ; then
+ cf_value='__attribute__((format(printf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_PRINTF 1
+EOF
+
+ fi
+
+cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) $cf_value
+EOF
+
+ ;;
+ (scanf)
+ cf_value='/* nothing */'
+ if test "$cf_scanf_attribute" != no ; then
+ cf_value='__attribute__((format(scanf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_SCANF 1
+EOF
+
+ fi
+
+cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) $cf_value
+EOF
+
+ ;;
+ (unused)
+
+cat >>confdefs.h <<EOF
+#define GCC_UNUSED $cf_directive
+EOF
+
+ ;;
+ esac
+ fi
+ done
+else
+ fgrep define conftest.i >>confdefs.h
+fi
+rm -rf conftest*
+fi
+
+### use option --enable-assertions to turn on generation of assertion code
+echo "$as_me:12158: checking if you want to enable runtime assertions" >&5
+echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
+
+# Check whether --enable-assertions or --disable-assertions was given.
+if test "${enable_assertions+set}" = set; then
+ enableval="$enable_assertions"
+ with_assertions=$enableval
+else
+ with_assertions=no
+fi;
+echo "$as_me:12168: result: $with_assertions" >&5
+echo "${ECHO_T}$with_assertions" >&6
+if test -n "$GCC"
+then
+ if test "$with_assertions" = no
+ then
+ CPPFLAGS="$CPPFLAGS -DNDEBUG"
+ else
+
+ ADAFLAGS="$ADAFLAGS -gnata"
+
+ fi
+fi
+
+### use option --disable-leaks to suppress "permanent" leaks, for testing
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NC_ALLOC_H 1
+EOF
+
+### use option --enable-expanded to generate certain macros as functions
+
+# Check whether --enable-expanded or --disable-expanded was given.
+if test "${enable_expanded+set}" = set; then
+ enableval="$enable_expanded"
+ test "$enableval" = yes &&
+cat >>confdefs.h <<\EOF
+#define NCURSES_EXPANDED 1
+EOF
+
+fi;
+
+### use option --disable-macros to suppress macros in favor of functions
+
+# Check whether --enable-macros or --disable-macros was given.
+if test "${enable_macros+set}" = set; then
+ enableval="$enable_macros"
+ test "$enableval" = no &&
+cat >>confdefs.h <<\EOF
+#define NCURSES_NOMACROS 1
+EOF
+
+fi;
+
+# Normally we only add trace() to the debug-library. Allow this to be
+# extended to all models of the ncurses library:
+cf_all_traces=no
+case "$CFLAGS $CPPFLAGS" in
+(*-DTRACE*)
+ cf_all_traces=yes
+ ;;
+esac
+
+echo "$as_me:12221: checking whether to add trace feature to all models" >&5
+echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
+
+# Check whether --with-trace or --without-trace was given.
+if test "${with_trace+set}" = set; then
+ withval="$with_trace"
+ cf_with_trace=$withval
+else
+ cf_with_trace=$cf_all_traces
+fi;
+echo "$as_me:12231: result: $cf_with_trace" >&5
+echo "${ECHO_T}$cf_with_trace" >&6
+
+if test "$cf_with_trace" = yes ; then
+ ADA_TRACE=TRUE
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -DTRACE
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+else
+ ADA_TRACE=FALSE
+fi
+
+echo "$as_me:12319: checking if we want to use GNAT projects" >&5
+echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
+
+# Check whether --enable-gnat-projects or --disable-gnat-projects was given.
+if test "${enable_gnat_projects+set}" = set; then
+ enableval="$enable_gnat_projects"
+ test "$enableval" != no && enableval=yes
+ if test "$enableval" != "yes" ; then
+ enable_gnat_projects=no
+ else
+ enable_gnat_projects=yes
+ fi
+else
+ enableval=yes
+ enable_gnat_projects=yes
+
+fi;
+echo "$as_me:12336: result: $enable_gnat_projects" >&5
+echo "${ECHO_T}$enable_gnat_projects" >&6
+
+### Checks for libraries.
+case $cf_cv_system_name in
+(*mingw32*)
+ ;;
+(*)
+echo "$as_me:12344: checking for gettimeofday" >&5
+echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
+if test "${ac_cv_func_gettimeofday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12350 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gettimeofday (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettimeofday ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
+choke me
+#else
+f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12381: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12384: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12387: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12390: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gettimeofday=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_gettimeofday=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:12400: result: $ac_cv_func_gettimeofday" >&5
+echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
+if test $ac_cv_func_gettimeofday = yes; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_GETTIMEOFDAY 1
+EOF
+
+else
+
+echo "$as_me:12409: checking for gettimeofday in -lbsd" >&5
+echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12417 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettimeofday ();
+int
+main ()
+{
+gettimeofday ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12436: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12439: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12442: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12445: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bsd_gettimeofday=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_bsd_gettimeofday=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:12456: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
+if test $ac_cv_lib_bsd_gettimeofday = yes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_GETTIMEOFDAY 1
+EOF
+
+ LIBS="$LIBS -lbsd"
+fi
+
+fi
+ ;;
+esac
+
+### Checks for header files.
+echo "$as_me:12472: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12478 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+_ACEOF
+if { (eval echo "$as_me:12486: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:12492: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12514 "configure"
+#include "confdefs.h"
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -rf conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12532 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -rf conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12553 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ $ac_main_return(2);
+ $ac_main_return (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12579: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12582: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12584: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12587: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:12600: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:12613: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12619 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12637: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12640: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12643: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:12653: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+EOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ echo "$as_me:12666: checking for opendir in -ldir" >&5
+echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
+if test "${ac_cv_lib_dir_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldir $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12674 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12693: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12696: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12699: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12702: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dir_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dir_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:12713: result: $ac_cv_lib_dir_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
+if test $ac_cv_lib_dir_opendir = yes; then
+ LIBS="$LIBS -ldir"
+fi
+
+else
+ echo "$as_me:12720: checking for opendir in -lx" >&5
+echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
+if test "${ac_cv_lib_x_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lx $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12728 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12747: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12750: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12753: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12756: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_x_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_x_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:12767: result: $ac_cv_lib_x_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
+if test $ac_cv_lib_x_opendir = yes; then
+ LIBS="$LIBS -lx"
+fi
+
+fi
+
+echo "$as_me:12775: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12781 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12797: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12800: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12803: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12806: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_time=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:12816: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+### checks for compiler characteristics
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_main_return=return
+
+echo "$as_me:12834: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12840 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12898: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12901: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12904: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12907: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_const=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:12917: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+### Checks for external-data
+
+echo "$as_me:12929: checking if data-only library module links" >&5
+echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
+if test "${cf_cv_link_dataonly+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ rm -f conftest.a
+ cat >conftest.$ac_ext <<EOF
+#line 12937 "configure"
+int testdata[3] = { 123, 456, 789 };
+EOF
+ if { (eval echo "$as_me:12940: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12943: \$? = $ac_status" >&5
+ (exit $ac_status); } ; then
+ mv conftest.o data.o && \
+ ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
+ fi
+ rm -f conftest.$ac_ext data.o
+ cat >conftest.$ac_ext <<EOF
+#line 12950 "configure"
+int testfunc()
+{
+#if defined(NeXT)
+ ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
+#else
+ extern int testdata[3];
+ return testdata[0] == 123
+ && testdata[1] == 456
+ && testdata[2] == 789;
+#endif
+}
+EOF
+ if { (eval echo "$as_me:12963: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12966: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ mv conftest.o func.o && \
+ ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
+ fi
+ rm -f conftest.$ac_ext func.o
+ ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
+ cf_saveLIBS="$LIBS"
+ LIBS="conftest.a $LIBS"
+ if test "$cross_compiling" = yes; then
+ cf_cv_link_dataonly=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12979 "configure"
+#include "confdefs.h"
+
+ int main()
+ {
+ extern int testfunc();
+ ${cf_cv_main_return:-return} (!testfunc());
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12990: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12993: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12995: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12998: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_link_dataonly=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_link_dataonly=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ LIBS="$cf_saveLIBS"
+
+fi
+
+echo "$as_me:13013: result: $cf_cv_link_dataonly" >&5
+echo "${ECHO_T}$cf_cv_link_dataonly" >&6
+
+if test "$cf_cv_link_dataonly" = no ; then
+
+cat >>confdefs.h <<\EOF
+#define BROKEN_LINKER 1
+EOF
+
+ BROKEN_LINKER=1
+fi
+
+### Checks for library functions.
+
+echo "$as_me:13027: checking for working mkstemp" >&5
+echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
+if test "${cf_cv_func_mkstemp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+rm -rf conftest*
+if test "$cross_compiling" = yes; then
+ cf_cv_func_mkstemp=maybe
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13038 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+int main()
+{
+ char *tmpl = "conftestXXXXXX";
+ char name[2][80];
+ int n;
+ int result = 0;
+ int fd;
+ struct stat sb;
+
+ umask(077);
+ for (n = 0; n < 2; ++n) {
+ strcpy(name[n], tmpl);
+ if ((fd = mkstemp(name[n])) >= 0) {
+ if (!strcmp(name[n], tmpl)
+ || stat(name[n], &sb) != 0
+ || (sb.st_mode & S_IFMT) != S_IFREG
+ || (sb.st_mode & 077) != 0) {
+ result = 1;
+ }
+ close(fd);
+ }
+ }
+ if (result == 0
+ && !strcmp(name[0], name[1]))
+ result = 1;
+ ${cf_cv_main_return:-return}(result);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:13076: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13079: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:13081: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13084: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_func_mkstemp=yes
+
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_func_mkstemp=no
+
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+echo "$as_me:13099: result: $cf_cv_func_mkstemp" >&5
+echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
+if test "x$cf_cv_func_mkstemp" = xmaybe ; then
+ echo "$as_me:13102: checking for mkstemp" >&5
+echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
+if test "${ac_cv_func_mkstemp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13108 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mkstemp (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char mkstemp ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
+choke me
+#else
+f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13139: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13142: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13145: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13148: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mkstemp=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_mkstemp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:13158: result: $ac_cv_func_mkstemp" >&5
+echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
+
+fi
+if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_MKSTEMP 1
+EOF
+
+fi
+
+if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
+ CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
+ CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
+fi
+
+cf_with_ada=yes
+if test "$cf_with_ada" != "no" ; then
+
+cf_ada_make=gnatmake
+# Extract the first word of "$cf_ada_make", so it can be a program name with args.
+set dummy $cf_ada_make; ac_word=$2
+echo "$as_me:13181: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_gnat_exists+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$gnat_exists"; then
+ ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_gnat_exists="yes"
+echo "$as_me:13196: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
+fi
+fi
+gnat_exists=$ac_cv_prog_gnat_exists
+if test -n "$gnat_exists"; then
+ echo "$as_me:13205: result: $gnat_exists" >&5
+echo "${ECHO_T}$gnat_exists" >&6
+else
+ echo "$as_me:13208: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$ac_cv_prog_gnat_exists" = no; then
+ cf_ada_make=
+ cf_cv_prog_gnat_correct=no
+else
+
+echo "$as_me:13217: checking for gnat version" >&5
+echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
+cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
+ grep '[0-9].[0-9][0-9]*' |\
+ sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
+echo "$as_me:13222: result: $cf_gnat_version" >&5
+echo "${ECHO_T}$cf_gnat_version" >&6
+
+case $cf_gnat_version in
+(3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
+ cf_cv_prog_gnat_correct=yes
+ ;;
+(*)
+ { echo "$as_me:13230: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
+echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
+ cf_cv_prog_gnat_correct=no
+ ;;
+esac
+
+ # Extract the first word of "m4", so it can be a program name with args.
+set dummy m4; ac_word=$2
+echo "$as_me:13238: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_M4_exists+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$M4_exists"; then
+ ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_M4_exists="yes"
+echo "$as_me:13253: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
+fi
+fi
+M4_exists=$ac_cv_prog_M4_exists
+if test -n "$M4_exists"; then
+ echo "$as_me:13262: result: $M4_exists" >&5
+echo "${ECHO_T}$M4_exists" >&6
+else
+ echo "$as_me:13265: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ 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
+ echo "$as_me:13274: checking if GNAT works" >&5
+echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
+
+rm -rf conftest* *~conftest*
+cat >>conftest.ads <<CF_EOF
+procedure conftest;
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+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_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
+ if ( ./conftest 1>&5 2>&1 ) ; then
+ cf_cv_prog_gnat_correct=yes
+ else
+ cf_cv_prog_gnat_correct=no
+ fi
+else
+ cf_cv_prog_gnat_correct=no
+fi
+rm -rf conftest* *~conftest*
+
+ echo "$as_me:13302: result: $cf_cv_prog_gnat_correct" >&5
+echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
+ fi
+fi
+
+ if test "$cf_cv_prog_gnat_correct" = yes; then
+
+ echo "$as_me:13309: checking optimization options for ADAFLAGS" >&5
+echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
+ case "$CFLAGS" in
+ (*-g*)
+
+ ADAFLAGS="$ADAFLAGS -g"
+
+ ;;
+ esac
+ case "$CFLAGS" in
+ (*-O*)
+ cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
+
+ ADAFLAGS="$ADAFLAGS $cf_O_flag"
+
+ ;;
+ esac
+ echo "$as_me:13326: result: $ADAFLAGS" >&5
+echo "${ECHO_T}$ADAFLAGS" >&6
+
+echo "$as_me:13329: checking if GNATPREP supports -T option" >&5
+echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
+if test "${cf_cv_gnatprep_opt_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_cv_gnatprep_opt_t=no
+gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
+
+fi
+echo "$as_me:13339: result: $cf_cv_gnatprep_opt_t" >&5
+echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
+test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
+
+echo "$as_me:13343: checking if GNAT supports generics" >&5
+echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
+case $cf_gnat_version in
+(3.[1-9]*|[4-9].*)
+ cf_gnat_generics=yes
+ ;;
+(*)
+ cf_gnat_generics=no
+ ;;
+esac
+echo "$as_me:13353: result: $cf_gnat_generics" >&5
+echo "${ECHO_T}$cf_gnat_generics" >&6
+
+if test "$cf_gnat_generics" = yes
+then
+ cf_compile_generics=generics
+ cf_generic_objects="\${GENOBJS}"
+else
+ cf_compile_generics=
+ cf_generic_objects=
+fi
+
+echo "$as_me:13365: checking if GNAT supports SIGINT" >&5
+echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
+if test "${cf_cv_gnat_sigint+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+rm -rf conftest* *~conftest*
+cat >>conftest.ads <<CF_EOF
+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;
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+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_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
+ cf_cv_gnat_sigint=yes
+else
+ cf_cv_gnat_sigint=no
+fi
+rm -rf conftest* *~conftest*
+
+fi
+echo "$as_me:13413: result: $cf_cv_gnat_sigint" >&5
+echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
+
+if test $cf_cv_gnat_sigint = yes ; then
+ USE_GNAT_SIGINT=""
+else
+ USE_GNAT_SIGINT="#"
+fi
+
+cf_gnat_libraries=no
+cf_gnat_projects=no
+
+if test "$enable_gnat_projects" != no ; then
+echo "$as_me:13426: checking if GNAT supports project files" >&5
+echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
+case $cf_gnat_version in
+(3.[0-9]*)
+ ;;
+(*)
+ case $cf_cv_system_name in
+ (cygwin*|msys*)
+ ;;
+ (*)
+ mkdir conftest.src conftest.bin conftest.lib
+ cd conftest.src
+ rm -rf conftest* *~conftest*
+ cat >>library.gpr <<CF_EOF
+project Library is
+ Kind := External ("LIB_KIND");
+ for Library_Name use "ConfTest";
+ for Object_Dir use ".";
+ for Library_ALI_Dir use External("LIBRARY_DIR");
+ for Library_Version use External ("SONAME");
+ for Library_Kind use Kind;
+ for Library_Dir use External("BUILD_DIR");
+ Source_Dir := External ("SOURCE_DIR");
+ for Source_Dirs use (Source_Dir);
+end Library;
+CF_EOF
+ cat >>confpackage.ads <<CF_EOF
+package ConfPackage is
+ procedure conftest;
+end ConfPackage;
+CF_EOF
+ cat >>confpackage.adb <<CF_EOF
+with Text_IO;
+package body ConfPackage is
+ procedure conftest is
+ begin
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ end conftest;
+end ConfPackage;
+CF_EOF
+ if ( $cf_ada_make $ADAFLAGS \
+ -Plibrary.gpr \
+ -XBUILD_DIR=`cd ../conftest.bin;pwd` \
+ -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
+ -XSOURCE_DIR=`pwd` \
+ -XSONAME=libConfTest.so.1 \
+ -XLIB_KIND=static 1>&5 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
+echo "$as_me:13486: result: $cf_gnat_projects" >&5
+echo "${ECHO_T}$cf_gnat_projects" >&6
+fi # enable_gnat_projects
+
+if test $cf_gnat_projects = yes
+then
+ echo "$as_me:13492: checking if GNAT supports libraries" >&5
+echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
+ echo "$as_me:13494: result: $cf_gnat_libraries" >&5
+echo "${ECHO_T}$cf_gnat_libraries" >&6
+fi
+
+if test "$cf_gnat_projects" = yes
+then
+ USE_OLD_MAKERULES="#"
+ USE_GNAT_PROJECTS=""
+else
+ USE_OLD_MAKERULES=""
+ USE_GNAT_PROJECTS="#"
+fi
+
+if test "$cf_gnat_libraries" = yes
+then
+ USE_GNAT_LIBRARIES=""
+else
+ USE_GNAT_LIBRARIES="#"
+fi
+
+echo "$as_me:13514: checking for ada-compiler" >&5
+echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
+
+# Check whether --with-ada-compiler or --without-ada-compiler was given.
+if test "${with_ada_compiler+set}" = set; then
+ withval="$with_ada_compiler"
+ cf_ada_compiler=$withval
+else
+ cf_ada_compiler=gnatmake
+fi;
+
+echo "$as_me:13525: result: $cf_ada_compiler" >&5
+echo "${ECHO_T}$cf_ada_compiler" >&6
+
+ cf_ada_package=terminal_interface
+
+echo "$as_me:13530: checking for ada-include" >&5
+echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
+
+# Check whether --with-ada-include or --without-ada-include was given.
+if test "${with_ada_include+set}" = set; then
+ withval="$with_ada_include"
+
+else
+ withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
+fi; if test -n "$prefix/share/ada/adainclude" ; then
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$withval" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval withval="$withval"
+ case ".$withval" in
+ (.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:13566: error: expected a pathname, not \"$withval\"" >&5
+echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+fi
+eval ADA_INCLUDE="$withval"
+
+echo "$as_me:13575: result: $ADA_INCLUDE" >&5
+echo "${ECHO_T}$ADA_INCLUDE" >&6
+
+echo "$as_me:13578: checking for ada-objects" >&5
+echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
+
+# Check whether --with-ada-objects or --without-ada-objects was given.
+if test "${with_ada_objects+set}" = set; then
+ withval="$with_ada_objects"
+
+else
+ withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
+fi; if test -n "$prefix/lib/ada/adalib" ; then
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$withval" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval withval="$withval"
+ case ".$withval" in
+ (.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:13614: error: expected a pathname, not \"$withval\"" >&5
+echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+fi
+eval ADA_OBJECTS="$withval"
+
+echo "$as_me:13623: result: $ADA_OBJECTS" >&5
+echo "${ECHO_T}$ADA_OBJECTS" >&6
+
+echo "$as_me:13626: checking if an Ada95 shared-library should be built" >&5
+echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
+
+# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
+if test "${with_ada_sharedlib+set}" = set; then
+ withval="$with_ada_sharedlib"
+ with_ada_sharedlib=$withval
+else
+ with_ada_sharedlib=no
+fi;
+echo "$as_me:13636: result: $with_ada_sharedlib" >&5
+echo "${ECHO_T}$with_ada_sharedlib" >&6
+
+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
+
+ else
+ { { echo "$as_me:13652: error: No usable Ada compiler found" >&5
+echo "$as_me: error: No usable Ada compiler found" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ { { echo "$as_me:13657: error: The Ada compiler is needed for this package" >&5
+echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+################################################################################
+
+# not needed
+TINFO_LDFLAGS2=
+
+TINFO_LIBS=
+
+### Construct the list of include-directories to be generated
+
+if test "$srcdir" != "."; then
+ CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
+fi
+CPPFLAGS="-I../include $CPPFLAGS"
+if test "$srcdir" != "."; then
+ CPPFLAGS="-I\${srcdir} $CPPFLAGS"
+fi
+CPPFLAGS="-I. $CPPFLAGS"
+
+ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
+if test "$srcdir" != "."; then
+ ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
+fi
+if test "$GCC" != yes; then
+ ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+elif test "$includedir" != "/usr/include"; then
+ if test "$includedir" = '${prefix}/include' ; then
+ if test x$prefix != x/usr ; then
+ ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+ fi
+ else
+ ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+ fi
+fi
+
+### Build up pieces for makefile rules
+echo "$as_me:13697: checking default library suffix" >&5
+echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
+
+ case $DFT_LWR_MODEL in
+ (libtool) DFT_ARG_SUFFIX='' ;;
+ (normal) DFT_ARG_SUFFIX='' ;;
+ (debug) DFT_ARG_SUFFIX='_g' ;;
+ (profile) DFT_ARG_SUFFIX='_p' ;;
+ (shared) DFT_ARG_SUFFIX='' ;;
+ esac
+ test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
+echo "$as_me:13708: result: $DFT_ARG_SUFFIX" >&5
+echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
+
+echo "$as_me:13711: checking default library-dependency suffix" >&5
+echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
+
+ case X$DFT_LWR_MODEL in
+ (Xlibtool)
+ DFT_LIB_SUFFIX='.la'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ (Xdebug)
+ DFT_LIB_SUFFIX='_g.a'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ (Xprofile)
+ DFT_LIB_SUFFIX='_p.a'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ (Xshared)
+ case $cf_cv_system_name in
+ (aix[5-7]*)
+ DFT_LIB_SUFFIX='.so'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ (cygwin*|msys*|mingw*)
+ DFT_LIB_SUFFIX='.dll'
+ DFT_DEP_SUFFIX='.dll.a'
+ ;;
+ (darwin*)
+ DFT_LIB_SUFFIX='.dylib'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ (hpux*)
+ case $target in
+ (ia64*)
+ DFT_LIB_SUFFIX='.so'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ (*)
+ DFT_LIB_SUFFIX='.sl'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ esac
+ ;;
+ (*)
+ DFT_LIB_SUFFIX='.so'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ esac
+ ;;
+ (*)
+ DFT_LIB_SUFFIX='.a'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ esac
+ if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
+ then
+ DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
+ DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
+ fi
+echo "$as_me:13769: result: $DFT_DEP_SUFFIX" >&5
+echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
+
+echo "$as_me:13772: checking default object directory" >&5
+echo $ECHO_N "checking default object directory... $ECHO_C" >&6
+
+ case $DFT_LWR_MODEL in
+ (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
+ (normal) DFT_OBJ_SUBDIR='objects' ;;
+ (debug) DFT_OBJ_SUBDIR='obj_g' ;;
+ (profile) DFT_OBJ_SUBDIR='obj_p' ;;
+ (shared)
+ case $cf_cv_system_name in
+ (cygwin|msys)
+ DFT_OBJ_SUBDIR='objects' ;;
+ (*)
+ DFT_OBJ_SUBDIR='obj_s' ;;
+ esac
+ esac
+echo "$as_me:13788: result: $DFT_OBJ_SUBDIR" >&5
+echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
+
+### Set up low-level terminfo dependencies for makefiles.
+
+if test "$DFT_LWR_MODEL" = shared ; then
+ case $cf_cv_system_name in
+ (cygwin*)
+ # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
+ ;;
+ (msys*)
+ # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
+ ;;
+ esac
+fi
+
+USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
+
+### Construct the list of subdirectories for which we'll customize makefiles
+### with the appropriate compile-rules.
+
+SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
+
+cat >>confdefs.h <<EOF
+#define NCURSES_PATHSEP '$PATH_SEPARATOR'
+EOF
+
+### Now that we're done running tests, add the compiler-warnings, if any
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $EXTRA_CFLAGS
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ (*)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+(yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+################################################################################
+
+TEST_ARG2=
+
+TEST_LIBS2=
+
+NCURSES_SHLIB2="sh -c"
+
+ADA_SUBDIRS="include gen src doc"
+if test "x$cf_with_tests" != "xno" ; then
+ ADA_SUBDIRS="$ADA_SUBDIRS samples"
+fi
+for cf_dir in $ADA_SUBDIRS
+do
+ SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
+done
+
+NCURSES_TREE="#"
+
+EXTERNAL_TREE=
+
+# match layout used by make-tar.sh
+ADAHTML_DIR=../doc/ada
+
+ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
+ac_config_commands="$ac_config_commands default"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:14000: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+ac_cs_invocation="\$0 \$@"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+exec 6>&1
+
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\EOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <dickey@invisible-island.net>."
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.52.20141204,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ shift
+ set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+ shift
+ ;;
+ -*);;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_need_defaults=false;;
+ esac
+
+ case $1 in
+ # Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:14176: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ shift
+ CONFIG_FILES="$CONFIG_FILES $1"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ ac_need_defaults=false;;
+
+ # This is an error.
+ -*) { { echo "$as_me:14195: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+exec 5>>config.log
+cat >&5 << _ACEOF
+
+## ----------------------- ##
+## Running config.status. ##
+## ----------------------- ##
+
+This file was extended by $as_me 2.52.20141204, executed with
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
+_ACEOF
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+#
+# INIT-COMMANDS section.
+#
+
+### Special initialization commands, used to pass information from the
+### configuration-run into config.status
+
+AWK="$AWK"
+DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
+DFT_LWR_MODEL="$DFT_LWR_MODEL"
+LIB_NAME="$LIB_NAME"
+LIB_PREFIX="$LIB_PREFIX"
+LIB_SUFFIX="$LIB_SUFFIX"
+LN_S="$LN_S"
+NCURSES_MAJOR="$NCURSES_MAJOR"
+NCURSES_MINOR="$NCURSES_MINOR"
+NCURSES_PATCH="$NCURSES_PATCH"
+USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
+cf_cv_abi_version="$cf_cv_abi_version"
+cf_cv_rel_version="$cf_cv_rel_version"
+cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
+cf_cv_shared_soname='$cf_cv_shared_soname'
+cf_cv_shlib_version="$cf_cv_shlib_version"
+cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
+cf_cv_system_name="$cf_cv_system_name"
+host="$host"
+target="$target"
+
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
+ "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
+ *) { { echo "$as_me:14266: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/cs$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@DEFS@,$DEFS,;t t
+s,@LIBS@,$LIBS,;t t
+s,@top_builddir@,$top_builddir,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
+s,@CPP@,$CPP,;t t
+s,@AWK@,$AWK,;t t
+s,@EGREP@,$EGREP,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@LN_S@,$LN_S,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
+s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@CTAGS@,$CTAGS,;t t
+s,@ETAGS@,$ETAGS,;t t
+s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
+s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
+s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LD@,$LD,;t t
+s,@ac_ct_LD@,$ac_ct_LD,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@ARFLAGS@,$ARFLAGS,;t t
+s,@DESTDIR@,$DESTDIR,;t t
+s,@BUILD_CC@,$BUILD_CC,;t t
+s,@BUILD_CPP@,$BUILD_CPP,;t t
+s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
+s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
+s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
+s,@BUILD_LIBS@,$BUILD_LIBS,;t t
+s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
+s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
+s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
+s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
+s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
+s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
+s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
+s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
+s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
+s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
+s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
+s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
+s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
+s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
+s,@LIB_PREFIX@,$LIB_PREFIX,;t t
+s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
+s,@CC_G_OPT@,$CC_G_OPT,;t t
+s,@LD_MODEL@,$LD_MODEL,;t t
+s,@shlibdir@,$shlibdir,;t t
+s,@MAKE_DLLS@,$MAKE_DLLS,;t t
+s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
+s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
+s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
+s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
+s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
+s,@LINK_PROGS@,$LINK_PROGS,;t t
+s,@LINK_TESTS@,$LINK_TESTS,;t t
+s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
+s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
+s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
+s,@INSTALL_LIB@,$INSTALL_LIB,;t t
+s,@RPATH_LIST@,$RPATH_LIST,;t t
+s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
+s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
+s,@NCURSES_CONST@,$NCURSES_CONST,;t t
+s,@PTHREAD@,$PTHREAD,;t t
+s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
+s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
+s,@ECHO_LT@,$ECHO_LT,;t t
+s,@ECHO_LD@,$ECHO_LD,;t t
+s,@RULE_CC@,$RULE_CC,;t t
+s,@SHOW_CC@,$SHOW_CC,;t t
+s,@ECHO_CC@,$ECHO_CC,;t t
+s,@ADAFLAGS@,$ADAFLAGS,;t t
+s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
+s,@ADA_TRACE@,$ADA_TRACE,;t t
+s,@gnat_exists@,$gnat_exists,;t t
+s,@M4_exists@,$M4_exists,;t t
+s,@cf_ada_make@,$cf_ada_make,;t t
+s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
+s,@cf_compile_generics@,$cf_compile_generics,;t t
+s,@cf_generic_objects@,$cf_generic_objects,;t t
+s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
+s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
+s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
+s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
+s,@cf_ada_compiler@,$cf_ada_compiler,;t t
+s,@cf_ada_package@,$cf_ada_package,;t t
+s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
+s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
+s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
+s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
+s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
+s,@TINFO_LIBS@,$TINFO_LIBS,;t t
+s,@ACPPFLAGS@,$ACPPFLAGS,;t t
+s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
+s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
+s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
+s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
+s,@TEST_ARG2@,$TEST_ARG2,;t t
+s,@TEST_LIBS2@,$TEST_LIBS2,;t t
+s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
+s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
+s,@NCURSES_TREE@,$NCURSES_TREE,;t t
+s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
+s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
+CEOF
+
+EOF
+
+ cat >>$CONFIG_STATUS <<\EOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case $srcdir in
+ .) ac_srcdir=.
+ if test -z "$ac_dots"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* )
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_dots$srcdir ;;
+ esac
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_dots$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:14590: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ configure_input="Generated automatically from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:14608: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:14621: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+ ac_warn_datarootdir=no
+ if test x"$ac_file" != x-; then
+ for ac_item in $ac_file_inputs
+ do
+ ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
+ if test -n "$ac_seen"; then
+ ac_used=`grep '@datarootdir@' $ac_item`
+ if test -z "$ac_used"; then
+ { echo "$as_me:14637: WARNING: datarootdir was used implicitly but not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: datarootdir was used implicitly but not set:
+$ac_seen" >&2;}
+ ac_warn_datarootdir=yes
+ fi
+ fi
+ ac_seen=`grep '${datarootdir}' $ac_item`
+ if test -n "$ac_seen"; then
+ { echo "$as_me:14646: WARNING: datarootdir was used explicitly but not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: datarootdir was used explicitly but not set:
+$ac_seen" >&2;}
+ ac_warn_datarootdir=yes
+ fi
+ done
+ fi
+
+if test "x$ac_warn_datarootdir" = xyes; then
+ ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
+fi
+
+EOF
+cat >>$CONFIG_STATUS <<EOF
+ sed "$ac_vpsub
+$extrasub
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ cp $tmp/out $ac_file
+
+ for ac_name in prefix exec_prefix datarootdir
+ do
+ ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
+ if test -n "$ac_seen"; then
+ ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
+ if test -z "$ac_init"; then
+ ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
+ { echo "$as_me:14683: WARNING: Variable $ac_name is used but was not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: Variable $ac_name is used but was not set:
+$ac_seen" >&2;}
+ fi
+ fi
+ done
+ egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
+ egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
+ if test -s $tmp/out; then
+ ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
+ { echo "$as_me:14694: WARNING: Some variables may not be substituted:
+$ac_seen" >&5
+echo "$as_me: WARNING: Some variables may not be substituted:
+$ac_seen" >&2;}
+ fi
+ else
+ cat $tmp/out
+ fi
+ rm -f $tmp/out
+
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_iB='\([ ]\),\1#\2define\3'
+ac_iC=' '
+ac_iD='\4,;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:14743: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:14754: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:14767: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+EOF
+
+# Transform confdefs.h into a list of #define's. We won't use it as a sed
+# script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
+# be either 'cat' or 'sort'.
+cat confdefs.h | uniq >conftest.vals
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+echo ' rm -f conftest.frag' >> $CONFIG_STATUS
+while grep . conftest.vals >/dev/null
+do
+ # Write chunks of a limited-size here document to conftest.frag.
+ echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
+ echo 'CEOF' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+# Run sed to substitute the contents of conftest.frag into $tmp/in at the
+# marker @DEFS@.
+echo ' cat >> conftest.edit <<CEOF
+/@DEFS@/r conftest.frag
+/@DEFS@/d
+CEOF
+sed -f conftest.edit $tmp/in > $tmp/out
+rm -f $tmp/in
+mv $tmp/out $tmp/in
+rm -f conftest.edit conftest.frag
+' >> $CONFIG_STATUS
+
+cat >>$CONFIG_STATUS <<\EOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated automatically by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ { echo "$as_me:14825: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ fi
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+
+ case $ac_dest in
+ default )
+if test -z "$USE_OLD_MAKERULES" ; then
+ $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
+fi
+ ;;
+ esac
+done
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+
+{ (exit 0); exit 0; }
+EOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+${MAKE:-make} preinstall
diff --git a/Ada95/configure.in b/Ada95/configure.in
new file mode 100644
index 0000000..d0718f4
--- /dev/null
+++ b/Ada95/configure.in
@@ -0,0 +1,620 @@
+dnl***************************************************************************
+dnl Copyright (c) 2010-2014,2015 Free Software Foundation, Inc. *
+dnl *
+dnl Permission is hereby granted, free of charge, to any person obtaining a *
+dnl copy of this software and associated documentation files (the *
+dnl "Software"), to deal in the Software without restriction, including *
+dnl without limitation the rights to use, copy, modify, merge, publish, *
+dnl distribute, distribute with modifications, sublicense, and/or sell *
+dnl copies of the Software, and to permit persons to whom the Software is *
+dnl furnished to do so, subject to the following conditions: *
+dnl *
+dnl The above copyright notice and this permission notice shall be included *
+dnl in all copies or substantial portions of the Software. *
+dnl *
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+dnl *
+dnl Except as contained in this notice, the name(s) of the above copyright *
+dnl holders shall not be used in advertising or otherwise to promote the *
+dnl sale, use or other dealings in this Software without prior written *
+dnl authorization. *
+dnl***************************************************************************
+dnl
+dnl Author: Thomas E. Dickey
+dnl
+dnl $Id: configure.in,v 1.60 2015/04/18 18:49:57 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.52.20030208)
+AC_REVISION($Revision: 1.60 $)
+AC_INIT(gen/gen.c)
+AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
+
+CF_TOP_BUILDDIR
+
+CF_WITH_SYSTYPE
+
+### Save the given $CFLAGS to allow user-override.
+cf_user_CFLAGS="$CFLAGS"
+
+### Default install-location
+CF_CFG_DEFAULTS
+
+### Checks for programs.
+CF_PROG_CC(gnatgcc gcc cc)
+AC_PROG_CPP
+AC_PROG_GCC_TRADITIONAL
+CF_PROG_CC_C_O(CC)
+
+AC_ARG_PROGRAM
+
+CF_PROG_AWK
+CF_PROG_EGREP
+AC_PROG_INSTALL
+CF_PROG_LN_S
+
+AC_SYS_LONG_FILE_NAMES
+
+# if we find pkg-config, check if we should install the ".pc" files.
+CF_PKG_CONFIG
+CF_WITH_PKG_CONFIG_LIBDIR
+
+AC_MSG_CHECKING(if you want to build test-programs)
+AC_ARG_WITH(tests,
+ [ --without-tests suppress build with test-programs],
+ [cf_with_tests=$withval],
+ [cf_with_tests=yes])
+AC_MSG_RESULT($cf_with_tests)
+
+AC_MSG_CHECKING(if we should assume mixed-case filenames)
+AC_ARG_ENABLE(mixed-case,
+ [ --enable-mixed-case tic should assume mixed-case filenames],
+ [enable_mixedcase=$enableval],
+ [enable_mixedcase=auto])
+AC_MSG_RESULT($enable_mixedcase)
+if test "$enable_mixedcase" = "auto" ; then
+ CF_MIXEDCASE_FILENAMES
+else
+ cf_cv_mixedcase=$enable_mixedcase
+ if test "$enable_mixedcase" = "yes" ; then
+ AC_DEFINE(MIXEDCASE_FILENAMES)
+ fi
+fi
+
+# do this after mixed-case option (tags/TAGS is not as important as tic).
+AC_PROG_MAKE_SET
+CF_MAKE_TAGS
+CF_MAKEFLAGS
+
+dnl These are standard among *NIX systems, but not when cross-compiling
+AC_CHECK_TOOL(RANLIB, ranlib, ':')
+AC_CHECK_TOOL(LD, ld, ld)
+AC_CHECK_TOOL(AR, ar, ar)
+CF_AR_FLAGS
+CF_PATHSEP
+
+dnl Special option for use by system-builders: the install-prefix is used to
+dnl adjust the location into which the actual install is done, so that an
+dnl archive can be built without modifying the host system's configuration.
+AC_MSG_CHECKING(if you have specified an install-prefix)
+AC_ARG_WITH(install-prefix,
+ [ --with-install-prefix prefixes actual install-location ($DESTDIR)],
+ [case "$withval" in
+ (yes|no)
+ ;;
+ (*) DESTDIR="$withval"
+ ;;
+ esac])
+AC_MSG_RESULT($DESTDIR)
+AC_SUBST(DESTDIR)
+
+###############################################################################
+CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:)
+# If we're cross-compiling, allow the user to override the tools and their
+# options. The configure script is oriented toward identifying the host
+# compiler, etc., but we need a build compiler to generate parts of the source.
+CF_BUILD_CC
+
+###############################################################################
+CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
+
+### Options to allow the user to specify the set of libraries which are used.
+### Use "--without-normal --with-shared" to allow the default model to be
+### shared, for example.
+cf_list_models=""
+
+AC_MSG_CHECKING(if you want to build shared C-objects)
+AC_ARG_WITH(shared,
+ [ --with-shared generate shared C-objects (needed for --with-ada-sharedlib)],
+ [with_shared=$withval],
+ [with_shared=no])
+AC_MSG_RESULT($with_shared)
+test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
+
+AC_MSG_CHECKING(for specified models)
+test -z "$cf_list_models" && cf_list_models=normal
+AC_MSG_RESULT($cf_list_models)
+
+### Use the first model as the default, and save its suffix for use in building
+### up test-applications.
+AC_MSG_CHECKING(for default model)
+DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
+AC_MSG_RESULT($DFT_LWR_MODEL)
+
+CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
+
+AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal")
+AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL")
+
+CF_NCURSES_ADDON
+
+CF_WITH_LIB_PREFIX(cf_prefix)
+
+LIB_SUFFIX=
+AC_SUBST(LIB_SUFFIX)
+
+###############################################################################
+
+dnl Not all ports of gcc support the -g option
+
+if test X"$CC_G_OPT" = X"" ; then
+ CC_G_OPT='-g'
+ test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
+fi
+AC_SUBST(CC_G_OPT)
+
+AC_MSG_CHECKING(for default loader flags)
+case $DFT_LWR_MODEL in
+(normal) LD_MODEL='' ;;
+(debug) LD_MODEL=$CC_G_OPT ;;
+(profile) LD_MODEL='-pg';;
+(shared) LD_MODEL='' ;;
+esac
+AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)
+AC_MSG_RESULT($LD_MODEL)
+
+CF_SHARED_OPTS
+
+# The test/sample programs in the original tree link using rpath option.
+# Make it optional for packagers.
+if test -n "$LOCAL_LDFLAGS"
+then
+ AC_MSG_CHECKING(if you want to link sample programs with rpath option)
+ AC_ARG_ENABLE(rpath-link,
+ [ --enable-rpath-link link sample programs with rpath option],
+ [with_rpath_link=$enableval],
+ [with_rpath_link=yes])
+ AC_MSG_RESULT($with_rpath_link)
+ if test "$with_rpath_link" = no
+ then
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ fi
+fi
+
+###############################################################################
+CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
+
+### use option --enable-broken-linker to force on use of broken-linker support
+AC_MSG_CHECKING(if you want broken-linker support code)
+AC_ARG_ENABLE(broken_linker,
+ [ --enable-broken_linker compile with broken-linker support code],
+ [with_broken_linker=$enableval],
+ [with_broken_linker=${BROKEN_LINKER:-no}])
+AC_MSG_RESULT($with_broken_linker)
+
+BROKEN_LINKER=0
+if test "$with_broken_linker" = yes ; then
+ AC_DEFINE(BROKEN_LINKER)
+ BROKEN_LINKER=1
+elif test "$DFT_LWR_MODEL" = shared ; then
+ case $cf_cv_system_name in
+ (cygwin*)
+ AC_DEFINE(BROKEN_LINKER)
+ BROKEN_LINKER=1
+ CF_VERBOSE(cygwin linker is broken anyway)
+ ;;
+ esac
+fi
+AC_SUBST(BROKEN_LINKER)
+
+# Check to define _XOPEN_SOURCE "automatically"
+CF_XOPEN_SOURCE
+
+CF_LARGEFILE
+
+### Enable compiling-in rcs id's
+AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
+AC_ARG_WITH(rcs-ids,
+ [ --with-rcs-ids compile-in RCS identifiers],
+ [with_rcs_ids=$withval],
+ [with_rcs_ids=no])
+AC_MSG_RESULT($with_rcs_ids)
+test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS,1,[Define to 1 if RCS identifiers should be compiled-in)])
+
+###############################################################################
+CF_HELP_MESSAGE(Extensions:)
+
+### Note that some functions (such as const) are normally disabled anyway.
+AC_MSG_CHECKING(if you want to build with function extensions)
+AC_ARG_ENABLE(ext-funcs,
+ [ --disable-ext-funcs disable function-extensions],
+ [with_ext_funcs=$enableval],
+ [with_ext_funcs=yes])
+AC_MSG_RESULT($with_ext_funcs)
+if test "$with_ext_funcs" = yes ; then
+ NCURSES_EXT_FUNCS=1
+ AC_DEFINE(HAVE_USE_DEFAULT_COLORS,1,[Define to 1 if we have use_default_colors function])
+ AC_DEFINE(NCURSES_EXT_FUNCS,1,[Define to 1 if we have ncurses extended functions])
+else
+ NCURSES_EXT_FUNCS=0
+fi
+AC_SUBST(NCURSES_EXT_FUNCS)
+
+### use option --enable-const to turn on use of const beyond that in XSI.
+AC_MSG_CHECKING(for extended use of const keyword)
+AC_ARG_ENABLE(const,
+ [ --enable-const compile with extra/non-standard const],
+ [with_ext_const=$enableval],
+ [with_ext_const=no])
+AC_MSG_RESULT($with_ext_const)
+NCURSES_CONST='/*nothing*/'
+if test "$with_ext_const" = yes ; then
+ NCURSES_CONST=const
+fi
+AC_SUBST(NCURSES_CONST)
+
+###############################################################################
+# These options are relatively safe to experiment with.
+CF_HELP_MESSAGE(Development Code:)
+AC_MSG_CHECKING(if you want all development code)
+AC_ARG_WITH(develop,
+ [ --without-develop disable development options],
+ [with_develop=$withval],
+ [with_develop=no])
+AC_MSG_RESULT($with_develop)
+
+###############################################################################
+# These are just experimental, probably should not be in a package:
+CF_HELP_MESSAGE(Experimental Code:)
+
+# This is still experimental (20080329), but should ultimately be moved to
+# the script-block --with-normal, etc.
+CF_WITH_PTHREAD
+
+AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
+AC_ARG_ENABLE(weak-symbols,
+ [ --enable-weak-symbols enable weak-symbols for pthreads],
+ [use_weak_symbols=$withval],
+ [use_weak_symbols=no])
+AC_MSG_RESULT($use_weak_symbols)
+if test "$use_weak_symbols" = yes ; then
+ CF_WEAK_SYMBOLS
+else
+ cf_cv_weak_symbols=no
+fi
+
+if test $cf_cv_weak_symbols = yes ; then
+ AC_DEFINE(USE_WEAK_SYMBOLS,1,[Define to 1 to enable weak-symbols for pthreads])
+fi
+
+PTHREAD=
+if test "$with_pthread" = "yes" ; then
+ AC_DEFINE(USE_PTHREADS,1,[Define to 1 to use the pthreads library])
+ enable_reentrant=yes
+ if test $cf_cv_weak_symbols = yes ; then
+ PTHREAD=-lpthread
+ fi
+fi
+AC_SUBST(PTHREAD)
+
+# OpenSUSE is installing ncurses6, using reentrant option.
+AC_CHECK_FUNC(_nc_TABSIZE,[assume_reentrant=yes], [assume_reentrant=no])
+
+# Reentrant code has to be opaque; there's little advantage to making ncurses
+# opaque outside of that, so there is no --enable-opaque option. We can use
+# this option without --with-pthreads, but this will be always set for
+# pthreads.
+AC_MSG_CHECKING(if you want experimental reentrant code)
+AC_ARG_ENABLE(reentrant,
+ [ --enable-reentrant compile with experimental reentrant code],
+ [with_reentrant=$enableval],
+ [with_reentrant=$assume_reentrant])
+AC_MSG_RESULT($with_reentrant)
+if test "$with_reentrant" = yes ; then
+ cf_cv_enable_reentrant=1
+ if test $cf_cv_weak_symbols = yes ; then
+ CF_REMOVE_LIB(LIBS,$LIBS,pthread)
+ elif test "$assume_reentrant" = no ; then
+ LIB_SUFFIX="t${LIB_SUFFIX}"
+ fi
+ AC_DEFINE(USE_REENTRANT,1,[Define to 1 to compile with experimental reentrant code])
+else
+ cf_cv_enable_reentrant=0
+fi
+AC_SUBST(cf_cv_enable_reentrant)
+
+### Allow using a different wrap-prefix
+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
+ AC_MSG_CHECKING(for prefix used to wrap public variables)
+ AC_ARG_WITH(wrap-prefix,
+ [ --with-wrap-prefix=XXX override prefix used for public variables],
+ [NCURSES_WRAP_PREFIX=$withval],
+ [NCURSES_WRAP_PREFIX=_nc_])
+ AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
+else
+ NCURSES_WRAP_PREFIX=_nc_
+fi
+AC_SUBST(NCURSES_WRAP_PREFIX)
+AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX",[Define to override _nc_ ncurses internal prefix])
+
+###############################################################################
+CF_HELP_MESSAGE(Testing/development Options:)
+
+### use option --disable-echo to suppress full display compiling commands
+CF_DISABLE_ECHO
+
+### use option --enable-warnings to turn on all gcc warnings
+AC_MSG_CHECKING(if you want to see compiler warnings)
+AC_ARG_ENABLE(warnings,
+ [ --enable-warnings build: turn on GCC compiler warnings],
+ [with_warnings=$enableval])
+AC_MSG_RESULT($with_warnings)
+
+if test "x$with_warnings" = "xyes"; then
+ CF_ADD_ADAFLAGS(-gnatg)
+ CF_GCC_WARNINGS(Wno-unknown-pragmas Wswitch-enum)
+fi
+CF_GCC_ATTRIBUTES
+
+### use option --enable-assertions to turn on generation of assertion code
+AC_MSG_CHECKING(if you want to enable runtime assertions)
+AC_ARG_ENABLE(assertions,
+ [ --enable-assertions test: turn on generation of assertion code],
+ [with_assertions=$enableval],
+ [with_assertions=no])
+AC_MSG_RESULT($with_assertions)
+if test -n "$GCC"
+then
+ if test "$with_assertions" = no
+ then
+ CPPFLAGS="$CPPFLAGS -DNDEBUG"
+ else
+ CF_ADD_ADAFLAGS(-gnata)
+ fi
+fi
+
+### use option --disable-leaks to suppress "permanent" leaks, for testing
+AC_DEFINE(HAVE_NC_ALLOC_H,1,[Define to 1 if we have nc_alloc.h header])
+
+### use option --enable-expanded to generate certain macros as functions
+AC_ARG_ENABLE(expanded,
+ [ --enable-expanded test: generate functions for certain macros],
+ [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED,1,[Define to 1 if ncurses macros should be expanded as functions])])
+
+### use option --disable-macros to suppress macros in favor of functions
+AC_ARG_ENABLE(macros,
+ [ --disable-macros test: use functions rather than macros],
+ [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS,1,[Define to 1 if ncurses macros should be expanded as functions])])
+
+# Normally we only add trace() to the debug-library. Allow this to be
+# extended to all models of the ncurses library:
+cf_all_traces=no
+case "$CFLAGS $CPPFLAGS" in
+(*-DTRACE*)
+ cf_all_traces=yes
+ ;;
+esac
+
+AC_MSG_CHECKING(whether to add trace feature to all models)
+AC_ARG_WITH(trace,
+[ --with-trace test: add trace() function to all models of ncurses],
+[cf_with_trace=$withval],
+[cf_with_trace=$cf_all_traces])
+AC_MSG_RESULT($cf_with_trace)
+
+if test "$cf_with_trace" = yes ; then
+ ADA_TRACE=TRUE
+ CF_ADD_CFLAGS(-DTRACE)
+else
+ ADA_TRACE=FALSE
+fi
+
+AC_SUBST(ADA_TRACE)
+
+CF_DISABLE_GNAT_PROJECTS
+
+### Checks for libraries.
+case $cf_cv_system_name in
+(*mingw32*)
+ ;;
+(*)
+AC_CHECK_FUNC(gettimeofday,
+ AC_DEFINE(HAVE_GETTIMEOFDAY),[
+
+AC_CHECK_LIB(bsd, gettimeofday,
+ AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday])
+ LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
+ ;;
+esac
+
+### Checks for header files.
+AC_STDC_HEADERS
+AC_HEADER_DIRENT
+AC_HEADER_TIME
+
+### checks for compiler characteristics
+AC_LANG_C
+AC_C_CONST
+
+### Checks for external-data
+CF_LINK_DATAONLY
+
+### Checks for library functions.
+CF_MKSTEMP
+
+dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
+if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
+ CF_STRIP_G_OPT(CFLAGS)
+ CF_STRIP_G_OPT(CXXFLAGS)
+fi
+
+CF_HELP_MESSAGE(Ada95 Binding Options:)
+cf_with_ada=yes
+dnl Check for availability of GNU Ada Translator (GNAT).
+dnl At the moment we support no other Ada95 compiler.
+if test "$cf_with_ada" != "no" ; then
+ CF_PROG_GNAT
+ if test "$cf_cv_prog_gnat_correct" = yes; then
+ CF_FIXUP_ADAFLAGS
+
+ CF_GNATPREP_OPT_T
+
+ CF_GNAT_GENERICS
+ CF_GNAT_SIGINT
+ CF_GNAT_PROJECTS
+
+ 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
+ else
+ AC_MSG_ERROR(No usable Ada compiler found)
+ fi
+else
+ AC_MSG_ERROR(The Ada compiler is needed for this package)
+fi
+
+################################################################################
+
+# not needed
+TINFO_LDFLAGS2=
+AC_SUBST(TINFO_LDFLAGS2)
+TINFO_LIBS=
+AC_SUBST(TINFO_LIBS)
+
+### Construct the list of include-directories to be generated
+CF_INCLUDE_DIRS
+CF_ADA_INCLUDE_DIRS
+
+### Build up pieces for makefile rules
+AC_MSG_CHECKING(default library suffix)
+CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
+AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
+AC_MSG_RESULT($DFT_ARG_SUFFIX)
+
+AC_MSG_CHECKING(default library-dependency suffix)
+CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_LIB_SUFFIX,DFT_DEP_SUFFIX)dnl
+AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
+AC_MSG_RESULT($DFT_DEP_SUFFIX)
+
+AC_MSG_CHECKING(default object directory)
+CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
+AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
+AC_MSG_RESULT($DFT_OBJ_SUBDIR)
+
+### Set up low-level terminfo dependencies for makefiles.
+
+if test "$DFT_LWR_MODEL" = shared ; then
+ case $cf_cv_system_name in
+ (cygwin*)
+ # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
+ ;;
+ (msys*)
+ # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
+ ;;
+ esac
+fi
+
+USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
+AC_SUBST(USE_CFG_SUFFIX)
+
+### Construct the list of subdirectories for which we'll customize makefiles
+### with the appropriate compile-rules.
+
+SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
+
+AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR',[Define to override ':' as the library path-separator])
+
+### Now that we're done running tests, add the compiler-warnings, if any
+CF_ADD_CFLAGS($EXTRA_CFLAGS)
+
+################################################################################
+
+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)
+
+ADA_SUBDIRS="include gen src doc"
+if test "x$cf_with_tests" != "xno" ; then
+ ADA_SUBDIRS="$ADA_SUBDIRS samples"
+fi
+for cf_dir in $ADA_SUBDIRS
+do
+ SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
+done
+AC_SUBST(ADA_SUBDIRS)
+
+NCURSES_TREE="#"
+AC_SUBST(NCURSES_TREE)
+
+EXTERNAL_TREE=
+AC_SUBST(EXTERNAL_TREE)
+
+# match layout used by make-tar.sh
+ADAHTML_DIR=../doc/ada
+AC_SUBST(ADAHTML_DIR)
+
+AC_OUTPUT( \
+ $SUB_MAKEFILES \
+ doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in \
+ Makefile,[
+if test -z "$USE_OLD_MAKERULES" ; then
+ $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
+fi
+],[
+### Special initialization commands, used to pass information from the
+### configuration-run into config.status
+
+AWK="$AWK"
+DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
+DFT_LWR_MODEL="$DFT_LWR_MODEL"
+LIB_NAME="$LIB_NAME"
+LIB_PREFIX="$LIB_PREFIX"
+LIB_SUFFIX="$LIB_SUFFIX"
+LN_S="$LN_S"
+NCURSES_MAJOR="$NCURSES_MAJOR"
+NCURSES_MINOR="$NCURSES_MINOR"
+NCURSES_PATCH="$NCURSES_PATCH"
+USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
+cf_cv_abi_version="$cf_cv_abi_version"
+cf_cv_rel_version="$cf_cv_rel_version"
+cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
+cf_cv_shared_soname='$cf_cv_shared_soname'
+cf_cv_shlib_version="$cf_cv_shlib_version"
+cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
+cf_cv_system_name="$cf_cv_system_name"
+host="$host"
+target="$target"
+
+],cat)dnl
+${MAKE:-make} preinstall
diff --git a/Ada95/doc/Makefile.in b/Ada95/doc/Makefile.in
new file mode 100644
index 0000000..0973827
--- /dev/null
+++ b/Ada95/doc/Makefile.in
@@ -0,0 +1,82 @@
+# $Id: Makefile.in,v 1.4 2015/08/05 23:15:41 tom Exp $
+##############################################################################
+# Copyright (c) 2011-2012,2015 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# Makefile for AdaCurses manual pages.
+
+SHELL = @SHELL@
+VPATH = @srcdir@
+
+DESTDIR = @DESTDIR@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+mandir = @mandir@
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+DFT_ARG_SUFFIX = @DFT_ARG_SUFFIX@
+
+THIS = AdaCurses
+DOCDIR = $(DESTDIR)$(datadir)/doc/$(THIS)
+MANDIR = $(DESTDIR)$(mandir)/man1
+
+all \
+sources \
+depend \
+tags :
+
+$(DOCDIR) \
+$(MANDIR) :
+ mkdir -p $@
+
+install install.man : $(MANDIR)
+ $(INSTALL_DATA) adacurses${DFT_ARG_SUFFIX}-config.1 $(MANDIR)
+
+uninstall uninstall.man :
+ -rm -f $(MANDIR)/adacurses${DFT_ARG_SUFFIX}-config.1
+
+# HTML documentation is optional, usually in a separate package.
+install.html : $(DOCDIR)
+ cd $(srcdir) && tar -cf - *.htm* ada | tar -C $(DOCDIR) -xf -
+
+uninstall.html :
+ -rm -rf $(DOCDIR)
+
+mostlyclean :
+ -rm -f core tags TAGS *~ *.bak *.ln *.atac trace
+
+clean: mostlyclean
+
+distclean realclean: clean
+ -rm -f Makefile *-config.1
diff --git a/Ada95/gen/Makefile.in b/Ada95/gen/Makefile.in
index b7e3bec..48df318 100644
--- a/Ada95/gen/Makefile.in
+++ b/Ada95/gen/Makefile.in
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,14 +28,15 @@
#
# Author: Juergen Pfeifer, 1996
#
-# $Id: Makefile.in,v 1.61 2008/10/04 22:58:31 tom Exp $
+# $Id: Makefile.in,v 1.85 2015/08/05 23:06:31 tom Exp $
#
.SUFFIXES:
-SHELL = /bin/sh
+SHELL = @SHELL@
+VPATH = @srcdir@
THIS = Makefile
-x = @PROG_EXT@
+x = @EXEEXT@
top_srcdir = @top_srcdir@
DESTDIR = @DESTDIR@
@@ -43,9 +44,7 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
-
-ADA_INCLUDE = $(DESTDIR)@ADA_INCLUDE@
-ADA_OBJECTS = $(DESTDIR)@ADA_OBJECTS@
+includedir = @includedir@
INSTALL = @INSTALL@
INSTALL_PROG = @INSTALL_PROGRAM@
@@ -56,12 +55,15 @@
CC = @CC@
HOST_CC = @BUILD_CC@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @ACPPFLAGS@ \
+CFLAGS = @CFLAGS@
+HOST_CFLAGS = @BUILD_CFLAGS@
+
+CPPFLAGS = @CPPFLAGS@
+HOST_CPPFLAGS = @ACPPFLAGS@ @BUILD_CPPFLAGS@ \
-DHAVE_CONFIG_H -I$(srcdir)
-CCFLAGS = $(CPPFLAGS) $(CFLAGS)
+CCFLAGS = $(HOST_CPPFLAGS) $(HOST_CFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
@@ -74,20 +76,32 @@
LOCAL_LIBDIR = @top_builddir@/lib
LINK = $(HOST_CC)
-LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) @TINFO_ARGS2@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+# For the wide-character configuration combined with broken_linker, we need
+# addresses of ACS_xxx constants, which requires linking with the newly built
+# ncurses library. If cross-compiling, the developer has to fill in a workable
+# native library for this purpose.
+NATIVE_LDFLAGS = @LD_MODEL@ $(LOCAL_LIBS) @TINFO_LDFLAGS2@ $(LDFLAGS) @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) @TINFO_LIBS@
+CROSS_LDFLAGS = @BUILD_LDFLAGS@ @BUILD_LIBS@
+
+ACTUAL_LDFLAGS = @ADAGEN_LDFLAGS@
RANLIB = @RANLIB@
M4 = m4
M4FLAGS = -DNCURSES_EXT_FUNCS=@NCURSES_EXT_FUNCS@
-ADACURSES_CONFIG = adacurses-config
+ADACURSES_CONFIG = adacurses@USE_CFG_SUFFIX@-config
-WRAPPER = sh $(top_srcdir)/misc/shlib
-GENERATE = ./gen$x '@DFT_ARG_SUFFIX@'
+WRAPPER = @NCURSES_SHLIB2@
+
+PROG_GENERATE = ./generate$x
+GENERATE = $(PROG_GENERATE) '@DFT_ARG_SUFFIX@'
DEL_ADAMODE = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d'
-GNATHTML = `type -p gnathtml || type -p gnathtml.pl`
+GNATHTML = `type -p gnathtml || type -p gnathtml.pl 2>/dev/null`
GNATHP = www.gnat.com
################################################################################
@@ -96,39 +110,6 @@
ADA_SRCDIR = ../src
-GEN_FILES0 = Base_Defs
-
-GEN_FILES1 = ACS_Map \
- AC_Rep \
- Base_Defs \
- Character_Attribute_Set_Rep \
- Color_Defs \
- Key_Definitions \
- Linker_Options \
- Old_Keys \
- Public_Variables \
- Trace_Defs \
- Version_Info \
- Window_Offsets
-
-GEN_FILES2 = Menu_Opt_Rep \
- Menu_Base_Defs \
- Menu_Linker_Options \
- Item_Rep
-
-GEN_FILES3 = Form_Opt_Rep \
- Form_Base_Defs \
- Form_Linker_Options \
- Field_Rep
-
-GEN_FILES4 = Mouse_Base_Defs \
- Mouse_Event_Rep \
- Mouse_Events \
- Panel_Linker_Options
-
-GEN_FILES5 = Chtype_Def \
- Eti_Defs
-
GEN_TARGETS = $(ADA_SRCDIR)/$(ABASE).ads \
$(ADA_SRCDIR)/$(ABASE).adb \
$(ADA_SRCDIR)/$(ABASE)-aux.ads \
@@ -142,7 +123,8 @@
$(ADA_SRCDIR)/$(ABASE)-forms-form_user_data.ads \
$(ADA_SRCDIR)/$(ABASE)-forms-field_types.ads \
$(ADA_SRCDIR)/$(ABASE)-forms-field_user_data.ads \
- $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads
+ $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads \
+ $(ADA_SRCDIR)/$(ABASE)_constants.ads
GEN_SRC = $(srcdir)/$(ABASE).ads.m4 \
$(srcdir)/$(ABASE).adb.m4 \
@@ -166,166 +148,64 @@
sources:
-$(ADA_INCLUDE) \
-$(ADA_OBJECTS) :
- sh $(top_srcdir)/mkdirs.sh $@
+$(DESTDIR)$(bindir) :
+ mkdir -p $@
install \
-install.libs :: $(ADA_INCLUDE)
- @echo installing package $(ALIB) in $(ADA_INCLUDE)
- @$(top_srcdir)/tar-copy.sh '$(ALIB)*.ad?' $(ADA_SRCDIR) $(ADA_INCLUDE)
- @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(ADA_SRCDIR) $(ADA_INCLUDE)
- @test $(srcdir) != ./ && $(top_srcdir)/tar-copy.sh '$(ALIB)*.ad?' $(srcdir)/../src $(ADA_INCLUDE)
- @test $(srcdir) != ./ && $(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ad?' $(srcdir)/../src $(ADA_INCLUDE)
-
-install \
-install.libs :: $(ADA_OBJECTS)
- @echo installing package $(ALIB) in $(ADA_OBJECTS)
- @-chmod a-wx $(ADA_SRCDIR)/*.ali
- @$(top_srcdir)/tar-copy.sh '$(ALIB)*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS)
- @$(top_srcdir)/tar-copy.sh '$(ALIB)[-.]*.ali' $(ADA_SRCDIR) $(ADA_OBJECTS)
- @-chmod u+x $(ADA_SRCDIR)/*.ali
-
-install \
-install.libs :: $(DESTDIR)$(bindir) adacurses-config
- $(INSTALL_PROG) adacurses-config $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
-
-uninstall \
-uninstall.libs ::
- @echo removing package $(ALIB) from $(ADA_INCLUDE)
- -@cd $(ADA_INCLUDE) && rm -f $(ALIB)[-.]*
-
-uninstall \
-uninstall.libs ::
- @echo removing package $(ALIB) from $(ADA_OBJECTS)
- -@cd $(ADA_OBJECTS) && rm -f $(ALIB)[-.]*
+install.libs :: $(DESTDIR)$(bindir) $(ADACURSES_CONFIG)
+ $(INSTALL_PROG) $(ADACURSES_CONFIG) $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
uninstall \
uninstall.libs ::
-rm -f $(DESTDIR)$(bindir)/$(ADACURSES_CONFIG)
-gen$x: gen.o
- @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@
+$(PROG_GENERATE): gen.o
+ @ECHO_LD@ $(LINK) $(CFLAGS_NORMAL) gen.o $(ACTUAL_LDFLAGS) -o $@
gen.o: $(srcdir)/gen.c
$(HOST_CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/gen.c
-################################################################################
-Character_Attribute_Set_Rep: gen$x
- $(WRAPPER) "$(GENERATE) B A" >$@
-Base_Defs: gen$x
- $(WRAPPER) "$(GENERATE) B B" >$@
-
-Color_Defs: gen$x
- $(WRAPPER) "$(GENERATE) B C" >$@
-
-Window_Offsets: gen$x
- $(WRAPPER) "$(GENERATE) B D" >$@
-
-Key_Definitions: gen$x
- $(WRAPPER) "$(GENERATE) B K" >$@
-
-Linker_Options: gen$x
- $(WRAPPER) "$(GENERATE) B L" >$@
-
-ACS_Map: gen$x
- $(WRAPPER) "$(GENERATE) B M" >$@
-
-Old_Keys: gen$x
- $(WRAPPER) "$(GENERATE) B O" >$@
-
-Public_Variables: gen$x
- $(WRAPPER) "$(GENERATE) B P" >$@
-
-AC_Rep: gen$x
- $(WRAPPER) "$(GENERATE) B R" >$@
-
-Version_Info: gen$x
- $(WRAPPER) "$(GENERATE) B V" >$@
-
-Trace_Defs: gen$x
- $(WRAPPER) "$(GENERATE) B T" >$@
-################################################################################
-Menu_Opt_Rep: gen$x
- $(WRAPPER) "$(GENERATE) M R" >$@
-
-Menu_Base_Defs: gen$x
- $(WRAPPER) "$(GENERATE) M B" >$@
-
-Menu_Linker_Options: gen$x
- $(WRAPPER) "$(GENERATE) M L" >$@
-
-Item_Rep: gen$x
- $(WRAPPER) "$(GENERATE) M I" >$@
-################################################################################
-Form_Opt_Rep: gen$x
- $(WRAPPER) "$(GENERATE) F R" >$@
-
-Form_Base_Defs: gen$x
- $(WRAPPER) "$(GENERATE) F B" >$@
-
-Form_Linker_Options: gen$x
- $(WRAPPER) "$(GENERATE) F L" >$@
-
-Field_Rep: gen$x
- $(WRAPPER) "$(GENERATE) F I" >$@
-################################################################################
-Mouse_Base_Defs: gen$x
- $(WRAPPER) "$(GENERATE) P B" >$@
-
-Mouse_Event_Rep: gen$x
- $(WRAPPER) "$(GENERATE) P M" >$@
-
-Mouse_Events: gen$x
- $(WRAPPER) "$(GENERATE) B E" >$@
-
-Panel_Linker_Options: gen$x
- $(WRAPPER) "$(GENERATE) P L" >$@
-
-Chtype_Def: gen$x
- $(WRAPPER) "$(GENERATE) E C" >$@
-
-Eti_Defs: gen$x
- $(WRAPPER) "$(GENERATE) E E" >$@
+$(ADA_SRCDIR)/$(ABASE)_constants.ads: $(PROG_GENERATE)
+ $(WRAPPER) "$(GENERATE)" >$@
################################################################################
$(ADA_SRCDIR)/$(ABASE).ads: $(srcdir)/$(ABASE).ads.m4 \
- $(GEN_FILES1) $(srcdir)/normal.m4
+ $(srcdir)/normal.m4
$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
$(srcdir)/$(ABASE).ads.m4 |\
$(DEL_ADAMODE) >$@
$(ADA_SRCDIR)/$(ABASE).adb: $(srcdir)/$(ABASE).adb.m4 \
- $(GEN_FILES1) $(srcdir)/normal.m4
+ $(srcdir)/normal.m4
$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
$(srcdir)/$(ABASE).adb.m4 |\
$(DEL_ADAMODE) >$@
$(ADA_SRCDIR)/$(ABASE)-aux.ads: $(srcdir)/$(ABASE)-aux.ads.m4 \
- $(GEN_FILES5) $(srcdir)/normal.m4
+ $(srcdir)/normal.m4
$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
$(srcdir)/$(ABASE)-aux.ads.m4 |\
$(DEL_ADAMODE) >$@
$(ADA_SRCDIR)/$(ABASE)-trace.ads: $(srcdir)/$(ABASE)-trace.ads.m4 \
- $(GEN_FILES5) $(srcdir)/normal.m4
+ $(srcdir)/normal.m4
$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
$(srcdir)/$(ABASE)-trace.ads.m4 |\
$(DEL_ADAMODE) >$@
$(ADA_SRCDIR)/$(ABASE)-menus.ads: $(srcdir)/$(ABASE)-menus.ads.m4 \
- $(GEN_FILES2) $(srcdir)/normal.m4
+ $(srcdir)/normal.m4
$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
$(srcdir)/$(ABASE)-menus.ads.m4 |\
$(DEL_ADAMODE) >$@
$(ADA_SRCDIR)/$(ABASE)-forms.ads: $(srcdir)/$(ABASE)-forms.ads.m4 \
- $(GEN_FILES3) $(srcdir)/normal.m4
+ $(srcdir)/normal.m4
$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
$(srcdir)/$(ABASE)-forms.ads.m4 |\
$(DEL_ADAMODE) >$@
$(ADA_SRCDIR)/$(ABASE)-mouse.ads: $(srcdir)/$(ABASE)-mouse.ads.m4 \
- $(GEN_FILES4) $(srcdir)/normal.m4
+ $(srcdir)/normal.m4
$(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \
$(srcdir)/$(ABASE)-mouse.ads.m4 |\
$(DEL_ADAMODE) >$@
@@ -387,23 +267,18 @@
@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
- -rm -f a.out core gen$x *.o
- -rm -f $(GEN_FILES1)
- -rm -f $(GEN_FILES2)
- -rm -f $(GEN_FILES3)
- -rm -f $(GEN_FILES4)
- -rm -f $(GEN_FILES5)
+ -rm -f a.out core $(PROG_GENERATE) *.o
clean :: mostlyclean
-rm -f $(GEN_TARGETS) instab.tmp *.ad[bs] *.html *.ali *.tmp
distclean :: clean
- -rm -f adacurses-config
+ -rm -f $(ADACURSES_CONFIG)
-rm -f Makefile
realclean :: distclean
-HTML_DIR = ../../doc/html/ada
+HTML_DIR = @ADAHTML_DIR@
instab.tmp : table.m4 $(GEN_SRC)
@rm -f $@
@@ -431,10 +306,12 @@
@rm -f instab.tmp
adahtml:
+ test -n "$(GNATHTML)" || exit 1
@find $(HTML_DIR) -type f -exec rm -f {} \;
@mkdir -p $(HTML_DIR)
cp -p ../src/*.ad[sb] . && chmod +w *.ad[sb]
- ln -sf ../src/*.ali .
+@USE_OLD_MAKERULES@ ln -sf ../src/*.ali .
+@USE_GNAT_PROJECTS@ ln -sf ../static-ali/*.ali .
@echo "Filtering generated files"
@for f in $(GEN_SRC); do \
h=`basename $$f` ;\
diff --git a/Ada95/gen/adacurses-config b/Ada95/gen/adacurses-config
deleted file mode 100644
index b7e9a0e..0000000
--- a/Ada95/gen/adacurses-config
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# $Id: adacurses-config.in,v 1.2 2007/04/07 21:06:50 tom Exp $
-#
-# This script will return the option to add to `gnatmake' for using
-# AdaCurses.
-#
-
-prefix="/usr/local"
-exec_prefix="${prefix}"
-libdir="${exec_prefix}/lib"
-
-VERSION="5.7.20081102"
-
-CFLAGS="-I$libdir/adacurses -L$libdir/adacurses"
-LIBS="-L$prefix/lib -lAdaCurses"
-
-case "x$1" in
- x--version)
- echo AdaCurses $VERSION
- ;;
- x--cflags)
- echo $CFLAGS
- ;;
- x--libs)
- echo $LIBS
- ;;
- x)
- # if no parameter is given, give what gnatmake needs
- echo $CFLAGS -largs $LIBS
- ;;
- *)
- echo 'Usage: adacurses-config [--version | --cflags | --libs]' >&2
- exit 1
- ;;
-esac
diff --git a/Ada95/gen/adacurses-config.in b/Ada95/gen/adacurses-config.in
index c88d85b..e29c309 100644
--- a/Ada95/gen/adacurses-config.in
+++ b/Ada95/gen/adacurses-config.in
@@ -1,35 +1,81 @@
#! /bin/sh
-# $Id: adacurses-config.in,v 1.2 2007/04/07 21:06:50 tom Exp $
+# $Id: adacurses-config.in,v 1.9 2014/06/07 19:32:22 Pascal.Pignard Exp $
+##############################################################################
+# Copyright (c) 2007-2010,2014 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
#
-# This script will return the option to add to `gnatmake' for using
-# AdaCurses.
-#
+# This script returns the options to add to `gnatmake' for using AdaCurses.
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-libdir="@libdir@"
+DESTDIR=@DESTDIR@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
-VERSION="@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@"
+ADA_INCLUDE=@ADA_INCLUDE@
+ADA_OBJECTS=@ADA_OBJECTS@
-CFLAGS="-I$libdir/adacurses -L$libdir/adacurses"
-LIBS="-L$prefix/lib -lAdaCurses"
+VERSION=@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@
+
+CFLAGS="-aI$ADA_INCLUDE -aO$ADA_OBJECTS"
+LIBS="-L$ADA_OBJECTS -lAdaCurses"
+
+THIS="adacurses"
case "x$1" in
- x--version)
- echo AdaCurses $VERSION
- ;;
- x--cflags)
- echo $CFLAGS
- ;;
- x--libs)
- echo $LIBS
- ;;
- x)
- # if no parameter is given, give what gnatmake needs
- echo $CFLAGS -largs $LIBS
- ;;
- *)
- echo 'Usage: adacurses-config [--version | --cflags | --libs]' >&2
- exit 1
- ;;
+ x--version)
+ echo AdaCurses $VERSION
+ ;;
+ x--cflags)
+ echo $CFLAGS
+ ;;
+ x--libs)
+ echo $LIBS
+ ;;
+ x)
+ # if no parameter is given, give what gnatmake needs
+ echo "$CFLAGS -largs $LIBS"
+ ;;
+ x--help)
+ cat <<ENDHELP
+Usage: ${THIS}-config [options]
+
+Options:
+ --cflags echos the gnat (Ada compiler) flags needed to compile with ${THIS}
+ --libs echos the gnat libraries needed to link with ${THIS}
+
+ --version echos the release+patchdate version of ${THIS}
+
+ --help prints this message
+
+If no options are given, echos the full set of flags needed by gnatmake.
+ENDHELP
+ ;;
+ *)
+ echo 'Usage: adacurses@DFT_ARG_SUFFIX@-config [--version | --cflags | --libs]' >&2
+ exit 1
+ ;;
esac
diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c
index d8ea44f..4e986a4 100644
--- a/Ada95/gen/gen.c
+++ b/Ada95/gen/gen.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,1492 +32,503 @@
/*
Version Control
- $Id: gen.c,v 1.49 2008/10/04 21:59:37 tom Exp $
+ $Id: gen.c,v 1.69 2014/05/31 21:00:08 tom Exp $
--------------------------------------------------------------------------*/
/*
- This program generates various record structures and constants from the
- ncurses header file for the Ada95 packages. Essentially it produces
- Ada95 source on stdout, which is then merged using m4 into a template
- to produce the real source.
- */
+ This program prints on its standard output the source for the
+ Terminal_Interface.Curses_Constants Ada package specification. This pure
+ package only exports C constants to the Ada compiler.
+ */
+#ifdef HAVE_CONFIG_H
#include <ncurses_cfg.h>
+#else
+#include <ncurses.h>
+#endif
#include <stdlib.h>
-#include <stddef.h>
#include <string.h>
-#include <assert.h>
-#include <ctype.h>
#include <menu.h>
#include <form.h>
-#define RES_NAME "Reserved"
+#undef UCHAR
+#undef UINT
-static const char *model = "";
-static int little_endian = 0;
+typedef unsigned char UCHAR;
+typedef unsigned int UINT;
-typedef struct
- {
- const char *name;
- unsigned long attr;
- }
-name_attribute_pair;
+/* These global variables will be set by main () */
+static int little_endian;
+static const char *my_program_invocation_name = NULL;
-static int
-find_pos(char *s, unsigned len, int *low, int *high)
+static void
+my_error(const char *message)
{
- unsigned int i, j;
- int l = 0;
+ fprintf(stderr, "%s: %s\n", my_program_invocation_name, message);
+ exit(EXIT_FAILURE);
+}
- *high = -1;
- *low = 8 * len;
+static void
+print_constant(const char *name,
+ long value)
+{
+ printf(" %-28s : constant := %ld;\n", name, value);
+}
- for (i = 0; i < len; i++, s++)
- {
- if (*s)
- {
- for (j = 0; j < 8 * sizeof(char); j++)
+#define PRINT_NAMED_CONSTANT(name) \
+ print_constant (#name, name)
- {
- if (((little_endian && ((*s) & 0x01)) ||
- (!little_endian && ((*s) & 0x80))))
- {
- if (l > *high)
- *high = l;
- if (l < *low)
- *low = l;
- }
- l++;
- if (little_endian)
- *s >>= 1;
- else
- *s <<= 1;
- }
- }
- else
- l += 8;
- }
- return (*high >= 0 && (*low <= *high)) ? *low : -1;
+static void
+print_comment(const char *message)
+{
+ printf("\n -- %s\n\n", message);
}
/*
- * This helper routine generates a representation clause for a
- * record type defined in the binding.
- * We are only dealing with record types which are of 32 or 16
- * bit size, i.e. they fit into an (u)int or a (u)short.
+ * Make sure that KEY_MIN and KEY_MAX are defined.
+ * main () will protest if KEY_MIN == 256
*/
-static void
- gen_reps
- (const name_attribute_pair * nap, /* array of name_attribute_pair records */
- const char *name, /* name of the represented record type */
- int len, /* size of the record in bytes */
- int bias)
-{
- int i, n, l, cnt = 0, low, high;
- int width = strlen(RES_NAME) + 3;
- unsigned long a;
- unsigned long mask = 0;
-
- assert(nap != NULL);
-
- for (i = 0; nap[i].name != (char *)0; i++)
- {
- cnt++;
- l = strlen(nap[i].name);
- if (l > width)
- width = l;
- }
- assert(width > 0);
-
- printf(" type %s is\n", name);
- printf(" record\n");
- for (i = 0; nap[i].name != (char *)0; i++)
- {
- printf(" %-*s : Boolean;\n", width, nap[i].name);
- }
- printf(" end record;\n");
- printf(" pragma Convention (C, %s);\n\n", name);
-
- printf(" for %s use\n", name);
- printf(" record\n");
-
- for (i = 0; nap[i].name != (char *)0; i++)
- {
- a = nap[i].attr;
- mask |= a;
- l = find_pos((char *)&a, sizeof(a), &low, &high);
- if (l >= 0)
- printf(" %-*s at 0 range %2d .. %2d;\n", width, nap[i].name,
- low - bias, high - bias);
- }
- i = 1;
- n = cnt;
- printf(" end record;\n");
- printf(" for %s'Size use %d;\n", name, 8 * len);
- printf(" -- Please note: this rep. clause is generated and may be\n");
- printf(" -- different on your system.");
-}
-
-static void
-chtype_rep(const char *name, attr_t mask)
-{
- attr_t x = -1;
- attr_t t = x & mask;
- int low, high;
- int l = find_pos((char *)&t, sizeof(t), &low, &high);
-
- if (l >= 0)
- printf(" %-5s at 0 range %2d .. %2d;\n", name, low, high);
-}
-
-static void
-gen_chtype_rep(const char *name)
-{
- printf(" for %s use\n record\n", name);
- chtype_rep("Ch", A_CHARTEXT);
- chtype_rep("Color", A_COLOR);
- chtype_rep("Attr", (A_ATTRIBUTES & ~A_COLOR));
- printf(" end record;\n for %s'Size use %ld;\n",
- name, (long)(8 * sizeof(chtype)));
-
- printf(" -- Please note: this rep. clause is generated and may be\n");
- printf(" -- different on your system.\n");
-}
-
-static void
-mrep_rep(const char *name, void *rec)
-{
- int low, high;
- int l = find_pos((char *)rec, sizeof(MEVENT), &low, &high);
-
- if (l >= 0)
- printf(" %-7s at 0 range %3d .. %3d;\n", name, low, high);
-}
-
-static void
-gen_mrep_rep(const char *name)
-{
- MEVENT x;
-
- printf(" for %s use\n record\n", name);
-
- memset(&x, 0, sizeof(x));
- x.id = -1;
- mrep_rep("Id", &x);
-
- memset(&x, 0, sizeof(x));
- x.x = -1;
- mrep_rep("X", &x);
-
- memset(&x, 0, sizeof(x));
- x.y = -1;
- mrep_rep("Y", &x);
-
- memset(&x, 0, sizeof(x));
- x.z = -1;
- mrep_rep("Z", &x);
-
- memset(&x, 0, sizeof(x));
- x.bstate = -1;
- mrep_rep("Bstate", &x);
-
- printf(" end record;\n");
- printf(" -- Please note: this rep. clause is generated and may be\n");
- printf(" -- different on your system.\n");
-}
-
-static void
-gen_attr_set(const char *name)
-{
- /* All of the A_xxx symbols are defined in ncurses, but not all are nonzero
- * if "configure --enable-widec" is specified.
- */
- static const name_attribute_pair nap[] =
- {
-#if A_STANDOUT
- {"Stand_Out", A_STANDOUT},
-#endif
-#if A_UNDERLINE
- {"Under_Line", A_UNDERLINE},
-#endif
-#if A_REVERSE
- {"Reverse_Video", A_REVERSE},
-#endif
-#if A_BLINK
- {"Blink", A_BLINK},
-#endif
-#if A_DIM
- {"Dim_Character", A_DIM},
-#endif
-#if A_BOLD
- {"Bold_Character", A_BOLD},
-#endif
-#if A_ALTCHARSET
- {"Alternate_Character_Set", A_ALTCHARSET},
-#endif
-#if A_INVIS
- {"Invisible_Character", A_INVIS},
-#endif
-#if A_PROTECT
- {"Protected_Character", A_PROTECT},
-#endif
-#if A_HORIZONTAL
- {"Horizontal", A_HORIZONTAL},
-#endif
-#if A_LEFT
- {"Left", A_LEFT},
-#endif
-#if A_LOW
- {"Low", A_LOW},
-#endif
-#if A_RIGHT
- {"Right", A_RIGHT},
-#endif
-#if A_TOP
- {"Top", A_TOP},
-#endif
-#if A_VERTICAL
- {"Vertical", A_VERTICAL},
-#endif
- {(char *)0, 0}
- };
- chtype attr = A_ATTRIBUTES & ~A_COLOR;
- int start = -1;
- int len = 0;
- int i, set;
- for (i = 0; i < (int)(8 * sizeof(chtype)); i++)
-
- {
- set = attr & 1;
- if (set)
- {
- if (start < 0)
- start = i;
- if (start >= 0)
- {
- len++;
- }
- }
- attr = attr >> 1;
- }
- gen_reps(nap, name, (len + 7) / 8, little_endian ? start : 0);
-}
-
-static void
-gen_trace(const char *name)
-{
- static const name_attribute_pair nap[] =
- {
- {"Times", TRACE_TIMES},
- {"Tputs", TRACE_TPUTS},
- {"Update", TRACE_UPDATE},
- {"Cursor_Move", TRACE_MOVE},
- {"Character_Output", TRACE_CHARPUT},
- {"Calls", TRACE_CALLS},
- {"Virtual_Puts", TRACE_VIRTPUT},
- {"Input_Events", TRACE_IEVENT},
- {"TTY_State", TRACE_BITS},
- {"Internal_Calls", TRACE_ICALLS},
- {"Character_Calls", TRACE_CCALLS},
- {"Termcap_TermInfo", TRACE_DATABASE},
- {(char *)0, 0}
- };
- gen_reps(nap, name, sizeof(int), 0);
-}
-
-static void
-gen_menu_opt_rep(const char *name)
-{
- static const name_attribute_pair nap[] =
- {
-#ifdef O_ONEVALUE
- {"One_Valued", O_ONEVALUE},
-#endif
-#ifdef O_SHOWDESC
- {"Show_Descriptions", O_SHOWDESC},
-#endif
-#ifdef O_ROWMAJOR
- {"Row_Major_Order", O_ROWMAJOR},
-#endif
-#ifdef O_IGNORECASE
- {"Ignore_Case", O_IGNORECASE},
-#endif
-#ifdef O_SHOWMATCH
- {"Show_Matches", O_SHOWMATCH},
-#endif
-#ifdef O_NONCYCLIC
- {"Non_Cyclic", O_NONCYCLIC},
-#endif
- {(char *)0, 0}
- };
- gen_reps(nap, name, sizeof(int), 0);
-}
-
-static void
-gen_item_opt_rep(const char *name)
-{
- static const name_attribute_pair nap[] =
- {
-#ifdef O_SELECTABLE
- {"Selectable", O_SELECTABLE},
-#endif
- {(char *)0, 0}
- };
- gen_reps(nap, name, sizeof(int), 0);
-}
-
-static void
-gen_form_opt_rep(const char *name)
-{
- static const name_attribute_pair nap[] =
- {
-#ifdef O_NL_OVERLOAD
- {"NL_Overload", O_NL_OVERLOAD},
-#endif
-#ifdef O_BS_OVERLOAD
- {"BS_Overload", O_BS_OVERLOAD},
-#endif
- {(char *)0, 0}
- };
- gen_reps(nap, name, sizeof(int), 0);
-}
-
-/*
- * Generate the representation clause for the Field_Option_Set record
- */
-static void
-gen_field_opt_rep(const char *name)
-{
- static const name_attribute_pair nap[] =
- {
-#ifdef O_VISIBLE
- {"Visible", O_VISIBLE},
-#endif
-#ifdef O_ACTIVE
- {"Active", O_ACTIVE},
-#endif
-#ifdef O_PUBLIC
- {"Public", O_PUBLIC},
-#endif
-#ifdef O_EDIT
- {"Edit", O_EDIT},
-#endif
-#ifdef O_WRAP
- {"Wrap", O_WRAP},
-#endif
-#ifdef O_BLANK
- {"Blank", O_BLANK},
-#endif
-#ifdef O_AUTOSKIP
- {"Auto_Skip", O_AUTOSKIP},
-#endif
-#ifdef O_NULLOK
- {"Null_Ok", O_NULLOK},
-#endif
-#ifdef O_PASSOK
- {"Pass_Ok", O_PASSOK},
-#endif
-#ifdef O_STATIC
- {"Static", O_STATIC},
-#endif
- {(char *)0, 0}
- };
- gen_reps(nap, name, sizeof(int), 0);
-}
-
-/*
- * Generate a single key code constant definition.
- */
-static void
-keydef(const char *name, const char *old_name, int value, int mode)
-{
- if (mode == 0) /* Generate the new name */
- printf(" %-30s : constant Special_Key_Code := 8#%3o#;\n", name, value);
- else
- { /* generate the old name, but only if it doesn't conflict with the old
- * name (Ada95 isn't case sensitive!)
- */
- const char *s = old_name;
- const char *t = name;
-
- while (*s && *t && (toupper(*s++) == toupper(*t++)));
- if (*s || *t)
- printf(" %-16s : Special_Key_Code renames %s;\n", old_name, name);
- }
-}
-
-/*
- * Generate constants for the key codes. When called with mode==0, a
- * complete list with nice constant names in proper casing style will
- * be generated. Otherwise a list of old (i.e. C-style) names will be
- * generated, given that the name wasn't already defined in the "nice"
- * list.
- */
-static void
-gen_keydefs(int mode)
-{
- char buf[16];
- char obuf[16];
- int i;
-
-#ifdef KEY_CODE_YES
- keydef("Key_Code_Yes", "KEY_CODE_YES", KEY_CODE_YES, mode);
-#endif
-#ifdef KEY_MIN
- keydef("Key_Min", "KEY_MIN", KEY_MIN, mode);
-#endif
-#ifdef KEY_BREAK
- keydef("Key_Break", "KEY_BREAK", KEY_BREAK, mode);
-#endif
-#ifdef KEY_DOWN
- keydef("Key_Cursor_Down", "KEY_DOWN", KEY_DOWN, mode);
-#endif
-#ifdef KEY_UP
- keydef("Key_Cursor_Up", "KEY_UP", KEY_UP, mode);
-#endif
-#ifdef KEY_LEFT
- keydef("Key_Cursor_Left", "KEY_LEFT", KEY_LEFT, mode);
-#endif
-#ifdef KEY_RIGHT
- keydef("Key_Cursor_Right", "KEY_RIGHT", KEY_RIGHT, mode);
-#endif
-#ifdef KEY_HOME
- keydef("Key_Home", "KEY_HOME", KEY_HOME, mode);
-#endif
-#ifdef KEY_BACKSPACE
- keydef("Key_Backspace", "KEY_BACKSPACE", KEY_BACKSPACE, mode);
-#endif
-#ifdef KEY_F0
- keydef("Key_F0", "KEY_F0", KEY_F0, mode);
-#endif
-#ifdef KEY_F
- for (i = 1; i <= 24; i++)
- {
- sprintf(buf, "Key_F%d", i);
- sprintf(obuf, "KEY_F%d", i);
- keydef(buf, obuf, KEY_F(i), mode);
- }
-#endif
-#ifdef KEY_DL
- keydef("Key_Delete_Line", "KEY_DL", KEY_DL, mode);
-#endif
-#ifdef KEY_IL
- keydef("Key_Insert_Line", "KEY_IL", KEY_IL, mode);
-#endif
-#ifdef KEY_DC
- keydef("Key_Delete_Char", "KEY_DC", KEY_DC, mode);
-#endif
-#ifdef KEY_IC
- keydef("Key_Insert_Char", "KEY_IC", KEY_IC, mode);
-#endif
-#ifdef KEY_EIC
- keydef("Key_Exit_Insert_Mode", "KEY_EIC", KEY_EIC, mode);
-#endif
-#ifdef KEY_CLEAR
- keydef("Key_Clear_Screen", "KEY_CLEAR", KEY_CLEAR, mode);
-#endif
-#ifdef KEY_EOS
- keydef("Key_Clear_End_Of_Screen", "KEY_EOS", KEY_EOS, mode);
-#endif
-#ifdef KEY_EOL
- keydef("Key_Clear_End_Of_Line", "KEY_EOL", KEY_EOL, mode);
-#endif
-#ifdef KEY_SF
- keydef("Key_Scroll_1_Forward", "KEY_SF", KEY_SF, mode);
-#endif
-#ifdef KEY_SR
- keydef("Key_Scroll_1_Backward", "KEY_SR", KEY_SR, mode);
-#endif
-#ifdef KEY_NPAGE
- keydef("Key_Next_Page", "KEY_NPAGE", KEY_NPAGE, mode);
-#endif
-#ifdef KEY_PPAGE
- keydef("Key_Previous_Page", "KEY_PPAGE", KEY_PPAGE, mode);
-#endif
-#ifdef KEY_STAB
- keydef("Key_Set_Tab", "KEY_STAB", KEY_STAB, mode);
-#endif
-#ifdef KEY_CTAB
- keydef("Key_Clear_Tab", "KEY_CTAB", KEY_CTAB, mode);
-#endif
-#ifdef KEY_CATAB
- keydef("Key_Clear_All_Tabs", "KEY_CATAB", KEY_CATAB, mode);
-#endif
-#ifdef KEY_ENTER
- keydef("Key_Enter_Or_Send", "KEY_ENTER", KEY_ENTER, mode);
-#endif
-#ifdef KEY_SRESET
- keydef("Key_Soft_Reset", "KEY_SRESET", KEY_SRESET, mode);
-#endif
-#ifdef KEY_RESET
- keydef("Key_Reset", "KEY_RESET", KEY_RESET, mode);
-#endif
-#ifdef KEY_PRINT
- keydef("Key_Print", "KEY_PRINT", KEY_PRINT, mode);
-#endif
-#ifdef KEY_LL
- keydef("Key_Bottom", "KEY_LL", KEY_LL, mode);
-#endif
-#ifdef KEY_A1
- keydef("Key_Upper_Left_Of_Keypad", "KEY_A1", KEY_A1, mode);
-#endif
-#ifdef KEY_A3
- keydef("Key_Upper_Right_Of_Keypad", "KEY_A3", KEY_A3, mode);
-#endif
-#ifdef KEY_B2
- keydef("Key_Center_Of_Keypad", "KEY_B2", KEY_B2, mode);
-#endif
-#ifdef KEY_C1
- keydef("Key_Lower_Left_Of_Keypad", "KEY_C1", KEY_C1, mode);
-#endif
-#ifdef KEY_C3
- keydef("Key_Lower_Right_Of_Keypad", "KEY_C3", KEY_C3, mode);
-#endif
-#ifdef KEY_BTAB
- keydef("Key_Back_Tab", "KEY_BTAB", KEY_BTAB, mode);
-#endif
-#ifdef KEY_BEG
- keydef("Key_Beginning", "KEY_BEG", KEY_BEG, mode);
-#endif
-#ifdef KEY_CANCEL
- keydef("Key_Cancel", "KEY_CANCEL", KEY_CANCEL, mode);
-#endif
-#ifdef KEY_CLOSE
- keydef("Key_Close", "KEY_CLOSE", KEY_CLOSE, mode);
-#endif
-#ifdef KEY_COMMAND
- keydef("Key_Command", "KEY_COMMAND", KEY_COMMAND, mode);
-#endif
-#ifdef KEY_COPY
- keydef("Key_Copy", "KEY_COPY", KEY_COPY, mode);
-#endif
-#ifdef KEY_CREATE
- keydef("Key_Create", "KEY_CREATE", KEY_CREATE, mode);
-#endif
-#ifdef KEY_END
- keydef("Key_End", "KEY_END", KEY_END, mode);
-#endif
-#ifdef KEY_EXIT
- keydef("Key_Exit", "KEY_EXIT", KEY_EXIT, mode);
-#endif
-#ifdef KEY_FIND
- keydef("Key_Find", "KEY_FIND", KEY_FIND, mode);
-#endif
-#ifdef KEY_HELP
- keydef("Key_Help", "KEY_HELP", KEY_HELP, mode);
-#endif
-#ifdef KEY_MARK
- keydef("Key_Mark", "KEY_MARK", KEY_MARK, mode);
-#endif
-#ifdef KEY_MESSAGE
- keydef("Key_Message", "KEY_MESSAGE", KEY_MESSAGE, mode);
-#endif
-#ifdef KEY_MOVE
- keydef("Key_Move", "KEY_MOVE", KEY_MOVE, mode);
-#endif
-#ifdef KEY_NEXT
- keydef("Key_Next", "KEY_NEXT", KEY_NEXT, mode);
-#endif
-#ifdef KEY_OPEN
- keydef("Key_Open", "KEY_OPEN", KEY_OPEN, mode);
-#endif
-#ifdef KEY_OPTIONS
- keydef("Key_Options", "KEY_OPTIONS", KEY_OPTIONS, mode);
-#endif
-#ifdef KEY_PREVIOUS
- keydef("Key_Previous", "KEY_PREVIOUS", KEY_PREVIOUS, mode);
-#endif
-#ifdef KEY_REDO
- keydef("Key_Redo", "KEY_REDO", KEY_REDO, mode);
-#endif
-#ifdef KEY_REFERENCE
- keydef("Key_Reference", "KEY_REFERENCE", KEY_REFERENCE, mode);
-#endif
-#ifdef KEY_REFRESH
- keydef("Key_Refresh", "KEY_REFRESH", KEY_REFRESH, mode);
-#endif
-#ifdef KEY_REPLACE
- keydef("Key_Replace", "KEY_REPLACE", KEY_REPLACE, mode);
-#endif
-#ifdef KEY_RESTART
- keydef("Key_Restart", "KEY_RESTART", KEY_RESTART, mode);
-#endif
-#ifdef KEY_RESUME
- keydef("Key_Resume", "KEY_RESUME", KEY_RESUME, mode);
-#endif
-#ifdef KEY_SAVE
- keydef("Key_Save", "KEY_SAVE", KEY_SAVE, mode);
-#endif
-#ifdef KEY_SBEG
- keydef("Key_Shift_Begin", "KEY_SBEG", KEY_SBEG, mode);
-#endif
-#ifdef KEY_SCANCEL
- keydef("Key_Shift_Cancel", "KEY_SCANCEL", KEY_SCANCEL, mode);
-#endif
-#ifdef KEY_SCOMMAND
- keydef("Key_Shift_Command", "KEY_SCOMMAND", KEY_SCOMMAND, mode);
-#endif
-#ifdef KEY_SCOPY
- keydef("Key_Shift_Copy", "KEY_SCOPY", KEY_SCOPY, mode);
-#endif
-#ifdef KEY_SCREATE
- keydef("Key_Shift_Create", "KEY_SCREATE", KEY_SCREATE, mode);
-#endif
-#ifdef KEY_SDC
- keydef("Key_Shift_Delete_Char", "KEY_SDC", KEY_SDC, mode);
-#endif
-#ifdef KEY_SDL
- keydef("Key_Shift_Delete_Line", "KEY_SDL", KEY_SDL, mode);
-#endif
-#ifdef KEY_SELECT
- keydef("Key_Select", "KEY_SELECT", KEY_SELECT, mode);
-#endif
-#ifdef KEY_SEND
- keydef("Key_Shift_End", "KEY_SEND", KEY_SEND, mode);
-#endif
-#ifdef KEY_SEOL
- keydef("Key_Shift_Clear_End_Of_Line", "KEY_SEOL", KEY_SEOL, mode);
-#endif
-#ifdef KEY_SEXIT
- keydef("Key_Shift_Exit", "KEY_SEXIT", KEY_SEXIT, mode);
-#endif
-#ifdef KEY_SFIND
- keydef("Key_Shift_Find", "KEY_SFIND", KEY_SFIND, mode);
-#endif
-#ifdef KEY_SHELP
- keydef("Key_Shift_Help", "KEY_SHELP", KEY_SHELP, mode);
-#endif
-#ifdef KEY_SHOME
- keydef("Key_Shift_Home", "KEY_SHOME", KEY_SHOME, mode);
-#endif
-#ifdef KEY_SIC
- keydef("Key_Shift_Insert_Char", "KEY_SIC", KEY_SIC, mode);
-#endif
-#ifdef KEY_SLEFT
- keydef("Key_Shift_Cursor_Left", "KEY_SLEFT", KEY_SLEFT, mode);
-#endif
-#ifdef KEY_SMESSAGE
- keydef("Key_Shift_Message", "KEY_SMESSAGE", KEY_SMESSAGE, mode);
-#endif
-#ifdef KEY_SMOVE
- keydef("Key_Shift_Move", "KEY_SMOVE", KEY_SMOVE, mode);
-#endif
-#ifdef KEY_SNEXT
- keydef("Key_Shift_Next_Page", "KEY_SNEXT", KEY_SNEXT, mode);
-#endif
-#ifdef KEY_SOPTIONS
- keydef("Key_Shift_Options", "KEY_SOPTIONS", KEY_SOPTIONS, mode);
-#endif
-#ifdef KEY_SPREVIOUS
- keydef("Key_Shift_Previous_Page", "KEY_SPREVIOUS", KEY_SPREVIOUS, mode);
-#endif
-#ifdef KEY_SPRINT
- keydef("Key_Shift_Print", "KEY_SPRINT", KEY_SPRINT, mode);
-#endif
-#ifdef KEY_SREDO
- keydef("Key_Shift_Redo", "KEY_SREDO", KEY_SREDO, mode);
-#endif
-#ifdef KEY_SREPLACE
- keydef("Key_Shift_Replace", "KEY_SREPLACE", KEY_SREPLACE, mode);
-#endif
-#ifdef KEY_SRIGHT
- keydef("Key_Shift_Cursor_Right", "KEY_SRIGHT", KEY_SRIGHT, mode);
-#endif
-#ifdef KEY_SRSUME
- keydef("Key_Shift_Resume", "KEY_SRSUME", KEY_SRSUME, mode);
-#endif
-#ifdef KEY_SSAVE
- keydef("Key_Shift_Save", "KEY_SSAVE", KEY_SSAVE, mode);
-#endif
-#ifdef KEY_SSUSPEND
- keydef("Key_Shift_Suspend", "KEY_SSUSPEND", KEY_SSUSPEND, mode);
-#endif
-#ifdef KEY_SUNDO
- keydef("Key_Shift_Undo", "KEY_SUNDO", KEY_SUNDO, mode);
-#endif
-#ifdef KEY_SUSPEND
- keydef("Key_Suspend", "KEY_SUSPEND", KEY_SUSPEND, mode);
-#endif
-#ifdef KEY_UNDO
- keydef("Key_Undo", "KEY_UNDO", KEY_UNDO, mode);
-#endif
-#ifdef KEY_MOUSE
- keydef("Key_Mouse", "KEY_MOUSE", KEY_MOUSE, mode);
-#endif
-#ifdef KEY_RESIZE
- keydef("Key_Resize", "KEY_RESIZE", KEY_RESIZE, mode);
-#endif
-}
-
-/*
- * Generate a constant with the given name. The second parameter
- * is a reference to the ACS character in the acs_map[] array and
- * will be translated into an index.
- */
-static void
-acs_def(const char *name, chtype *a)
-{
- int c = a - &acs_map[0];
-
- printf(" %-24s : constant Character := ", name);
- if (isprint(c) && (c != '`'))
- printf("'%c';\n", c);
- else
- printf("Character'Val (%d);\n", c);
-}
-
-/*
- * Generate the constants for the ACS characters
- */
-static void
-gen_acs(void)
-{
- printf(" type C_ACS_Map is array (Character'Val (0) .. Character'Val (127))\n");
- printf(" of Attributed_Character;\n");
-#if USE_REENTRANT || BROKEN_LINKER
- printf(" type C_ACS_Ptr is access C_ACS_Map;\n");
- printf(" function ACS_Map return C_ACS_Ptr;\n");
- printf(" pragma Import (C, ACS_Map, \"_nc_acs_map\");\n");
-#else
- printf(" ACS_Map : C_ACS_Map;\n");
- printf(" pragma Import (C, ACS_Map, \"acs_map\");\n");
-#endif
- printf(" --\n");
- printf(" --\n");
- printf(" -- Constants for several characters from the Alternate Character Set\n");
- printf(" -- You must use these constants as indices into the ACS_Map array\n");
- printf(" -- to get the corresponding attributed character at runtime.\n");
- printf(" --\n");
-
-#ifdef ACS_ULCORNER
- acs_def("ACS_Upper_Left_Corner", &ACS_ULCORNER);
-#endif
-#ifdef ACS_LLCORNER
- acs_def("ACS_Lower_Left_Corner", &ACS_LLCORNER);
-#endif
-#ifdef ACS_URCORNER
- acs_def("ACS_Upper_Right_Corner", &ACS_URCORNER);
-#endif
-#ifdef ACS_LRCORNER
- acs_def("ACS_Lower_Right_Corner", &ACS_LRCORNER);
-#endif
-#ifdef ACS_LTEE
- acs_def("ACS_Left_Tee", &ACS_LTEE);
-#endif
-#ifdef ACS_RTEE
- acs_def("ACS_Right_Tee", &ACS_RTEE);
-#endif
-#ifdef ACS_BTEE
- acs_def("ACS_Bottom_Tee", &ACS_BTEE);
-#endif
-#ifdef ACS_TTEE
- acs_def("ACS_Top_Tee", &ACS_TTEE);
-#endif
-#ifdef ACS_HLINE
- acs_def("ACS_Horizontal_Line", &ACS_HLINE);
-#endif
-#ifdef ACS_VLINE
- acs_def("ACS_Vertical_Line", &ACS_VLINE);
-#endif
-#ifdef ACS_PLUS
- acs_def("ACS_Plus_Symbol", &ACS_PLUS);
-#endif
-#ifdef ACS_S1
- acs_def("ACS_Scan_Line_1", &ACS_S1);
-#endif
-#ifdef ACS_S9
- acs_def("ACS_Scan_Line_9", &ACS_S9);
-#endif
-#ifdef ACS_DIAMOND
- acs_def("ACS_Diamond", &ACS_DIAMOND);
-#endif
-#ifdef ACS_CKBOARD
- acs_def("ACS_Checker_Board", &ACS_CKBOARD);
-#endif
-#ifdef ACS_DEGREE
- acs_def("ACS_Degree", &ACS_DEGREE);
-#endif
-#ifdef ACS_PLMINUS
- acs_def("ACS_Plus_Minus", &ACS_PLMINUS);
-#endif
-#ifdef ACS_BULLET
- acs_def("ACS_Bullet", &ACS_BULLET);
-#endif
-#ifdef ACS_LARROW
- acs_def("ACS_Left_Arrow", &ACS_LARROW);
-#endif
-#ifdef ACS_RARROW
- acs_def("ACS_Right_Arrow", &ACS_RARROW);
-#endif
-#ifdef ACS_DARROW
- acs_def("ACS_Down_Arrow", &ACS_DARROW);
-#endif
-#ifdef ACS_UARROW
- acs_def("ACS_Up_Arrow", &ACS_UARROW);
-#endif
-#ifdef ACS_BOARD
- acs_def("ACS_Board_Of_Squares", &ACS_BOARD);
-#endif
-#ifdef ACS_LANTERN
- acs_def("ACS_Lantern", &ACS_LANTERN);
-#endif
-#ifdef ACS_BLOCK
- acs_def("ACS_Solid_Block", &ACS_BLOCK);
-#endif
-#ifdef ACS_S3
- acs_def("ACS_Scan_Line_3", &ACS_S3);
-#endif
-#ifdef ACS_S7
- acs_def("ACS_Scan_Line_7", &ACS_S7);
-#endif
-#ifdef ACS_LEQUAL
- acs_def("ACS_Less_Or_Equal", &ACS_LEQUAL);
-#endif
-#ifdef ACS_GEQUAL
- acs_def("ACS_Greater_Or_Equal", &ACS_GEQUAL);
-#endif
-#ifdef ACS_PI
- acs_def("ACS_PI", &ACS_PI);
-#endif
-#ifdef ACS_NEQUAL
- acs_def("ACS_Not_Equal", &ACS_NEQUAL);
-#endif
-#ifdef ACS_STERLING
- acs_def("ACS_Sterling", &ACS_STERLING);
-#endif
-}
-
-#define GEN_EVENT(name,value) \
- printf(" %-25s : constant Event_Mask := 8#%011lo#;\n", \
- #name, value)
-
-#define GEN_MEVENT(name) \
- printf(" %-25s : constant Event_Mask := 8#%011lo#;\n", \
- #name, name)
-
-static void
-gen_mouse_events(void)
-{
- mmask_t all1 = 0;
- mmask_t all2 = 0;
- mmask_t all3 = 0;
- mmask_t all4 = 0;
-
-#ifdef BUTTON1_RELEASED
- GEN_MEVENT(BUTTON1_RELEASED);
- all1 |= BUTTON1_RELEASED;
-#endif
-#ifdef BUTTON1_PRESSED
- GEN_MEVENT(BUTTON1_PRESSED);
- all1 |= BUTTON1_PRESSED;
-#endif
-#ifdef BUTTON1_CLICKED
- GEN_MEVENT(BUTTON1_CLICKED);
- all1 |= BUTTON1_CLICKED;
-#endif
-#ifdef BUTTON1_DOUBLE_CLICKED
- GEN_MEVENT(BUTTON1_DOUBLE_CLICKED);
- all1 |= BUTTON1_DOUBLE_CLICKED;
-#endif
-#ifdef BUTTON1_TRIPLE_CLICKED
- GEN_MEVENT(BUTTON1_TRIPLE_CLICKED);
- all1 |= BUTTON1_TRIPLE_CLICKED;
-#endif
-#ifdef BUTTON1_RESERVED_EVENT
- GEN_MEVENT(BUTTON1_RESERVED_EVENT);
- all1 |= BUTTON1_RESERVED_EVENT;
-#endif
-#ifdef BUTTON2_RELEASED
- GEN_MEVENT(BUTTON2_RELEASED);
- all2 |= BUTTON2_RELEASED;
-#endif
-#ifdef BUTTON2_PRESSED
- GEN_MEVENT(BUTTON2_PRESSED);
- all2 |= BUTTON2_PRESSED;
-#endif
-#ifdef BUTTON2_CLICKED
- GEN_MEVENT(BUTTON2_CLICKED);
- all2 |= BUTTON2_CLICKED;
-#endif
-#ifdef BUTTON2_DOUBLE_CLICKED
- GEN_MEVENT(BUTTON2_DOUBLE_CLICKED);
- all2 |= BUTTON2_DOUBLE_CLICKED;
-#endif
-#ifdef BUTTON2_TRIPLE_CLICKED
- GEN_MEVENT(BUTTON2_TRIPLE_CLICKED);
- all2 |= BUTTON2_TRIPLE_CLICKED;
-#endif
-#ifdef BUTTON2_RESERVED_EVENT
- GEN_MEVENT(BUTTON2_RESERVED_EVENT);
- all2 |= BUTTON2_RESERVED_EVENT;
-#endif
-#ifdef BUTTON3_RELEASED
- GEN_MEVENT(BUTTON3_RELEASED);
- all3 |= BUTTON3_RELEASED;
-#endif
-#ifdef BUTTON3_PRESSED
- GEN_MEVENT(BUTTON3_PRESSED);
- all3 |= BUTTON3_PRESSED;
-#endif
-#ifdef BUTTON3_CLICKED
- GEN_MEVENT(BUTTON3_CLICKED);
- all3 |= BUTTON3_CLICKED;
-#endif
-#ifdef BUTTON3_DOUBLE_CLICKED
- GEN_MEVENT(BUTTON3_DOUBLE_CLICKED);
- all3 |= BUTTON3_DOUBLE_CLICKED;
-#endif
-#ifdef BUTTON3_TRIPLE_CLICKED
- GEN_MEVENT(BUTTON3_TRIPLE_CLICKED);
- all3 |= BUTTON3_TRIPLE_CLICKED;
-#endif
-#ifdef BUTTON3_RESERVED_EVENT
- GEN_MEVENT(BUTTON3_RESERVED_EVENT);
- all3 |= BUTTON3_RESERVED_EVENT;
-#endif
-#ifdef BUTTON4_RELEASED
- GEN_MEVENT(BUTTON4_RELEASED);
- all4 |= BUTTON4_RELEASED;
-#endif
-#ifdef BUTTON4_PRESSED
- GEN_MEVENT(BUTTON4_PRESSED);
- all4 |= BUTTON4_PRESSED;
-#endif
-#ifdef BUTTON4_CLICKED
- GEN_MEVENT(BUTTON4_CLICKED);
- all4 |= BUTTON4_CLICKED;
-#endif
-#ifdef BUTTON4_DOUBLE_CLICKED
- GEN_MEVENT(BUTTON4_DOUBLE_CLICKED);
- all4 |= BUTTON4_DOUBLE_CLICKED;
-#endif
-#ifdef BUTTON4_TRIPLE_CLICKED
- GEN_MEVENT(BUTTON4_TRIPLE_CLICKED);
- all4 |= BUTTON4_TRIPLE_CLICKED;
-#endif
-#ifdef BUTTON4_RESERVED_EVENT
- GEN_MEVENT(BUTTON4_RESERVED_EVENT);
- all4 |= BUTTON4_RESERVED_EVENT;
-#endif
-#ifdef BUTTON_CTRL
- GEN_MEVENT(BUTTON_CTRL);
-#endif
-#ifdef BUTTON_SHIFT
- GEN_MEVENT(BUTTON_SHIFT);
-#endif
-#ifdef BUTTON_ALT
- GEN_MEVENT(BUTTON_ALT);
-#endif
-#ifdef REPORT_MOUSE_POSITION
- GEN_MEVENT(REPORT_MOUSE_POSITION);
-#endif
-#ifdef ALL_MOUSE_EVENTS
- GEN_MEVENT(ALL_MOUSE_EVENTS);
-#endif
-
- GEN_EVENT(BUTTON1_EVENTS, all1);
- GEN_EVENT(BUTTON2_EVENTS, all2);
- GEN_EVENT(BUTTON3_EVENTS, all3);
- GEN_EVENT(BUTTON4_EVENTS, all4);
-}
-
-static void
-wrap_one_var(const char *c_var,
- const char *c_type,
- const char *ada_func,
- const char *ada_type)
-{
-#if USE_REENTRANT
- /* must wrap variables */
- printf("\n");
- printf(" function %s return %s\n", ada_func, ada_type);
- printf(" is\n");
- printf(" function Result return %s;\n", c_type);
- printf(" pragma Import (C, Result, \"_nc_%s\");\n", c_var);
- printf(" begin\n");
- if (strcmp(c_type, ada_type))
- printf(" return %s (Result);\n", ada_type);
- else
- printf(" return Result;\n");
- printf(" end %s;\n", ada_func);
-#else
- /* global variables are really global */
- printf("\n");
- printf(" function %s return %s\n", ada_func, ada_type);
- printf(" is\n");
- printf(" Result : %s;\n", c_type);
- printf(" pragma Import (C, Result, \"%s\");\n", c_var);
- printf(" begin\n");
- if (strcmp(c_type, ada_type))
- printf(" return %s (Result);\n", ada_type);
- else
- printf(" return Result;\n");
- printf(" end %s;\n", ada_func);
-#endif
-}
-
-#define GEN_PUBLIC_VAR(c_var, c_type, ada_func, ada_type) \
- wrap_one_var(#c_var, #c_type, #ada_func, #ada_type)
-
-static void
-gen_public_vars(void)
-{
- GEN_PUBLIC_VAR(stdscr, Window, Standard_Window, Window);
- GEN_PUBLIC_VAR(curscr, Window, Current_Window, Window);
- GEN_PUBLIC_VAR(LINES, C_Int, Lines, Line_Count);
- GEN_PUBLIC_VAR(COLS, C_Int, Columns, Column_Count);
- GEN_PUBLIC_VAR(TABSIZE, C_Int, Tab_Size, Natural);
- GEN_PUBLIC_VAR(COLORS, C_Int, Number_Of_Colors, Natural);
- GEN_PUBLIC_VAR(COLOR_PAIRS, C_Int, Number_Of_Color_Pairs, Natural);
-}
-
-/*
- * Output some comment lines indicating that the file is generated.
- * The name parameter is the name of the facility to be used in
- * the comment.
- */
-static void
-prologue(const char *name)
-{
- printf("-- %s binding.\n", name);
- printf("-- This module is generated. Please don't change it manually!\n");
- printf("-- Run the generator instead.\n-- |");
-
- printf("define(`M4_BIT_ORDER',`%s_Order_First')",
- little_endian ? "Low" : "High");
-}
-
-/*
- * Write the prologue for the curses facility and make sure that
- * KEY_MIN and KEY_MAX are defined for the rest of this source.
- */
-static void
-basedefs(void)
-{
- prologue("curses");
#ifndef KEY_MAX
# define KEY_MAX 0777
#endif
- printf("define(`M4_KEY_MAX',`8#%o#')", KEY_MAX);
#ifndef KEY_MIN
# define KEY_MIN 0401
#endif
- if (KEY_MIN == 256)
- {
- fprintf(stderr, "Unexpected value for KEY_MIN: %d\n", KEY_MIN);
- exit(1);
- }
- printf("define(`M4_SPECIAL_FIRST',`8#%o#')", KEY_MIN - 1);
-}
-/*
- * Write out the comment lines for the menu facility
- */
-static void
-menu_basedefs(void)
+static UCHAR
+bit_is_set(const UCHAR * const data,
+ const UINT offset)
{
- prologue("menu");
+ const UCHAR byte = data[offset >> 3];
+ UINT bit;
+
+ if (little_endian)
+ bit = offset; /* offset */
+ else /* or */
+ bit = ~offset; /* 7 - offset */
+ bit &= 7; /* modulo 8 */
+ return byte & (UCHAR) (1 << bit);
}
-/*
- * Write out the comment lines for the form facility
- */
-static void
-form_basedefs(void)
-{
- prologue("form");
-}
-
-/*
- * Write out the comment lines for the mouse facility
- */
-static void
-mouse_basedefs(void)
-{
- prologue("mouse");
-}
-
-/*
- * Write the definition of a single color
- */
-static void
-color_def(const char *name, int value)
-{
- printf(" %-16s : constant Color_Number := %d;\n", name, value);
-}
-
-/*
- * Generate all color definitions
- */
-static void
-gen_color(void)
-{
-#if HAVE_USE_DEFAULT_COLORS
- color_def("Default_Color", -1);
-#endif
-#ifdef COLOR_BLACK
- color_def("Black", COLOR_BLACK);
-#endif
-#ifdef COLOR_RED
- color_def("Red", COLOR_RED);
-#endif
-#ifdef COLOR_GREEN
- color_def("Green", COLOR_GREEN);
-#endif
-#ifdef COLOR_YELLOW
- color_def("Yellow", COLOR_YELLOW);
-#endif
-#ifdef COLOR_BLUE
- color_def("Blue", COLOR_BLUE);
-#endif
-#ifdef COLOR_MAGENTA
- color_def("Magenta", COLOR_MAGENTA);
-#endif
-#ifdef COLOR_CYAN
- color_def("Cyan", COLOR_CYAN);
-#endif
-#ifdef COLOR_WHITE
- color_def("White", COLOR_WHITE);
-#endif
-}
-
-/*
- * Generate the linker options for the base facility
- */
-static void
-gen_linkopts(void)
-{
- printf(" pragma Linker_Options (\"-lncurses%s\");\n", model);
-}
-
-/*
- * Generate the linker options for the menu facility
- */
-static void
-gen_menu_linkopts(void)
-{
- printf(" pragma Linker_Options (\"-lmenu%s\");\n", model);
-}
-
-/*
- * Generate the linker options for the form facility
- */
-static void
-gen_form_linkopts(void)
-{
- printf(" pragma Linker_Options (\"-lform%s\");\n", model);
-}
-
-/*
- * Generate the linker options for the panel facility
- */
-static void
-gen_panel_linkopts(void)
-{
- printf(" pragma Linker_Options (\"-lpanel%s\");\n", model);
-}
-
-static void
-gen_version_info(void)
-{
- static const char *v1 =
- " NC_Major_Version : constant := %d; -- Major version of the library\n";
- static const char *v2 =
- " NC_Minor_Version : constant := %d; -- Minor version of the library\n";
- static const char *v3 =
- " NC_Version : constant String := %c%d.%d%c; -- Version of library\n";
-
- printf(v1, NCURSES_VERSION_MAJOR);
- printf(v2, NCURSES_VERSION_MINOR);
- printf(v3, '"', NCURSES_VERSION_MAJOR, NCURSES_VERSION_MINOR, '"');
-}
-
+/* Find lowest and highest used offset in a byte array. */
+/* Returns 0 if and only if all bits are unset. */
static int
-eti_gen(char *buf, int code, const char *name, int *etimin, int *etimax)
+find_pos(const UCHAR * const data,
+ const UINT sizeof_data,
+ UINT * const low,
+ UINT * const high)
{
- sprintf(buf, " E_%-16s : constant Eti_Error := %d;\n", name, code);
- if (code < *etimin)
- *etimin = code;
- if (code > *etimax)
- *etimax = code;
- return strlen(buf);
+ const UINT last = (sizeof_data << 3) - 1;
+ UINT offset;
+
+ for (offset = last; !bit_is_set(data, offset); offset--)
+ if (!offset) /* All bits are 0. */
+ return 0;
+ *high = offset;
+
+ for (offset = 0; !bit_is_set(data, offset); offset++)
+ {
+ }
+ *low = offset;
+
+ return -1;
}
-static void
-gen_offsets(void)
-{
- const char *s_bool = "";
+#define PRINT_BITMASK(c_type, ada_name, mask_macro) \
+ { \
+ UINT first, last; \
+ c_type mask = (mask_macro); \
+ if (!find_pos ((UCHAR *)&mask, sizeof (mask), &first, &last)) \
+ my_error ("failed to locate " ada_name); \
+ print_constant (ada_name "_First", first); \
+ print_constant (ada_name "_Last", last); \
+ }
- if (sizeof(bool) == sizeof(char))
- {
- s_bool = "char";
- }
- else if (sizeof(bool) == sizeof(short))
- {
- s_bool = "short";
- }
- else if (sizeof(bool) == sizeof(int))
- {
- s_bool = "int";
- }
- printf(" Sizeof%-*s : constant Natural := %2ld; -- %s\n",
- 12, "_bool", (long)sizeof(bool), "bool");
+#define PRINT_NAMED_BITMASK(c_type, mask_macro) \
+ PRINT_BITMASK (c_type, #mask_macro, mask_macro)
- /* In ncurses _maxy and _maxx needs an offset for the "public"
- * value
- */
- printf(" Offset%-*s : constant Natural := %2d; -- %s\n",
- 12, "_XY", 1, "int");
- printf("\n");
- printf(" type Curses_Bool is mod 2 ** Interfaces.C.%s'Size;\n", s_bool);
-}
+#define STRUCT_OFFSET(record, field) \
+ { \
+ UINT first, last; \
+ record mask; \
+ memset (&mask, 0, sizeof (mask)); \
+ memset (&mask.field, 0xff, sizeof(mask.field)); \
+ if (!find_pos ((UCHAR *)&mask, sizeof (mask), &first, &last)) \
+ my_error ("failed to locate" #record "_" #field); \
+ print_constant (#record "_" #field "_First", first); \
+ print_constant (#record "_" #field "_Last", last); \
+ }
-/*
- * main() expects two arguments on the commandline, both single characters.
- * The first character denotes the facility for which we generate output.
- * Possible values are
- * B - Base
- * M - Menus
- * F - Forms
- * P - Pointer Device (Mouse)
- * E - ETI base definitions
- *
- * The second character then denotes the specific output that should be
- * generated for the selected facility.
- */
+/*--------------------*/
+/* Start of main (). */
+/*--------------------*/
+
int
-main(int argc, char *argv[])
+main(int argc, const char *argv[])
{
- int x = 0x12345678;
- char *s = (char *)&x;
+ const int x = 0x12345678;
- if (*s == 0x78)
- little_endian = 1;
+ little_endian = (*((const char *)&x) == 0x78);
- if (argc != 4)
- exit(1);
- model = *++argv;
+ my_program_invocation_name = argv[0];
- switch (argv[1][0])
- {
- /* --------------------------------------------------------------- */
- case 'B': /* The Base facility */
- switch (argv[2][0])
- {
- case 'A': /* chtype translation into Ada95 record type */
- gen_attr_set("Character_Attribute_Set");
- break;
- case 'B': /* write some initial comment lines */
- basedefs();
- break;
- case 'C': /* generate color constants */
- gen_color();
- break;
- case 'D': /* generate displacements of fields in WINDOW struct. */
- gen_offsets();
- break;
- case 'E': /* generate Mouse Event codes */
- gen_mouse_events();
- break;
- case 'K': /* translation of keycodes */
- gen_keydefs(0);
- break;
- case 'L': /* generate the Linker_Options pragma */
- gen_linkopts();
- break;
- case 'M': /* generate constants for the ACS characters */
- gen_acs();
- break;
- case 'O': /* generate definitions of the old key code names */
- gen_keydefs(1);
- break;
- case 'P': /* generate definitions of the public variables */
- gen_public_vars();
- break;
- case 'R': /* generate representation clause for Attributed character */
- gen_chtype_rep("Attributed_Character");
- break;
- case 'T': /* generate the Trace info */
- gen_trace("Trace_Attribute_Set");
- break;
- case 'V': /* generate version info */
- gen_version_info();
- break;
- default:
- break;
- }
- break;
- /* --------------------------------------------------------------- */
- case 'M': /* The Menu facility */
- switch (argv[2][0])
- {
- case 'R': /* generate representation clause for Menu_Option_Set */
- gen_menu_opt_rep("Menu_Option_Set");
- break;
- case 'B': /* write some initial comment lines */
- menu_basedefs();
- break;
- case 'L': /* generate the Linker_Options pragma */
- gen_menu_linkopts();
- break;
- case 'I': /* generate representation clause for Item_Option_Set */
- gen_item_opt_rep("Item_Option_Set");
- break;
- default:
- break;
- }
- break;
- /* --------------------------------------------------------------- */
- case 'F': /* The Form facility */
- switch (argv[2][0])
- {
- case 'R': /* generate representation clause for Form_Option_Set */
- gen_form_opt_rep("Form_Option_Set");
- break;
- case 'B': /* write some initial comment lines */
- form_basedefs();
- break;
- case 'L': /* generate the Linker_Options pragma */
- gen_form_linkopts();
- break;
- case 'I': /* generate representation clause for Field_Option_Set */
- gen_field_opt_rep("Field_Option_Set");
- break;
- default:
- break;
- }
- break;
- /* --------------------------------------------------------------- */
- case 'P': /* The Pointer(=Mouse) facility */
- switch (argv[2][0])
- {
- case 'B': /* write some initial comment lines */
- mouse_basedefs();
- break;
- case 'M': /* generate representation clause for Mouse_Event */
- gen_mrep_rep("Mouse_Event");
- break;
- case 'L': /* generate the Linker_Options pragma */
- gen_panel_linkopts();
- break;
- default:
- break;
- }
- break;
- /* --------------------------------------------------------------- */
- case 'E': /* chtype size detection */
- switch (argv[2][0])
- {
- case 'C':
- {
- const char *fmt = " type C_Chtype is new %s;\n";
- const char *afmt = " type C_AttrType is new %s;\n";
+ if (KEY_MIN == 256)
+ my_error("unexpected value for KEY_MIN: 256");
- if (sizeof(chtype) == sizeof(int))
- {
- if (sizeof(int) == sizeof(long))
- printf(fmt, "C_ULong");
+ if (argc != 2)
+ my_error("Only one argument expected (DFT_ARG_SUFFIX)");
- else
- printf(fmt, "C_UInt");
- }
- else if (sizeof(chtype) == sizeof(long))
- {
- printf(fmt, "C_ULong");
- }
- else
- printf("Error\n");
+ printf("-- Generated by the C program %s (source " __FILE__ ").\n",
+ my_program_invocation_name);
+ printf("-- Do not edit this file directly.\n");
+ printf("-- The values provided here may vary on your system.\n");
+ printf("\n");
+ printf("with System;\n");
+ printf("package Terminal_Interface.Curses_Constants is\n");
+ printf(" pragma Pure;\n");
+ printf("\n");
- if (sizeof(attr_t) == sizeof(int))
- {
- if (sizeof(int) == sizeof(long))
- printf(afmt, "C_ULong");
+ printf(" DFT_ARG_SUFFIX : constant String := \"%s\";\n", argv[1]);
+ printf(" Bit_Order : constant System.Bit_Order := System.%s_Order_First;\n",
+ little_endian ? "Low" : "High");
+ print_constant("Sizeof_Bool", 8 * sizeof(bool));
- else
- printf(afmt, "C_UInt");
- }
- else if (sizeof(attr_t) == sizeof(long))
- {
- printf(afmt, "C_ULong");
- }
- else
- printf("Error\n");
+ PRINT_NAMED_CONSTANT(OK);
+ PRINT_NAMED_CONSTANT(ERR);
+ printf(" pragma Warnings (Off); -- redefinition of Standard.True and False\n");
+ PRINT_NAMED_CONSTANT(TRUE);
+ PRINT_NAMED_CONSTANT(FALSE);
+ printf(" pragma Warnings (On);\n");
- printf("define(`CF_CURSES_OK',`%d')", OK);
- printf("define(`CF_CURSES_ERR',`%d')", ERR);
- printf("define(`CF_CURSES_TRUE',`%d')", TRUE);
- printf("define(`CF_CURSES_FALSE',`%d')", FALSE);
- }
- break;
- case 'E':
- {
- char *buf = (char *)malloc(2048);
- char *p = buf;
- int etimin = E_OK;
- int etimax = E_OK;
+ print_comment("Version of the ncurses library from extensions(3NCURSES)");
+ PRINT_NAMED_CONSTANT(NCURSES_VERSION_MAJOR);
+ PRINT_NAMED_CONSTANT(NCURSES_VERSION_MINOR);
+ printf(" Version : constant String := \"%d.%d\";\n",
+ NCURSES_VERSION_MAJOR, NCURSES_VERSION_MINOR);
- if (p)
- {
- p += eti_gen(p, E_OK, "Ok", &etimin, &etimax);
- p += eti_gen(p, E_SYSTEM_ERROR, "System_Error", &etimin, &etimax);
- p += eti_gen(p, E_BAD_ARGUMENT, "Bad_Argument", &etimin, &etimax);
- p += eti_gen(p, E_POSTED, "Posted", &etimin, &etimax);
- p += eti_gen(p, E_CONNECTED, "Connected", &etimin, &etimax);
- p += eti_gen(p, E_BAD_STATE, "Bad_State", &etimin, &etimax);
- p += eti_gen(p, E_NO_ROOM, "No_Room", &etimin, &etimax);
- p += eti_gen(p, E_NOT_POSTED, "Not_Posted", &etimin, &etimax);
- p += eti_gen(p, E_UNKNOWN_COMMAND,
- "Unknown_Command", &etimin, &etimax);
- p += eti_gen(p, E_NO_MATCH, "No_Match", &etimin, &etimax);
- p += eti_gen(p, E_NOT_SELECTABLE,
- "Not_Selectable", &etimin, &etimax);
- p += eti_gen(p, E_NOT_CONNECTED,
- "Not_Connected", &etimin, &etimax);
- p += eti_gen(p, E_REQUEST_DENIED,
- "Request_Denied", &etimin, &etimax);
- p += eti_gen(p, E_INVALID_FIELD,
- "Invalid_Field", &etimin, &etimax);
- p += eti_gen(p, E_CURRENT,
- "Current", &etimin, &etimax);
- }
- printf(" subtype Eti_Error is C_Int range %d .. %d;\n\n",
- etimin, etimax);
- printf(buf);
- }
- break;
- default:
- break;
- }
- break;
- /* --------------------------------------------------------------- */
- case 'V': /* plain version dump */
- {
- switch (argv[2][0])
- {
- case '1': /* major version */
-#ifdef NCURSES_VERSION_MAJOR
- printf("%d", NCURSES_VERSION_MAJOR);
+ print_comment("Character non-color attributes from attr(3NCURSES)");
+ printf(" -- attr_t and chtype may be signed in C.\n");
+ printf(" type attr_t is mod 2 ** %lu;\n", (long unsigned)(8 * sizeof(attr_t)));
+ PRINT_NAMED_BITMASK(attr_t, A_CHARTEXT);
+ PRINT_NAMED_BITMASK(attr_t, A_COLOR);
+ PRINT_BITMASK(attr_t, "Attr", A_ATTRIBUTES & ~A_COLOR);
+ PRINT_NAMED_BITMASK(attr_t, A_STANDOUT);
+ PRINT_NAMED_BITMASK(attr_t, A_UNDERLINE);
+ PRINT_NAMED_BITMASK(attr_t, A_REVERSE);
+ PRINT_NAMED_BITMASK(attr_t, A_BLINK);
+ PRINT_NAMED_BITMASK(attr_t, A_DIM);
+ PRINT_NAMED_BITMASK(attr_t, A_BOLD);
+ PRINT_NAMED_BITMASK(attr_t, A_PROTECT);
+ PRINT_NAMED_BITMASK(attr_t, A_INVIS);
+ PRINT_NAMED_BITMASK(attr_t, A_ALTCHARSET);
+ PRINT_NAMED_BITMASK(attr_t, A_HORIZONTAL);
+ PRINT_NAMED_BITMASK(attr_t, A_LEFT);
+ PRINT_NAMED_BITMASK(attr_t, A_LOW);
+ PRINT_NAMED_BITMASK(attr_t, A_RIGHT);
+ PRINT_NAMED_BITMASK(attr_t, A_TOP);
+ PRINT_NAMED_BITMASK(attr_t, A_VERTICAL);
+ print_constant("chtype_Size", 8 * sizeof(chtype));
+
+ print_comment("predefined color numbers from color(3NCURSES)");
+ PRINT_NAMED_CONSTANT(COLOR_BLACK);
+ PRINT_NAMED_CONSTANT(COLOR_RED);
+ PRINT_NAMED_CONSTANT(COLOR_GREEN);
+ PRINT_NAMED_CONSTANT(COLOR_YELLOW);
+ PRINT_NAMED_CONSTANT(COLOR_BLUE);
+ PRINT_NAMED_CONSTANT(COLOR_MAGENTA);
+ PRINT_NAMED_CONSTANT(COLOR_CYAN);
+ PRINT_NAMED_CONSTANT(COLOR_WHITE);
+
+ print_comment("ETI return codes from ncurses.h");
+ PRINT_NAMED_CONSTANT(E_OK);
+ PRINT_NAMED_CONSTANT(E_SYSTEM_ERROR);
+ PRINT_NAMED_CONSTANT(E_BAD_ARGUMENT);
+ PRINT_NAMED_CONSTANT(E_POSTED);
+ PRINT_NAMED_CONSTANT(E_CONNECTED);
+ PRINT_NAMED_CONSTANT(E_BAD_STATE);
+ PRINT_NAMED_CONSTANT(E_NO_ROOM);
+ PRINT_NAMED_CONSTANT(E_NOT_POSTED);
+ PRINT_NAMED_CONSTANT(E_UNKNOWN_COMMAND);
+ PRINT_NAMED_CONSTANT(E_NO_MATCH);
+ PRINT_NAMED_CONSTANT(E_NOT_SELECTABLE);
+ PRINT_NAMED_CONSTANT(E_NOT_CONNECTED);
+ PRINT_NAMED_CONSTANT(E_REQUEST_DENIED);
+ PRINT_NAMED_CONSTANT(E_INVALID_FIELD);
+ PRINT_NAMED_CONSTANT(E_CURRENT);
+
+ print_comment("Input key codes not defined in any ncurses manpage");
+ PRINT_NAMED_CONSTANT(KEY_MIN);
+ PRINT_NAMED_CONSTANT(KEY_MAX);
+#ifdef KEY_CODE_YES
+ PRINT_NAMED_CONSTANT(KEY_CODE_YES);
#endif
- break;
- case '2': /* minor version */
-#ifdef NCURSES_VERSION_MINOR
- printf("%d", NCURSES_VERSION_MINOR);
+
+ print_comment("Input key codes from getch(3NCURSES)");
+ PRINT_NAMED_CONSTANT(KEY_BREAK);
+ PRINT_NAMED_CONSTANT(KEY_DOWN);
+ PRINT_NAMED_CONSTANT(KEY_UP);
+ PRINT_NAMED_CONSTANT(KEY_LEFT);
+ PRINT_NAMED_CONSTANT(KEY_RIGHT);
+ PRINT_NAMED_CONSTANT(KEY_HOME);
+ PRINT_NAMED_CONSTANT(KEY_BACKSPACE);
+ PRINT_NAMED_CONSTANT(KEY_F0);
+ print_constant("KEY_F1", KEY_F(1));
+ print_constant("KEY_F2", KEY_F(2));
+ print_constant("KEY_F3", KEY_F(3));
+ print_constant("KEY_F4", KEY_F(4));
+ print_constant("KEY_F5", KEY_F(5));
+ print_constant("KEY_F6", KEY_F(6));
+ print_constant("KEY_F7", KEY_F(7));
+ print_constant("KEY_F8", KEY_F(8));
+ print_constant("KEY_F9", KEY_F(9));
+ print_constant("KEY_F10", KEY_F(10));
+ print_constant("KEY_F11", KEY_F(11));
+ print_constant("KEY_F12", KEY_F(12));
+ print_constant("KEY_F13", KEY_F(13));
+ print_constant("KEY_F14", KEY_F(14));
+ print_constant("KEY_F15", KEY_F(15));
+ print_constant("KEY_F16", KEY_F(16));
+ print_constant("KEY_F17", KEY_F(17));
+ print_constant("KEY_F18", KEY_F(18));
+ print_constant("KEY_F19", KEY_F(19));
+ print_constant("KEY_F20", KEY_F(20));
+ print_constant("KEY_F21", KEY_F(21));
+ print_constant("KEY_F22", KEY_F(22));
+ print_constant("KEY_F23", KEY_F(23));
+ print_constant("KEY_F24", KEY_F(24));
+ PRINT_NAMED_CONSTANT(KEY_DL);
+ PRINT_NAMED_CONSTANT(KEY_IL);
+ PRINT_NAMED_CONSTANT(KEY_DC);
+ PRINT_NAMED_CONSTANT(KEY_IC);
+ PRINT_NAMED_CONSTANT(KEY_EIC);
+ PRINT_NAMED_CONSTANT(KEY_CLEAR);
+ PRINT_NAMED_CONSTANT(KEY_EOS);
+ PRINT_NAMED_CONSTANT(KEY_EOL);
+ PRINT_NAMED_CONSTANT(KEY_SF);
+ PRINT_NAMED_CONSTANT(KEY_SR);
+ PRINT_NAMED_CONSTANT(KEY_NPAGE);
+ PRINT_NAMED_CONSTANT(KEY_PPAGE);
+ PRINT_NAMED_CONSTANT(KEY_STAB);
+ PRINT_NAMED_CONSTANT(KEY_CTAB);
+ PRINT_NAMED_CONSTANT(KEY_CATAB);
+ PRINT_NAMED_CONSTANT(KEY_ENTER);
+ PRINT_NAMED_CONSTANT(KEY_SRESET);
+ PRINT_NAMED_CONSTANT(KEY_RESET);
+ PRINT_NAMED_CONSTANT(KEY_PRINT);
+ PRINT_NAMED_CONSTANT(KEY_LL);
+ PRINT_NAMED_CONSTANT(KEY_A1);
+ PRINT_NAMED_CONSTANT(KEY_A3);
+ PRINT_NAMED_CONSTANT(KEY_B2);
+ PRINT_NAMED_CONSTANT(KEY_C1);
+ PRINT_NAMED_CONSTANT(KEY_C3);
+ PRINT_NAMED_CONSTANT(KEY_BTAB);
+ PRINT_NAMED_CONSTANT(KEY_BEG);
+ PRINT_NAMED_CONSTANT(KEY_CANCEL);
+ PRINT_NAMED_CONSTANT(KEY_CLOSE);
+ PRINT_NAMED_CONSTANT(KEY_COMMAND);
+ PRINT_NAMED_CONSTANT(KEY_COPY);
+ PRINT_NAMED_CONSTANT(KEY_CREATE);
+ PRINT_NAMED_CONSTANT(KEY_END);
+ PRINT_NAMED_CONSTANT(KEY_EXIT);
+ PRINT_NAMED_CONSTANT(KEY_FIND);
+ PRINT_NAMED_CONSTANT(KEY_HELP);
+ PRINT_NAMED_CONSTANT(KEY_MARK);
+ PRINT_NAMED_CONSTANT(KEY_MESSAGE);
+ PRINT_NAMED_CONSTANT(KEY_MOVE);
+ PRINT_NAMED_CONSTANT(KEY_NEXT);
+ PRINT_NAMED_CONSTANT(KEY_OPEN);
+ PRINT_NAMED_CONSTANT(KEY_OPTIONS);
+ PRINT_NAMED_CONSTANT(KEY_PREVIOUS);
+ PRINT_NAMED_CONSTANT(KEY_REDO);
+ PRINT_NAMED_CONSTANT(KEY_REFERENCE);
+ PRINT_NAMED_CONSTANT(KEY_REFRESH);
+ PRINT_NAMED_CONSTANT(KEY_REPLACE);
+ PRINT_NAMED_CONSTANT(KEY_RESTART);
+ PRINT_NAMED_CONSTANT(KEY_RESUME);
+ PRINT_NAMED_CONSTANT(KEY_SAVE);
+ PRINT_NAMED_CONSTANT(KEY_SBEG);
+ PRINT_NAMED_CONSTANT(KEY_SCANCEL);
+ PRINT_NAMED_CONSTANT(KEY_SCOMMAND);
+ PRINT_NAMED_CONSTANT(KEY_SCOPY);
+ PRINT_NAMED_CONSTANT(KEY_SCREATE);
+ PRINT_NAMED_CONSTANT(KEY_SDC);
+ PRINT_NAMED_CONSTANT(KEY_SDL);
+ PRINT_NAMED_CONSTANT(KEY_SELECT);
+ PRINT_NAMED_CONSTANT(KEY_SEND);
+ PRINT_NAMED_CONSTANT(KEY_SEOL);
+ PRINT_NAMED_CONSTANT(KEY_SEXIT);
+ PRINT_NAMED_CONSTANT(KEY_SFIND);
+ PRINT_NAMED_CONSTANT(KEY_SHELP);
+ PRINT_NAMED_CONSTANT(KEY_SHOME);
+ PRINT_NAMED_CONSTANT(KEY_SIC);
+ PRINT_NAMED_CONSTANT(KEY_SLEFT);
+ PRINT_NAMED_CONSTANT(KEY_SMESSAGE);
+ PRINT_NAMED_CONSTANT(KEY_SMOVE);
+ PRINT_NAMED_CONSTANT(KEY_SNEXT);
+ PRINT_NAMED_CONSTANT(KEY_SOPTIONS);
+ PRINT_NAMED_CONSTANT(KEY_SPREVIOUS);
+ PRINT_NAMED_CONSTANT(KEY_SPRINT);
+ PRINT_NAMED_CONSTANT(KEY_SREDO);
+ PRINT_NAMED_CONSTANT(KEY_SREPLACE);
+ PRINT_NAMED_CONSTANT(KEY_SRIGHT);
+ PRINT_NAMED_CONSTANT(KEY_SRSUME);
+ PRINT_NAMED_CONSTANT(KEY_SSAVE);
+ PRINT_NAMED_CONSTANT(KEY_SSUSPEND);
+ PRINT_NAMED_CONSTANT(KEY_SUNDO);
+ PRINT_NAMED_CONSTANT(KEY_SUSPEND);
+ PRINT_NAMED_CONSTANT(KEY_UNDO);
+ PRINT_NAMED_CONSTANT(KEY_MOUSE);
+ PRINT_NAMED_CONSTANT(KEY_RESIZE);
+
+ print_comment("alternate character codes (ACS) from addch(3NCURSES)");
+#define PRINT_ACS(name) print_constant (#name, &name - &acs_map[0])
+ PRINT_ACS(ACS_ULCORNER);
+ PRINT_ACS(ACS_LLCORNER);
+ PRINT_ACS(ACS_URCORNER);
+ PRINT_ACS(ACS_LRCORNER);
+ PRINT_ACS(ACS_LTEE);
+ PRINT_ACS(ACS_RTEE);
+ PRINT_ACS(ACS_BTEE);
+ PRINT_ACS(ACS_TTEE);
+ PRINT_ACS(ACS_HLINE);
+ PRINT_ACS(ACS_VLINE);
+ PRINT_ACS(ACS_PLUS);
+ PRINT_ACS(ACS_S1);
+ PRINT_ACS(ACS_S9);
+ PRINT_ACS(ACS_DIAMOND);
+ PRINT_ACS(ACS_CKBOARD);
+ PRINT_ACS(ACS_DEGREE);
+ PRINT_ACS(ACS_PLMINUS);
+ PRINT_ACS(ACS_BULLET);
+ PRINT_ACS(ACS_LARROW);
+ PRINT_ACS(ACS_RARROW);
+ PRINT_ACS(ACS_DARROW);
+ PRINT_ACS(ACS_UARROW);
+ PRINT_ACS(ACS_BOARD);
+ PRINT_ACS(ACS_LANTERN);
+ PRINT_ACS(ACS_BLOCK);
+ PRINT_ACS(ACS_S3);
+ PRINT_ACS(ACS_S7);
+ PRINT_ACS(ACS_LEQUAL);
+ PRINT_ACS(ACS_GEQUAL);
+ PRINT_ACS(ACS_PI);
+ PRINT_ACS(ACS_NEQUAL);
+ PRINT_ACS(ACS_STERLING);
+
+ print_comment("Menu_Options from opts(3MENU)");
+ PRINT_NAMED_BITMASK(Menu_Options, O_ONEVALUE);
+ PRINT_NAMED_BITMASK(Menu_Options, O_SHOWDESC);
+ PRINT_NAMED_BITMASK(Menu_Options, O_ROWMAJOR);
+ PRINT_NAMED_BITMASK(Menu_Options, O_IGNORECASE);
+ PRINT_NAMED_BITMASK(Menu_Options, O_SHOWMATCH);
+ PRINT_NAMED_BITMASK(Menu_Options, O_NONCYCLIC);
+ print_constant("Menu_Options_Size", 8 * sizeof(Menu_Options));
+
+ print_comment("Item_Options from menu_opts(3MENU)");
+ PRINT_NAMED_BITMASK(Item_Options, O_SELECTABLE);
+ print_constant("Item_Options_Size", 8 * sizeof(Item_Options));
+
+ print_comment("Field_Options from field_opts(3FORM)");
+ PRINT_NAMED_BITMASK(Field_Options, O_VISIBLE);
+ PRINT_NAMED_BITMASK(Field_Options, O_ACTIVE);
+ PRINT_NAMED_BITMASK(Field_Options, O_PUBLIC);
+ PRINT_NAMED_BITMASK(Field_Options, O_EDIT);
+ PRINT_NAMED_BITMASK(Field_Options, O_WRAP);
+ PRINT_NAMED_BITMASK(Field_Options, O_BLANK);
+ PRINT_NAMED_BITMASK(Field_Options, O_AUTOSKIP);
+ PRINT_NAMED_BITMASK(Field_Options, O_NULLOK);
+ PRINT_NAMED_BITMASK(Field_Options, O_PASSOK);
+ PRINT_NAMED_BITMASK(Field_Options, O_STATIC);
+ print_constant("Field_Options_Size", 8 * sizeof(Field_Options));
+
+ print_comment("Field_Options from opts(3FORM)");
+ PRINT_NAMED_BITMASK(Field_Options, O_NL_OVERLOAD);
+ PRINT_NAMED_BITMASK(Field_Options, O_BS_OVERLOAD);
+ /* Field_Options_Size is defined below */
+
+ print_comment("MEVENT structure from mouse(3NCURSES)");
+ STRUCT_OFFSET(MEVENT, id);
+ STRUCT_OFFSET(MEVENT, x);
+ STRUCT_OFFSET(MEVENT, y);
+ STRUCT_OFFSET(MEVENT, z);
+ STRUCT_OFFSET(MEVENT, bstate);
+ print_constant("MEVENT_Size", 8 * sizeof(MEVENT));
+
+ print_comment("mouse events from mouse(3NCURSES)");
+ {
+ mmask_t all_events;
+
+#define PRINT_MOUSE_EVENT(event) \
+ print_constant (#event, event); \
+ all_events |= event
+
+ all_events = 0;
+ PRINT_MOUSE_EVENT(BUTTON1_RELEASED);
+ PRINT_MOUSE_EVENT(BUTTON1_PRESSED);
+ PRINT_MOUSE_EVENT(BUTTON1_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON1_DOUBLE_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON1_TRIPLE_CLICKED);
+#ifdef BUTTON1_RESERVED_EVENT
+ PRINT_MOUSE_EVENT(BUTTON1_RESERVED_EVENT);
#endif
- break;
- case '3': /* patch level */
-#ifdef NCURSES_VERSION_PATCH
- printf("%d", NCURSES_VERSION_PATCH);
+ print_constant("all_events_button_1", (long)all_events);
+
+ all_events = 0;
+ PRINT_MOUSE_EVENT(BUTTON2_RELEASED);
+ PRINT_MOUSE_EVENT(BUTTON2_PRESSED);
+ PRINT_MOUSE_EVENT(BUTTON2_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON2_DOUBLE_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON2_TRIPLE_CLICKED);
+#ifdef BUTTON2_RESERVED_EVENT
+ PRINT_MOUSE_EVENT(BUTTON2_RESERVED_EVENT);
#endif
- break;
- default:
- break;
- }
- }
- break;
- /* --------------------------------------------------------------- */
- default:
- break;
- }
- return 0;
+ print_constant("all_events_button_2", (long)all_events);
+
+ all_events = 0;
+ PRINT_MOUSE_EVENT(BUTTON3_RELEASED);
+ PRINT_MOUSE_EVENT(BUTTON3_PRESSED);
+ PRINT_MOUSE_EVENT(BUTTON3_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON3_DOUBLE_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON3_TRIPLE_CLICKED);
+#ifdef BUTTON3_RESERVED_EVENT
+ PRINT_MOUSE_EVENT(BUTTON3_RESERVED_EVENT);
+#endif
+ print_constant("all_events_button_3", (long)all_events);
+
+ all_events = 0;
+ PRINT_MOUSE_EVENT(BUTTON4_RELEASED);
+ PRINT_MOUSE_EVENT(BUTTON4_PRESSED);
+ PRINT_MOUSE_EVENT(BUTTON4_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON4_DOUBLE_CLICKED);
+ PRINT_MOUSE_EVENT(BUTTON4_TRIPLE_CLICKED);
+#ifdef BUTTON4_RESERVED_EVENT
+ PRINT_MOUSE_EVENT(BUTTON4_RESERVED_EVENT);
+#endif
+ print_constant("all_events_button_4", (long)all_events);
+ }
+ PRINT_NAMED_CONSTANT(BUTTON_CTRL);
+ PRINT_NAMED_CONSTANT(BUTTON_SHIFT);
+ PRINT_NAMED_CONSTANT(BUTTON_ALT);
+ PRINT_NAMED_CONSTANT(REPORT_MOUSE_POSITION);
+ PRINT_NAMED_CONSTANT(ALL_MOUSE_EVENTS);
+
+ print_comment("trace selection from trace(3NCURSES)");
+ PRINT_NAMED_BITMASK(UINT, TRACE_TIMES);
+ PRINT_NAMED_BITMASK(UINT, TRACE_TPUTS);
+ PRINT_NAMED_BITMASK(UINT, TRACE_UPDATE);
+ PRINT_NAMED_BITMASK(UINT, TRACE_MOVE);
+ PRINT_NAMED_BITMASK(UINT, TRACE_CHARPUT);
+ PRINT_NAMED_BITMASK(UINT, TRACE_CALLS);
+ PRINT_NAMED_BITMASK(UINT, TRACE_VIRTPUT);
+ PRINT_NAMED_BITMASK(UINT, TRACE_IEVENT);
+ PRINT_NAMED_BITMASK(UINT, TRACE_BITS);
+ PRINT_NAMED_BITMASK(UINT, TRACE_ICALLS);
+ PRINT_NAMED_BITMASK(UINT, TRACE_CCALLS);
+ PRINT_NAMED_BITMASK(UINT, TRACE_DATABASE);
+ PRINT_NAMED_BITMASK(UINT, TRACE_ATTRS);
+ print_constant("Trace_Size", 8 * sizeof(UINT));
+
+ printf("end Terminal_Interface.Curses_Constants;\n");
+ exit(EXIT_SUCCESS);
}
diff --git a/Ada95/gen/terminal_interface-curses-aux.ads.m4 b/Ada95/gen/terminal_interface-curses-aux.ads.m4
index e0c9348..b90b8dd 100644
--- a/Ada95/gen/terminal_interface-curses-aux.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-aux.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,14 +38,12 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.16 $
+-- $Revision: 1.23 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-include(`Base_Defs')
with System;
with Interfaces.C;
with Interfaces.C.Strings; use Interfaces.C.Strings;
-with Unchecked_Conversion;
package Terminal_Interface.Curses.Aux is
pragma Preelaborate (Terminal_Interface.Curses.Aux);
@@ -60,41 +58,41 @@
subtype C_ULong is Interfaces.C.unsigned_long;
subtype C_Char_Ptr is Interfaces.C.Strings.chars_ptr;
type C_Void_Ptr is new System.Address;
-include(`Chtype_Def')
+
-- This is how those constants are defined in ncurses. I see them also
-- exactly like this in all ETI implementations I ever tested. So it
-- could be that this is quite general, but please check with your curses.
- -- This is critical, because curses sometime mixes boolean returns with
+ -- This is critical, because curses sometime mixes Boolean returns with
-- returning an error status.
- Curses_Ok : constant C_Int := CF_CURSES_OK;
- Curses_Err : constant C_Int := CF_CURSES_ERR;
+ Curses_Ok : constant C_Int := Curses_Constants.OK;
+ Curses_Err : constant C_Int := Curses_Constants.ERR;
- Curses_True : constant C_Int := CF_CURSES_TRUE;
- Curses_False : constant C_Int := CF_CURSES_FALSE;
+ Curses_True : constant C_Int := Curses_Constants.TRUE;
+ Curses_False : constant C_Int := Curses_Constants.FALSE;
-- Eti_Error: type for error codes returned by the menu and form subsystem
-include(`Eti_Defs')
+ type Eti_Error is
+ (E_Current,
+ E_Invalid_Field,
+ E_Request_Denied,
+ E_Not_Connected,
+ E_Not_Selectable,
+ E_No_Match,
+ E_Unknown_Command,
+ E_Not_Posted,
+ E_No_Room,
+ E_Bad_State,
+ E_Connected,
+ E_Posted,
+ E_Bad_Argument,
+ E_System_Error,
+ E_Ok);
+
procedure Eti_Exception (Code : Eti_Error);
- -- Dispatch the error code and raise the appropriate exception
- --
- --
- -- Some helpers
- function Chtype_To_AttrChar is new
- Unchecked_Conversion (Source => C_Chtype,
- Target => Attributed_Character);
- function AttrChar_To_Chtype is new
- Unchecked_Conversion (Source => Attributed_Character,
- Target => C_Chtype);
+ -- Do nothing if Code = E_Ok.
+ -- Else dispatch the error code and raise the appropriate exception.
- function AttrChar_To_AttrType is new
- Unchecked_Conversion (Source => Attributed_Character,
- Target => C_AttrType);
-
- function AttrType_To_AttrChar is new
- Unchecked_Conversion (Source => C_AttrType,
- Target => Attributed_Character);
-
- procedure Fill_String (Cp : in chars_ptr;
+ procedure Fill_String (Cp : chars_ptr;
Str : out String);
-- Fill the Str parameter with the string denoted by the chars_ptr
-- C-Style string.
@@ -102,4 +100,23 @@
function Fill_String (Cp : chars_ptr) return String;
-- Same but as function.
+private
+ for Eti_Error'Size use C_Int'Size;
+ pragma Convention (C, Eti_Error);
+ for Eti_Error use
+ (E_Current => Curses_Constants.E_CURRENT,
+ E_Invalid_Field => Curses_Constants.E_INVALID_FIELD,
+ E_Request_Denied => Curses_Constants.E_REQUEST_DENIED,
+ E_Not_Connected => Curses_Constants.E_NOT_CONNECTED,
+ E_Not_Selectable => Curses_Constants.E_NOT_SELECTABLE,
+ E_No_Match => Curses_Constants.E_NO_MATCH,
+ E_Unknown_Command => Curses_Constants.E_UNKNOWN_COMMAND,
+ E_Not_Posted => Curses_Constants.E_NOT_POSTED,
+ E_No_Room => Curses_Constants.E_NO_ROOM,
+ E_Bad_State => Curses_Constants.E_BAD_STATE,
+ E_Connected => Curses_Constants.E_CONNECTED,
+ E_Posted => Curses_Constants.E_POSTED,
+ E_Bad_Argument => Curses_Constants.E_BAD_ARGUMENT,
+ E_System_Error => Curses_Constants.E_SYSTEM_ERROR,
+ E_Ok => Curses_Constants.E_OK);
end Terminal_Interface.Curses.Aux;
diff --git a/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4
index 8819844..51682cd 100644
--- a/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,10 +38,11 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.14 $
+-- $Revision: 1.19 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
+with Terminal_Interface.Curses.Aux;
package Terminal_Interface.Curses.Forms.Field_Types is
pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types);
@@ -64,8 +65,8 @@
type Field_Type_Access is access all Field_Type'Class;
-- ANCHOR(`set_field_type()',`Set_Type')
- procedure Set_Field_Type (Fld : in Field;
- Fld_Type : in Field_Type) is abstract;
+ procedure Set_Field_Type (Fld : Field;
+ Fld_Type : Field_Type) is abstract;
-- AKA
-- But: we hide the vararg mechanism of the C interface. You always
-- have to pass a single Field_Type parameter.
@@ -75,7 +76,7 @@
-- MANPAGE(`form_field_validation.3x')
-- ANCHOR(`field_type()',`Get_Type')
- function Get_Type (Fld : in Field) return Field_Type_Access;
+ function Get_Type (Fld : Field) return Field_Type_Access;
-- AKA
-- ALIAS(`field_arg()')
-- In Ada95 we can combine these. If you try to retrieve the field type
@@ -101,15 +102,15 @@
pragma Convention (C, Freearg_Function);
type Field_Check_Function is access
- function (Fld : Field; Usr : System.Address) return C_Int;
+ function (Fld : Field; Usr : System.Address) return Curses_Bool;
pragma Convention (C, Field_Check_Function);
type Char_Check_Function is access
- function (Ch : C_Int; Usr : System.Address) return C_Int;
+ function (Ch : C_Int; Usr : System.Address) return Curses_Bool;
pragma Convention (C, Char_Check_Function);
type Choice_Function is access
- function (Fld : Field; Usr : System.Address) return C_Int;
+ function (Fld : Field; Usr : System.Address) return Curses_Bool;
pragma Convention (C, Choice_Function);
-- +----------------------------------------------------------------------
@@ -117,7 +118,7 @@
-- |
type Low_Level_Field_Type is
record
- Status : Interfaces.C.short;
+ Status : Interfaces.C.unsigned_short;
Ref_Count : Interfaces.C.long;
Left, Right : System.Address;
Makearg : Makearg_Function;
@@ -159,7 +160,7 @@
-- Any other value will raise a Form_Exception.
function Make_Arg (Args : System.Address) return System.Address;
- pragma Convention (C, Make_Arg);
+ pragma Import (C, Make_Arg, "void_star_make_arg");
-- This is the Makearg_Function for the internal low-level types
-- introduced by this binding.
@@ -174,7 +175,7 @@
-- introduced by this binding.
function Field_Check_Router (Fld : Field;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Field_Check_Router);
-- This is the Field_Check_Function for the internal low-level types
-- introduced to wrap the low-level types by a Field_Type derived
@@ -182,7 +183,7 @@
-- function.
function Char_Check_Router (Ch : C_Int;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Char_Check_Router);
-- This is the Char_Check_Function for the internal low-level types
-- introduced to wrap the low-level types by a Field_Type derived
@@ -190,7 +191,7 @@
-- function.
function Next_Router (Fld : Field;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Next_Router);
-- This is the Choice_Function for the internal low-level types
-- introduced to wrap the low-level types by a Field_Type derived
@@ -198,7 +199,7 @@
-- function.
function Prev_Router (Fld : Field;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Prev_Router);
-- This is the Choice_Function for the internal low-level types
-- introduced to wrap the low-level types by a Field_Type derived
@@ -227,12 +228,12 @@
Mak : Makearg_Function := Make_Arg'Access;
Cop : Copyarg_Function := Copy_Arg'Access;
Fre : Freearg_Function := Free_Arg'Access)
- return C_Int;
+ return Aux.Eti_Error;
pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
function Set_Fieldtype_Choice (Cft : C_Field_Type;
Next, Prev : Choice_Function)
- return C_Int;
+ return Aux.Eti_Error;
pragma Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
end Terminal_Interface.Curses.Forms.Field_Types;
diff --git a/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4
index 4139883..9de700b 100644
--- a/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,7 +38,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.15 $
+-- $Revision: 1.16 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -51,18 +51,18 @@
-- MANPAGE(`form_field_userptr.3x')
-- ANCHOR(`set_field_userptr',`Set_User_Data')
- procedure Set_User_Data (Fld : in Field;
- Data : in User_Access);
+ procedure Set_User_Data (Fld : Field;
+ Data : User_Access);
-- AKA
pragma Inline (Set_User_Data);
-- ANCHOR(`field_userptr',`Get_User_Data')
- procedure Get_User_Data (Fld : in Field;
+ procedure Get_User_Data (Fld : Field;
Data : out User_Access);
-- AKA
-- ANCHOR(`field_userptr',`Get_User_Data')
- function Get_User_Data (Fld : in Field) return User_Access;
+ function Get_User_Data (Fld : Field) return User_Access;
-- AKA
-- Sama as function
pragma Inline (Get_User_Data);
diff --git a/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4
index 0c4420d..f7fb1a7 100644
--- a/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,7 +38,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.14 $
+-- $Revision: 1.15 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -51,18 +51,18 @@
-- MANPAGE(`form_userptr.3x')
-- ANCHOR(`set_form_userptr',`Set_User_Data')
- procedure Set_User_Data (Frm : in Form;
- Data : in User_Access);
+ procedure Set_User_Data (Frm : Form;
+ Data : User_Access);
-- AKA
pragma Inline (Set_User_Data);
-- ANCHOR(`form_userptr',`Get_User_Data')
- procedure Get_User_Data (Frm : in Form;
+ procedure Get_User_Data (Frm : Form;
Data : out User_Access);
-- AKA
-- ANCHOR(`form_userptr',`Get_User_Data')
- function Get_User_Data (Frm : in Form) return User_Access;
+ function Get_User_Data (Frm : Form) return User_Access;
-- AKA
-- Same as function
pragma Inline (Get_User_Data);
diff --git a/Ada95/gen/terminal_interface-curses-forms.ads.m4 b/Ada95/gen/terminal_interface-curses-forms.ads.m4
index 5b75edb..b269f4c 100644
--- a/Ada95/gen/terminal_interface-curses-forms.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-forms.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,18 +38,17 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.29 $
--- $Date: 2006/06/25 14:30:21 $
+-- $Revision: 1.33 $
+-- $Date: 2014/05/24 21:31:57 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-include(`Form_Base_Defs')
with System;
with Ada.Characters.Latin_1;
package Terminal_Interface.Curses.Forms is
pragma Preelaborate (Terminal_Interface.Curses.Forms);
-include(`Form_Linker_Options')dnl
-include(`Linker_Options')
+ pragma Linker_Options ("-lform" & Curses_Constants.DFT_ARG_SUFFIX);
+
Space : Character renames Ada.Characters.Latin_1.Space;
type Field is private;
@@ -63,18 +62,68 @@
Center,
Right);
- pragma Warnings (Off);
-include(`Field_Rep')Dnl
+ type Field_Option_Set is
+ record
+ Visible : Boolean;
+ Active : Boolean;
+ Public : Boolean;
+ Edit : Boolean;
+ Wrap : Boolean;
+ Blank : Boolean;
+ Auto_Skip : Boolean;
+ Null_Ok : Boolean;
+ Pass_Ok : Boolean;
+ Static : Boolean;
+ end record;
+ pragma Convention (C_Pass_By_Copy, Field_Option_Set);
+ for Field_Option_Set use
+ record
+ Visible at 0 range Curses_Constants.O_VISIBLE_First
+ .. Curses_Constants.O_VISIBLE_Last;
+ Active at 0 range Curses_Constants.O_ACTIVE_First
+ .. Curses_Constants.O_ACTIVE_Last;
+ Public at 0 range Curses_Constants.O_PUBLIC_First
+ .. Curses_Constants.O_PUBLIC_Last;
+ Edit at 0 range Curses_Constants.O_EDIT_First
+ .. Curses_Constants.O_EDIT_Last;
+ Wrap at 0 range Curses_Constants.O_WRAP_First
+ .. Curses_Constants.O_WRAP_Last;
+ Blank at 0 range Curses_Constants.O_BLANK_First
+ .. Curses_Constants.O_BLANK_Last;
+ Auto_Skip at 0 range Curses_Constants.O_AUTOSKIP_First
+ .. Curses_Constants.O_AUTOSKIP_Last;
+ Null_Ok at 0 range Curses_Constants.O_NULLOK_First
+ .. Curses_Constants.O_NULLOK_Last;
+ Pass_Ok at 0 range Curses_Constants.O_PASSOK_First
+ .. Curses_Constants.O_PASSOK_Last;
+ Static at 0 range Curses_Constants.O_STATIC_First
+ .. Curses_Constants.O_STATIC_Last;
+ end record;
+ pragma Warnings (Off);
+ for Field_Option_Set'Size use Curses_Constants.Field_Options_Size;
pragma Warnings (On);
function Default_Field_Options return Field_Option_Set;
-- The initial defaults for the field options.
pragma Inline (Default_Field_Options);
- pragma Warnings (Off);
-include(`Form_Opt_Rep')Dnl
+ type Form_Option_Set is
+ record
+ NL_Overload : Boolean;
+ BS_Overload : Boolean;
+ end record;
+ pragma Convention (C_Pass_By_Copy, Form_Option_Set);
+ for Form_Option_Set use
+ record
+ NL_Overload at 0 range Curses_Constants.O_NL_OVERLOAD_First
+ .. Curses_Constants.O_NL_OVERLOAD_Last;
+ BS_Overload at 0 range Curses_Constants.O_BS_OVERLOAD_First
+ .. Curses_Constants.O_BS_OVERLOAD_Last;
+ end record;
+ pragma Warnings (Off);
+ for Form_Option_Set'Size use Curses_Constants.Field_Options_Size;
pragma Warnings (On);
function Default_Form_Options return Form_Option_Set;
@@ -89,7 +138,7 @@
type Field_Array_Access is access Field_Array;
procedure Free (FA : in out Field_Array_Access;
- Free_Fields : in Boolean := False);
+ Free_Fields : Boolean := False);
-- Release the memory for an allocated field array
-- If Free_Fields is True, call Delete() for all the fields in
-- the array.
@@ -228,7 +277,7 @@
REQ_NEXT_CHOICE : Form_Request_Code renames F_Next_Choice;
REQ_PREV_CHOICE : Form_Request_Code renames F_Previous_Choice;
- procedure Request_Name (Key : in Form_Request_Code;
+ procedure Request_Name (Key : Form_Request_Code;
Name : out String);
function Request_Name (Key : Form_Request_Code) return String;
@@ -287,8 +336,8 @@
-- MANPAGE(`form_field_just.3x')
-- ANCHOR(`set_field_just()',`Set_Justification')
- procedure Set_Justification (Fld : in Field;
- Just : in Field_Justification := None);
+ procedure Set_Justification (Fld : Field;
+ Just : Field_Justification := None);
-- AKA
pragma Inline (Set_Justification);
@@ -301,29 +350,29 @@
-- ANCHOR(`set_field_buffer()',`Set_Buffer')
procedure Set_Buffer
- (Fld : in Field;
- Buffer : in Buffer_Number := Buffer_Number'First;
- Str : in String);
+ (Fld : Field;
+ Buffer : Buffer_Number := Buffer_Number'First;
+ Str : String);
-- AKA
-- Not inlined
-- ANCHOR(`field_buffer()',`Get_Buffer')
procedure Get_Buffer
- (Fld : in Field;
- Buffer : in Buffer_Number := Buffer_Number'First;
+ (Fld : Field;
+ Buffer : Buffer_Number := Buffer_Number'First;
Str : out String);
-- AKA
function Get_Buffer
- (Fld : in Field;
- Buffer : in Buffer_Number := Buffer_Number'First) return String;
+ (Fld : Field;
+ Buffer : Buffer_Number := Buffer_Number'First) return String;
-- AKA
-- Same but as function
pragma Inline (Get_Buffer);
-- ANCHOR(`set_field_status()',`Set_Status')
- procedure Set_Status (Fld : in Field;
- Status : in Boolean := True);
+ procedure Set_Status (Fld : Field;
+ Status : Boolean := True);
-- AKA
pragma Inline (Set_Status);
@@ -333,29 +382,29 @@
pragma Inline (Changed);
-- ANCHOR(`set_field_max()',`Set_Maximum_Size')
- procedure Set_Maximum_Size (Fld : in Field;
- Max : in Natural := 0);
+ procedure Set_Maximum_Size (Fld : Field;
+ Max : Natural := 0);
-- AKA
pragma Inline (Set_Maximum_Size);
-- MANPAGE(`form_field_opts.3x')
-- ANCHOR(`set_field_opts()',`Set_Options')
- procedure Set_Options (Fld : in Field;
- Options : in Field_Option_Set);
+ procedure Set_Options (Fld : Field;
+ Options : Field_Option_Set);
-- AKA
-- An overloaded version is defined later. Pragma Inline appears there
-- ANCHOR(`field_opts_on()',`Switch_Options')
- procedure Switch_Options (Fld : in Field;
- Options : in Field_Option_Set;
+ procedure Switch_Options (Fld : Field;
+ Options : Field_Option_Set;
On : Boolean := True);
-- AKA
-- ALIAS(`field_opts_off()')
-- An overloaded version is defined later. Pragma Inline appears there
-- ANCHOR(`field_opts()',`Get_Options')
- procedure Get_Options (Fld : in Field;
+ procedure Get_Options (Fld : Field;
Options : out Field_Option_Set);
-- AKA
@@ -369,19 +418,19 @@
-- ANCHOR(`set_field_fore()',`Set_Foreground')
procedure Set_Foreground
- (Fld : in Field;
- Fore : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Fld : Field;
+ Fore : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
pragma Inline (Set_Foreground);
-- ANCHOR(`field_fore()',`Foreground')
- procedure Foreground (Fld : in Field;
+ procedure Foreground (Fld : Field;
Fore : out Character_Attribute_Set);
-- AKA
-- ANCHOR(`field_fore()',`Foreground')
- procedure Foreground (Fld : in Field;
+ procedure Foreground (Fld : Field;
Fore : out Character_Attribute_Set;
Color : out Color_Pair);
-- AKA
@@ -389,32 +438,32 @@
-- ANCHOR(`set_field_back()',`Set_Background')
procedure Set_Background
- (Fld : in Field;
- Back : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Fld : Field;
+ Back : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
pragma Inline (Set_Background);
-- ANCHOR(`field_back()',`Background')
- procedure Background (Fld : in Field;
+ procedure Background (Fld : Field;
Back : out Character_Attribute_Set);
-- AKA
-- ANCHOR(`field_back()',`Background')
- procedure Background (Fld : in Field;
+ procedure Background (Fld : Field;
Back : out Character_Attribute_Set;
Color : out Color_Pair);
-- AKA
pragma Inline (Background);
-- ANCHOR(`set_field_pad()',`Set_Pad_Character')
- procedure Set_Pad_Character (Fld : in Field;
- Pad : in Character := Space);
+ procedure Set_Pad_Character (Fld : Field;
+ Pad : Character := Space);
-- AKA
pragma Inline (Set_Pad_Character);
-- ANCHOR(`field_pad()',`Pad_Character')
- procedure Pad_Character (Fld : in Field;
+ procedure Pad_Character (Fld : Field;
Pad : out Character);
-- AKA
pragma Inline (Pad_Character);
@@ -422,7 +471,7 @@
-- MANPAGE(`form_field_info.3x')
-- ANCHOR(`field_info()',`Info')
- procedure Info (Fld : in Field;
+ procedure Info (Fld : Field;
Lines : out Line_Count;
Columns : out Column_Count;
First_Row : out Line_Position;
@@ -433,7 +482,7 @@
pragma Inline (Info);
-- ANCHOR(`dynamic_field_info()',`Dynamic_Info')
- procedure Dynamic_Info (Fld : in Field;
+ procedure Dynamic_Info (Fld : Field;
Lines : out Line_Count;
Columns : out Column_Count;
Max : out Natural);
@@ -443,8 +492,8 @@
-- MANPAGE(`form_win.3x')
-- ANCHOR(`set_form_win()',`Set_Window')
- procedure Set_Window (Frm : in Form;
- Win : in Window);
+ procedure Set_Window (Frm : Form;
+ Win : Window);
-- AKA
pragma Inline (Set_Window);
@@ -454,8 +503,8 @@
pragma Inline (Get_Window);
-- ANCHOR(`set_form_sub()',`Set_Sub_Window')
- procedure Set_Sub_Window (Frm : in Form;
- Win : in Window);
+ procedure Set_Sub_Window (Frm : Form;
+ Win : Window);
-- AKA
pragma Inline (Set_Sub_Window);
@@ -465,7 +514,7 @@
pragma Inline (Get_Sub_Window);
-- ANCHOR(`scale_form()',`Scale')
- procedure Scale (Frm : in Form;
+ procedure Scale (Frm : Form;
Lines : out Line_Count;
Columns : out Column_Count);
-- AKA
@@ -473,30 +522,30 @@
-- MANPAGE(`form_hook.3x')
- type Form_Hook_Function is access procedure (Frm : in Form);
+ type Form_Hook_Function is access procedure (Frm : Form);
pragma Convention (C, Form_Hook_Function);
-- ANCHOR(`set_field_init()',`Set_Field_Init_Hook')
- procedure Set_Field_Init_Hook (Frm : in Form;
- Proc : in Form_Hook_Function);
+ procedure Set_Field_Init_Hook (Frm : Form;
+ Proc : Form_Hook_Function);
-- AKA
pragma Inline (Set_Field_Init_Hook);
-- ANCHOR(`set_field_term()',`Set_Field_Term_Hook')
- procedure Set_Field_Term_Hook (Frm : in Form;
- Proc : in Form_Hook_Function);
+ procedure Set_Field_Term_Hook (Frm : Form;
+ Proc : Form_Hook_Function);
-- AKA
pragma Inline (Set_Field_Term_Hook);
-- ANCHOR(`set_form_init()',`Set_Form_Init_Hook')
- procedure Set_Form_Init_Hook (Frm : in Form;
- Proc : in Form_Hook_Function);
+ procedure Set_Form_Init_Hook (Frm : Form;
+ Proc : Form_Hook_Function);
-- AKA
pragma Inline (Set_Form_Init_Hook);
-- ANCHOR(`set_form_term()',`Set_Form_Term_Hook')
- procedure Set_Form_Term_Hook (Frm : in Form;
- Proc : in Form_Hook_Function);
+ procedure Set_Form_Term_Hook (Frm : Form;
+ Proc : Form_Hook_Function);
-- AKA
pragma Inline (Set_Form_Term_Hook);
@@ -523,14 +572,14 @@
-- MANPAGE(`form_field.3x')
-- ANCHOR(`set_form_fields()',`Redefine')
- procedure Redefine (Frm : in Form;
- Flds : in Field_Array_Access);
+ procedure Redefine (Frm : Form;
+ Flds : Field_Array_Access);
-- AKA
pragma Inline (Redefine);
-- ANCHOR(`set_form_fields()',`Set_Fields')
- procedure Set_Fields (Frm : in Form;
- Flds : in Field_Array_Access) renames Redefine;
+ procedure Set_Fields (Frm : Form;
+ Flds : Field_Array_Access) renames Redefine;
-- AKA
-- pragma Inline (Set_Fields);
@@ -546,9 +595,9 @@
pragma Inline (Field_Count);
-- ANCHOR(`move_field()',`Move')
- procedure Move (Fld : in Field;
- Line : in Line_Position;
- Column : in Column_Position);
+ procedure Move (Fld : Field;
+ Line : Line_Position;
+ Column : Column_Position);
-- AKA
pragma Inline (Move);
@@ -574,21 +623,21 @@
-- MANPAGE(`form_opts.3x')
-- ANCHOR(`set_form_opts()',`Set_Options')
- procedure Set_Options (Frm : in Form;
- Options : in Form_Option_Set);
+ procedure Set_Options (Frm : Form;
+ Options : Form_Option_Set);
-- AKA
pragma Inline (Set_Options);
-- ANCHOR(`form_opts_on()',`Switch_Options')
- procedure Switch_Options (Frm : in Form;
- Options : in Form_Option_Set;
+ procedure Switch_Options (Frm : Form;
+ Options : Form_Option_Set;
On : Boolean := True);
-- AKA
-- ALIAS(`form_opts_off()')
pragma Inline (Switch_Options);
-- ANCHOR(`form_opts()',`Get_Options')
- procedure Get_Options (Frm : in Form;
+ procedure Get_Options (Frm : Form;
Options : out Form_Option_Set);
-- AKA
@@ -600,8 +649,8 @@
-- MANPAGE(`form_post.3x')
-- ANCHOR(`post_form()',`Post')
- procedure Post (Frm : in Form;
- Post : in Boolean := True);
+ procedure Post (Frm : Form;
+ Post : Boolean := True);
-- AKA
-- ALIAS(`unpost_form()')
pragma Inline (Post);
@@ -643,19 +692,19 @@
type Page_Number is new Natural;
-- ANCHOR(`set_current_field()',`Set_Current')
- procedure Set_Current (Frm : in Form;
- Fld : in Field);
+ procedure Set_Current (Frm : Form;
+ Fld : Field);
-- AKA
pragma Inline (Set_Current);
-- ANCHOR(`current_field()',`Current')
- function Current (Frm : in Form) return Field;
+ function Current (Frm : Form) return Field;
-- AKA
pragma Inline (Current);
-- ANCHOR(`set_form_page()',`Set_Page')
- procedure Set_Page (Frm : in Form;
- Page : in Page_Number := Page_Number'First);
+ procedure Set_Page (Frm : Form;
+ Page : Page_Number := Page_Number'First);
-- AKA
pragma Inline (Set_Page);
@@ -675,8 +724,8 @@
-- MANPAGE(`form_new_page.3x')
-- ANCHOR(`set_new_page()',`Set_New_Page')
- procedure Set_New_Page (Fld : in Field;
- New_Page : in Boolean := True);
+ procedure Set_New_Page (Fld : Field;
+ New_Page : Boolean := True);
-- AKA
pragma Inline (Set_New_Page);
diff --git a/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4
index 14b2466..4ffa41b 100644
--- a/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,8 +38,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.16 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.17 $
+-- $Date: 2009/12/26 17:31:35 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -56,18 +56,18 @@
-- MANPAGE(`mitem_userptr.3x')
-- ANCHOR(`set_item_userptr',`Set_User_Data')
- procedure Set_User_Data (Itm : in Item;
- Data : in User_Access);
+ procedure Set_User_Data (Itm : Item;
+ Data : User_Access);
-- AKA
pragma Inline (Set_User_Data);
-- ANCHOR(`item_userptr',`Get_User_Data')
- procedure Get_User_Data (Itm : in Item;
+ procedure Get_User_Data (Itm : Item;
Data : out User_Access);
-- AKA
-- ANCHOR(`item_userptr',`Get_User_Data')
- function Get_User_Data (Itm : in Item) return User_Access;
+ function Get_User_Data (Itm : Item) return User_Access;
-- AKA
-- Same as function
pragma Inline (Get_User_Data);
diff --git a/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4
index 696149b..9138ba6 100644
--- a/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,7 +38,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.14 $
+-- $Revision: 1.15 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -51,18 +51,18 @@
-- MANPAGE(`menu_userptr.3x')
-- ANCHOR(`set_menu_userptr',`Set_User_Data')
- procedure Set_User_Data (Men : in Menu;
- Data : in User_Access);
+ procedure Set_User_Data (Men : Menu;
+ Data : User_Access);
-- AKA
pragma Inline (Set_User_Data);
-- ANCHOR(`menu_userptr',`Get_User_Data')
- procedure Get_User_Data (Men : in Menu;
+ procedure Get_User_Data (Men : Menu;
Data : out User_Access);
-- AKA
-- ANCHOR(`menu_userptr',`Get_User_Data')
- function Get_User_Data (Men : in Menu) return User_Access;
+ function Get_User_Data (Men : Menu) return User_Access;
-- AKA
-- Same as function
pragma Inline (Get_User_Data);
diff --git a/Ada95/gen/terminal_interface-curses-menus.ads.m4 b/Ada95/gen/terminal_interface-curses-menus.ads.m4
index 17993e1..0ad9c45 100644
--- a/Ada95/gen/terminal_interface-curses-menus.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-menus.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,18 +38,17 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.27 $
--- $Date: 2007/05/05 20:20:52 $
+-- $Revision: 1.31 $
+-- $Date: 2014/05/24 21:31:57 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-include(`Menu_Base_Defs')
with System;
with Ada.Characters.Latin_1;
package Terminal_Interface.Curses.Menus is
pragma Preelaborate (Terminal_Interface.Curses.Menus);
-include(`Menu_Linker_Options')dnl
-include(`Linker_Options')
+ pragma Linker_Options ("-lmenu" & Curses_Constants.DFT_ARG_SUFFIX);
+
Space : Character renames Ada.Characters.Latin_1.Space;
type Item is private;
@@ -102,7 +101,7 @@
REQ_NEXT_MATCH : Menu_Request_Code renames M_Next_Match;
REQ_PREV_MATCH : Menu_Request_Code renames M_Previous_Match;
- procedure Request_Name (Key : in Menu_Request_Code;
+ procedure Request_Name (Key : Menu_Request_Code;
Name : out String);
function Request_Name (Key : Menu_Request_Code) return String;
@@ -116,9 +115,34 @@
--
-- Menu options
--
- pragma Warnings (Off);
-include(`Menu_Opt_Rep')dnl
+ type Menu_Option_Set is
+ record
+ One_Valued : Boolean;
+ Show_Descriptions : Boolean;
+ Row_Major_Order : Boolean;
+ Ignore_Case : Boolean;
+ Show_Matches : Boolean;
+ Non_Cyclic : Boolean;
+ end record;
+ pragma Convention (C_Pass_By_Copy, Menu_Option_Set);
+ for Menu_Option_Set use
+ record
+ One_Valued at 0 range Curses_Constants.O_ONEVALUE_First
+ .. Curses_Constants.O_ONEVALUE_Last;
+ Show_Descriptions at 0 range Curses_Constants.O_SHOWDESC_First
+ .. Curses_Constants.O_SHOWDESC_Last;
+ Row_Major_Order at 0 range Curses_Constants.O_ROWMAJOR_First
+ .. Curses_Constants.O_ROWMAJOR_Last;
+ Ignore_Case at 0 range Curses_Constants.O_IGNORECASE_First
+ .. Curses_Constants.O_IGNORECASE_Last;
+ Show_Matches at 0 range Curses_Constants.O_SHOWMATCH_First
+ .. Curses_Constants.O_SHOWMATCH_Last;
+ Non_Cyclic at 0 range Curses_Constants.O_NONCYCLIC_First
+ .. Curses_Constants.O_NONCYCLIC_Last;
+ end record;
+ pragma Warnings (Off);
+ for Menu_Option_Set'Size use Curses_Constants.Menu_Options_Size;
pragma Warnings (On);
function Default_Menu_Options return Menu_Option_Set;
@@ -127,9 +151,19 @@
--
-- Item options
--
- pragma Warnings (Off);
-include(`Item_Rep')dnl
+ type Item_Option_Set is
+ record
+ Selectable : Boolean;
+ end record;
+ pragma Convention (C_Pass_By_Copy, Item_Option_Set);
+ for Item_Option_Set use
+ record
+ Selectable at 0 range Curses_Constants.O_SELECTABLE_First
+ .. Curses_Constants.O_SELECTABLE_Last;
+ end record;
+ pragma Warnings (Off);
+ for Item_Option_Set'Size use Curses_Constants.Item_Options_Size;
pragma Warnings (On);
function Default_Item_Options return Item_Option_Set;
@@ -172,8 +206,8 @@
-- MANPAGE(`mitem_value.3x')
-- ANCHOR(`set_item_value()',`Set_Value')
- procedure Set_Value (Itm : in Item;
- Value : in Boolean := True);
+ procedure Set_Value (Itm : Item;
+ Value : Boolean := True);
-- AKA
pragma Inline (Set_Value);
@@ -192,14 +226,14 @@
-- MANPAGE(`mitem_opts.3x')
-- ANCHOR(`set_item_opts()',`Set_Options')
- procedure Set_Options (Itm : in Item;
- Options : in Item_Option_Set);
+ procedure Set_Options (Itm : Item;
+ Options : Item_Option_Set);
-- AKA
-- An overloaded Set_Options is defined later. Pragma Inline appears there
-- ANCHOR(`item_opts_on()',`Switch_Options')
- procedure Switch_Options (Itm : in Item;
- Options : in Item_Option_Set;
+ procedure Switch_Options (Itm : Item;
+ Options : Item_Option_Set;
On : Boolean := True);
-- AKA
-- ALIAS(`item_opts_off()')
@@ -207,7 +241,7 @@
-- Pragma Inline appears there
-- ANCHOR(`item_opts()',`Get_Options')
- procedure Get_Options (Itm : in Item;
+ procedure Get_Options (Itm : Item;
Options : out Item_Option_Set);
-- AKA
@@ -219,7 +253,7 @@
-- MANPAGE(`mitem_name.3x')
-- ANCHOR(`item_name()',`Name')
- procedure Name (Itm : in Item;
+ procedure Name (Itm : Item;
Name : out String);
-- AKA
function Name (Itm : Item) return String;
@@ -228,7 +262,7 @@
pragma Inline (Name);
-- ANCHOR(`item_description();',`Description')
- procedure Description (Itm : in Item;
+ procedure Description (Itm : Item;
Description : out String);
-- AKA
@@ -240,8 +274,8 @@
-- MANPAGE(`mitem_current.3x')
-- ANCHOR(`set_current_item()',`Set_Current')
- procedure Set_Current (Men : in Menu;
- Itm : in Item);
+ procedure Set_Current (Men : Menu;
+ Itm : Item);
-- AKA
pragma Inline (Set_Current);
@@ -251,8 +285,8 @@
pragma Inline (Current);
-- ANCHOR(`set_top_row()',`Set_Top_Row')
- procedure Set_Top_Row (Men : in Menu;
- Line : in Line_Position);
+ procedure Set_Top_Row (Men : Menu;
+ Line : Line_Position);
-- AKA
pragma Inline (Set_Top_Row);
@@ -272,8 +306,8 @@
-- MANPAGE(`menu_post.3x')
-- ANCHOR(`post_menu()',`Post')
- procedure Post (Men : in Menu;
- Post : in Boolean := True);
+ procedure Post (Men : Menu;
+ Post : Boolean := True);
-- AKA
-- ALIAS(`unpost_menu()')
pragma Inline (Post);
@@ -281,21 +315,21 @@
-- MANPAGE(`menu_opts.3x')
-- ANCHOR(`set_menu_opts()',`Set_Options')
- procedure Set_Options (Men : in Menu;
- Options : in Menu_Option_Set);
+ procedure Set_Options (Men : Menu;
+ Options : Menu_Option_Set);
-- AKA
pragma Inline (Set_Options);
-- ANCHOR(`menu_opts_on()',`Switch_Options')
- procedure Switch_Options (Men : in Menu;
- Options : in Menu_Option_Set;
+ procedure Switch_Options (Men : Menu;
+ Options : Menu_Option_Set;
On : Boolean := True);
-- AKA
-- ALIAS(`menu_opts_off()')
pragma Inline (Switch_Options);
-- ANCHOR(`menu_opts()',`Get_Options')
- procedure Get_Options (Men : in Menu;
+ procedure Get_Options (Men : Menu;
Options : out Menu_Option_Set);
-- AKA
@@ -307,8 +341,8 @@
-- MANPAGE(`menu_win.3x')
-- ANCHOR(`set_menu_win()',`Set_Window')
- procedure Set_Window (Men : in Menu;
- Win : in Window);
+ procedure Set_Window (Men : Menu;
+ Win : Window);
-- AKA
pragma Inline (Set_Window);
@@ -318,8 +352,8 @@
pragma Inline (Get_Window);
-- ANCHOR(`set_menu_sub()',`Set_Sub_Window')
- procedure Set_Sub_Window (Men : in Menu;
- Win : in Window);
+ procedure Set_Sub_Window (Men : Menu;
+ Win : Window);
-- AKA
pragma Inline (Set_Sub_Window);
@@ -329,7 +363,7 @@
pragma Inline (Get_Sub_Window);
-- ANCHOR(`scale_menu()',`Scale')
- procedure Scale (Men : in Menu;
+ procedure Scale (Men : Menu;
Lines : out Line_Count;
Columns : out Column_Count);
-- AKA
@@ -345,13 +379,13 @@
-- MANPAGE(`menu_mark.3x')
-- ANCHOR(`set_menu_mark()',`Set_Mark')
- procedure Set_Mark (Men : in Menu;
- Mark : in String);
+ procedure Set_Mark (Men : Menu;
+ Mark : String);
-- AKA
pragma Inline (Set_Mark);
-- ANCHOR(`menu_mark()',`Mark')
- procedure Mark (Men : in Menu;
+ procedure Mark (Men : Menu;
Mark : out String);
-- AKA
@@ -364,19 +398,19 @@
-- ANCHOR(`set_menu_fore()',`Set_Foreground')
procedure Set_Foreground
- (Men : in Menu;
- Fore : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Men : Menu;
+ Fore : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
pragma Inline (Set_Foreground);
-- ANCHOR(`menu_fore()',`Foreground')
- procedure Foreground (Men : in Menu;
+ procedure Foreground (Men : Menu;
Fore : out Character_Attribute_Set);
-- AKA
-- ANCHOR(`menu_fore()',`Foreground')
- procedure Foreground (Men : in Menu;
+ procedure Foreground (Men : Menu;
Fore : out Character_Attribute_Set;
Color : out Color_Pair);
-- AKA
@@ -384,19 +418,19 @@
-- ANCHOR(`set_menu_back()',`Set_Background')
procedure Set_Background
- (Men : in Menu;
- Back : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Men : Menu;
+ Back : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
pragma Inline (Set_Background);
-- ANCHOR(`menu_back()',`Background')
- procedure Background (Men : in Menu;
+ procedure Background (Men : Menu;
Back : out Character_Attribute_Set);
-- AKA
-- ANCHOR(`menu_back()',`Background')
- procedure Background (Men : in Menu;
+ procedure Background (Men : Menu;
Back : out Character_Attribute_Set;
Color : out Color_Pair);
-- AKA
@@ -404,33 +438,33 @@
-- ANCHOR(`set_menu_grey()',`Set_Grey')
procedure Set_Grey
- (Men : in Menu;
- Grey : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Men : Menu;
+ Grey : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
pragma Inline (Set_Grey);
-- ANCHOR(`menu_grey()',`Grey')
- procedure Grey (Men : in Menu;
+ procedure Grey (Men : Menu;
Grey : out Character_Attribute_Set);
-- AKA
-- ANCHOR(`menu_grey()',`Grey')
procedure Grey
- (Men : in Menu;
+ (Men : Menu;
Grey : out Character_Attribute_Set;
Color : out Color_Pair);
-- AKA
pragma Inline (Grey);
-- ANCHOR(`set_menu_pad()',`Set_Pad_Character')
- procedure Set_Pad_Character (Men : in Menu;
- Pad : in Character := Space);
+ procedure Set_Pad_Character (Men : Menu;
+ Pad : Character := Space);
-- AKA
pragma Inline (Set_Pad_Character);
-- ANCHOR(`menu_pad()',`Pad_Character')
- procedure Pad_Character (Men : in Menu;
+ procedure Pad_Character (Men : Menu;
Pad : out Character);
-- AKA
pragma Inline (Pad_Character);
@@ -438,15 +472,15 @@
-- MANPAGE(`menu_spacing.3x')
-- ANCHOR(`set_menu_spacing()',`Set_Spacing')
- procedure Set_Spacing (Men : in Menu;
- Descr : in Column_Position := 0;
- Row : in Line_Position := 0;
- Col : in Column_Position := 0);
+ procedure Set_Spacing (Men : Menu;
+ Descr : Column_Position := 0;
+ Row : Line_Position := 0;
+ Col : Column_Position := 0);
-- AKA
pragma Inline (Set_Spacing);
-- ANCHOR(`menu_spacing()',`Spacing')
- procedure Spacing (Men : in Menu;
+ procedure Spacing (Men : Menu;
Descr : out Column_Position;
Row : out Line_Position;
Col : out Column_Position);
@@ -463,7 +497,7 @@
pragma Inline (Set_Pattern);
-- ANCHOR(`menu_pattern()',`Pattern')
- procedure Pattern (Men : in Menu;
+ procedure Pattern (Men : Menu;
Text : out String);
-- AKA
pragma Inline (Pattern);
@@ -471,9 +505,9 @@
-- MANPAGE(`menu_format.3x')
-- ANCHOR(`set_menu_format()',`Set_Format')
- procedure Set_Format (Men : in Menu;
- Lines : in Line_Count;
- Columns : in Column_Count);
+ procedure Set_Format (Men : Menu;
+ Lines : Line_Count;
+ Columns : Column_Count);
-- Not implemented: 0 argument for Lines or Columns;
-- instead use Format to get the current sizes
-- The default format is 16 rows, 1 column. Calling
@@ -485,7 +519,7 @@
pragma Inline (Set_Format);
-- ANCHOR(`menu_format()',`Format')
- procedure Format (Men : in Menu;
+ procedure Format (Men : Menu;
Lines : out Line_Count;
Columns : out Column_Count);
-- AKA
@@ -493,30 +527,30 @@
-- MANPAGE(`menu_hook.3x')
- type Menu_Hook_Function is access procedure (Men : in Menu);
+ type Menu_Hook_Function is access procedure (Men : Menu);
pragma Convention (C, Menu_Hook_Function);
-- ANCHOR(`set_item_init()',`Set_Item_Init_Hook')
- procedure Set_Item_Init_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function);
+ procedure Set_Item_Init_Hook (Men : Menu;
+ Proc : Menu_Hook_Function);
-- AKA
pragma Inline (Set_Item_Init_Hook);
-- ANCHOR(`set_item_term()',`Set_Item_Term_Hook')
- procedure Set_Item_Term_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function);
+ procedure Set_Item_Term_Hook (Men : Menu;
+ Proc : Menu_Hook_Function);
-- AKA
pragma Inline (Set_Item_Term_Hook);
-- ANCHOR(`set_menu_init()',`Set_Menu_Init_Hook')
- procedure Set_Menu_Init_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function);
+ procedure Set_Menu_Init_Hook (Men : Menu;
+ Proc : Menu_Hook_Function);
-- AKA
pragma Inline (Set_Menu_Init_Hook);
-- ANCHOR(`set_menu_term()',`Set_Menu_Term_Hook')
- procedure Set_Menu_Term_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function);
+ procedure Set_Menu_Term_Hook (Men : Menu;
+ Proc : Menu_Hook_Function);
-- AKA
pragma Inline (Set_Menu_Term_Hook);
@@ -543,13 +577,13 @@
-- MANPAGE(`menu_items.3x')
-- ANCHOR(`set_menu_items()',`Redefine')
- procedure Redefine (Men : in Menu;
- Items : in Item_Array_Access);
+ procedure Redefine (Men : Menu;
+ Items : Item_Array_Access);
-- AKA
pragma Inline (Redefine);
- procedure Set_Items (Men : in Menu;
- Items : in Item_Array_Access) renames Redefine;
+ procedure Set_Items (Men : Menu;
+ Items : Item_Array_Access) renames Redefine;
-- pragma Inline (Set_Items);
-- ANCHOR(`menu_items()',`Items')
diff --git a/Ada95/gen/terminal_interface-curses-mouse.ads.m4 b/Ada95/gen/terminal_interface-curses-mouse.ads.m4
index b59ebbf..8d3f8ed 100644
--- a/Ada95/gen/terminal_interface-curses-mouse.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-mouse.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,21 +38,16 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.27 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.32 $
+-- $Date: 2015/05/30 23:19:19 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-include(`Mouse_Base_Defs')
with System;
package Terminal_Interface.Curses.Mouse is
pragma Preelaborate (Terminal_Interface.Curses.Mouse);
-- MANPAGE(`curs_mouse.3x')
- -- Please note, that in ncurses-1.9.9e documentation mouse support
- -- is still marked as experimental. So also this binding will change
- -- if the ncurses methods change.
- --
-- mouse_trafo, wmouse_trafo are implemented as Transform_Coordinates
-- in the parent package.
--
@@ -95,20 +90,20 @@
-- Return true if a mouse device is supported, false otherwise.
procedure Register_Reportable_Event
- (Button : in Mouse_Button;
- State : in Button_State;
+ (Button : Mouse_Button;
+ State : Button_State;
Mask : in out Event_Mask);
-- Stores the event described by the button and the state in the mask.
- -- Before you call this the first time, you should init the mask
+ -- Before you call this the first time, you should initialize the mask
-- with the Empty_Mask constant
pragma Inline (Register_Reportable_Event);
procedure Register_Reportable_Events
- (Button : in Mouse_Button;
- State : in Button_States;
+ (Button : Mouse_Button;
+ State : Button_States;
Mask : in out Event_Mask);
-- Register all events described by the Button and the State bitmap.
- -- Before you call this the first time, you should init the mask
+ -- Before you call this the first time, you should initialize the mask
-- with the Empty_Mask constant
-- ANCHOR(`mousemask()',`Start_Mouse')
@@ -121,7 +116,7 @@
-- AKA
pragma Inline (Start_Mouse);
- procedure End_Mouse (Mask : in Event_Mask := No_Events);
+ procedure End_Mouse (Mask : Event_Mask := No_Events);
-- Terminates the mouse, restores the specified event mask
pragma Inline (End_Mouse);
@@ -130,7 +125,7 @@
-- AKA
pragma Inline (Get_Mouse);
- procedure Get_Event (Event : in Mouse_Event;
+ procedure Get_Event (Event : Mouse_Event;
Y : out Line_Position;
X : out Column_Position;
Button : out Mouse_Button;
@@ -142,7 +137,7 @@
pragma Inline (Get_Event);
-- ANCHOR(`ungetmouse()',`Unget_Mouse')
- procedure Unget_Mouse (Event : in Mouse_Event);
+ procedure Unget_Mouse (Event : Mouse_Event);
-- AKA
pragma Inline (Unget_Mouse);
@@ -159,7 +154,10 @@
pragma Inline (Mouse_Interval);
private
- type Event_Mask is new Interfaces.C.unsigned_long;
+ -- This can be as little as 32 bits (unsigned), or as long as the system's
+ -- unsigned long. Declare it as the minimum size to handle all valid
+ -- sizes.
+ type Event_Mask is mod 4294967296;
type Mouse_Event is
record
@@ -171,12 +169,35 @@
end record;
pragma Convention (C, Mouse_Event);
-include(`Mouse_Event_Rep')
- Generation_Bit_Order : constant System.Bit_Order := System.M4_BIT_ORDER;
- -- This constant may be different on your system.
+ for Mouse_Event use
+ record
+ Id at 0 range Curses_Constants.MEVENT_id_First
+ .. Curses_Constants.MEVENT_id_Last;
+ X at 0 range Curses_Constants.MEVENT_x_First
+ .. Curses_Constants.MEVENT_x_Last;
+ Y at 0 range Curses_Constants.MEVENT_y_First
+ .. Curses_Constants.MEVENT_y_Last;
+ Z at 0 range Curses_Constants.MEVENT_z_First
+ .. Curses_Constants.MEVENT_z_Last;
+ Bstate at 0 range Curses_Constants.MEVENT_bstate_First
+ .. Curses_Constants.MEVENT_bstate_Last;
+ end record;
+ for Mouse_Event'Size use Curses_Constants.MEVENT_Size;
+ Generation_Bit_Order : System.Bit_Order renames Curses_Constants.Bit_Order;
-include(`Mouse_Events')
- No_Events : constant Event_Mask := 0;
- All_Events : constant Event_Mask := ALL_MOUSE_EVENTS;
+ BUTTON_CTRL : constant Event_Mask := Curses_Constants.BUTTON_CTRL;
+ BUTTON_SHIFT : constant Event_Mask := Curses_Constants.BUTTON_SHIFT;
+ BUTTON_ALT : constant Event_Mask := Curses_Constants.BUTTON_ALT;
+ BUTTON1_EVENTS : constant Event_Mask
+ := Curses_Constants.all_events_button_1;
+ BUTTON2_EVENTS : constant Event_Mask
+ := Curses_Constants.all_events_button_2;
+ BUTTON3_EVENTS : constant Event_Mask
+ := Curses_Constants.all_events_button_3;
+ BUTTON4_EVENTS : constant Event_Mask
+ := Curses_Constants.all_events_button_4;
+ ALL_MOUSE_EVENTS : constant Event_Mask := Curses_Constants.ALL_MOUSE_EVENTS;
+ No_Events : constant Event_Mask := 0;
+ All_Events : constant Event_Mask := ALL_MOUSE_EVENTS;
end Terminal_Interface.Curses.Mouse;
diff --git a/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
index e6def9b..03d8114 100644
--- a/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,7 +38,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.14 $
+-- $Revision: 1.15 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -51,18 +51,18 @@
-- MANPAGE(`panel.3x')
-- ANCHOR(`set_panel_userptr',`Set_User_Data')
- procedure Set_User_Data (Pan : in Panel;
- Data : in User_Access);
+ procedure Set_User_Data (Pan : Panel;
+ Data : User_Access);
-- AKA
pragma Inline (Set_User_Data);
-- ANCHOR(`panel_userptr',`Get_User_Data')
- procedure Get_User_Data (Pan : in Panel;
+ procedure Get_User_Data (Pan : Panel;
Data : out User_Access);
-- AKA
-- ANCHOR(`panel_userptr',`Get_User_Data')
- function Get_User_Data (Pan : in Panel) return User_Access;
+ function Get_User_Data (Pan : Panel) return User_Access;
-- AKA
-- Same as function
pragma Inline (Get_User_Data);
diff --git a/Ada95/gen/terminal_interface-curses-panels.ads.m4 b/Ada95/gen/terminal_interface-curses-panels.ads.m4
index 39b7260..b0eda4d 100644
--- a/Ada95/gen/terminal_interface-curses-panels.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-panels.ads.m4
@@ -10,7 +10,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -38,16 +38,16 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.19 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.22 $
+-- $Date: 2014/05/24 21:31:57 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with System;
package Terminal_Interface.Curses.Panels is
pragma Preelaborate (Terminal_Interface.Curses.Panels);
-include(`Panel_Linker_Options')dnl
-include(`Linker_Options')
+ pragma Linker_Options ("-lpanel" & Curses_Constants.DFT_ARG_SUFFIX);
+
type Panel is private;
---------------------------
@@ -74,17 +74,17 @@
-- pragma Inline (New_Panel);
-- ANCHOR(`bottom_panel()',`Bottom')
- procedure Bottom (Pan : in Panel);
+ procedure Bottom (Pan : Panel);
-- AKA
pragma Inline (Bottom);
-- ANCHOR(`top_panel()',`Top')
- procedure Top (Pan : in Panel);
+ procedure Top (Pan : Panel);
-- AKA
pragma Inline (Top);
-- ANCHOR(`show_panel()',`Show')
- procedure Show (Pan : in Panel);
+ procedure Show (Pan : Panel);
-- AKA
pragma Inline (Show);
@@ -94,7 +94,7 @@
pragma Import (C, Update_Panels, "update_panels");
-- ANCHOR(`hide_panel()',`Hide')
- procedure Hide (Pan : in Panel);
+ procedure Hide (Pan : Panel);
-- AKA
pragma Inline (Hide);
@@ -108,15 +108,15 @@
-- pragma Inline (Panel_Window);
-- ANCHOR(`replace_panel()',`Replace')
- procedure Replace (Pan : in Panel;
- Win : in Window);
+ procedure Replace (Pan : Panel;
+ Win : Window);
-- AKA
pragma Inline (Replace);
-- ANCHOR(`move_panel()',`Move')
- procedure Move (Pan : in Panel;
- Line : in Line_Position;
- Column : in Column_Position);
+ procedure Move (Pan : Panel;
+ Line : Line_Position;
+ Column : Column_Position);
-- AKA
pragma Inline (Move);
diff --git a/Ada95/gen/terminal_interface-curses-trace.ads.m4 b/Ada95/gen/terminal_interface-curses-trace.ads.m4
index 546004f..e227343 100644
--- a/Ada95/gen/terminal_interface-curses-trace.ads.m4
+++ b/Ada95/gen/terminal_interface-curses-trace.ads.m4
@@ -9,7 +9,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000 Free Software Foundation, Inc. --
+-- Copyright (c) 2000,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -37,16 +37,62 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control:
--- $Revision: 1.1 $
+-- $Revision: 1.4 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Trace is
pragma Preelaborate (Terminal_Interface.Curses.Trace);
- pragma Warnings (Off);
-include(`Trace_Defs')
+ type Trace_Attribute_Set is
+ record
+ Times : Boolean;
+ Tputs : Boolean;
+ Update : Boolean;
+ Cursor_Move : Boolean;
+ Character_Output : Boolean;
+ Calls : Boolean;
+ Virtual_Puts : Boolean;
+ Input_Events : Boolean;
+ TTY_State : Boolean;
+ Internal_Calls : Boolean;
+ Character_Calls : Boolean;
+ Termcap_TermInfo : Boolean;
+ Attribute_Color : Boolean;
+ end record;
+ pragma Convention (C_Pass_By_Copy, Trace_Attribute_Set);
+ for Trace_Attribute_Set use
+ record
+ Times at 0 range Curses_Constants.TRACE_TIMES_First
+ .. Curses_Constants.TRACE_TIMES_Last;
+ Tputs at 0 range Curses_Constants.TRACE_TPUTS_First
+ .. Curses_Constants.TRACE_TPUTS_Last;
+ Update at 0 range Curses_Constants.TRACE_UPDATE_First
+ .. Curses_Constants.TRACE_UPDATE_Last;
+ Cursor_Move at 0 range Curses_Constants.TRACE_MOVE_First
+ .. Curses_Constants.TRACE_MOVE_Last;
+ Character_Output at 0 range Curses_Constants.TRACE_CHARPUT_First
+ .. Curses_Constants.TRACE_CHARPUT_Last;
+ Calls at 0 range Curses_Constants.TRACE_CALLS_First
+ .. Curses_Constants.TRACE_CALLS_Last;
+ Virtual_Puts at 0 range Curses_Constants.TRACE_VIRTPUT_First
+ .. Curses_Constants.TRACE_VIRTPUT_Last;
+ Input_Events at 0 range Curses_Constants.TRACE_IEVENT_First
+ .. Curses_Constants.TRACE_IEVENT_Last;
+ TTY_State at 0 range Curses_Constants.TRACE_BITS_First
+ .. Curses_Constants.TRACE_BITS_Last;
+ Internal_Calls at 0 range Curses_Constants.TRACE_ICALLS_First
+ .. Curses_Constants.TRACE_ICALLS_Last;
+ Character_Calls at 0 range Curses_Constants.TRACE_CCALLS_First
+ .. Curses_Constants.TRACE_CCALLS_Last;
+ Termcap_TermInfo at 0 range Curses_Constants.TRACE_DATABASE_First
+ .. Curses_Constants.TRACE_DATABASE_Last;
+ Attribute_Color at 0 range Curses_Constants.TRACE_ATTRS_First
+ .. Curses_Constants.TRACE_ATTRS_Last;
+ end record;
+ pragma Warnings (Off);
+ for Trace_Attribute_Set'Size use Curses_Constants.Trace_Size;
pragma Warnings (On);
Trace_Disable : constant Trace_Attribute_Set := (others => False);
diff --git a/Ada95/gen/terminal_interface-curses.adb.m4 b/Ada95/gen/terminal_interface-curses.adb.m4
index 75ddb96..b98782b 100644
--- a/Ada95/gen/terminal_interface-curses.adb.m4
+++ b/Ada95/gen/terminal_interface-curses.adb.m4
@@ -9,7 +9,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -37,8 +37,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.5 $
--- $Date: 2008/07/26 18:46:32 $
+-- $Revision: 1.14 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with System;
@@ -61,7 +61,7 @@
pragma Convention (C, chtype_array);
------------------------------------------------------------------------------
- function Key_Name (Key : in Real_Key_Code) return String
+ function Key_Name (Key : Real_Key_Code) return String
is
function Keyname (K : C_Int) return chars_ptr;
pragma Import (C, Keyname, "keyname");
@@ -89,7 +89,7 @@
end if;
end Key_Name;
- procedure Key_Name (Key : in Real_Key_Code;
+ procedure Key_Name (Key : Real_Key_Code;
Name : out String)
is
begin
@@ -132,9 +132,9 @@
end if;
end Is_End_Window;
------------------------------------------------------------------------------
- procedure Move_Cursor (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position)
+ procedure Move_Cursor (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position)
is
function Wmove (Win : Window;
Line : C_Int;
@@ -147,20 +147,20 @@
end if;
end Move_Cursor;
------------------------------------------------------------------------------
- procedure Add (Win : in Window := Standard_Window;
- Ch : in Attributed_Character)
+ procedure Add (Win : Window := Standard_Window;
+ Ch : Attributed_Character)
is
function Waddch (W : Window;
- Ch : C_Chtype) return C_Int;
+ Ch : Attributed_Character) return C_Int;
pragma Import (C, Waddch, "waddch");
begin
- if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
+ if Waddch (Win, Ch) = Curses_Err then
raise Curses_Exception;
end if;
end Add;
- procedure Add (Win : in Window := Standard_Window;
- Ch : in Character)
+ procedure Add (Win : Window := Standard_Window;
+ Ch : Character)
is
begin
Add (Win,
@@ -170,29 +170,30 @@
end Add;
procedure Add
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Ch : in Attributed_Character)
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Ch : Attributed_Character)
is
function mvwaddch (W : Window;
Y : C_Int;
X : C_Int;
- Ch : C_Chtype) return C_Int;
+ Ch : Attributed_Character) return C_Int;
pragma Import (C, mvwaddch, "mvwaddch");
begin
if mvwaddch (Win, C_Int (Line),
C_Int (Column),
- AttrChar_To_Chtype (Ch)) = Curses_Err then
+ Ch) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Add;
procedure Add
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Ch : in Character)
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Ch : Character)
is
begin
Add (Win,
@@ -204,21 +205,21 @@
end Add;
procedure Add_With_Immediate_Echo
- (Win : in Window := Standard_Window;
- Ch : in Attributed_Character)
+ (Win : Window := Standard_Window;
+ Ch : Attributed_Character)
is
function Wechochar (W : Window;
- Ch : C_Chtype) return C_Int;
+ Ch : Attributed_Character) return C_Int;
pragma Import (C, Wechochar, "wechochar");
begin
- if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
+ if Wechochar (Win, Ch) = Curses_Err then
raise Curses_Exception;
end if;
end Add_With_Immediate_Echo;
procedure Add_With_Immediate_Echo
- (Win : in Window := Standard_Window;
- Ch : in Character)
+ (Win : Window := Standard_Window;
+ Ch : Character)
is
begin
Add_With_Immediate_Echo
@@ -331,9 +332,9 @@
return W;
end Duplicate;
- procedure Move_Window (Win : in Window;
- Line : in Line_Position;
- Column : in Column_Position)
+ procedure Move_Window (Win : Window;
+ Line : Line_Position;
+ Column : Column_Position)
is
function Mvwin (Win : Window;
Line : C_Int;
@@ -345,9 +346,9 @@
end if;
end Move_Window;
- procedure Move_Derived_Window (Win : in Window;
- Line : in Line_Position;
- Column : in Column_Position)
+ procedure Move_Derived_Window (Win : Window;
+ Line : Line_Position;
+ Column : Column_Position)
is
function Mvderwin (Win : Window;
Line : C_Int;
@@ -359,8 +360,8 @@
end if;
end Move_Derived_Window;
- procedure Set_Synch_Mode (Win : in Window := Standard_Window;
- Mode : in Boolean := False)
+ procedure Set_Synch_Mode (Win : Window := Standard_Window;
+ Mode : Boolean := False)
is
function Syncok (Win : Window;
Mode : Curses_Bool) return C_Int;
@@ -371,9 +372,9 @@
end if;
end Set_Synch_Mode;
------------------------------------------------------------------------------
- procedure Add (Win : in Window := Standard_Window;
- Str : in String;
- Len : in Integer := -1)
+ procedure Add (Win : Window := Standard_Window;
+ Str : String;
+ Len : Integer := -1)
is
function Waddnstr (Win : Window;
Str : char_array;
@@ -390,11 +391,11 @@
end Add;
procedure Add
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Str : in String;
- Len : in Integer := -1)
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Str : String;
+ Len : Integer := -1)
is
begin
Move_Cursor (Win, Line, Column);
@@ -402,9 +403,9 @@
end Add;
------------------------------------------------------------------------------
procedure Add
- (Win : in Window := Standard_Window;
- Str : in Attributed_String;
- Len : in Integer := -1)
+ (Win : Window := Standard_Window;
+ Str : Attributed_String;
+ Len : Integer := -1)
is
function Waddchnstr (Win : Window;
Str : chtype_array;
@@ -419,17 +420,18 @@
Txt (Str'Length) := Default_Character;
if Waddchnstr (Win,
Txt,
- C_Int (Len)) = Curses_Err then
+ C_Int (Len)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Add;
procedure Add
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Str : in Attributed_String;
- Len : in Integer := -1)
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Str : Attributed_String;
+ Len : Integer := -1)
is
begin
Move_Cursor (Win, Line, Column);
@@ -437,46 +439,45 @@
end Add;
------------------------------------------------------------------------------
procedure Border
- (Win : in Window := Standard_Window;
- Left_Side_Symbol : in Attributed_Character := Default_Character;
- Right_Side_Symbol : in Attributed_Character := Default_Character;
- Top_Side_Symbol : in Attributed_Character := Default_Character;
- Bottom_Side_Symbol : in Attributed_Character := Default_Character;
- Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character;
- Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
- Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character;
- Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character)
+ (Win : Window := Standard_Window;
+ Left_Side_Symbol : Attributed_Character := Default_Character;
+ Right_Side_Symbol : Attributed_Character := Default_Character;
+ Top_Side_Symbol : Attributed_Character := Default_Character;
+ Bottom_Side_Symbol : Attributed_Character := Default_Character;
+ Upper_Left_Corner_Symbol : Attributed_Character := Default_Character;
+ Upper_Right_Corner_Symbol : Attributed_Character := Default_Character;
+ Lower_Left_Corner_Symbol : Attributed_Character := Default_Character;
+ Lower_Right_Corner_Symbol : Attributed_Character := Default_Character)
is
function Wborder (W : Window;
- LS : C_Chtype;
- RS : C_Chtype;
- TS : C_Chtype;
- BS : C_Chtype;
- ULC : C_Chtype;
- URC : C_Chtype;
- LLC : C_Chtype;
- LRC : C_Chtype) return C_Int;
+ LS : Attributed_Character;
+ RS : Attributed_Character;
+ TS : Attributed_Character;
+ BS : Attributed_Character;
+ ULC : Attributed_Character;
+ URC : Attributed_Character;
+ LLC : Attributed_Character;
+ LRC : Attributed_Character) return C_Int;
pragma Import (C, Wborder, "wborder");
begin
if Wborder (Win,
- AttrChar_To_Chtype (Left_Side_Symbol),
- AttrChar_To_Chtype (Right_Side_Symbol),
- AttrChar_To_Chtype (Top_Side_Symbol),
- AttrChar_To_Chtype (Bottom_Side_Symbol),
- AttrChar_To_Chtype (Upper_Left_Corner_Symbol),
- AttrChar_To_Chtype (Upper_Right_Corner_Symbol),
- AttrChar_To_Chtype (Lower_Left_Corner_Symbol),
- AttrChar_To_Chtype (Lower_Right_Corner_Symbol)
- ) = Curses_Err
+ Left_Side_Symbol,
+ Right_Side_Symbol,
+ Top_Side_Symbol,
+ Bottom_Side_Symbol,
+ Upper_Left_Corner_Symbol,
+ Upper_Right_Corner_Symbol,
+ Lower_Left_Corner_Symbol,
+ Lower_Right_Corner_Symbol) = Curses_Err
then
raise Curses_Exception;
end if;
end Border;
procedure Box
- (Win : in Window := Standard_Window;
- Vertical_Symbol : in Attributed_Character := Default_Character;
- Horizontal_Symbol : in Attributed_Character := Default_Character)
+ (Win : Window := Standard_Window;
+ Vertical_Symbol : Attributed_Character := Default_Character;
+ Horizontal_Symbol : Attributed_Character := Default_Character)
is
begin
Border (Win,
@@ -485,35 +486,37 @@
end Box;
procedure Horizontal_Line
- (Win : in Window := Standard_Window;
- Line_Size : in Natural;
- Line_Symbol : in Attributed_Character := Default_Character)
+ (Win : Window := Standard_Window;
+ Line_Size : Natural;
+ Line_Symbol : Attributed_Character := Default_Character)
is
function Whline (W : Window;
- Ch : C_Chtype;
+ Ch : Attributed_Character;
Len : C_Int) return C_Int;
pragma Import (C, Whline, "whline");
begin
if Whline (Win,
- AttrChar_To_Chtype (Line_Symbol),
- C_Int (Line_Size)) = Curses_Err then
+ Line_Symbol,
+ C_Int (Line_Size)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Horizontal_Line;
procedure Vertical_Line
- (Win : in Window := Standard_Window;
- Line_Size : in Natural;
- Line_Symbol : in Attributed_Character := Default_Character)
+ (Win : Window := Standard_Window;
+ Line_Size : Natural;
+ Line_Symbol : Attributed_Character := Default_Character)
is
function Wvline (W : Window;
- Ch : C_Chtype;
+ Ch : Attributed_Character;
Len : C_Int) return C_Int;
pragma Import (C, Wvline, "wvline");
begin
if Wvline (Win,
- AttrChar_To_Chtype (Line_Symbol),
- C_Int (Line_Size)) = Curses_Err then
+ Line_Symbol,
+ C_Int (Line_Size)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Vertical_Line;
@@ -534,7 +537,7 @@
end if;
end Get_Keystroke;
- procedure Undo_Keystroke (Key : in Real_Key_Code)
+ procedure Undo_Keystroke (Key : Real_Key_Code)
is
function Ungetch (Ch : C_Int) return C_Int;
pragma Import (C, Ungetch, "ungetch");
@@ -606,15 +609,15 @@
end Standout;
procedure Switch_Character_Attribute
- (Win : in Window := Standard_Window;
- Attr : in Character_Attribute_Set := Normal_Video;
- On : in Boolean := True)
+ (Win : Window := Standard_Window;
+ Attr : Character_Attribute_Set := Normal_Video;
+ On : Boolean := True)
is
function Wattron (Win : Window;
- C_Attr : C_AttrType) return C_Int;
+ C_Attr : Attributed_Character) return C_Int;
pragma Import (C, Wattron, "wattr_on");
function Wattroff (Win : Window;
- C_Attr : C_AttrType) return C_Int;
+ C_Attr : Attributed_Character) return C_Int;
pragma Import (C, Wattroff, "wattr_off");
-- In Ada we use the On Boolean to control whether or not we want to
-- switch on or off the attributes in the set.
@@ -624,9 +627,9 @@
Attr => Attr);
begin
if On then
- Err := Wattron (Win, AttrChar_To_AttrType (AC));
+ Err := Wattron (Win, AC);
else
- Err := Wattroff (Win, AttrChar_To_AttrType (AC));
+ Err := Wattroff (Win, AC);
end if;
if Err = Curses_Err then
raise Curses_Exception;
@@ -634,19 +637,18 @@
end Switch_Character_Attribute;
procedure Set_Character_Attributes
- (Win : in Window := Standard_Window;
- Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Win : Window := Standard_Window;
+ Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
function Wattrset (Win : Window;
- C_Attr : C_AttrType) return C_Int;
+ C_Attr : Attributed_Character) return C_Int;
pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set
begin
- if Wattrset (Win,
- AttrChar_To_AttrType (Attributed_Character'
- (Ch => Character'First,
- Color => Color,
- Attr => Attr))) = Curses_Err then
+ if Wattrset (Win, (Ch => Character'First,
+ Color => Color,
+ Attr => Attr)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Set_Character_Attributes;
@@ -655,20 +657,18 @@
return Character_Attribute_Set
is
function Wattrget (Win : Window;
- Atr : access C_AttrType;
+ Atr : access Attributed_Character;
Col : access C_Short;
Opt : System.Address) return C_Int;
pragma Import (C, Wattrget, "wattr_get");
- Attr : aliased C_AttrType;
+ Attr : aliased Attributed_Character;
Col : aliased C_Short;
Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access,
System.Null_Address);
- Ch : Attributed_Character;
begin
if Res = Curses_Ok then
- Ch := AttrType_To_AttrChar (Attr);
- return Ch.Attr;
+ return Attr.Attr;
else
raise Curses_Exception;
end if;
@@ -678,27 +678,25 @@
return Color_Pair
is
function Wattrget (Win : Window;
- Atr : access C_AttrType;
+ Atr : access Attributed_Character;
Col : access C_Short;
Opt : System.Address) return C_Int;
pragma Import (C, Wattrget, "wattr_get");
- Attr : aliased C_AttrType;
+ Attr : aliased Attributed_Character;
Col : aliased C_Short;
Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access,
System.Null_Address);
- Ch : Attributed_Character;
begin
if Res = Curses_Ok then
- Ch := AttrType_To_AttrChar (Attr);
- return Ch.Color;
+ return Attr.Color;
else
raise Curses_Exception;
end if;
end Get_Character_Attribute;
- procedure Set_Color (Win : in Window := Standard_Window;
- Pair : in Color_Pair)
+ procedure Set_Color (Win : Window := Standard_Window;
+ Pair : Color_Pair)
is
function Wset_Color (Win : Window;
Color : C_Short;
@@ -707,41 +705,44 @@
begin
if Wset_Color (Win,
C_Short (Pair),
- C_Void_Ptr (System.Null_Address)) = Curses_Err then
+ C_Void_Ptr (System.Null_Address)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Set_Color;
procedure Change_Attributes
- (Win : in Window := Standard_Window;
- Count : in Integer := -1;
- Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Win : Window := Standard_Window;
+ Count : Integer := -1;
+ Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
function Wchgat (Win : Window;
Cnt : C_Int;
- Attr : C_AttrType;
+ Attr : Attributed_Character;
Color : C_Short;
Opts : System.Address := System.Null_Address)
return C_Int;
pragma Import (C, Wchgat, "wchgat");
-
- Ch : constant Attributed_Character :=
- (Ch => Character'First, Color => Color_Pair'First, Attr => Attr);
begin
- if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch),
- C_Short (Color)) = Curses_Err then
+ if Wchgat (Win,
+ C_Int (Count),
+ (Ch => Character'First,
+ Color => Color_Pair'First,
+ Attr => Attr),
+ C_Short (Color)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Change_Attributes;
procedure Change_Attributes
- (Win : in Window := Standard_Window;
- Line : in Line_Position := Line_Position'First;
- Column : in Column_Position := Column_Position'First;
- Count : in Integer := -1;
- Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Win : Window := Standard_Window;
+ Line : Line_Position := Line_Position'First;
+ Column : Column_Position := Column_Position'First;
+ Count : Integer := -1;
+ Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
begin
Move_Cursor (Win, Line, Column);
@@ -768,7 +769,7 @@
end if;
end Flash_Screen;
------------------------------------------------------------------------------
- procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True)
+ procedure Set_Cbreak_Mode (SwitchOn : Boolean := True)
is
function Cbreak return C_Int;
pragma Import (C, Cbreak, "cbreak");
@@ -787,7 +788,7 @@
end if;
end Set_Cbreak_Mode;
- procedure Set_Raw_Mode (SwitchOn : in Boolean := True)
+ procedure Set_Raw_Mode (SwitchOn : Boolean := True)
is
function Raw return C_Int;
pragma Import (C, Raw, "raw");
@@ -806,7 +807,7 @@
end if;
end Set_Raw_Mode;
- procedure Set_Echo_Mode (SwitchOn : in Boolean := True)
+ procedure Set_Echo_Mode (SwitchOn : Boolean := True)
is
function Echo return C_Int;
pragma Import (C, Echo, "echo");
@@ -825,8 +826,8 @@
end if;
end Set_Echo_Mode;
- procedure Set_Meta_Mode (Win : in Window := Standard_Window;
- SwitchOn : in Boolean := True)
+ procedure Set_Meta_Mode (Win : Window := Standard_Window;
+ SwitchOn : Boolean := True)
is
function Meta (W : Window; Mode : Curses_Bool) return C_Int;
pragma Import (C, Meta, "meta");
@@ -836,8 +837,8 @@
end if;
end Set_Meta_Mode;
- procedure Set_KeyPad_Mode (Win : in Window := Standard_Window;
- SwitchOn : in Boolean := True)
+ procedure Set_KeyPad_Mode (Win : Window := Standard_Window;
+ SwitchOn : Boolean := True)
is
function Keypad (W : Window; Mode : Curses_Bool) return C_Int;
pragma Import (C, Keypad, "keypad");
@@ -847,7 +848,7 @@
end if;
end Set_KeyPad_Mode;
- function Get_KeyPad_Mode (Win : in Window := Standard_Window)
+ function Get_KeyPad_Mode (Win : Window := Standard_Window)
return Boolean
is
function Is_Keypad (W : Window) return Curses_Bool;
@@ -856,7 +857,7 @@
return (Is_Keypad (Win) /= Curses_Bool_False);
end Get_KeyPad_Mode;
- procedure Half_Delay (Amount : in Half_Delay_Amount)
+ procedure Half_Delay (Amount : Half_Delay_Amount)
is
function Halfdelay (Amount : C_Int) return C_Int;
pragma Import (C, Halfdelay, "halfdelay");
@@ -867,8 +868,8 @@
end Half_Delay;
procedure Set_Flush_On_Interrupt_Mode
- (Win : in Window := Standard_Window;
- Mode : in Boolean := True)
+ (Win : Window := Standard_Window;
+ Mode : Boolean := True)
is
function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int;
pragma Import (C, Intrflush, "intrflush");
@@ -879,8 +880,8 @@
end Set_Flush_On_Interrupt_Mode;
procedure Set_Queue_Interrupt_Mode
- (Win : in Window := Standard_Window;
- Flush : in Boolean := True)
+ (Win : Window := Standard_Window;
+ Flush : Boolean := True)
is
procedure Qiflush;
pragma Import (C, Qiflush, "qiflush");
@@ -898,8 +899,8 @@
end Set_Queue_Interrupt_Mode;
procedure Set_NoDelay_Mode
- (Win : in Window := Standard_Window;
- Mode : in Boolean := False)
+ (Win : Window := Standard_Window;
+ Mode : Boolean := False)
is
function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int;
pragma Import (C, Nodelay, "nodelay");
@@ -909,9 +910,9 @@
end if;
end Set_NoDelay_Mode;
- procedure Set_Timeout_Mode (Win : in Window := Standard_Window;
- Mode : in Timeout_Mode;
- Amount : in Natural)
+ procedure Set_Timeout_Mode (Win : Window := Standard_Window;
+ Mode : Timeout_Mode;
+ Amount : Natural)
is
procedure Wtimeout (Win : Window; Amount : C_Int);
pragma Import (C, Wtimeout, "wtimeout");
@@ -931,20 +932,21 @@
end Set_Timeout_Mode;
procedure Set_Escape_Timer_Mode
- (Win : in Window := Standard_Window;
- Timer_Off : in Boolean := False)
+ (Win : Window := Standard_Window;
+ Timer_Off : Boolean := False)
is
function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int;
pragma Import (C, Notimeout, "notimeout");
begin
if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off)))
- = Curses_Err then
+ = Curses_Err
+ then
raise Curses_Exception;
end if;
end Set_Escape_Timer_Mode;
------------------------------------------------------------------------------
- procedure Set_NL_Mode (SwitchOn : in Boolean := True)
+ procedure Set_NL_Mode (SwitchOn : Boolean := True)
is
function NL return C_Int;
pragma Import (C, NL, "nl");
@@ -964,8 +966,8 @@
end Set_NL_Mode;
procedure Clear_On_Next_Update
- (Win : in Window := Standard_Window;
- Do_Clear : in Boolean := True)
+ (Win : Window := Standard_Window;
+ Do_Clear : Boolean := True)
is
function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int;
pragma Import (C, Clear_Ok, "clearok");
@@ -976,8 +978,8 @@
end Clear_On_Next_Update;
procedure Use_Insert_Delete_Line
- (Win : in Window := Standard_Window;
- Do_Idl : in Boolean := True)
+ (Win : Window := Standard_Window;
+ Do_Idl : Boolean := True)
is
function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int;
pragma Import (C, IDL_Ok, "idlok");
@@ -988,8 +990,8 @@
end Use_Insert_Delete_Line;
procedure Use_Insert_Delete_Character
- (Win : in Window := Standard_Window;
- Do_Idc : in Boolean := True)
+ (Win : Window := Standard_Window;
+ Do_Idc : Boolean := True)
is
procedure IDC_Ok (W : Window; Flag : Curses_Bool);
pragma Import (C, IDC_Ok, "idcok");
@@ -998,8 +1000,8 @@
end Use_Insert_Delete_Character;
procedure Leave_Cursor_After_Update
- (Win : in Window := Standard_Window;
- Do_Leave : in Boolean := True)
+ (Win : Window := Standard_Window;
+ Do_Leave : Boolean := True)
is
function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int;
pragma Import (C, Leave_Ok, "leaveok");
@@ -1010,8 +1012,8 @@
end Leave_Cursor_After_Update;
procedure Immediate_Update_Mode
- (Win : in Window := Standard_Window;
- Mode : in Boolean := False)
+ (Win : Window := Standard_Window;
+ Mode : Boolean := False)
is
procedure Immedok (Win : Window; Mode : Curses_Bool);
pragma Import (C, Immedok, "immedok");
@@ -1020,8 +1022,8 @@
end Immediate_Update_Mode;
procedure Allow_Scrolling
- (Win : in Window := Standard_Window;
- Mode : in Boolean := False)
+ (Win : Window := Standard_Window;
+ Mode : Boolean := False)
is
function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int;
pragma Import (C, Scrollok, "scrollok");
@@ -1041,9 +1043,9 @@
end Scrolling_Allowed;
procedure Set_Scroll_Region
- (Win : in Window := Standard_Window;
- Top_Line : in Line_Position;
- Bottom_Line : in Line_Position)
+ (Win : Window := Standard_Window;
+ Top_Line : Line_Position;
+ Bottom_Line : Line_Position)
is
function Wsetscrreg (Win : Window;
Lin : C_Int;
@@ -1051,7 +1053,8 @@
pragma Import (C, Wsetscrreg, "wsetscrreg");
begin
if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line))
- = Curses_Err then
+ = Curses_Err
+ then
raise Curses_Exception;
end if;
end Set_Scroll_Region;
@@ -1066,7 +1069,7 @@
end if;
end Update_Screen;
- procedure Refresh (Win : in Window := Standard_Window)
+ procedure Refresh (Win : Window := Standard_Window)
is
function Wrefresh (W : Window) return C_Int;
pragma Import (C, Wrefresh, "wrefresh");
@@ -1077,7 +1080,7 @@
end Refresh;
procedure Refresh_Without_Update
- (Win : in Window := Standard_Window)
+ (Win : Window := Standard_Window)
is
function Wnoutrefresh (W : Window) return C_Int;
pragma Import (C, Wnoutrefresh, "wnoutrefresh");
@@ -1087,7 +1090,7 @@
end if;
end Refresh_Without_Update;
- procedure Redraw (Win : in Window := Standard_Window)
+ procedure Redraw (Win : Window := Standard_Window)
is
function Redrawwin (Win : Window) return C_Int;
pragma Import (C, Redrawwin, "redrawwin");
@@ -1098,9 +1101,9 @@
end Redraw;
procedure Redraw
- (Win : in Window := Standard_Window;
- Begin_Line : in Line_Position;
- Line_Count : in Positive)
+ (Win : Window := Standard_Window;
+ Begin_Line : Line_Position;
+ Line_Count : Positive)
is
function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int)
return C_Int;
@@ -1108,13 +1111,14 @@
begin
if Wredrawln (Win,
C_Int (Begin_Line),
- C_Int (Line_Count)) = Curses_Err then
+ C_Int (Line_Count)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Redraw;
------------------------------------------------------------------------------
- procedure Erase (Win : in Window := Standard_Window)
+ procedure Erase (Win : Window := Standard_Window)
is
function Werase (W : Window) return C_Int;
pragma Import (C, Werase, "werase");
@@ -1124,7 +1128,7 @@
end if;
end Erase;
- procedure Clear (Win : in Window := Standard_Window)
+ procedure Clear (Win : Window := Standard_Window)
is
function Wclear (W : Window) return C_Int;
pragma Import (C, Wclear, "wclear");
@@ -1134,7 +1138,7 @@
end if;
end Clear;
- procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window)
+ procedure Clear_To_End_Of_Screen (Win : Window := Standard_Window)
is
function Wclearbot (W : Window) return C_Int;
pragma Import (C, Wclearbot, "wclrtobot");
@@ -1144,7 +1148,7 @@
end if;
end Clear_To_End_Of_Screen;
- procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window)
+ procedure Clear_To_End_Of_Line (Win : Window := Standard_Window)
is
function Wcleareol (W : Window) return C_Int;
pragma Import (C, Wcleareol, "wclrtoeol");
@@ -1155,23 +1159,24 @@
end Clear_To_End_Of_Line;
------------------------------------------------------------------------------
procedure Set_Background
- (Win : in Window := Standard_Window;
- Ch : in Attributed_Character)
+ (Win : Window := Standard_Window;
+ Ch : Attributed_Character)
is
- procedure WBackground (W : in Window; Ch : in C_Chtype);
+ procedure WBackground (W : Window; Ch : Attributed_Character);
pragma Import (C, WBackground, "wbkgdset");
begin
- WBackground (Win, AttrChar_To_Chtype (Ch));
+ WBackground (Win, Ch);
end Set_Background;
procedure Change_Background
- (Win : in Window := Standard_Window;
- Ch : in Attributed_Character)
+ (Win : Window := Standard_Window;
+ Ch : Attributed_Character)
is
- function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int;
+ function WChangeBkgd (W : Window; Ch : Attributed_Character)
+ return C_Int;
pragma Import (C, WChangeBkgd, "wbkgd");
begin
- if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
+ if WChangeBkgd (Win, Ch) = Curses_Err then
raise Curses_Exception;
end if;
end Change_Background;
@@ -1179,16 +1184,16 @@
function Get_Background (Win : Window := Standard_Window)
return Attributed_Character
is
- function Wgetbkgd (Win : Window) return C_Chtype;
+ function Wgetbkgd (Win : Window) return Attributed_Character;
pragma Import (C, Wgetbkgd, "getbkgd");
begin
- return Chtype_To_AttrChar (Wgetbkgd (Win));
+ return Wgetbkgd (Win);
end Get_Background;
------------------------------------------------------------------------------
- procedure Change_Lines_Status (Win : in Window := Standard_Window;
- Start : in Line_Position;
- Count : in Positive;
- State : in Boolean)
+ procedure Change_Lines_Status (Win : Window := Standard_Window;
+ Start : Line_Position;
+ Count : Positive;
+ State : Boolean)
is
function Wtouchln (Win : Window;
Sta : C_Int;
@@ -1197,32 +1202,35 @@
pragma Import (C, Wtouchln, "wtouchln");
begin
if Wtouchln (Win, C_Int (Start), C_Int (Count),
- C_Int (Boolean'Pos (State))) = Curses_Err then
+ C_Int (Boolean'Pos (State))) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Change_Lines_Status;
- procedure Touch (Win : in Window := Standard_Window)
+ procedure Touch (Win : Window := Standard_Window)
is
Y : Line_Position;
X : Column_Position;
begin
Get_Size (Win, Y, X);
+ pragma Warnings (Off, X); -- unreferenced
Change_Lines_Status (Win, 0, Positive (Y), True);
end Touch;
- procedure Untouch (Win : in Window := Standard_Window)
+ procedure Untouch (Win : Window := Standard_Window)
is
Y : Line_Position;
X : Column_Position;
begin
Get_Size (Win, Y, X);
+ pragma Warnings (Off, X); -- unreferenced
Change_Lines_Status (Win, 0, Positive (Y), False);
end Untouch;
- procedure Touch (Win : in Window := Standard_Window;
- Start : in Line_Position;
- Count : in Positive)
+ procedure Touch (Win : Window := Standard_Window;
+ Start : Line_Position;
+ Count : Positive)
is
begin
Change_Lines_Status (Win, Start, Count, True);
@@ -1256,15 +1264,15 @@
end Is_Touched;
------------------------------------------------------------------------------
procedure Copy
- (Source_Window : in Window;
- Destination_Window : in Window;
- Source_Top_Row : in Line_Position;
- Source_Left_Column : in Column_Position;
- Destination_Top_Row : in Line_Position;
- Destination_Left_Column : in Column_Position;
- Destination_Bottom_Row : in Line_Position;
- Destination_Right_Column : in Column_Position;
- Non_Destructive_Mode : in Boolean := True)
+ (Source_Window : Window;
+ Destination_Window : Window;
+ Source_Top_Row : Line_Position;
+ Source_Left_Column : Column_Position;
+ Destination_Top_Row : Line_Position;
+ Destination_Left_Column : Column_Position;
+ Destination_Bottom_Row : Line_Position;
+ Destination_Right_Column : Column_Position;
+ Non_Destructive_Mode : Boolean := True)
is
function Copywin (Src : Window;
Dst : Window;
@@ -1286,14 +1294,15 @@
C_Int (Destination_Bottom_Row),
C_Int (Destination_Right_Column),
Boolean'Pos (Non_Destructive_Mode)
- ) = Curses_Err then
+ ) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Copy;
procedure Overwrite
- (Source_Window : in Window;
- Destination_Window : in Window)
+ (Source_Window : Window;
+ Destination_Window : Window)
is
function Overwrite (Src : Window; Dst : Window) return C_Int;
pragma Import (C, Overwrite, "overwrite");
@@ -1304,8 +1313,8 @@
end Overwrite;
procedure Overlay
- (Source_Window : in Window;
- Destination_Window : in Window)
+ (Source_Window : Window;
+ Destination_Window : Window)
is
function Overlay (Src : Window; Dst : Window) return C_Int;
pragma Import (C, Overlay, "overlay");
@@ -1317,8 +1326,8 @@
------------------------------------------------------------------------------
procedure Insert_Delete_Lines
- (Win : in Window := Standard_Window;
- Lines : in Integer := 1) -- default is to insert one line above
+ (Win : Window := Standard_Window;
+ Lines : Integer := 1) -- default is to insert one line above
is
function Winsdelln (W : Window; N : C_Int) return C_Int;
pragma Import (C, Winsdelln, "winsdelln");
@@ -1328,13 +1337,13 @@
end if;
end Insert_Delete_Lines;
- procedure Delete_Line (Win : in Window := Standard_Window)
+ procedure Delete_Line (Win : Window := Standard_Window)
is
begin
Insert_Delete_Lines (Win, -1);
end Delete_Line;
- procedure Insert_Line (Win : in Window := Standard_Window)
+ procedure Insert_Line (Win : Window := Standard_Window)
is
begin
Insert_Delete_Lines (Win, 1);
@@ -1342,7 +1351,7 @@
------------------------------------------------------------------------------
procedure Get_Size
- (Win : in Window := Standard_Window;
+ (Win : Window := Standard_Window;
Number_Of_Lines : out Line_Count;
Number_Of_Columns : out Column_Count)
is
@@ -1352,17 +1361,15 @@
function GetMaxX (W : Window) return C_Int;
pragma Import (C, GetMaxX, "getmaxx");
- Y : constant C_Int := GetMaxY (Win)
- + C_Int (Offset_XY);
- X : constant C_Int := GetMaxX (Win)
- + C_Int (Offset_XY);
+ Y : constant C_Int := GetMaxY (Win);
+ X : constant C_Int := GetMaxX (Win);
begin
Number_Of_Lines := Line_Count (Y);
Number_Of_Columns := Column_Count (X);
end Get_Size;
procedure Get_Window_Position
- (Win : in Window := Standard_Window;
+ (Win : Window := Standard_Window;
Top_Left_Line : out Line_Position;
Top_Left_Column : out Column_Position)
is
@@ -1380,7 +1387,7 @@
end Get_Window_Position;
procedure Get_Cursor_Position
- (Win : in Window := Standard_Window;
+ (Win : Window := Standard_Window;
Line : out Line_Position;
Column : out Column_Position)
is
@@ -1398,7 +1405,7 @@
end Get_Cursor_Position;
procedure Get_Origin_Relative_To_Parent
- (Win : in Window;
+ (Win : Window;
Top_Left_Line : out Line_Position;
Top_Left_Column : out Column_Position;
Is_Not_A_Subwindow : out Boolean)
@@ -1467,13 +1474,13 @@
end Sub_Pad;
procedure Refresh
- (Pad : in Window;
- Source_Top_Row : in Line_Position;
- Source_Left_Column : in Column_Position;
- Destination_Top_Row : in Line_Position;
- Destination_Left_Column : in Column_Position;
- Destination_Bottom_Row : in Line_Position;
- Destination_Right_Column : in Column_Position)
+ (Pad : Window;
+ Source_Top_Row : Line_Position;
+ Source_Left_Column : Column_Position;
+ Destination_Top_Row : Line_Position;
+ Destination_Left_Column : Column_Position;
+ Destination_Bottom_Row : Line_Position;
+ Destination_Right_Column : Column_Position)
is
function Prefresh
(Pad : Window;
@@ -1491,19 +1498,20 @@
C_Int (Destination_Top_Row),
C_Int (Destination_Left_Column),
C_Int (Destination_Bottom_Row),
- C_Int (Destination_Right_Column)) = Curses_Err then
+ C_Int (Destination_Right_Column)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Refresh;
procedure Refresh_Without_Update
- (Pad : in Window;
- Source_Top_Row : in Line_Position;
- Source_Left_Column : in Column_Position;
- Destination_Top_Row : in Line_Position;
- Destination_Left_Column : in Column_Position;
- Destination_Bottom_Row : in Line_Position;
- Destination_Right_Column : in Column_Position)
+ (Pad : Window;
+ Source_Top_Row : Line_Position;
+ Source_Left_Column : Column_Position;
+ Destination_Top_Row : Line_Position;
+ Destination_Left_Column : Column_Position;
+ Destination_Bottom_Row : Line_Position;
+ Destination_Right_Column : Column_Position)
is
function Pnoutrefresh
(Pad : Window;
@@ -1521,27 +1529,28 @@
C_Int (Destination_Top_Row),
C_Int (Destination_Left_Column),
C_Int (Destination_Bottom_Row),
- C_Int (Destination_Right_Column)) = Curses_Err then
+ C_Int (Destination_Right_Column)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Refresh_Without_Update;
procedure Add_Character_To_Pad_And_Echo_It
- (Pad : in Window;
- Ch : in Attributed_Character)
+ (Pad : Window;
+ Ch : Attributed_Character)
is
- function Pechochar (Pad : Window; Ch : C_Chtype)
+ function Pechochar (Pad : Window; Ch : Attributed_Character)
return C_Int;
pragma Import (C, Pechochar, "pechochar");
begin
- if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then
+ if Pechochar (Pad, Ch) = Curses_Err then
raise Curses_Exception;
end if;
end Add_Character_To_Pad_And_Echo_It;
procedure Add_Character_To_Pad_And_Echo_It
- (Pad : in Window;
- Ch : in Character)
+ (Pad : Window;
+ Ch : Character)
is
begin
Add_Character_To_Pad_And_Echo_It
@@ -1551,8 +1560,8 @@
Attr => Normal_Video));
end Add_Character_To_Pad_And_Echo_It;
------------------------------------------------------------------------------
- procedure Scroll (Win : in Window := Standard_Window;
- Amount : in Integer := 1)
+ procedure Scroll (Win : Window := Standard_Window;
+ Amount : Integer := 1)
is
function Wscrl (Win : Window; N : C_Int) return C_Int;
pragma Import (C, Wscrl, "wscrl");
@@ -1564,7 +1573,7 @@
end Scroll;
------------------------------------------------------------------------------
- procedure Delete_Character (Win : in Window := Standard_Window)
+ procedure Delete_Character (Win : Window := Standard_Window)
is
function Wdelch (Win : Window) return C_Int;
pragma Import (C, Wdelch, "wdelch");
@@ -1575,9 +1584,9 @@
end Delete_Character;
procedure Delete_Character
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position)
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position)
is
function Mvwdelch (Win : Window;
Lin : C_Int;
@@ -1592,10 +1601,10 @@
function Peek (Win : Window := Standard_Window)
return Attributed_Character
is
- function Winch (Win : Window) return C_Chtype;
+ function Winch (Win : Window) return Attributed_Character;
pragma Import (C, Winch, "winch");
begin
- return Chtype_To_AttrChar (Winch (Win));
+ return Winch (Win);
end Peek;
function Peek
@@ -1605,46 +1614,47 @@
is
function Mvwinch (Win : Window;
Lin : C_Int;
- Col : C_Int) return C_Chtype;
+ Col : C_Int) return Attributed_Character;
pragma Import (C, Mvwinch, "mvwinch");
begin
- return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column)));
+ return Mvwinch (Win, C_Int (Line), C_Int (Column));
end Peek;
------------------------------------------------------------------------------
- procedure Insert (Win : in Window := Standard_Window;
- Ch : in Attributed_Character)
+ procedure Insert (Win : Window := Standard_Window;
+ Ch : Attributed_Character)
is
- function Winsch (Win : Window; Ch : C_Chtype) return C_Int;
+ function Winsch (Win : Window; Ch : Attributed_Character) return C_Int;
pragma Import (C, Winsch, "winsch");
begin
- if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then
+ if Winsch (Win, Ch) = Curses_Err then
raise Curses_Exception;
end if;
end Insert;
procedure Insert
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Ch : in Attributed_Character)
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Ch : Attributed_Character)
is
function Mvwinsch (Win : Window;
Lin : C_Int;
Col : C_Int;
- Ch : C_Chtype) return C_Int;
+ Ch : Attributed_Character) return C_Int;
pragma Import (C, Mvwinsch, "mvwinsch");
begin
if Mvwinsch (Win,
C_Int (Line),
C_Int (Column),
- AttrChar_To_Chtype (Ch)) = Curses_Err then
+ Ch) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Insert;
------------------------------------------------------------------------------
- procedure Insert (Win : in Window := Standard_Window;
- Str : in String;
- Len : in Integer := -1)
+ procedure Insert (Win : Window := Standard_Window;
+ Str : String;
+ Len : Integer := -1)
is
function Winsnstr (Win : Window;
Str : char_array;
@@ -1661,11 +1671,11 @@
end Insert;
procedure Insert
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Str : in String;
- Len : in Integer := -1)
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Str : String;
+ Len : Integer := -1)
is
function Mvwinsnstr (Win : Window;
Line : C_Int;
@@ -1679,14 +1689,15 @@
begin
To_C (Str, Txt, Length);
if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len))
- = Curses_Err then
+ = Curses_Err
+ then
raise Curses_Exception;
end if;
end Insert;
------------------------------------------------------------------------------
- procedure Peek (Win : in Window := Standard_Window;
+ procedure Peek (Win : Window := Standard_Window;
Str : out String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
function Winnstr (Win : Window;
Str : char_array;
@@ -1714,11 +1725,11 @@
end Peek;
procedure Peek
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
Str : out String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
begin
Move_Cursor (Win, Line, Column);
@@ -1726,9 +1737,9 @@
end Peek;
------------------------------------------------------------------------------
procedure Peek
- (Win : in Window := Standard_Window;
+ (Win : Window := Standard_Window;
Str : out Attributed_String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
function Winchnstr (Win : Window;
Str : chtype_array; -- out
@@ -1763,20 +1774,20 @@
end Peek;
procedure Peek
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
Str : out Attributed_String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
begin
Move_Cursor (Win, Line, Column);
Peek (Win, Str, Len);
end Peek;
------------------------------------------------------------------------------
- procedure Get (Win : in Window := Standard_Window;
+ procedure Get (Win : Window := Standard_Window;
Str : out String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
function Wgetnstr (Win : Window;
Str : char_array;
@@ -1804,11 +1815,11 @@
end Get;
procedure Get
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
Str : out String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
begin
Move_Cursor (Win, Line, Column);
@@ -1816,7 +1827,7 @@
end Get;
------------------------------------------------------------------------------
procedure Init_Soft_Label_Keys
- (Format : in Soft_Label_Key_Format := Three_Two_Three)
+ (Format : Soft_Label_Key_Format := Three_Two_Three)
is
function Slk_Init (Fmt : C_Int) return C_Int;
pragma Import (C, Slk_Init, "slk_init");
@@ -1826,9 +1837,9 @@
end if;
end Init_Soft_Label_Keys;
- procedure Set_Soft_Label_Key (Label : in Label_Number;
- Text : in String;
- Fmt : in Label_Justification := Left)
+ procedure Set_Soft_Label_Key (Label : Label_Number;
+ Text : String;
+ Fmt : Label_Justification := Left)
is
function Slk_Set (Label : C_Int;
Txt : char_array;
@@ -1840,7 +1851,8 @@
begin
To_C (Text, Txt, Len);
if Slk_Set (C_Int (Label), Txt,
- C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then
+ C_Int (Label_Justification'Pos (Fmt))) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Set_Soft_Label_Key;
@@ -1865,7 +1877,7 @@
end if;
end Refresh_Soft_Label_Keys_Without_Update;
- procedure Get_Soft_Label_Key (Label : in Label_Number;
+ procedure Get_Soft_Label_Key (Label : Label_Number;
Text : out String)
is
function Slk_Label (Label : C_Int) return chars_ptr;
@@ -1874,7 +1886,7 @@
Fill_String (Slk_Label (C_Int (Label)), Text);
end Get_Soft_Label_Key;
- function Get_Soft_Label_Key (Label : in Label_Number) return String
+ function Get_Soft_Label_Key (Label : Label_Number) return String
is
function Slk_Label (Label : C_Int) return chars_ptr;
pragma Import (C, Slk_Label, "slk_label");
@@ -1913,12 +1925,12 @@
end Touch_Soft_Label_Keys;
procedure Switch_Soft_Label_Key_Attributes
- (Attr : in Character_Attribute_Set;
- On : in Boolean := True)
+ (Attr : Character_Attribute_Set;
+ On : Boolean := True)
is
- function Slk_Attron (Ch : C_Chtype) return C_Int;
+ function Slk_Attron (Ch : Attributed_Character) return C_Int;
pragma Import (C, Slk_Attron, "slk_attron");
- function Slk_Attroff (Ch : C_Chtype) return C_Int;
+ function Slk_Attroff (Ch : Attributed_Character) return C_Int;
pragma Import (C, Slk_Attroff, "slk_attroff");
Err : C_Int;
@@ -1927,9 +1939,9 @@
Color => Color_Pair'First);
begin
if On then
- Err := Slk_Attron (AttrChar_To_Chtype (Ch));
+ Err := Slk_Attron (Ch);
else
- Err := Slk_Attroff (AttrChar_To_Chtype (Ch));
+ Err := Slk_Attroff (Ch);
end if;
if Err = Curses_Err then
raise Curses_Exception;
@@ -1937,44 +1949,44 @@
end Switch_Soft_Label_Key_Attributes;
procedure Set_Soft_Label_Key_Attributes
- (Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
- function Slk_Attrset (Ch : C_Chtype) return C_Int;
+ function Slk_Attrset (Ch : Attributed_Character) return C_Int;
pragma Import (C, Slk_Attrset, "slk_attrset");
Ch : constant Attributed_Character := (Ch => Character'First,
Attr => Attr,
Color => Color);
begin
- if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then
+ if Slk_Attrset (Ch) = Curses_Err then
raise Curses_Exception;
end if;
end Set_Soft_Label_Key_Attributes;
function Get_Soft_Label_Key_Attributes return Character_Attribute_Set
is
- function Slk_Attr return C_Chtype;
+ function Slk_Attr return Attributed_Character;
pragma Import (C, Slk_Attr, "slk_attr");
- Attr : constant C_Chtype := Slk_Attr;
+ Attr : constant Attributed_Character := Slk_Attr;
begin
- return Chtype_To_AttrChar (Attr).Attr;
+ return Attr.Attr;
end Get_Soft_Label_Key_Attributes;
function Get_Soft_Label_Key_Attributes return Color_Pair
is
- function Slk_Attr return C_Chtype;
+ function Slk_Attr return Attributed_Character;
pragma Import (C, Slk_Attr, "slk_attr");
- Attr : constant C_Chtype := Slk_Attr;
+ Attr : constant Attributed_Character := Slk_Attr;
begin
- return Chtype_To_AttrChar (Attr).Color;
+ return Attr.Color;
end Get_Soft_Label_Key_Attributes;
- procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair)
+ procedure Set_Soft_Label_Key_Color (Pair : Color_Pair)
is
- function Slk_Color (Color : in C_Short) return C_Int;
+ function Slk_Color (Color : C_Short) return C_Int;
pragma Import (C, Slk_Color, "slk_color");
begin
if Slk_Color (C_Short (Pair)) = Curses_Err then
@@ -1983,21 +1995,22 @@
end Set_Soft_Label_Key_Color;
------------------------------------------------------------------------------
- procedure Enable_Key (Key : in Special_Key_Code;
- Enable : in Boolean := True)
+ procedure Enable_Key (Key : Special_Key_Code;
+ Enable : Boolean := True)
is
function Keyok (Keycode : C_Int;
On_Off : Curses_Bool) return C_Int;
pragma Import (C, Keyok, "keyok");
begin
if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable)))
- = Curses_Err then
+ = Curses_Err
+ then
raise Curses_Exception;
end if;
end Enable_Key;
------------------------------------------------------------------------------
- procedure Define_Key (Definition : in String;
- Key : in Special_Key_Code)
+ procedure Define_Key (Definition : String;
+ Key : Special_Key_Code)
is
function Defkey (Def : char_array;
Key : C_Int) return C_Int;
@@ -2012,24 +2025,24 @@
end if;
end Define_Key;
------------------------------------------------------------------------------
- procedure Un_Control (Ch : in Attributed_Character;
+ procedure Un_Control (Ch : Attributed_Character;
Str : out String)
is
- function Unctrl (Ch : C_Chtype) return chars_ptr;
+ function Unctrl (Ch : Attributed_Character) return chars_ptr;
pragma Import (C, Unctrl, "unctrl");
begin
- Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str);
+ Fill_String (Unctrl (Ch), Str);
end Un_Control;
- function Un_Control (Ch : in Attributed_Character) return String
+ function Un_Control (Ch : Attributed_Character) return String
is
- function Unctrl (Ch : C_Chtype) return chars_ptr;
+ function Unctrl (Ch : Attributed_Character) return chars_ptr;
pragma Import (C, Unctrl, "unctrl");
begin
- return Fill_String (Unctrl (AttrChar_To_Chtype (Ch)));
+ return Fill_String (Unctrl (Ch));
end Un_Control;
- procedure Delay_Output (Msecs : in Natural)
+ procedure Delay_Output (Msecs : Natural)
is
function Delayoutput (Msecs : C_Int) return C_Int;
pragma Import (C, Delayoutput, "delay_output");
@@ -2099,10 +2112,10 @@
function Supported_Attributes return Character_Attribute_Set
is
- function Termattrs return C_Chtype;
+ function Termattrs return Attributed_Character;
pragma Import (C, Termattrs, "termattrs");
- Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs);
+ Ch : constant Attributed_Character := Termattrs;
begin
return Ch.Attr;
end Supported_Attributes;
@@ -2139,9 +2152,9 @@
return Fill_String (Termname);
end Terminal_Name;
------------------------------------------------------------------------------
- procedure Init_Pair (Pair : in Redefinable_Color_Pair;
- Fore : in Color_Number;
- Back : in Color_Number)
+ procedure Init_Pair (Pair : Redefinable_Color_Pair;
+ Fore : Color_Number;
+ Back : Color_Number)
is
function Initpair (Pair : C_Short;
Fore : C_Short;
@@ -2152,16 +2165,18 @@
raise Constraint_Error;
end if;
if Integer (Fore) >= Number_Of_Colors or else
- Integer (Back) >= Number_Of_Colors then
+ Integer (Back) >= Number_Of_Colors
+ then
raise Constraint_Error;
end if;
if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back))
- = Curses_Err then
+ = Curses_Err
+ then
raise Curses_Exception;
end if;
end Init_Pair;
- procedure Pair_Content (Pair : in Color_Pair;
+ procedure Pair_Content (Pair : Color_Pair;
Fore : out Color_Number;
Back : out Color_Number)
is
@@ -2193,10 +2208,10 @@
end if;
end Has_Colors;
- procedure Init_Color (Color : in Color_Number;
- Red : in RGB_Value;
- Green : in RGB_Value;
- Blue : in RGB_Value)
+ procedure Init_Color (Color : Color_Number;
+ Red : RGB_Value;
+ Green : RGB_Value;
+ Blue : RGB_Value)
is
function Initcolor (Col : C_Short;
Red : C_Short;
@@ -2205,7 +2220,8 @@
pragma Import (C, Initcolor, "init_color");
begin
if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green),
- C_Short (Blue)) = Curses_Err then
+ C_Short (Blue)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Init_Color;
@@ -2222,7 +2238,7 @@
end if;
end Can_Change_Color;
- procedure Color_Content (Color : in Color_Number;
+ procedure Color_Content (Color : Color_Number;
Red : out RGB_Value;
Green : out RGB_Value;
Blue : out RGB_Value)
@@ -2236,7 +2252,8 @@
R, G, B : aliased C_Short;
begin
if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) =
- Curses_Err then
+ Curses_Err
+ then
raise Curses_Exception;
else
Red := RGB_Value (R);
@@ -2246,7 +2263,7 @@
end Color_Content;
------------------------------------------------------------------------------
- procedure Save_Curses_Mode (Mode : in Curses_Mode)
+ procedure Save_Curses_Mode (Mode : Curses_Mode)
is
function Def_Prog_Mode return C_Int;
pragma Import (C, Def_Prog_Mode, "def_prog_mode");
@@ -2264,7 +2281,7 @@
end if;
end Save_Curses_Mode;
- procedure Reset_Curses_Mode (Mode : in Curses_Mode)
+ procedure Reset_Curses_Mode (Mode : Curses_Mode)
is
function Reset_Prog_Mode return C_Int;
pragma Import (C, Reset_Prog_Mode, "reset_prog_mode");
@@ -2302,8 +2319,8 @@
end if;
end Reset_Terminal_State;
- procedure Rip_Off_Lines (Lines : in Integer;
- Proc : in Stdscr_Init_Proc)
+ procedure Rip_Off_Lines (Lines : Integer;
+ Proc : Stdscr_Init_Proc)
is
function Ripoffline (Lines : C_Int;
Proc : Stdscr_Init_Proc) return C_Int;
@@ -2327,7 +2344,7 @@
end if;
end Set_Cursor_Visibility;
- procedure Nap_Milli_Seconds (Ms : in Natural)
+ procedure Nap_Milli_Seconds (Ms : Natural)
is
function Napms (Ms : C_Int) return C_Int;
pragma Import (C, Napms, "napms");
@@ -2337,13 +2354,52 @@
end if;
end Nap_Milli_Seconds;
------------------------------------------------------------------------------
-include(`Public_Variables')
+ function Lines return Line_Count
+ is
+ function LINES_As_Function return Interfaces.C.int;
+ pragma Import (C, LINES_As_Function, "LINES_as_function");
+ begin
+ return Line_Count (LINES_As_Function);
+ end Lines;
+
+ function Columns return Column_Count
+ is
+ function COLS_As_Function return Interfaces.C.int;
+ pragma Import (C, COLS_As_Function, "COLS_as_function");
+ begin
+ return Column_Count (COLS_As_Function);
+ end Columns;
+
+ function Tab_Size return Natural
+ is
+ function TABSIZE_As_Function return Interfaces.C.int;
+ pragma Import (C, TABSIZE_As_Function, "TABSIZE_as_function");
+
+ begin
+ return Natural (TABSIZE_As_Function);
+ end Tab_Size;
+
+ function Number_Of_Colors return Natural
+ is
+ function COLORS_As_Function return Interfaces.C.int;
+ pragma Import (C, COLORS_As_Function, "COLORS_as_function");
+ begin
+ return Natural (COLORS_As_Function);
+ end Number_Of_Colors;
+
+ function Number_Of_Color_Pairs return Natural
+ is
+ function COLOR_PAIRS_As_Function return Interfaces.C.int;
+ pragma Import (C, COLOR_PAIRS_As_Function, "COLOR_PAIRS_as_function");
+ begin
+ return Natural (COLOR_PAIRS_As_Function);
+ end Number_Of_Color_Pairs;
------------------------------------------------------------------------------
procedure Transform_Coordinates
- (W : in Window := Standard_Window;
+ (W : Window := Standard_Window;
Line : in out Line_Position;
Column : in out Column_Position;
- Dir : in Transform_Direction := From_Screen)
+ Dir : Transform_Direction := From_Screen)
is
type Int_Access is access all C_Int;
function Transform (W : Window;
@@ -2431,7 +2487,7 @@
end if;
end Use_Extended_Names;
------------------------------------------------------------------------------
- procedure Screen_Dump_To_File (Filename : in String)
+ procedure Screen_Dump_To_File (Filename : String)
is
function scr_dump (f : char_array) return C_Int;
pragma Import (C, scr_dump, "scr_dump");
@@ -2444,7 +2500,7 @@
end if;
end Screen_Dump_To_File;
- procedure Screen_Restore_From_File (Filename : in String)
+ procedure Screen_Restore_From_File (Filename : String)
is
function scr_restore (f : char_array) return C_Int;
pragma Import (C, scr_restore, "scr_restore");
@@ -2457,7 +2513,7 @@
end if;
end Screen_Restore_From_File;
- procedure Screen_Init_From_File (Filename : in String)
+ procedure Screen_Init_From_File (Filename : String)
is
function scr_init (f : char_array) return C_Int;
pragma Import (C, scr_init, "scr_init");
@@ -2470,7 +2526,7 @@
end if;
end Screen_Init_From_File;
- procedure Screen_Set_File (Filename : in String)
+ procedure Screen_Set_File (Filename : String)
is
function scr_set (f : char_array) return C_Int;
pragma Import (C, scr_set, "scr_set");
@@ -2493,7 +2549,8 @@
begin
if wresize (Win,
C_Int (Number_Of_Lines),
- C_Int (Number_Of_Columns)) = Curses_Err then
+ C_Int (Number_Of_Columns)) = Curses_Err
+ then
raise Curses_Exception;
end if;
end Resize;
diff --git a/Ada95/gen/terminal_interface-curses.ads.m4 b/Ada95/gen/terminal_interface-curses.ads.m4
index 4abc55e..25bb5d9 100644
--- a/Ada95/gen/terminal_interface-curses.ads.m4
+++ b/Ada95/gen/terminal_interface-curses.ads.m4
@@ -9,7 +9,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -37,23 +37,28 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.41 $
--- $Date: 2007/05/05 20:33:52 $
+-- $Revision: 1.47 $
+-- $Date: 2014/05/24 21:31:57 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-include(`Base_Defs')
with System.Storage_Elements;
with Interfaces.C; -- We need this for some assertions.
+with Terminal_Interface.Curses_Constants;
+
package Terminal_Interface.Curses is
pragma Preelaborate (Terminal_Interface.Curses);
-include(`Linker_Options')
-include(`Version_Info')
+ pragma Linker_Options ("-lncurses" & Curses_Constants.DFT_ARG_SUFFIX);
+
+ Major_Version : constant := Curses_Constants.NCURSES_VERSION_MAJOR;
+ Minor_Version : constant := Curses_Constants.NCURSES_VERSION_MINOR;
+ NC_Version : String renames Curses_Constants.Version;
+
type Window is private;
Null_Window : constant Window;
- type Line_Position is new Natural; -- line coordinate
- type Column_Position is new Natural; -- column coordinate
+ type Line_Position is new Integer; -- line coordinate
+ type Column_Position is new Integer; -- column coordinate
subtype Line_Count is Line_Position range 1 .. Line_Position'Last;
-- Type to count lines. We do not allow null windows, so must be positive
@@ -65,24 +70,315 @@
-- request codes.
-- FIXME: The "-1" should be Curses_Err
- subtype Real_Key_Code is Key_Code range -1 .. M4_KEY_MAX;
+ subtype Real_Key_Code is Key_Code range -1 .. Curses_Constants.KEY_MAX;
-- This are the codes that potentially represent a real keystroke.
-- Not all codes may be possible on a specific terminal. To check the
-- availability of a special key, the Has_Key function is provided.
subtype Special_Key_Code is Real_Key_Code
- range M4_SPECIAL_FIRST .. Real_Key_Code'Last;
+ range Curses_Constants. KEY_MIN - 1 .. Real_Key_Code'Last;
-- Type for a function- or special key number
subtype Normal_Key_Code is Real_Key_Code range
Character'Pos (Character'First) .. Character'Pos (Character'Last);
-- This are the codes for regular (incl. non-graphical) characters.
+ -- For those who like to use the original key names we produce them were
+ -- they differ from the original.
+
-- Constants for function- and special keys
- --
- Key_None : constant Special_Key_Code := M4_SPECIAL_FIRST;
-include(`Key_Definitions')
- Key_Max : constant Special_Key_Code
+ Key_None : constant Special_Key_Code
+ := Curses_Constants.KEY_MIN - 1;
+ Key_Min : constant Special_Key_Code
+ := Curses_Constants.KEY_MIN;
+ Key_Break : constant Special_Key_Code
+ := Curses_Constants.KEY_BREAK;
+ KEY_DOWN : constant Special_Key_Code
+ := Curses_Constants.KEY_DOWN;
+ Key_Cursor_Down : Special_Key_Code renames KEY_DOWN;
+ KEY_UP : constant Special_Key_Code
+ := Curses_Constants.KEY_UP;
+ Key_Cursor_Up : Special_Key_Code renames KEY_UP;
+ KEY_LEFT : constant Special_Key_Code
+ := Curses_Constants.KEY_LEFT;
+ Key_Cursor_Left : Special_Key_Code renames KEY_LEFT;
+ KEY_RIGHT : constant Special_Key_Code
+ := Curses_Constants.KEY_RIGHT;
+ Key_Cursor_Right : Special_Key_Code renames KEY_RIGHT;
+ Key_Home : constant Special_Key_Code
+ := Curses_Constants.KEY_HOME;
+ Key_Backspace : constant Special_Key_Code
+ := Curses_Constants.KEY_BACKSPACE;
+ Key_F0 : constant Special_Key_Code
+ := Curses_Constants.KEY_F0;
+ Key_F1 : constant Special_Key_Code
+ := Curses_Constants.KEY_F1;
+ Key_F2 : constant Special_Key_Code
+ := Curses_Constants.KEY_F2;
+ Key_F3 : constant Special_Key_Code
+ := Curses_Constants.KEY_F3;
+ Key_F4 : constant Special_Key_Code
+ := Curses_Constants.KEY_F4;
+ Key_F5 : constant Special_Key_Code
+ := Curses_Constants.KEY_F5;
+ Key_F6 : constant Special_Key_Code
+ := Curses_Constants.KEY_F6;
+ Key_F7 : constant Special_Key_Code
+ := Curses_Constants.KEY_F7;
+ Key_F8 : constant Special_Key_Code
+ := Curses_Constants.KEY_F8;
+ Key_F9 : constant Special_Key_Code
+ := Curses_Constants.KEY_F9;
+ Key_F10 : constant Special_Key_Code
+ := Curses_Constants.KEY_F10;
+ Key_F11 : constant Special_Key_Code
+ := Curses_Constants.KEY_F11;
+ Key_F12 : constant Special_Key_Code
+ := Curses_Constants.KEY_F12;
+ Key_F13 : constant Special_Key_Code
+ := Curses_Constants.KEY_F13;
+ Key_F14 : constant Special_Key_Code
+ := Curses_Constants.KEY_F14;
+ Key_F15 : constant Special_Key_Code
+ := Curses_Constants.KEY_F15;
+ Key_F16 : constant Special_Key_Code
+ := Curses_Constants.KEY_F16;
+ Key_F17 : constant Special_Key_Code
+ := Curses_Constants.KEY_F17;
+ Key_F18 : constant Special_Key_Code
+ := Curses_Constants.KEY_F18;
+ Key_F19 : constant Special_Key_Code
+ := Curses_Constants.KEY_F19;
+ Key_F20 : constant Special_Key_Code
+ := Curses_Constants.KEY_F20;
+ Key_F21 : constant Special_Key_Code
+ := Curses_Constants.KEY_F21;
+ Key_F22 : constant Special_Key_Code
+ := Curses_Constants.KEY_F22;
+ Key_F23 : constant Special_Key_Code
+ := Curses_Constants.KEY_F23;
+ Key_F24 : constant Special_Key_Code
+ := Curses_Constants.KEY_F24;
+ KEY_DL : constant Special_Key_Code
+ := Curses_Constants.KEY_DL;
+ Key_Delete_Line : Special_Key_Code renames KEY_DL;
+ KEY_IL : constant Special_Key_Code
+ := Curses_Constants.KEY_IL;
+ Key_Insert_Line : Special_Key_Code renames KEY_IL;
+ KEY_DC : constant Special_Key_Code
+ := Curses_Constants.KEY_DC;
+ Key_Delete_Char : Special_Key_Code renames KEY_DC;
+ KEY_IC : constant Special_Key_Code
+ := Curses_Constants.KEY_IC;
+ Key_Insert_Char : Special_Key_Code renames KEY_IC;
+ KEY_EIC : constant Special_Key_Code
+ := Curses_Constants.KEY_EIC;
+ Key_Exit_Insert_Mode : Special_Key_Code renames KEY_EIC;
+ KEY_CLEAR : constant Special_Key_Code
+ := Curses_Constants.KEY_CLEAR;
+ Key_Clear_Screen : Special_Key_Code renames KEY_CLEAR;
+ KEY_EOS : constant Special_Key_Code
+ := Curses_Constants.KEY_EOS;
+ Key_Clear_End_Of_Screen : Special_Key_Code renames KEY_EOS;
+ KEY_EOL : constant Special_Key_Code
+ := Curses_Constants.KEY_EOL;
+ Key_Clear_End_Of_Line : Special_Key_Code renames KEY_EOL;
+ KEY_SF : constant Special_Key_Code
+ := Curses_Constants.KEY_SF;
+ Key_Scroll_1_Forward : Special_Key_Code renames KEY_SF;
+ KEY_SR : constant Special_Key_Code
+ := Curses_Constants.KEY_SR;
+ Key_Scroll_1_Backward : Special_Key_Code renames KEY_SR;
+ KEY_NPAGE : constant Special_Key_Code
+ := Curses_Constants.KEY_NPAGE;
+ Key_Next_Page : Special_Key_Code renames KEY_NPAGE;
+ KEY_PPAGE : constant Special_Key_Code
+ := Curses_Constants.KEY_PPAGE;
+ Key_Previous_Page : Special_Key_Code renames KEY_PPAGE;
+ KEY_STAB : constant Special_Key_Code
+ := Curses_Constants.KEY_STAB;
+ Key_Set_Tab : Special_Key_Code renames KEY_STAB;
+ KEY_CTAB : constant Special_Key_Code
+ := Curses_Constants.KEY_CTAB;
+ Key_Clear_Tab : Special_Key_Code renames KEY_CTAB;
+ KEY_CATAB : constant Special_Key_Code
+ := Curses_Constants.KEY_CATAB;
+ Key_Clear_All_Tabs : Special_Key_Code renames KEY_CATAB;
+ KEY_ENTER : constant Special_Key_Code
+ := Curses_Constants.KEY_ENTER;
+ Key_Enter_Or_Send : Special_Key_Code renames KEY_ENTER;
+ KEY_SRESET : constant Special_Key_Code
+ := Curses_Constants.KEY_SRESET;
+ Key_Soft_Reset : Special_Key_Code renames KEY_SRESET;
+ Key_Reset : constant Special_Key_Code
+ := Curses_Constants.KEY_RESET;
+ Key_Print : constant Special_Key_Code
+ := Curses_Constants.KEY_PRINT;
+ KEY_LL : constant Special_Key_Code
+ := Curses_Constants.KEY_LL;
+ Key_Bottom : Special_Key_Code renames KEY_LL;
+ KEY_A1 : constant Special_Key_Code
+ := Curses_Constants.KEY_A1;
+ Key_Upper_Left_Of_Keypad : Special_Key_Code renames KEY_A1;
+ KEY_A3 : constant Special_Key_Code
+ := Curses_Constants.KEY_A3;
+ Key_Upper_Right_Of_Keypad : Special_Key_Code renames KEY_A3;
+ KEY_B2 : constant Special_Key_Code
+ := Curses_Constants.KEY_B2;
+ Key_Center_Of_Keypad : Special_Key_Code renames KEY_B2;
+ KEY_C1 : constant Special_Key_Code
+ := Curses_Constants.KEY_C1;
+ Key_Lower_Left_Of_Keypad : Special_Key_Code renames KEY_C1;
+ KEY_C3 : constant Special_Key_Code
+ := Curses_Constants.KEY_C3;
+ Key_Lower_Right_Of_Keypad : Special_Key_Code renames KEY_C3;
+ KEY_BTAB : constant Special_Key_Code
+ := Curses_Constants.KEY_BTAB;
+ Key_Back_Tab : Special_Key_Code renames KEY_BTAB;
+ KEY_BEG : constant Special_Key_Code
+ := Curses_Constants.KEY_BEG;
+ Key_Beginning : Special_Key_Code renames KEY_BEG;
+ Key_Cancel : constant Special_Key_Code
+ := Curses_Constants.KEY_CANCEL;
+ Key_Close : constant Special_Key_Code
+ := Curses_Constants.KEY_CLOSE;
+ Key_Command : constant Special_Key_Code
+ := Curses_Constants.KEY_COMMAND;
+ Key_Copy : constant Special_Key_Code
+ := Curses_Constants.KEY_COPY;
+ Key_Create : constant Special_Key_Code
+ := Curses_Constants.KEY_CREATE;
+ Key_End : constant Special_Key_Code
+ := Curses_Constants.KEY_END;
+ Key_Exit : constant Special_Key_Code
+ := Curses_Constants.KEY_EXIT;
+ Key_Find : constant Special_Key_Code
+ := Curses_Constants.KEY_FIND;
+ Key_Help : constant Special_Key_Code
+ := Curses_Constants.KEY_HELP;
+ Key_Mark : constant Special_Key_Code
+ := Curses_Constants.KEY_MARK;
+ Key_Message : constant Special_Key_Code
+ := Curses_Constants.KEY_MESSAGE;
+ Key_Move : constant Special_Key_Code
+ := Curses_Constants.KEY_MOVE;
+ Key_Next : constant Special_Key_Code
+ := Curses_Constants.KEY_NEXT;
+ Key_Open : constant Special_Key_Code
+ := Curses_Constants.KEY_OPEN;
+ Key_Options : constant Special_Key_Code
+ := Curses_Constants.KEY_OPTIONS;
+ Key_Previous : constant Special_Key_Code
+ := Curses_Constants.KEY_PREVIOUS;
+ Key_Redo : constant Special_Key_Code
+ := Curses_Constants.KEY_REDO;
+ Key_Reference : constant Special_Key_Code
+ := Curses_Constants.KEY_REFERENCE;
+ Key_Refresh : constant Special_Key_Code
+ := Curses_Constants.KEY_REFRESH;
+ Key_Replace : constant Special_Key_Code
+ := Curses_Constants.KEY_REPLACE;
+ Key_Restart : constant Special_Key_Code
+ := Curses_Constants.KEY_RESTART;
+ Key_Resume : constant Special_Key_Code
+ := Curses_Constants.KEY_RESUME;
+ Key_Save : constant Special_Key_Code
+ := Curses_Constants.KEY_SAVE;
+ KEY_SBEG : constant Special_Key_Code
+ := Curses_Constants.KEY_SBEG;
+ Key_Shift_Begin : Special_Key_Code renames KEY_SBEG;
+ KEY_SCANCEL : constant Special_Key_Code
+ := Curses_Constants.KEY_SCANCEL;
+ Key_Shift_Cancel : Special_Key_Code renames KEY_SCANCEL;
+ KEY_SCOMMAND : constant Special_Key_Code
+ := Curses_Constants.KEY_SCOMMAND;
+ Key_Shift_Command : Special_Key_Code renames KEY_SCOMMAND;
+ KEY_SCOPY : constant Special_Key_Code
+ := Curses_Constants.KEY_SCOPY;
+ Key_Shift_Copy : Special_Key_Code renames KEY_SCOPY;
+ KEY_SCREATE : constant Special_Key_Code
+ := Curses_Constants.KEY_SCREATE;
+ Key_Shift_Create : Special_Key_Code renames KEY_SCREATE;
+ KEY_SDC : constant Special_Key_Code
+ := Curses_Constants.KEY_SDC;
+ Key_Shift_Delete_Char : Special_Key_Code renames KEY_SDC;
+ KEY_SDL : constant Special_Key_Code
+ := Curses_Constants.KEY_SDL;
+ Key_Shift_Delete_Line : Special_Key_Code renames KEY_SDL;
+ Key_Select : constant Special_Key_Code
+ := Curses_Constants.KEY_SELECT;
+ KEY_SEND : constant Special_Key_Code
+ := Curses_Constants.KEY_SEND;
+ Key_Shift_End : Special_Key_Code renames KEY_SEND;
+ KEY_SEOL : constant Special_Key_Code
+ := Curses_Constants.KEY_SEOL;
+ Key_Shift_Clear_End_Of_Line : Special_Key_Code renames KEY_SEOL;
+ KEY_SEXIT : constant Special_Key_Code
+ := Curses_Constants.KEY_SEXIT;
+ Key_Shift_Exit : Special_Key_Code renames KEY_SEXIT;
+ KEY_SFIND : constant Special_Key_Code
+ := Curses_Constants.KEY_SFIND;
+ Key_Shift_Find : Special_Key_Code renames KEY_SFIND;
+ KEY_SHELP : constant Special_Key_Code
+ := Curses_Constants.KEY_SHELP;
+ Key_Shift_Help : Special_Key_Code renames KEY_SHELP;
+ KEY_SHOME : constant Special_Key_Code
+ := Curses_Constants.KEY_SHOME;
+ Key_Shift_Home : Special_Key_Code renames KEY_SHOME;
+ KEY_SIC : constant Special_Key_Code
+ := Curses_Constants.KEY_SIC;
+ Key_Shift_Insert_Char : Special_Key_Code renames KEY_SIC;
+ KEY_SLEFT : constant Special_Key_Code
+ := Curses_Constants.KEY_SLEFT;
+ Key_Shift_Cursor_Left : Special_Key_Code renames KEY_SLEFT;
+ KEY_SMESSAGE : constant Special_Key_Code
+ := Curses_Constants.KEY_SMESSAGE;
+ Key_Shift_Message : Special_Key_Code renames KEY_SMESSAGE;
+ KEY_SMOVE : constant Special_Key_Code
+ := Curses_Constants.KEY_SMOVE;
+ Key_Shift_Move : Special_Key_Code renames KEY_SMOVE;
+ KEY_SNEXT : constant Special_Key_Code
+ := Curses_Constants.KEY_SNEXT;
+ Key_Shift_Next_Page : Special_Key_Code renames KEY_SNEXT;
+ KEY_SOPTIONS : constant Special_Key_Code
+ := Curses_Constants.KEY_SOPTIONS;
+ Key_Shift_Options : Special_Key_Code renames KEY_SOPTIONS;
+ KEY_SPREVIOUS : constant Special_Key_Code
+ := Curses_Constants.KEY_SPREVIOUS;
+ Key_Shift_Previous_Page : Special_Key_Code renames KEY_SPREVIOUS;
+ KEY_SPRINT : constant Special_Key_Code
+ := Curses_Constants.KEY_SPRINT;
+ Key_Shift_Print : Special_Key_Code renames KEY_SPRINT;
+ KEY_SREDO : constant Special_Key_Code
+ := Curses_Constants.KEY_SREDO;
+ Key_Shift_Redo : Special_Key_Code renames KEY_SREDO;
+ KEY_SREPLACE : constant Special_Key_Code
+ := Curses_Constants.KEY_SREPLACE;
+ Key_Shift_Replace : Special_Key_Code renames KEY_SREPLACE;
+ KEY_SRIGHT : constant Special_Key_Code
+ := Curses_Constants.KEY_SRIGHT;
+ Key_Shift_Cursor_Right : Special_Key_Code renames KEY_SRIGHT;
+ KEY_SRSUME : constant Special_Key_Code
+ := Curses_Constants.KEY_SRSUME;
+ Key_Shift_Resume : Special_Key_Code renames KEY_SRSUME;
+ KEY_SSAVE : constant Special_Key_Code
+ := Curses_Constants.KEY_SSAVE;
+ Key_Shift_Save : Special_Key_Code renames KEY_SSAVE;
+ KEY_SSUSPEND : constant Special_Key_Code
+ := Curses_Constants.KEY_SSUSPEND;
+ Key_Shift_Suspend : Special_Key_Code renames KEY_SSUSPEND;
+ KEY_SUNDO : constant Special_Key_Code
+ := Curses_Constants.KEY_SUNDO;
+ Key_Shift_Undo : Special_Key_Code renames KEY_SUNDO;
+ Key_Suspend : constant Special_Key_Code
+ := Curses_Constants.KEY_SUSPEND;
+ Key_Undo : constant Special_Key_Code
+ := Curses_Constants.KEY_UNDO;
+ Key_Mouse : constant Special_Key_Code
+ := Curses_Constants.KEY_MOUSE;
+ Key_Resize : constant Special_Key_Code
+ := Curses_Constants.KEY_RESIZE;
+ Key_Max : constant Special_Key_Code
:= Special_Key_Code'Last;
subtype User_Key_Code is Key_Code
@@ -90,12 +386,7 @@
-- This is reserved for user defined key codes. The range between Key_Max
-- and the first user code is reserved for subsystems like menu and forms.
- -- For those who like to use the original key names we produce them were
- -- they differ from the original. Please note that they may differ in
- -- lower/upper case.
-include(`Old_Keys')dnl
-
-------------------------------------------------------------------------------
+ --------------------------------------------------------------------------
type Color_Number is range -1 .. Integer (Interfaces.C.short'Last);
for Color_Number'Size use Interfaces.C.short'Size;
@@ -104,7 +395,15 @@
-- (potentially) definable colors. Some of those indices are
-- predefined (see below), although they may not really exist.
-include(`Color_Defs')
+ Black : constant Color_Number := Curses_Constants.COLOR_BLACK;
+ Red : constant Color_Number := Curses_Constants.COLOR_RED;
+ Green : constant Color_Number := Curses_Constants.COLOR_GREEN;
+ Yellow : constant Color_Number := Curses_Constants.COLOR_YELLOW;
+ Blue : constant Color_Number := Curses_Constants.COLOR_BLUE;
+ Magenta : constant Color_Number := Curses_Constants.COLOR_MAGENTA;
+ Cyan : constant Color_Number := Curses_Constants.COLOR_CYAN;
+ White : constant Color_Number := Curses_Constants.COLOR_WHITE;
+
type RGB_Value is range 0 .. Integer (Interfaces.C.short'Last);
for RGB_Value'Size use Interfaces.C.short'Size;
-- Some system may allow to redefine a color by setting RGB values.
@@ -117,8 +416,73 @@
-- two colors described by Color_Numbers, one for the foreground and
-- the other for the background
-include(`Character_Attribute_Set_Rep')
- -- (n)curses uses all but the lowest 16 Bits for Attributes.
+ type Character_Attribute_Set is
+ record
+ Stand_Out : Boolean;
+ Under_Line : Boolean;
+ Reverse_Video : Boolean;
+ Blink : Boolean;
+ Dim_Character : Boolean;
+ Bold_Character : Boolean;
+ Protected_Character : Boolean;
+ Invisible_Character : Boolean;
+ Alternate_Character_Set : Boolean;
+ Horizontal : Boolean;
+ Left : Boolean;
+ Low : Boolean;
+ Right : Boolean;
+ Top : Boolean;
+ Vertical : Boolean;
+ end record;
+
+ for Character_Attribute_Set use
+ record
+ Stand_Out at 0 range
+ Curses_Constants.A_STANDOUT_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_STANDOUT_Last - Curses_Constants.Attr_First;
+ Under_Line at 0 range
+ Curses_Constants.A_UNDERLINE_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_UNDERLINE_Last - Curses_Constants.Attr_First;
+ Reverse_Video at 0 range
+ Curses_Constants.A_REVERSE_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_REVERSE_Last - Curses_Constants.Attr_First;
+ Blink at 0 range
+ Curses_Constants.A_BLINK_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_BLINK_Last - Curses_Constants.Attr_First;
+ Dim_Character at 0 range
+ Curses_Constants.A_DIM_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_DIM_Last - Curses_Constants.Attr_First;
+ Bold_Character at 0 range
+ Curses_Constants.A_BOLD_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_BOLD_Last - Curses_Constants.Attr_First;
+ Protected_Character at 0 range
+ Curses_Constants.A_PROTECT_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_PROTECT_Last - Curses_Constants.Attr_First;
+ Invisible_Character at 0 range
+ Curses_Constants.A_INVIS_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_INVIS_Last - Curses_Constants.Attr_First;
+ Alternate_Character_Set at 0 range
+ Curses_Constants.A_ALTCHARSET_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_ALTCHARSET_Last - Curses_Constants.Attr_First;
+ Horizontal at 0 range
+ Curses_Constants.A_HORIZONTAL_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_HORIZONTAL_Last - Curses_Constants.Attr_First;
+ Left at 0 range
+ Curses_Constants.A_LEFT_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_LEFT_Last - Curses_Constants.Attr_First;
+ Low at 0 range
+ Curses_Constants.A_LOW_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_LOW_Last - Curses_Constants.Attr_First;
+ Right at 0 range
+ Curses_Constants.A_RIGHT_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_RIGHT_Last - Curses_Constants.Attr_First;
+ Top at 0 range
+ Curses_Constants.A_TOP_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_TOP_Last - Curses_Constants.Attr_First;
+ Vertical at 0 range
+ Curses_Constants.A_VERTICAL_First - Curses_Constants.Attr_First
+ .. Curses_Constants.A_VERTICAL_Last - Curses_Constants.Attr_First;
+ end record;
Normal_Video : constant Character_Attribute_Set := (others => False);
@@ -128,17 +492,29 @@
Color : Color_Pair;
Ch : Character;
end record;
- pragma Convention (C, Attributed_Character);
+ pragma Convention (C_Pass_By_Copy, Attributed_Character);
-- This is the counterpart for the chtype in C.
-include(`AC_Rep')
+ for Attributed_Character use
+ record
+ Ch at 0 range Curses_Constants.A_CHARTEXT_First
+ .. Curses_Constants.A_CHARTEXT_Last;
+ Color at 0 range Curses_Constants.A_COLOR_First
+ .. Curses_Constants.A_COLOR_Last;
+ pragma Warnings (Off);
+ Attr at 0 range Curses_Constants.Attr_First
+ .. Curses_Constants.Attr_Last;
+ pragma Warnings (On);
+ end record;
+ for Attributed_Character'Size use Curses_Constants.chtype_Size;
+
Default_Character : constant Attributed_Character
:= (Ch => Character'First,
Color => Color_Pair'First,
Attr => (others => False)); -- preelaboratable Normal_Video
type Attributed_String is array (Positive range <>) of Attributed_Character;
- pragma Pack (Attributed_String);
+ pragma Convention (C, Attributed_String);
-- In this binding we allow strings of attributed characters.
------------------
@@ -188,7 +564,78 @@
function Number_Of_Color_Pairs return Natural;
pragma Inline (Number_Of_Color_Pairs);
-include(`ACS_Map')dnl
+ subtype ACS_Index is Character range
+ Character'Val (0) .. Character'Val (127);
+ function ACS_Map (Index : ACS_Index) return Attributed_Character;
+ pragma Import (C, ACS_Map, "acs_map_as_function");
+
+ -- Constants for several characters from the Alternate Character Set
+ -- You must use these constants as indices into the ACS_Map function
+ -- to get the corresponding attributed character at runtime
+ ACS_Upper_Left_Corner : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_ULCORNER);
+ ACS_Lower_Left_Corner : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_LLCORNER);
+ ACS_Upper_Right_Corner : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_URCORNER);
+ ACS_Lower_Right_Corner : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_LRCORNER);
+ ACS_Left_Tee : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_LTEE);
+ ACS_Right_Tee : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_RTEE);
+ ACS_Bottom_Tee : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_BTEE);
+ ACS_Top_Tee : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_TTEE);
+ ACS_Horizontal_Line : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_HLINE);
+ ACS_Vertical_Line : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_VLINE);
+ ACS_Plus_Symbol : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_PLUS);
+ ACS_Scan_Line_1 : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_S1);
+ ACS_Scan_Line_9 : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_S9);
+ ACS_Diamond : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_DIAMOND);
+ ACS_Checker_Board : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_CKBOARD);
+ ACS_Degree : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_DEGREE);
+ ACS_Plus_Minus : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_PLMINUS);
+ ACS_Bullet : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_BULLET);
+ ACS_Left_Arrow : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_LARROW);
+ ACS_Right_Arrow : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_RARROW);
+ ACS_Down_Arrow : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_DARROW);
+ ACS_Up_Arrow : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_UARROW);
+ ACS_Board_Of_Squares : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_BOARD);
+ ACS_Lantern : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_LANTERN);
+ ACS_Solid_Block : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_BLOCK);
+ ACS_Scan_Line_3 : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_S3);
+ ACS_Scan_Line_7 : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_S7);
+ ACS_Less_Or_Equal : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_LEQUAL);
+ ACS_Greater_Or_Equal : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_GEQUAL);
+ ACS_PI : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_PI);
+ ACS_Not_Equal : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_NEQUAL);
+ ACS_Sterling : constant ACS_Index
+ := Character'Val (Curses_Constants.ACS_STERLING);
-- MANPAGE(`curs_initscr.3x')
-- | Not implemented: newterm, set_term, delscreen
@@ -196,11 +643,13 @@
-- ANCHOR(`stdscr',`Standard_Window')
function Standard_Window return Window;
-- AKA
+ pragma Import (C, Standard_Window, "stdscr_as_function");
pragma Inline (Standard_Window);
-- ANCHOR(`curscr',`Current_Window')
function Current_Window return Window;
-- AKA
+ pragma Import (C, Current_Window, "curscr_as_function");
pragma Inline (Current_Window);
-- ANCHOR(`initscr()',`Init_Screen')
@@ -227,9 +676,9 @@
-- MANPAGE(`curs_move.3x')
-- ANCHOR(`wmove()',`Move_Cursor')
- procedure Move_Cursor (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position);
+ procedure Move_Cursor (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position);
-- AKA
-- ALIAS(`move()')
pragma Inline (Move_Cursor);
@@ -237,43 +686,43 @@
-- MANPAGE(`curs_addch.3x')
-- ANCHOR(`waddch()',`Add')
- procedure Add (Win : in Window := Standard_Window;
- Ch : in Attributed_Character);
+ procedure Add (Win : Window := Standard_Window;
+ Ch : Attributed_Character);
-- AKA
-- ALIAS(`addch()')
- procedure Add (Win : in Window := Standard_Window;
- Ch : in Character);
+ procedure Add (Win : Window := Standard_Window;
+ Ch : Character);
-- Add a single character at the current logical cursor position to
-- the window. Use the current windows attributes.
-- ANCHOR(`mvwaddch()',`Add')
procedure Add
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Ch : in Attributed_Character);
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Ch : Attributed_Character);
-- AKA
-- ALIAS(`mvaddch()')
procedure Add
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Ch : in Character);
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Ch : Character);
-- Move to the position and add a single character into the window
-- There are more Add routines, so the Inline pragma follows later
-- ANCHOR(`wechochar()',`Add_With_Immediate_Echo')
procedure Add_With_Immediate_Echo
- (Win : in Window := Standard_Window;
- Ch : in Attributed_Character);
+ (Win : Window := Standard_Window;
+ Ch : Attributed_Character);
-- AKA
-- ALIAS(`echochar()')
procedure Add_With_Immediate_Echo
- (Win : in Window := Standard_Window;
- Ch : in Character);
+ (Win : Window := Standard_Window;
+ Ch : Character);
-- Add a character and do an immediate refresh of the screen.
pragma Inline (Add_With_Immediate_Echo);
@@ -331,52 +780,52 @@
pragma Inline (Duplicate);
-- ANCHOR(`mvwin()',`Move_Window')
- procedure Move_Window (Win : in Window;
- Line : in Line_Position;
- Column : in Column_Position);
+ procedure Move_Window (Win : Window;
+ Line : Line_Position;
+ Column : Column_Position);
-- AKA
pragma Inline (Move_Window);
-- ANCHOR(`mvderwin()',`Move_Derived_Window')
- procedure Move_Derived_Window (Win : in Window;
- Line : in Line_Position;
- Column : in Column_Position);
+ procedure Move_Derived_Window (Win : Window;
+ Line : Line_Position;
+ Column : Column_Position);
-- AKA
pragma Inline (Move_Derived_Window);
-- ANCHOR(`wsyncup()',`Synchronize_Upwards')
- procedure Synchronize_Upwards (Win : in Window);
+ procedure Synchronize_Upwards (Win : Window);
-- AKA
pragma Import (C, Synchronize_Upwards, "wsyncup");
-- ANCHOR(`wsyncdown()',`Synchronize_Downwards')
- procedure Synchronize_Downwards (Win : in Window);
+ procedure Synchronize_Downwards (Win : Window);
-- AKA
pragma Import (C, Synchronize_Downwards, "wsyncdown");
-- ANCHOR(`syncok()',`Set_Synch_Mode')
- procedure Set_Synch_Mode (Win : in Window := Standard_Window;
- Mode : in Boolean := False);
+ procedure Set_Synch_Mode (Win : Window := Standard_Window;
+ Mode : Boolean := False);
-- AKA
pragma Inline (Set_Synch_Mode);
-- MANPAGE(`curs_addstr.3x')
-- ANCHOR(`waddnstr()',`Add')
- procedure Add (Win : in Window := Standard_Window;
- Str : in String;
- Len : in Integer := -1);
+ procedure Add (Win : Window := Standard_Window;
+ Str : String;
+ Len : Integer := -1);
-- AKA
-- ALIAS(`waddstr()')
-- ALIAS(`addnstr()')
-- ALIAS(`addstr()')
-- ANCHOR(`mvwaddnstr()',`Add')
- procedure Add (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Str : in String;
- Len : in Integer := -1);
+ procedure Add (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Str : String;
+ Len : Integer := -1);
-- AKA
-- ALIAS(`mvwaddstr()')
-- ALIAS(`mvaddnstr()')
@@ -385,20 +834,20 @@
-- MANPAGE(`curs_addchstr.3x')
-- ANCHOR(`waddchnstr()',`Add')
- procedure Add (Win : in Window := Standard_Window;
- Str : in Attributed_String;
- Len : in Integer := -1);
+ procedure Add (Win : Window := Standard_Window;
+ Str : Attributed_String;
+ Len : Integer := -1);
-- AKA
-- ALIAS(`waddchstr()')
-- ALIAS(`addchnstr()')
-- ALIAS(`addchstr()')
-- ANCHOR(`mvwaddchnstr()',`Add')
- procedure Add (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Str : in Attributed_String;
- Len : in Integer := -1);
+ procedure Add (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Str : Attributed_String;
+ Len : Integer := -1);
-- AKA
-- ALIAS(`mvwaddchstr()')
-- ALIAS(`mvaddchnstr()')
@@ -411,15 +860,15 @@
-- ANCHOR(`wborder()',`Border')
procedure Border
- (Win : in Window := Standard_Window;
- Left_Side_Symbol : in Attributed_Character := Default_Character;
- Right_Side_Symbol : in Attributed_Character := Default_Character;
- Top_Side_Symbol : in Attributed_Character := Default_Character;
- Bottom_Side_Symbol : in Attributed_Character := Default_Character;
- Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character;
- Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character;
- Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character;
- Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character
+ (Win : Window := Standard_Window;
+ Left_Side_Symbol : Attributed_Character := Default_Character;
+ Right_Side_Symbol : Attributed_Character := Default_Character;
+ Top_Side_Symbol : Attributed_Character := Default_Character;
+ Bottom_Side_Symbol : Attributed_Character := Default_Character;
+ Upper_Left_Corner_Symbol : Attributed_Character := Default_Character;
+ Upper_Right_Corner_Symbol : Attributed_Character := Default_Character;
+ Lower_Left_Corner_Symbol : Attributed_Character := Default_Character;
+ Lower_Right_Corner_Symbol : Attributed_Character := Default_Character
);
-- AKA
-- ALIAS(`border()')
@@ -427,26 +876,26 @@
-- ANCHOR(`box()',`Box')
procedure Box
- (Win : in Window := Standard_Window;
- Vertical_Symbol : in Attributed_Character := Default_Character;
- Horizontal_Symbol : in Attributed_Character := Default_Character);
+ (Win : Window := Standard_Window;
+ Vertical_Symbol : Attributed_Character := Default_Character;
+ Horizontal_Symbol : Attributed_Character := Default_Character);
-- AKA
pragma Inline (Box);
-- ANCHOR(`whline()',`Horizontal_Line')
procedure Horizontal_Line
- (Win : in Window := Standard_Window;
- Line_Size : in Natural;
- Line_Symbol : in Attributed_Character := Default_Character);
+ (Win : Window := Standard_Window;
+ Line_Size : Natural;
+ Line_Symbol : Attributed_Character := Default_Character);
-- AKA
-- ALIAS(`hline()')
pragma Inline (Horizontal_Line);
-- ANCHOR(`wvline()',`Vertical_Line')
procedure Vertical_Line
- (Win : in Window := Standard_Window;
- Line_Size : in Natural;
- Line_Symbol : in Attributed_Character := Default_Character);
+ (Win : Window := Standard_Window;
+ Line_Size : Natural;
+ Line_Symbol : Attributed_Character := Default_Character);
-- AKA
-- ALIAS(`vline()')
pragma Inline (Vertical_Line);
@@ -461,12 +910,12 @@
-- ALIAS(`getch()')
-- Get a character from the keyboard and echo it - if enabled - to the
-- window.
- -- If for any reason (i.e. a timeout) we couldn't get a character the
+ -- If for any reason (i.e. a timeout) we could not get a character the
-- returned keycode is Key_None.
pragma Inline (Get_Keystroke);
-- ANCHOR(`ungetch()',`Undo_Keystroke')
- procedure Undo_Keystroke (Key : in Real_Key_Code);
+ procedure Undo_Keystroke (Key : Real_Key_Code);
-- AKA
pragma Inline (Undo_Keystroke);
@@ -509,9 +958,9 @@
-- ANCHOR(`wattron()',`Switch_Character_Attribute')
procedure Switch_Character_Attribute
- (Win : in Window := Standard_Window;
- Attr : in Character_Attribute_Set := Normal_Video;
- On : in Boolean := True); -- if False we switch Off.
+ (Win : Window := Standard_Window;
+ Attr : Character_Attribute_Set := Normal_Video;
+ On : Boolean := True); -- if False we switch Off.
-- Switches those Attributes set to true in the list.
-- AKA
-- ALIAS(`wattroff()')
@@ -520,49 +969,49 @@
-- ANCHOR(`wattrset()',`Set_Character_Attributes')
procedure Set_Character_Attributes
- (Win : in Window := Standard_Window;
- Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Win : Window := Standard_Window;
+ Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
-- ALIAS(`attrset()')
pragma Inline (Set_Character_Attributes);
-- ANCHOR(`wattr_get()',`Get_Character_Attributes')
function Get_Character_Attribute
- (Win : in Window := Standard_Window) return Character_Attribute_Set;
+ (Win : Window := Standard_Window) return Character_Attribute_Set;
-- AKA
-- ALIAS(`attr_get()')
-- ANCHOR(`wattr_get()',`Get_Character_Attribute')
function Get_Character_Attribute
- (Win : in Window := Standard_Window) return Color_Pair;
+ (Win : Window := Standard_Window) return Color_Pair;
-- AKA
pragma Inline (Get_Character_Attribute);
-- ANCHOR(`wcolor_set()',`Set_Color')
- procedure Set_Color (Win : in Window := Standard_Window;
- Pair : in Color_Pair);
+ procedure Set_Color (Win : Window := Standard_Window;
+ Pair : Color_Pair);
-- AKA
-- ALIAS(`color_set()')
pragma Inline (Set_Color);
-- ANCHOR(`wchgat()',`Change_Attributes')
procedure Change_Attributes
- (Win : in Window := Standard_Window;
- Count : in Integer := -1;
- Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Win : Window := Standard_Window;
+ Count : Integer := -1;
+ Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
-- ALIAS(`chgat()')
-- ANCHOR(`mvwchgat()',`Change_Attributes')
procedure Change_Attributes
- (Win : in Window := Standard_Window;
- Line : in Line_Position := Line_Position'First;
- Column : in Column_Position := Column_Position'First;
- Count : in Integer := -1;
- Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Win : Window := Standard_Window;
+ Line : Line_Position := Line_Position'First;
+ Column : Column_Position := Column_Position'First;
+ Count : Integer := -1;
+ Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
-- ALIAS(`mvchgat()')
pragma Inline (Change_Attributes);
@@ -584,36 +1033,36 @@
-- | Not implemented : typeahead
--
-- ANCHOR(`cbreak()',`Set_Cbreak_Mode')
- procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True);
+ procedure Set_Cbreak_Mode (SwitchOn : Boolean := True);
-- AKA
-- ALIAS(`nocbreak()')
pragma Inline (Set_Cbreak_Mode);
-- ANCHOR(`raw()',`Set_Raw_Mode')
- procedure Set_Raw_Mode (SwitchOn : in Boolean := True);
+ procedure Set_Raw_Mode (SwitchOn : Boolean := True);
-- AKA
-- ALIAS(`noraw()')
pragma Inline (Set_Raw_Mode);
-- ANCHOR(`echo()',`Set_Echo_Mode')
- procedure Set_Echo_Mode (SwitchOn : in Boolean := True);
+ procedure Set_Echo_Mode (SwitchOn : Boolean := True);
-- AKA
-- ALIAS(`noecho()')
pragma Inline (Set_Echo_Mode);
-- ANCHOR(`meta()',`Set_Meta_Mode')
- procedure Set_Meta_Mode (Win : in Window := Standard_Window;
- SwitchOn : in Boolean := True);
+ procedure Set_Meta_Mode (Win : Window := Standard_Window;
+ SwitchOn : Boolean := True);
-- AKA
pragma Inline (Set_Meta_Mode);
-- ANCHOR(`keypad()',`Set_KeyPad_Mode')
- procedure Set_KeyPad_Mode (Win : in Window := Standard_Window;
- SwitchOn : in Boolean := True);
+ procedure Set_KeyPad_Mode (Win : Window := Standard_Window;
+ SwitchOn : Boolean := True);
-- AKA
pragma Inline (Set_KeyPad_Mode);
- function Get_KeyPad_Mode (Win : in Window := Standard_Window)
+ function Get_KeyPad_Mode (Win : Window := Standard_Window)
return Boolean;
-- This has no pendant in C. There you've to look into the WINDOWS
-- structure to get the value. Bad practice, not repeated in Ada.
@@ -621,100 +1070,100 @@
type Half_Delay_Amount is range 1 .. 255;
-- ANCHOR(`halfdelay()',`Half_Delay')
- procedure Half_Delay (Amount : in Half_Delay_Amount);
+ procedure Half_Delay (Amount : Half_Delay_Amount);
-- AKA
pragma Inline (Half_Delay);
-- ANCHOR(`intrflush()',`Set_Flush_On_Interrupt_Mode')
procedure Set_Flush_On_Interrupt_Mode
- (Win : in Window := Standard_Window;
- Mode : in Boolean := True);
+ (Win : Window := Standard_Window;
+ Mode : Boolean := True);
-- AKA
pragma Inline (Set_Flush_On_Interrupt_Mode);
-- ANCHOR(`qiflush()',`Set_Queue_Interrupt_Mode')
procedure Set_Queue_Interrupt_Mode
- (Win : in Window := Standard_Window;
- Flush : in Boolean := True);
+ (Win : Window := Standard_Window;
+ Flush : Boolean := True);
-- AKA
-- ALIAS(`noqiflush()')
pragma Inline (Set_Queue_Interrupt_Mode);
-- ANCHOR(`nodelay()',`Set_NoDelay_Mode')
procedure Set_NoDelay_Mode
- (Win : in Window := Standard_Window;
- Mode : in Boolean := False);
+ (Win : Window := Standard_Window;
+ Mode : Boolean := False);
-- AKA
pragma Inline (Set_NoDelay_Mode);
type Timeout_Mode is (Blocking, Non_Blocking, Delayed);
-- ANCHOR(`wtimeout()',`Set_Timeout_Mode')
- procedure Set_Timeout_Mode (Win : in Window := Standard_Window;
- Mode : in Timeout_Mode;
- Amount : in Natural); -- in Milliseconds
+ procedure Set_Timeout_Mode (Win : Window := Standard_Window;
+ Mode : Timeout_Mode;
+ Amount : Natural); -- in Milliseconds
-- AKA
-- ALIAS(`timeout()')
-- Instead of overloading the semantic of the sign of amount, we
-- introduce the Timeout_Mode parameter. This should improve
-- readability. For Blocking and Non_Blocking, the Amount is not
-- evaluated.
- -- We don't inline this procedure.
+ -- We do not inline this procedure.
-- ANCHOR(`notimeout()',`Set_Escape_Time_Mode')
procedure Set_Escape_Timer_Mode
- (Win : in Window := Standard_Window;
- Timer_Off : in Boolean := False);
+ (Win : Window := Standard_Window;
+ Timer_Off : Boolean := False);
-- AKA
pragma Inline (Set_Escape_Timer_Mode);
-- MANPAGE(`curs_outopts.3x')
-- ANCHOR(`nl()',`Set_NL_Mode')
- procedure Set_NL_Mode (SwitchOn : in Boolean := True);
+ procedure Set_NL_Mode (SwitchOn : Boolean := True);
-- AKA
-- ALIAS(`nonl()')
pragma Inline (Set_NL_Mode);
-- ANCHOR(`clearok()',`Clear_On_Next_Update')
procedure Clear_On_Next_Update
- (Win : in Window := Standard_Window;
- Do_Clear : in Boolean := True);
+ (Win : Window := Standard_Window;
+ Do_Clear : Boolean := True);
-- AKA
pragma Inline (Clear_On_Next_Update);
-- ANCHOR(`idlok()',`Use_Insert_Delete_Line')
procedure Use_Insert_Delete_Line
- (Win : in Window := Standard_Window;
- Do_Idl : in Boolean := True);
+ (Win : Window := Standard_Window;
+ Do_Idl : Boolean := True);
-- AKA
pragma Inline (Use_Insert_Delete_Line);
-- ANCHOR(`idcok()',`Use_Insert_Delete_Character')
procedure Use_Insert_Delete_Character
- (Win : in Window := Standard_Window;
- Do_Idc : in Boolean := True);
+ (Win : Window := Standard_Window;
+ Do_Idc : Boolean := True);
-- AKA
pragma Inline (Use_Insert_Delete_Character);
-- ANCHOR(`leaveok()',`Leave_Cursor_After_Update')
procedure Leave_Cursor_After_Update
- (Win : in Window := Standard_Window;
- Do_Leave : in Boolean := True);
+ (Win : Window := Standard_Window;
+ Do_Leave : Boolean := True);
-- AKA
pragma Inline (Leave_Cursor_After_Update);
-- ANCHOR(`immedok()',`Immediate_Update_Mode')
procedure Immediate_Update_Mode
- (Win : in Window := Standard_Window;
- Mode : in Boolean := False);
+ (Win : Window := Standard_Window;
+ Mode : Boolean := False);
-- AKA
pragma Inline (Immediate_Update_Mode);
-- ANCHOR(`scrollok()',`Allow_Scrolling')
procedure Allow_Scrolling
- (Win : in Window := Standard_Window;
- Mode : in Boolean := False);
+ (Win : Window := Standard_Window;
+ Mode : Boolean := False);
-- AKA
pragma Inline (Allow_Scrolling);
@@ -724,9 +1173,9 @@
-- ANCHOR(`wsetscrreg()',`Set_Scroll_Region')
procedure Set_Scroll_Region
- (Win : in Window := Standard_Window;
- Top_Line : in Line_Position;
- Bottom_Line : in Line_Position);
+ (Win : Window := Standard_Window;
+ Top_Line : Line_Position;
+ Bottom_Line : Line_Position);
-- AKA
-- ALIAS(`setscrreg()')
pragma Inline (Set_Scroll_Region);
@@ -739,7 +1188,7 @@
pragma Inline (Update_Screen);
-- ANCHOR(`wrefresh()',`Refresh')
- procedure Refresh (Win : in Window := Standard_Window);
+ procedure Refresh (Win : Window := Standard_Window);
-- AKA
-- There is an overloaded Refresh for Pads.
-- The Inline pragma appears there
@@ -747,47 +1196,47 @@
-- ANCHOR(`wnoutrefresh()',`Refresh_Without_Update')
procedure Refresh_Without_Update
- (Win : in Window := Standard_Window);
+ (Win : Window := Standard_Window);
-- AKA
-- There is an overloaded Refresh_Without_Update for Pads.
-- The Inline pragma appears there
-- ANCHOR(`redrawwin()',`Redraw')
- procedure Redraw (Win : in Window := Standard_Window);
+ procedure Redraw (Win : Window := Standard_Window);
-- AKA
-- ANCHOR(`wredrawln()',`Redraw')
- procedure Redraw (Win : in Window := Standard_Window;
- Begin_Line : in Line_Position;
- Line_Count : in Positive);
+ procedure Redraw (Win : Window := Standard_Window;
+ Begin_Line : Line_Position;
+ Line_Count : Positive);
-- AKA
pragma Inline (Redraw);
-- MANPAGE(`curs_clear.3x')
-- ANCHOR(`werase()',`Erase')
- procedure Erase (Win : in Window := Standard_Window);
+ procedure Erase (Win : Window := Standard_Window);
-- AKA
-- ALIAS(`erase()')
pragma Inline (Erase);
-- ANCHOR(`wclear()',`Clear')
procedure Clear
- (Win : in Window := Standard_Window);
+ (Win : Window := Standard_Window);
-- AKA
-- ALIAS(`clear()')
pragma Inline (Clear);
-- ANCHOR(`wclrtobot()',`Clear_To_End_Of_Screen')
procedure Clear_To_End_Of_Screen
- (Win : in Window := Standard_Window);
+ (Win : Window := Standard_Window);
-- AKA
-- ALIAS(`clrtobot()')
pragma Inline (Clear_To_End_Of_Screen);
-- ANCHOR(`wclrtoeol()',`Clear_To_End_Of_Line')
procedure Clear_To_End_Of_Line
- (Win : in Window := Standard_Window);
+ (Win : Window := Standard_Window);
-- AKA
-- ALIAS(`clrtoeol()')
pragma Inline (Clear_To_End_Of_Line);
@@ -799,16 +1248,16 @@
-- because in C it is common to see bkgdset(A_BOLD) or
-- bkgdset(COLOR_PAIR(n))
procedure Set_Background
- (Win : in Window := Standard_Window;
- Ch : in Attributed_Character);
+ (Win : Window := Standard_Window;
+ Ch : Attributed_Character);
-- AKA
-- ALIAS(`bkgdset()')
pragma Inline (Set_Background);
-- ANCHOR(`wbkgd()',`Change_Background')
procedure Change_Background
- (Win : in Window := Standard_Window;
- Ch : in Attributed_Character);
+ (Win : Window := Standard_Window;
+ Ch : Attributed_Character);
-- AKA
-- ALIAS(`bkgd()')
pragma Inline (Change_Background);
@@ -824,26 +1273,26 @@
-- MANPAGE(`curs_touch.3x')
-- ANCHOR(`untouchwin()',`Untouch')
- procedure Untouch (Win : in Window := Standard_Window);
+ procedure Untouch (Win : Window := Standard_Window);
-- AKA
pragma Inline (Untouch);
-- ANCHOR(`touchwin()',`Touch')
- procedure Touch (Win : in Window := Standard_Window);
+ procedure Touch (Win : Window := Standard_Window);
-- AKA
-- ANCHOR(`touchline()',`Touch')
- procedure Touch (Win : in Window := Standard_Window;
- Start : in Line_Position;
- Count : in Positive);
+ procedure Touch (Win : Window := Standard_Window;
+ Start : Line_Position;
+ Count : Positive);
-- AKA
pragma Inline (Touch);
-- ANCHOR(`wtouchln()',`Change_Line_Status')
- procedure Change_Lines_Status (Win : in Window := Standard_Window;
- Start : in Line_Position;
- Count : in Positive;
- State : in Boolean);
+ procedure Change_Lines_Status (Win : Window := Standard_Window;
+ Start : Line_Position;
+ Count : Positive;
+ State : Boolean);
-- AKA
pragma Inline (Change_Lines_Status);
@@ -861,27 +1310,27 @@
-- ANCHOR(`copywin()',`Copy')
procedure Copy
- (Source_Window : in Window;
- Destination_Window : in Window;
- Source_Top_Row : in Line_Position;
- Source_Left_Column : in Column_Position;
- Destination_Top_Row : in Line_Position;
- Destination_Left_Column : in Column_Position;
- Destination_Bottom_Row : in Line_Position;
- Destination_Right_Column : in Column_Position;
- Non_Destructive_Mode : in Boolean := True);
+ (Source_Window : Window;
+ Destination_Window : Window;
+ Source_Top_Row : Line_Position;
+ Source_Left_Column : Column_Position;
+ Destination_Top_Row : Line_Position;
+ Destination_Left_Column : Column_Position;
+ Destination_Bottom_Row : Line_Position;
+ Destination_Right_Column : Column_Position;
+ Non_Destructive_Mode : Boolean := True);
-- AKA
pragma Inline (Copy);
-- ANCHOR(`overwrite()',`Overwrite')
- procedure Overwrite (Source_Window : in Window;
- Destination_Window : in Window);
+ procedure Overwrite (Source_Window : Window;
+ Destination_Window : Window);
-- AKA
pragma Inline (Overwrite);
-- ANCHOR(`overlay()',`Overlay')
- procedure Overlay (Source_Window : in Window;
- Destination_Window : in Window);
+ procedure Overlay (Source_Window : Window;
+ Destination_Window : Window);
-- AKA
pragma Inline (Overlay);
@@ -889,20 +1338,20 @@
-- ANCHOR(`winsdelln()',`Insert_Delete_Lines')
procedure Insert_Delete_Lines
- (Win : in Window := Standard_Window;
- Lines : in Integer := 1); -- default is to insert one line above
+ (Win : Window := Standard_Window;
+ Lines : Integer := 1); -- default is to insert one line above
-- AKA
-- ALIAS(`insdelln()')
pragma Inline (Insert_Delete_Lines);
-- ANCHOR(`wdeleteln()',`Delete_Line')
- procedure Delete_Line (Win : in Window := Standard_Window);
+ procedure Delete_Line (Win : Window := Standard_Window);
-- AKA
-- ALIAS(`deleteln()')
pragma Inline (Delete_Line);
-- ANCHOR(`winsertln()',`Insert_Line')
- procedure Insert_Line (Win : in Window := Standard_Window);
+ procedure Insert_Line (Win : Window := Standard_Window);
-- AKA
-- ALIAS(`insertln()')
pragma Inline (Insert_Line);
@@ -911,7 +1360,7 @@
-- ANCHOR(`getmaxyx()',`Get_Size')
procedure Get_Size
- (Win : in Window := Standard_Window;
+ (Win : Window := Standard_Window;
Number_Of_Lines : out Line_Count;
Number_Of_Columns : out Column_Count);
-- AKA
@@ -919,7 +1368,7 @@
-- ANCHOR(`getbegyx()',`Get_Window_Position')
procedure Get_Window_Position
- (Win : in Window := Standard_Window;
+ (Win : Window := Standard_Window;
Top_Left_Line : out Line_Position;
Top_Left_Column : out Column_Position);
-- AKA
@@ -927,7 +1376,7 @@
-- ANCHOR(`getyx()',`Get_Cursor_Position')
procedure Get_Cursor_Position
- (Win : in Window := Standard_Window;
+ (Win : Window := Standard_Window;
Line : out Line_Position;
Column : out Column_Position);
-- AKA
@@ -935,12 +1384,12 @@
-- ANCHOR(`getparyx()',`Get_Origin_Relative_To_Parent')
procedure Get_Origin_Relative_To_Parent
- (Win : in Window;
+ (Win : Window;
Top_Left_Line : out Line_Position;
Top_Left_Column : out Column_Position;
Is_Not_A_Subwindow : out Boolean);
-- AKA
- -- Instead of placing -1 in the coordinates as return, we use a boolean
+ -- Instead of placing -1 in the coordinates as return, we use a Boolean
-- to return the info that the window has no parent.
pragma Inline (Get_Origin_Relative_To_Parent);
@@ -964,44 +1413,44 @@
-- ANCHOR(`prefresh()',`Refresh')
procedure Refresh
- (Pad : in Window;
- Source_Top_Row : in Line_Position;
- Source_Left_Column : in Column_Position;
- Destination_Top_Row : in Line_Position;
- Destination_Left_Column : in Column_Position;
- Destination_Bottom_Row : in Line_Position;
- Destination_Right_Column : in Column_Position);
+ (Pad : Window;
+ Source_Top_Row : Line_Position;
+ Source_Left_Column : Column_Position;
+ Destination_Top_Row : Line_Position;
+ Destination_Left_Column : Column_Position;
+ Destination_Bottom_Row : Line_Position;
+ Destination_Right_Column : Column_Position);
-- AKA
pragma Inline (Refresh);
-- ANCHOR(`pnoutrefresh()',`Refresh_Without_Update')
procedure Refresh_Without_Update
- (Pad : in Window;
- Source_Top_Row : in Line_Position;
- Source_Left_Column : in Column_Position;
- Destination_Top_Row : in Line_Position;
- Destination_Left_Column : in Column_Position;
- Destination_Bottom_Row : in Line_Position;
- Destination_Right_Column : in Column_Position);
+ (Pad : Window;
+ Source_Top_Row : Line_Position;
+ Source_Left_Column : Column_Position;
+ Destination_Top_Row : Line_Position;
+ Destination_Left_Column : Column_Position;
+ Destination_Bottom_Row : Line_Position;
+ Destination_Right_Column : Column_Position);
-- AKA
pragma Inline (Refresh_Without_Update);
-- ANCHOR(`pechochar()',`Add_Character_To_Pad_And_Echo_It')
procedure Add_Character_To_Pad_And_Echo_It
- (Pad : in Window;
- Ch : in Attributed_Character);
+ (Pad : Window;
+ Ch : Attributed_Character);
-- AKA
procedure Add_Character_To_Pad_And_Echo_It
- (Pad : in Window;
- Ch : in Character);
+ (Pad : Window;
+ Ch : Character);
pragma Inline (Add_Character_To_Pad_And_Echo_It);
-- MANPAGE(`curs_scroll.3x')
-- ANCHOR(`wscrl()',`Scroll')
- procedure Scroll (Win : in Window := Standard_Window;
- Amount : in Integer := 1);
+ procedure Scroll (Win : Window := Standard_Window;
+ Amount : Integer := 1);
-- AKA
-- ALIAS(`scroll()')
-- ALIAS(`scrl()')
@@ -1010,15 +1459,15 @@
-- MANPAGE(`curs_delch.3x')
-- ANCHOR(`wdelch()',`Delete_Character')
- procedure Delete_Character (Win : in Window := Standard_Window);
+ procedure Delete_Character (Win : Window := Standard_Window);
-- AKA
-- ALIAS(`delch()')
-- ANCHOR(`mvwdelch()',`Delete_Character')
procedure Delete_Character
- (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position);
+ (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position);
-- AKA
-- ALIAS(`mvdelch()')
pragma Inline (Delete_Character);
@@ -1043,36 +1492,36 @@
-- MANPAGE(`curs_insch.3x')
-- ANCHOR(`winsch()',`Insert')
- procedure Insert (Win : in Window := Standard_Window;
- Ch : in Attributed_Character);
+ procedure Insert (Win : Window := Standard_Window;
+ Ch : Attributed_Character);
-- AKA
-- ALIAS(`insch()')
-- ANCHOR(`mvwinsch()',`Insert')
- procedure Insert (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Ch : in Attributed_Character);
+ procedure Insert (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Ch : Attributed_Character);
-- AKA
-- ALIAS(`mvinsch()')
-- MANPAGE(`curs_insstr.3x')
-- ANCHOR(`winsnstr()',`Insert')
- procedure Insert (Win : in Window := Standard_Window;
- Str : in String;
- Len : in Integer := -1);
+ procedure Insert (Win : Window := Standard_Window;
+ Str : String;
+ Len : Integer := -1);
-- AKA
-- ALIAS(`winsstr()')
-- ALIAS(`insnstr()')
-- ALIAS(`insstr()')
-- ANCHOR(`mvwinsnstr()',`Insert')
- procedure Insert (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
- Str : in String;
- Len : in Integer := -1);
+ procedure Insert (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
+ Str : String;
+ Len : Integer := -1);
-- AKA
-- ALIAS(`mvwinsstr()')
-- ALIAS(`mvinsnstr()')
@@ -1082,20 +1531,20 @@
-- MANPAGE(`curs_instr.3x')
-- ANCHOR(`winnstr()',`Peek')
- procedure Peek (Win : in Window := Standard_Window;
+ procedure Peek (Win : Window := Standard_Window;
Str : out String;
- Len : in Integer := -1);
+ Len : Integer := -1);
-- AKA
-- ALIAS(`winstr()')
-- ALIAS(`innstr()')
-- ALIAS(`instr()')
-- ANCHOR(`mvwinnstr()',`Peek')
- procedure Peek (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
+ procedure Peek (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
Str : out String;
- Len : in Integer := -1);
+ Len : Integer := -1);
-- AKA
-- ALIAS(`mvwinstr()')
-- ALIAS(`mvinnstr()')
@@ -1104,32 +1553,32 @@
-- MANPAGE(`curs_inchstr.3x')
-- ANCHOR(`winchnstr()',`Peek')
- procedure Peek (Win : in Window := Standard_Window;
+ procedure Peek (Win : Window := Standard_Window;
Str : out Attributed_String;
- Len : in Integer := -1);
+ Len : Integer := -1);
-- AKA
-- ALIAS(`winchstr()')
-- ALIAS(`inchnstr()')
-- ALIAS(`inchstr()')
-- ANCHOR(`mvwinchnstr()',`Peek')
- procedure Peek (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
+ procedure Peek (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
Str : out Attributed_String;
- Len : in Integer := -1);
+ Len : Integer := -1);
-- AKA
-- ALIAS(`mvwinchstr()')
-- ALIAS(`mvinchnstr()')
-- ALIAS(`mvinchstr()')
- -- We don't inline the Peek procedures
+ -- We do not inline the Peek procedures
-- MANPAGE(`curs_getstr.3x')
-- ANCHOR(`wgetnstr()',`Get')
- procedure Get (Win : in Window := Standard_Window;
+ procedure Get (Win : Window := Standard_Window;
Str : out String;
- Len : in Integer := -1);
+ Len : Integer := -1);
-- AKA
-- ALIAS(`wgetstr()')
-- ALIAS(`getnstr()')
@@ -1138,11 +1587,11 @@
-- overflows.
-- ANCHOR(`mvwgetnstr()',`Get')
- procedure Get (Win : in Window := Standard_Window;
- Line : in Line_Position;
- Column : in Column_Position;
+ procedure Get (Win : Window := Standard_Window;
+ Line : Line_Position;
+ Column : Column_Position;
Str : out String;
- Len : in Integer := -1);
+ Len : Integer := -1);
-- AKA
-- ALIAS(`mvwgetstr()')
-- ALIAS(`mvgetnstr()')
@@ -1162,16 +1611,16 @@
-- ANCHOR(`slk_init()',`Init_Soft_Label_Keys')
procedure Init_Soft_Label_Keys
- (Format : in Soft_Label_Key_Format := Three_Two_Three);
+ (Format : Soft_Label_Key_Format := Three_Two_Three);
-- AKA
pragma Inline (Init_Soft_Label_Keys);
-- ANCHOR(`slk_set()',`Set_Soft_Label_Key')
- procedure Set_Soft_Label_Key (Label : in Label_Number;
- Text : in String;
- Fmt : in Label_Justification := Left);
+ procedure Set_Soft_Label_Key (Label : Label_Number;
+ Text : String;
+ Fmt : Label_Justification := Left);
-- AKA
- -- We don't inline this procedure
+ -- We do not inline this procedure
-- ANCHOR(`slk_refresh()',`Refresh_Soft_Label_Key')
procedure Refresh_Soft_Label_Keys;
@@ -1184,12 +1633,12 @@
pragma Inline (Refresh_Soft_Label_Keys_Without_Update);
-- ANCHOR(`slk_label()',`Get_Soft_Label_Key')
- procedure Get_Soft_Label_Key (Label : in Label_Number;
+ procedure Get_Soft_Label_Key (Label : Label_Number;
Text : out String);
-- AKA
-- ANCHOR(`slk_label()',`Get_Soft_Label_Key')
- function Get_Soft_Label_Key (Label : in Label_Number) return String;
+ function Get_Soft_Label_Key (Label : Label_Number) return String;
-- AKA
-- Same as function
pragma Inline (Get_Soft_Label_Key);
@@ -1211,16 +1660,16 @@
-- ANCHOR(`slk_attron()',`Switch_Soft_Label_Key_Attributes')
procedure Switch_Soft_Label_Key_Attributes
- (Attr : in Character_Attribute_Set;
- On : in Boolean := True);
+ (Attr : Character_Attribute_Set;
+ On : Boolean := True);
-- AKA
-- ALIAS(`slk_attroff()')
pragma Inline (Switch_Soft_Label_Key_Attributes);
-- ANCHOR(`slk_attrset()',`Set_Soft_Label_Key_Attributes')
procedure Set_Soft_Label_Key_Attributes
- (Attr : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First);
+ (Attr : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First);
-- AKA
pragma Inline (Set_Soft_Label_Key_Attributes);
@@ -1234,7 +1683,7 @@
pragma Inline (Get_Soft_Label_Key_Attributes);
-- ANCHOR(`slk_color()',`Set_Soft_Label_Key_Color')
- procedure Set_Soft_Label_Key_Color (Pair : in Color_Pair);
+ procedure Set_Soft_Label_Key_Color (Pair : Color_Pair);
-- AKA
pragma Inline (Set_Soft_Label_Key_Color);
@@ -1244,16 +1693,16 @@
-- MANPAGE(`keyok.3x')
-- ANCHOR(`keyok()',`Enable_Key')
- procedure Enable_Key (Key : in Special_Key_Code;
- Enable : in Boolean := True);
+ procedure Enable_Key (Key : Special_Key_Code;
+ Enable : Boolean := True);
-- AKA
pragma Inline (Enable_Key);
-- MANPAGE(`define_key.3x')
-- ANCHOR(`define_key()',`Define_Key')
- procedure Define_Key (Definition : in String;
- Key : in Special_Key_Code);
+ procedure Define_Key (Definition : String;
+ Key : Special_Key_Code);
-- AKA
pragma Inline (Define_Key);
@@ -1264,30 +1713,30 @@
--
-- ANCHOR(`keyname()',`Key_Name')
- procedure Key_Name (Key : in Real_Key_Code;
+ procedure Key_Name (Key : Real_Key_Code;
Name : out String);
-- AKA
-- The external name for a real keystroke.
-- ANCHOR(`keyname()',`Key_Name')
- function Key_Name (Key : in Real_Key_Code) return String;
+ function Key_Name (Key : Real_Key_Code) return String;
-- AKA
-- Same as function
- -- We don't inline this routine
+ -- We do not inline this routine
-- ANCHOR(`unctrl()',`Un_Control')
- procedure Un_Control (Ch : in Attributed_Character;
+ procedure Un_Control (Ch : Attributed_Character;
Str : out String);
-- AKA
-- ANCHOR(`unctrl()',`Un_Control')
- function Un_Control (Ch : in Attributed_Character) return String;
+ function Un_Control (Ch : Attributed_Character) return String;
-- AKA
-- Same as function
pragma Inline (Un_Control);
-- ANCHOR(`delay_output()',`Delay_Output')
- procedure Delay_Output (Msecs : in Natural);
+ procedure Delay_Output (Msecs : Natural);
-- AKA
pragma Inline (Delay_Output);
@@ -1362,14 +1811,14 @@
pragma Import (C, Start_Color, "start_color");
-- ANCHOR(`init_pair()',`Init_Pair')
- procedure Init_Pair (Pair : in Redefinable_Color_Pair;
- Fore : in Color_Number;
- Back : in Color_Number);
+ procedure Init_Pair (Pair : Redefinable_Color_Pair;
+ Fore : Color_Number;
+ Back : Color_Number);
-- AKA
pragma Inline (Init_Pair);
-- ANCHOR(`pair_content()',`Pair_Content')
- procedure Pair_Content (Pair : in Color_Pair;
+ procedure Pair_Content (Pair : Color_Pair;
Fore : out Color_Number;
Back : out Color_Number);
-- AKA
@@ -1381,10 +1830,10 @@
pragma Inline (Has_Colors);
-- ANCHOR(`init_color()',`Init_Color')
- procedure Init_Color (Color : in Color_Number;
- Red : in RGB_Value;
- Green : in RGB_Value;
- Blue : in RGB_Value);
+ procedure Init_Color (Color : Color_Number;
+ Red : RGB_Value;
+ Green : RGB_Value;
+ Blue : RGB_Value);
-- AKA
pragma Inline (Init_Color);
@@ -1394,7 +1843,7 @@
pragma Inline (Can_Change_Color);
-- ANCHOR(`color_content()',`Color_Content')
- procedure Color_Content (Color : in Color_Number;
+ procedure Color_Content (Color : Color_Number;
Red : out RGB_Value;
Green : out RGB_Value;
Blue : out RGB_Value);
@@ -1407,13 +1856,13 @@
type Curses_Mode is (Curses, Shell);
-- ANCHOR(`def_prog_mode()',`Save_Curses_Mode')
- procedure Save_Curses_Mode (Mode : in Curses_Mode);
+ procedure Save_Curses_Mode (Mode : Curses_Mode);
-- AKA
-- ALIAS(`def_shell_mode()')
pragma Inline (Save_Curses_Mode);
-- ANCHOR(`reset_prog_mode()',`Reset_Curses_Mode')
- procedure Reset_Curses_Mode (Mode : in Curses_Mode);
+ procedure Reset_Curses_Mode (Mode : Curses_Mode);
-- AKA
-- ALIAS(`reset_shell_mode()')
pragma Inline (Reset_Curses_Mode);
@@ -1437,13 +1886,13 @@
-- and -1 otherwise.
-- ANCHOR(`ripoffline()',`Rip_Off_Lines')
- procedure Rip_Off_Lines (Lines : in Integer;
- Proc : in Stdscr_Init_Proc);
+ procedure Rip_Off_Lines (Lines : Integer;
+ Proc : Stdscr_Init_Proc);
-- AKA
-- N.B.: to be more precise, this uses a ncurses specific enhancement of
-- ripoffline(), in which the Lines argument absolute value is the
-- number of lines to be ripped of. The official ripoffline() only
- -- uses the sign of Lines to rip of a single line from bottom or top.
+ -- uses the sign of Lines to remove a single line from bottom or top.
pragma Inline (Rip_Off_Lines);
type Cursor_Visibility is (Invisible, Normal, Very_Visible);
@@ -1454,7 +1903,7 @@
pragma Inline (Set_Cursor_Visibility);
-- ANCHOR(`napms()',`Nap_Milli_Seconds')
- procedure Nap_Milli_Seconds (Ms : in Natural);
+ procedure Nap_Milli_Seconds (Ms : Natural);
-- AKA
pragma Inline (Nap_Milli_Seconds);
@@ -1463,19 +1912,21 @@
-- |=====================================================================
type Transform_Direction is (From_Screen, To_Screen);
procedure Transform_Coordinates
- (W : in Window := Standard_Window;
+ (W : Window := Standard_Window;
Line : in out Line_Position;
Column : in out Column_Position;
- Dir : in Transform_Direction := From_Screen);
+ Dir : Transform_Direction := From_Screen);
-- This procedure transforms screen coordinates into coordinates relative
-- to the window and vice versa, depending on the Dir parameter.
- -- Screen coordinates are the position informations on the physical device.
+ -- Screen coordinates are the position information for the physical device.
-- An Curses_Exception will be raised if Line and Column are not in the
-- Window or if you pass the Null_Window as argument.
- -- We don't inline this procedure
+ -- We do not inline this procedure
-- MANPAGE(`default_colors.3x')
+ Default_Color : constant Color_Number := -1;
+
-- ANCHOR(`use_default_colors()',`Use_Default_Colors')
procedure Use_Default_Colors;
-- AKA
@@ -1507,29 +1958,29 @@
-- MANPAGE(`curs_scr_dump.3x')
-- ANCHOR(`scr_dump()',`Screen_Dump_To_File')
- procedure Screen_Dump_To_File (Filename : in String);
+ procedure Screen_Dump_To_File (Filename : String);
-- AKA
-- ANCHOR(`scr_restore()',`Screen_Restore_From_File')
- procedure Screen_Restore_From_File (Filename : in String);
+ procedure Screen_Restore_From_File (Filename : String);
-- AKA
-- ANCHOR(`scr_init()',`Screen_Init_From_File')
- procedure Screen_Init_From_File (Filename : in String);
+ procedure Screen_Init_From_File (Filename : String);
-- AKA
-- ANCHOR(`scr_set()',`Screen_Set_File')
- procedure Screen_Set_File (Filename : in String);
+ procedure Screen_Set_File (Filename : String);
-- AKA
-- MANPAGE(`curs_print.3x')
- -- Not implemented: mcprint
+ -- Not implemented: mcprint
-- MANPAGE(`curs_printw.3x')
-- Not implemented: printw, wprintw, mvprintw, mvwprintw, vwprintw,
-- vw_printw
-- Please use the Ada style Text_IO child packages for formatted
- -- printing. It doesn't make a lot of sense to map the printf style
+ -- printing. It does not make a lot of sense to map the printf style
-- C functions to Ada.
-- MANPAGE(`curs_scanw.3x')
@@ -1553,7 +2004,11 @@
-- The next constants are generated and may be different on your
-- architecture.
--
-include(`Window_Offsets')dnl
+
+ Sizeof_Bool : constant := Curses_Constants.Sizeof_Bool;
+
+ type Curses_Bool is mod 2 ** Sizeof_Bool;
+
Curses_Bool_False : constant Curses_Bool := 0;
end Terminal_Interface.Curses;
diff --git a/Ada95/include/MKncurses_def.sh b/Ada95/include/MKncurses_def.sh
new file mode 100755
index 0000000..4aac865
--- /dev/null
+++ b/Ada95/include/MKncurses_def.sh
@@ -0,0 +1,80 @@
+#! /bin/sh
+# $Id: MKncurses_def.sh,v 1.2 2003/10/25 16:19:46 tom Exp $
+##############################################################################
+# Copyright (c) 2000 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# MKncurses_def.sh -- generate fallback definitions for ncurses_cfg.h
+#
+# Author: Thomas E. Dickey 2000
+#
+# Given the choice between constructs such as
+#
+# #if defined(foo) && foo
+# #if foo
+#
+# we chose the latter. It is guaranteed by the language standard, and there
+# appear to be no broken compilers that do not honor that detail. But some
+# people want to use gcc's -Wundef option (corresponding to one of the less
+# useful features in Watcom's compiler) to check for misspellings. So we
+# generate a set of fallback definitions to quiet the warnings without making
+# the code ugly.
+#
+DEFS="${1-ncurses_defs}"
+cat <<EOF
+/*
+ * This file is generated by $0
+ */
+
+#ifndef NC_DEFINE_H
+#define NC_DEFINE_H 1
+
+EOF
+
+${AWK-awk} <$DEFS '
+!/^[@#]/ {
+ if ( NF == 1 )
+ {
+ print "#ifndef", $1
+ print "#define", $1, "0"
+ print "#endif"
+ print ""
+ } else if ( NF != 0 ) {
+ print "#ifndef", $1
+ printf "#define"
+ for (n = 1; n <= NF; n++) {
+ printf " %s", $n
+ }
+ print ""
+ print "#endif"
+ print ""
+ }
+}
+END {
+print "#endif /* NC_DEFINE_H */"
+ }
+'
diff --git a/Ada95/include/Makefile.in b/Ada95/include/Makefile.in
new file mode 100644
index 0000000..0a89ed6
--- /dev/null
+++ b/Ada95/include/Makefile.in
@@ -0,0 +1,92 @@
+# $Id: Makefile.in,v 1.4 2015/08/05 23:15:41 tom Exp $
+##############################################################################
+# Copyright (c) 2010-2011,2015 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# Makefile for ncurses source code.
+#
+# This makes header files used when building Ada95 as a separate tree.
+#
+# The variable 'srcdir' refers to the source-distribution, and can be set with
+# the configure script by "--srcdir=DIR".
+
+# turn off _all_ suffix rules; we'll generate our own
+.SUFFIXES:
+
+SHELL = @SHELL@
+VPATH = @srcdir@
+THIS = Makefile
+
+DESTDIR = @DESTDIR@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+includedir = @includedir@
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+AWK = @AWK@
+
+# These files are generated by this makefile
+AUTO_SRC = \
+ ncurses_def.h
+
+################################################################################
+all \
+libs \
+depend \
+sources \
+install :: $(AUTO_SRC)
+
+uninstall ::
+
+ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
+ AWK=$(AWK) $(SHELL) $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
+
+tags:
+ ctags *.[ch]
+
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
+
+mostlyclean ::
+ -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
+
+clean :: mostlyclean
+ -rm -f $(AUTO_SRC)
+
+distclean :: clean
+ -rm -f Makefile
+
+realclean :: distclean
+
+###############################################################################
+# The remainder of this file is automatically generated during configuration
+###############################################################################
diff --git a/Ada95/include/ncurses_cfg.hin b/Ada95/include/ncurses_cfg.hin
new file mode 100644
index 0000000..3f8a482
--- /dev/null
+++ b/Ada95/include/ncurses_cfg.hin
@@ -0,0 +1,72 @@
+/****************************************************************************
+ * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+/*
+ * $Id: ncurses_cfg.hin,v 1.7 2005/01/02 01:26:58 tom Exp $
+ *
+ * This is a template-file used to generate the "ncurses_cfg.h" file.
+ *
+ * Rather than list every definition, the configuration script substitutes the
+ * definitions that it finds using 'sed'. You need a patch (original date
+ * 971222) to autoconf 2.12 or 2.13 to do this.
+ *
+ * See:
+ * http://invisible-island.net/autoconf/
+ * ftp://invisible-island.net/autoconf/
+ */
+#ifndef NC_CONFIG_H
+#define NC_CONFIG_H
+@DEFS@
+
+#include <ncurses_def.h>
+
+ /* The C compiler may not treat these properly but C++ has to */
+#ifdef __cplusplus
+#undef const
+#undef inline
+#else
+#if defined(lint) || defined(TRACE)
+#undef inline
+#define inline /* nothing */
+#endif
+#endif
+
+ /* On HP-UX, the C compiler doesn't grok mbstate_t without
+ -D_XOPEN_SOURCE=500. However, this causes problems on
+ IRIX. So, we #define mbstate_t to int in configure.in
+ only for the C compiler if needed. */
+#ifndef __cplusplus
+#ifdef NEED_MBSTATE_T_DEF
+#define mbstate_t int
+#endif
+#endif
+
+#endif /* NC_CONFIG_H */
diff --git a/Ada95/include/ncurses_defs b/Ada95/include/ncurses_defs
new file mode 100644
index 0000000..3174620
--- /dev/null
+++ b/Ada95/include/ncurses_defs
@@ -0,0 +1,204 @@
+# $Id: ncurses_defs,v 1.44 2013/04/27 19:50:17 tom Exp $
+##############################################################################
+# Copyright (c) 2000-2012,2013 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# See "MKncurses_def.sh" for an explanation.
+#
+# (hint: don't try to define NDEBUG ;-)
+
+BROKEN_LINKER
+BSD_TPUTS
+CPP_HAS_PARAM_INIT
+CURSES_ACS_ARRAY acs_map
+CURSES_WACS_ARRAY _nc_wacs
+DECL_ERRNO
+ETIP_NEEDS_MATH_H
+GCC_NORETURN /* nothing */
+GCC_UNUSED /* nothing */
+HAVE_BIG_CORE
+HAVE_BSD_CGETENT
+HAVE_BSD_SIGNAL_H
+HAVE_BTOWC
+HAVE_BUILTIN_H
+HAVE_CHGAT 1
+HAVE_COLOR_SET 1
+HAVE_DIRENT_H
+HAVE_ERRNO
+HAVE_FCNTL_H
+HAVE_FILTER 1
+HAVE_FORM_H
+HAVE_GETBEGX 1
+HAVE_GETCURX 1
+HAVE_GETCWD
+HAVE_GETEGID
+HAVE_GETEUID
+HAVE_GETMAXX 1
+HAVE_GETNSTR
+HAVE_GETOPT_H
+HAVE_GETPARX 1
+HAVE_GETTIMEOFDAY
+HAVE_GETTTYNAM
+HAVE_GETWIN 1
+HAVE_GPM_H
+HAVE_GPP_BUILTIN_H
+HAVE_GXX_BUILTIN_H
+HAVE_HAS_KEY
+HAVE_IOSTREAM
+HAVE_ISASCII
+HAVE_ISSETUGID
+HAVE_LANGINFO_CODESET
+HAVE_LIBC_H
+HAVE_LIBDBMALLOC
+HAVE_LIBDMALLOC
+HAVE_LIBFORM
+HAVE_LIBGPM
+HAVE_LIBMENU
+HAVE_LIBMPATROL
+HAVE_LIBPANEL
+HAVE_LIMITS_H
+HAVE_LINK
+HAVE_LOCALE_H
+HAVE_LONG_FILE_NAMES
+HAVE_MBLEN
+HAVE_MBRLEN
+HAVE_MBRTOWC
+HAVE_MBSRTOWCS
+HAVE_MBSTOWCS
+HAVE_MBTOWC
+HAVE_MENU_H
+HAVE_MKSTEMP
+HAVE_MVVLINE 1
+HAVE_MVWVLINE 1
+HAVE_NANOSLEEP
+HAVE_NC_ALLOC_H
+HAVE_PANEL_H
+HAVE_POLL
+HAVE_POLL_H
+HAVE_PURIFY
+HAVE_PUTWC
+HAVE_PUTWIN 1
+HAVE_REGEXPR_H_FUNCS
+HAVE_REGEXP_H_FUNCS
+HAVE_REGEX_H_FUNCS
+HAVE_REMOVE
+HAVE_RESIZETERM
+HAVE_RESIZE_TERM
+HAVE_RIPOFFLINE 1
+HAVE_SELECT
+HAVE_SETBUF
+HAVE_SETBUFFER
+HAVE_SETUPTERM 1
+HAVE_SETVBUF
+HAVE_SIGACTION
+HAVE_SIGVEC
+HAVE_SIZECHANGE
+HAVE_SLK_COLOR
+HAVE_SLK_INIT 1
+HAVE_STRSTR
+HAVE_SYMLINK
+HAVE_SYS_BSDTYPES_H
+HAVE_SYS_IOCTL_H
+HAVE_SYS_PARAM_H
+HAVE_SYS_POLL_H
+HAVE_SYS_SELECT_H
+HAVE_SYS_TERMIO_H
+HAVE_SYS_TIMES_H
+HAVE_SYS_TIME_H
+HAVE_SYS_TIME_SELECT
+HAVE_TCGETATTR
+HAVE_TCGETPGRP
+HAVE_TELL
+HAVE_TERMATTRS 1
+HAVE_TERMIOS_H
+HAVE_TERMIO_H
+HAVE_TERMNAME 1
+HAVE_TERM_H 1
+HAVE_TGETENT 1
+HAVE_TIGETNUM 1
+HAVE_TIGETSTR 1
+HAVE_TIMES
+HAVE_TTYENT_H
+HAVE_TYPEAHEAD 1
+HAVE_TYPEINFO
+HAVE_TYPE_ATTR_T
+HAVE_TYPE_SIGACTION
+HAVE_UNISTD_H
+HAVE_UNLINK
+HAVE_USE_DEFAULT_COLORS
+HAVE_VFSCANF
+HAVE_VSNPRINTF
+HAVE_VSSCANF
+HAVE_WCSRTOMBS
+HAVE_WCSTOMBS
+HAVE_WCTOB
+HAVE_WCTOMB
+HAVE_WCTYPE_H
+HAVE_WINSSTR 1
+HAVE_WORKING_POLL
+HAVE_WRESIZE
+HAVE__DOSCAN
+MIXEDCASE_FILENAMES
+NCURSES_CHAR_EQ
+NCURSES_EXPANDED
+NCURSES_EXT_COLORS
+NCURSES_EXT_FUNCS
+NCURSES_NO_PADDING
+NCURSES_PATHSEP ':'
+NEED_PTEM_H
+NO_LEAKS
+PURE_TERMINFO
+STDC_HEADERS
+SVR4_ACTION
+SVR4_TERMIO
+SYSTEM_NAME "unknown"
+TERMINFO "none"
+TERMPATH "none"
+TIME_WITH_SYS_TIME
+TYPEOF_CHTYPE
+USE_COLORFGBG
+USE_DATABASE
+USE_GETCAP
+USE_GETCAP_CACHE
+USE_HARD_TABS
+USE_HASHED_DB
+USE_HASHMAP
+USE_HOME_TERMINFO
+USE_LINKS
+USE_MY_MEMMOVE
+USE_OK_BCOPY
+USE_RCS_IDS
+USE_REENTRANT
+USE_SAFE_SPRINTF
+USE_SCROLL_HINTS
+USE_SIGWINCH
+USE_SYMLINKS
+USE_SYSMOUSE
+USE_TERMCAP
+USE_WEAK_SYMBOLS
+USE_WIDEC_SUPPORT
+USE_XMC_SUPPORT
diff --git a/Ada95/make-tar.sh b/Ada95/make-tar.sh
new file mode 100755
index 0000000..f3d0a64
--- /dev/null
+++ b/Ada95/make-tar.sh
@@ -0,0 +1,156 @@
+#!/bin/sh
+# $Id: make-tar.sh,v 1.15 2015/05/16 17:12:37 tom Exp $
+##############################################################################
+# Copyright (c) 2010-2013,2015 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+# Construct a tar-file containing only the Ada95 tree as well as its associated
+# documentation. The reason for doing that is to simplify distributing the
+# ada binding as a separate package.
+
+CDPATH=:
+export CDPATH
+
+TARGET=`pwd`
+
+: ${ROOTNAME:=ncurses-Ada95}
+: ${PKG_NAME:=AdaCurses}
+: ${DESTDIR:=$TARGET}
+: ${TMPDIR:=/tmp}
+
+grep_assign() {
+ grep_assign=`egrep "^$2\>" "$1" | sed -e "s/^$2[ ]*=[ ]*//" -e 's/"//g'`
+ eval $2=\"$grep_assign\"
+}
+
+grep_patchdate() {
+ grep_assign ../dist.mk NCURSES_MAJOR
+ grep_assign ../dist.mk NCURSES_MINOR
+ grep_assign ../dist.mk NCURSES_PATCH
+}
+
+# The rpm spec-file in the ncurses tree is a template. Fill in the version
+# information from dist.mk
+edit_specfile() {
+ sed \
+ -e "s/\\<MAJOR\\>/$NCURSES_MAJOR/g" \
+ -e "s/\\<MINOR\\>/$NCURSES_MINOR/g" \
+ -e "s/\\<YYYYMMDD\\>/$NCURSES_PATCH/g" $1 >$1.new
+ chmod u+w $1
+ mv $1.new $1
+}
+
+make_changelog() {
+ test -f $1 && chmod u+w $1
+ cat >$1 <<EOF
+`echo $PKG_NAME|tr '[A-Z]' '[a-z]'` ($NCURSES_MAJOR.$NCURSES_MINOR+$NCURSES_PATCH) unstable; urgency=low
+
+ * snapshot of ncurses subpackage for $PKG_NAME.
+
+ -- `head -n 1 $HOME/.signature` `date -R`
+EOF
+}
+
+# This can be run from either the subdirectory, or from the top-level
+# source directory. We will put the tar file in the original directory.
+test -d ./Ada95 && cd ./Ada95
+SOURCE=`cd ..;pwd`
+
+BUILD=$TMPDIR/make-tar$$
+trap "cd /; rm -rf $BUILD; exit 0" 0 1 2 5 15
+
+umask 077
+if ! ( mkdir $BUILD )
+then
+ echo "? cannot make build directory $BUILD"
+fi
+
+umask 022
+mkdir $BUILD/$ROOTNAME
+
+cp -p -r * $BUILD/$ROOTNAME/ || exit
+
+# Add the config.* utility scripts from the top-level directory.
+for i in . ..
+do
+ for j in config.guess config.sub install-sh tar-copy.sh
+ do
+ test -f $i/$j && cp -p $i/$j $BUILD/$ROOTNAME/
+ done
+done
+
+# Make rpm and dpkg scripts for test-builds
+grep_patchdate
+for spec in $BUILD/$ROOTNAME/package/*.spec
+do
+ edit_specfile $spec
+done
+for spec in $BUILD/$ROOTNAME/package/debian*
+do
+ make_changelog $spec/changelog
+done
+
+cp -p ../man/MKada_config.in $BUILD/$ROOTNAME/doc/
+if test -z "$NO_HTML_DOCS"
+then
+ # Add the ada documentation.
+ cd ../doc/html || exit
+
+ cp -p -r Ada* $BUILD/$ROOTNAME/doc/
+ cp -p -r ada $BUILD/$ROOTNAME/doc/
+fi
+
+cp -p $SOURCE/NEWS $BUILD/$ROOTNAME
+
+# cleanup empty directories (an artifact of ncurses source archives)
+
+touch $BUILD/$ROOTNAME/MANIFEST
+( cd $BUILD/$ROOTNAME && find . -type f -print |$SOURCE/misc/csort >MANIFEST )
+
+cd $BUILD || exit
+
+# Remove build-artifacts.
+find . -name RCS -exec rm -rf {} \;
+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null
+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null
+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null
+
+# There is no need for this script in the tar file.
+rm -f $ROOTNAME/make-tar.sh
+
+# Remove build-artifacts.
+find . -name "*.gz" -exec rm -rf {} \;
+
+# Make the files writable...
+chmod -R u+w .
+
+tar cf - $ROOTNAME | gzip >$DESTDIR/$ROOTNAME.tar.gz
+cd $DESTDIR
+
+pwd
+ls -l $ROOTNAME.tar.gz
+
+# vi:ts=4 sw=4
diff --git a/Ada95/mk-1st.awk b/Ada95/mk-1st.awk
new file mode 100644
index 0000000..7726549
--- /dev/null
+++ b/Ada95/mk-1st.awk
@@ -0,0 +1,90 @@
+# $Id: mk-1st.awk,v 1.4 2011/02/22 09:40:01 tom Exp $
+##############################################################################
+# Copyright (c) 2010,2011 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# Generate compile-rules for the Ada95 modules that we are using in libraries
+# or programs. This script is used for older versions of gnatmake, which do
+# not build libraries reliably, e.g., gnatmake 3.15.
+#
+# Fields in src/modules:
+# $1 = module name
+# $2 = directory where spec-dependency ".ads" is found
+# $3 = directory where body-dependency ".adb" is found
+# $4 = unit to compile (spec or body)
+#
+BEGIN {
+ printf "\n";
+ printf "# generated by Ada95/mk-1st.awk\n";
+ }
+ /^[#]/ {
+ next
+ }
+ /^$/ {
+ next
+ }
+ {
+ printf "\n";
+ printf "%s.o :", $1;
+
+ if ( $2 == "none" ) {
+ pre_spec = "";
+ } else if ( $2 == "." ) {
+ pre_spec = "";
+ printf " \\\n\t\t%s.ads", $1;
+ } else {
+ pre_spec = sprintf("%s/", $2);
+ printf " \\\n\t\t%s%s.ads", pre_spec, $1;
+ }
+
+ if ( $3 == "none" ) {
+ pre_body = "";
+ } else if ( $3 == "." ) {
+ pre_body = "";
+ printf " \\\n\t\t%s.adb", $1;
+ } else {
+ pre_body = sprintf("%s/", $3);
+ printf " \\\n\t\t%s%s.adb", pre_body, $1;
+ printf " \\\n\t\t$(BASEDEPS)";
+ }
+
+ if ( $4 == "spec" ) {
+ suffix = "ads";
+ prefix = pre_spec;
+ } else {
+ suffix = "adb";
+ prefix = pre_body;
+ }
+
+ printf "\n";
+ printf "\t$(ADA) $(ADAFLAGS) -c -o $@ %s%s.%s\n", prefix, $1, suffix
+ }
+END {
+ print ""
+ }
diff --git a/Ada95/package/AdaCurses-doc.spec b/Ada95/package/AdaCurses-doc.spec
new file mode 100644
index 0000000..92c96ac
--- /dev/null
+++ b/Ada95/package/AdaCurses-doc.spec
@@ -0,0 +1,50 @@
+Summary: AdaCurses - Ada95 binding documentation for ncurses
+%define AppProgram AdaCurses
+%define AppVersion MAJOR.MINOR
+%define AppRelease YYYYMMDD
+%define AppPackage %{AppProgram}-doc
+# $Id: AdaCurses-doc.spec,v 1.3 2015/04/26 23:39:31 tom Exp $
+Name: %{AppPackage}
+Version: %{AppVersion}
+Release: %{AppRelease}
+License: MIT
+Group: Applications/Development
+URL: ftp://invisible-island.net/%{AppProgram}
+Source0: %{AppProgram}-%{AppRelease}.tgz
+Packager: Thomas Dickey <dickey@invisible-island.net>
+
+%description
+This is the Ada95 binding documentation from the ncurses MAJOR.MINOR
+distribution, for patch-date YYYYMMDD.
+%prep
+
+%define debug_package %{nil}
+
+%setup -q -n %{AppProgram}-%{AppRelease}
+
+%build
+
+INSTALL_PROGRAM='${INSTALL}' \
+ ./configure \
+ --target %{_target_platform} \
+ --prefix=%{_prefix} \
+ --datadir=%{_datadir} \
+ --with-ada-sharedlib
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+
+(cd doc && make install.html DESTDIR=$RPM_BUILD_ROOT )
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_datadir}/doc/AdaCurses
+
+%changelog
+# each patch should add its ChangeLog entries here
+
+* Sat Mar 26 2011 Thomas Dickey
+- initial version
diff --git a/Ada95/package/AdaCurses.spec b/Ada95/package/AdaCurses.spec
new file mode 100644
index 0000000..4e2354c
--- /dev/null
+++ b/Ada95/package/AdaCurses.spec
@@ -0,0 +1,84 @@
+Summary: AdaCurses - Ada95 binding for ncurses
+%define AppProgram AdaCurses
+%define AppVersion MAJOR.MINOR
+%define AppRelease YYYYMMDD
+# $Id: AdaCurses.spec,v 1.15 2015/04/26 23:55:55 tom Exp $
+Name: %{AppProgram}
+Version: %{AppVersion}
+Release: %{AppRelease}
+License: MIT
+Group: Applications/Development
+URL: ftp://invisible-island.net/%{AppProgram}
+Source0: %{AppProgram}-%{AppRelease}.tgz
+Packager: Thomas Dickey <dickey@invisible-island.net>
+
+%description
+This is the Ada95 binding from the ncurses MAJOR.MINOR distribution, for
+patch-date YYYYMMDD.
+
+In addition to a library, this package installs sample programs in
+"bin/AdaCurses" to avoid conflict with other packages.
+%prep
+
+%define debug_package %{nil}
+
+# http://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering
+%filter_from_requires /libAdaCurses.so.1/d
+%filter_setup
+
+%setup -q -n %{AppProgram}-%{AppRelease}
+
+%build
+
+%define ada_libdir %{_prefix}/lib/ada/adalib
+
+INSTALL_PROGRAM='${INSTALL}' \
+ ./configure \
+ --target %{_target_platform} \
+ --prefix=%{_prefix} \
+ --bindir=%{_bindir} \
+ --libdir=%{_libdir} \
+ --mandir=%{_mandir} \
+ --datadir=%{_datadir} \
+ --disable-rpath-link \
+ --with-shared \
+ --with-ada-sharedlib
+
+make
+
+%install
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+
+make install DESTDIR=$RPM_BUILD_ROOT
+
+( cd samples &&
+ make install.examples \
+ DESTDIR=$RPM_BUILD_ROOT \
+ BINDIR=$RPM_BUILD_ROOT%{_bindir}/%{AppProgram}
+)
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_bindir}/adacurses*-config
+%{_bindir}/%{AppProgram}/*
+%{_libdir}/libAdaCurses.*
+%{ada_libdir}/libAdaCurses.*
+%{ada_libdir}/terminal_interface*
+%{_mandir}/man1/adacurses*-config.1*
+%{_datadir}/%{AppProgram}/*
+%{_datadir}/ada/adainclude/terminal_interface*
+
+%changelog
+# each patch should add its ChangeLog entries here
+
+* Thu Mar 31 2011 Thomas Dickey
+- use --with-shared option for consistency with --with-ada-sharelib
+- ensure that MY_DATADIR is set when installing examples
+- add ada_libdir symbol to handle special case where libdir is /usr/lib64
+- use --disable-rpath-link to link sample programs without rpath
+
+* Fri Mar 25 2011 Thomas Dickey
+- initial version
diff --git a/Ada95/package/debian/compat b/Ada95/package/debian/compat
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/Ada95/package/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/Ada95/package/debian/control b/Ada95/package/debian/control
new file mode 100644
index 0000000..88af970
--- /dev/null
+++ b/Ada95/package/debian/control
@@ -0,0 +1,17 @@
+Source: adacurses
+Maintainer: Thomas E. Dickey <dickey@invisible-island.net>
+Section: misc
+Priority: optional
+Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 5)
+Homepage: http://invisible-island.net/adacurses/
+
+Package: adacurses
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: AdaCurses - Ada95 binding for ncurses
+ This package installs as "adacurses" to avoid conflict with other packages.
+ This is the Ada95 binding from the ncurses distribution.
+ .
+ In addition to a library, this package installs sample programs in
+ "bin/AdaCurses" to avoid conflict with other packages.
diff --git a/Ada95/package/debian/copyright b/Ada95/package/debian/copyright
new file mode 100644
index 0000000..b24950a
--- /dev/null
+++ b/Ada95/package/debian/copyright
@@ -0,0 +1,78 @@
+Upstream source http://invisible-island.net/ncurses/ncurses-examples.html
+
+Current ncurses maintainer: Thomas Dickey <dickey@invisible-island.net>
+
+-------------------------------------------------------------------------------
+Files: *
+Copyright: 1998-2014,2015 Free Software Foundation, Inc.
+Licence: X11
+
+Files: aclocal.m4 package
+Copyright: 2010-2014,2015 by Thomas E. Dickey
+Licence: X11
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, distribute with modifications, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name(s) of the above copyright
+ holders shall not be used in advertising or otherwise to promote the
+ sale, use or other dealings in this Software without prior written
+ authorization.
+
+-------------------------------------------------------------------------------
+Files: install-sh
+Copyright: 1994 X Consortium
+Licence: X11
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to
+ deal in the Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+ TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Except as contained in this notice, the name of the X Consortium shall not
+ be used in advertising or otherwise to promote the sale, use or other deal-
+ ings in this Software without prior written authorization from the X Consor-
+ tium.
+
+ FSF changes to this file are in the public domain.
+
+ Calling this script install-sh is preferred over install.sh, to prevent
+ `make' implicit rules from creating a file called install from it
+ when there is no Makefile.
+
+ This script is compatible with the BSD install script, but was written
+ from scratch. It can only install one file at a time, a restriction
+ shared with many OS's install programs.
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in '/usr/share/common-licenses/GPL-2'
+
+-- vile: txtmode file-encoding=utf-8
diff --git a/Ada95/package/debian/docs b/Ada95/package/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/Ada95/package/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/Ada95/package/debian/rules b/Ada95/package/debian/rules
new file mode 100755
index 0000000..5805f8b
--- /dev/null
+++ b/Ada95/package/debian/rules
@@ -0,0 +1,99 @@
+#!/usr/bin/make -f
+# MAde with the aid of dh_make, by Craig Small
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Some lines taken from debmake, by Cristoph Lameter.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+TARGET_DIR = $(CURDIR)/debian/adacurses
+SAMPLE_DIR = $(TARGET_DIR)/usr/bin/AdaCurses
+
+CFLAGS =
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+
+ CFLAGS="$(CFLAGS)" ./configure \
+ --host=$(DEB_HOST_GNU_TYPE) \
+ --build=$(DEB_BUILD_GNU_TYPE) \
+ --prefix=/usr \
+ --disable-rpath-link \
+ --with-shared \
+ --with-ada-sharedlib \
+ --without-pkg-config
+
+ touch configure-stamp
+
+build: build-stamp
+build-stamp: configure-stamp
+ dh_testdir
+
+ $(MAKE)
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+
+ [ ! -f makefile ] || $(MAKE) distclean
+
+ rm -f configure-stamp build-stamp install-stamp
+
+ dh_clean
+
+install: install-stamp
+install-stamp: build-stamp
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) install DESTDIR=$(TARGET_DIR)
+
+ # FIXME: it would be nice to make these into separate packages
+ ( cd samples && $(MAKE) install.examples DESTDIR=$(TARGET_DIR) BINDIR=$(SAMPLE_DIR) )
+ ( cd doc && $(MAKE) install.html DESTDIR=$(TARGET_DIR) )
+
+ touch install-stamp
+
+# Build architecture-independent files here.
+binary-indep: build install
+# No binary-indep target.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs
+ dh_installexamples
+ dh_installchangelogs NEWS
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_makeshlibs
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install install-stamp
diff --git a/Ada95/package/debian/source/format b/Ada95/package/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/Ada95/package/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/Ada95/package/debian/watch b/Ada95/package/debian/watch
new file mode 100644
index 0000000..4794ae3
--- /dev/null
+++ b/Ada95/package/debian/watch
@@ -0,0 +1,4 @@
+version=3
+
+opts=passive ftp://invisible-island.net/AdaCurses/AdaCurses-([\d.]+)\.tgz \
+ debian uupdate
diff --git a/Ada95/samples/Makefile.in b/Ada95/samples/Makefile.in
index 5ee78df..5b40027 100644
--- a/Ada95/samples/Makefile.in
+++ b/Ada95/samples/Makefile.in
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2012,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,18 +28,22 @@
#
# Author: Juergen Pfeifer, 1996
#
-# $Id: Makefile.in,v 1.34 2006/12/17 16:45:02 tom Exp $
+# $Id: Makefile.in,v 1.49 2015/08/05 23:15:41 tom Exp $
#
.SUFFIXES:
-SHELL = /bin/sh
+SHELL = @SHELL@
+VPATH = @srcdir@
THIS = Makefile
-x = @PROG_EXT@
+x = @EXEEXT@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
+bindir = @bindir@
+datarootdir = @datarootdir@
+datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
@@ -73,6 +77,13 @@
RANLIB = @RANLIB@
################################################################################
+BINDIR = $(DESTDIR)$(bindir)
+DATADIR = $(DESTDIR)$(datadir)
+LIBDIR = $(DESTDIR)$(libdir)
+
+MY_DATADIR = $(DATADIR)/AdaCurses
+
+################################################################################
ada_srcdir=../src
LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
@@ -87,33 +98,11 @@
ABASE = $(ALIB)-curses
CARGS =-cargs $(ADAFLAGS)
-LARGS =-largs @TEST_ARG2@ $(LD_FLAGS) -lAdaCurses
-
-PROGS = tour rain ncurses
+LARGS =-largs -L../lib -lAdaCurses @TEST_ARG2@ $(LD_FLAGS) @TEST_LIBS2@
-TOUR_OBJS = tour.o sample.o sample-curses_demo.o sample-explanation.o \
- sample-form_demo.o sample-function_key_setting.o \
- sample-header_handler.o sample-helpers.o \
- sample-keyboard_handler.o sample-manifest.o sample-menu_demo.o \
- sample-menu_demo-aux.o sample-text_io_demo.o \
- sample-curses_demo-attributes.o sample-curses_demo-mouse.o \
- sample-form_demo-aux.o sample-my_field_type.o
+PROGS = tour$x ncurses$x @USE_GNAT_SIGINT@ rain$x
-RAIN_OBJS = rain.o status.o
-
-NCURSES_OBJS = ncurses.o ncurses2-getch_test.o \
- ncurses2-acs_and_scroll.o ncurses2-m.o \
- ncurses2-acs_display.o ncurses2-menu_test.o \
- ncurses2-attr_test.o ncurses2-overlap_test.o \
- ncurses2-color_edit.o ncurses2-slk_test.o \
- ncurses2-color_test.o ncurses2-test_sgr_attributes.o \
- ncurses2-demo_forms.o ncurses2-trace_set.o \
- ncurses2-demo_pad.o ncurses2-util.o \
- ncurses2-demo_panels.o ncurses2.o \
- ncurses2-flushinp_test.o
-
-
-all :: tour$x rain$x ncurses$x
+all :: $(PROGS)
@echo made $@
sources :
@@ -128,15 +117,28 @@
uninstall.libs ::
@echo made $@
+install.examples :: $(BINDIR) $(PROGS)
+ $(INSTALL) $(PROGS) $(BINDIR)
+
+install.examples :: $(MY_DATADIR)
+ $(INSTALL_DATA) explain.txt $(MY_DATADIR)
+
+uninstall.examples ::
+ -cd $(BINDIR) && rm -f $(PROGS)
+ -rmdir $(BINDIR)
+ -rm -f $(MY_DATADIR)/explain.txt
+ -rmdir $(MY_DATADIR)
+
+$(BINDIR) \
+$(MY_DATADIR) :
+ mkdir -p $@
+
ncurses$x :
$(ADAMAKE) $(ADAMAKEFLAGS) ncurses $(CARGS) $(LARGS)
-tour$x : explain.msg
+tour$x :
$(ADAMAKE) $(ADAMAKEFLAGS) tour $(CARGS) $(LARGS)
-explain.msg: $(srcdir)/explain.txt
- cp $(srcdir)/explain.txt $@
-
rain$x :
$(ADAMAKE) $(ADAMAKEFLAGS) rain $(CARGS) $(LARGS)
@@ -145,7 +147,7 @@
clean :: mostlyclean
rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] \
- explain.msg trace screendump
+ trace screendump b~*.ad[bs]
distclean :: clean
rm -f Makefile
diff --git a/Ada95/samples/explain.txt b/Ada95/samples/explain.txt
index 570f617..be2cba1 100644
--- a/Ada95/samples/explain.txt
+++ b/Ada95/samples/explain.txt
@@ -54,13 +54,13 @@
#HELP
#HELPKEYS
You may scroll with the Cursor Up/Down Keys.
-You may leave the help with the Function Key labelled 'Quit'.
+You may leave the help with the Function Key labeled 'Quit'.
#INHELP
You are already in the help system.
-You may leave the help with the Function Key labelled 'Quit'.
+You may leave the help with the Function Key labeled 'Quit'.
#MAIN
This is the main menu of the sample program for the ncurses Ada95
-binding. The main intention of the demo is not to demonstate or
+binding. The main intention of the demo is not to demonstrate or
test all the features of ncurses and it's subsystems, but to provide
to you some sample code how to use the binding with Ada95.
@@ -86,23 +86,23 @@
the item name and the description.
#MENU01
This is a demo of the some of the menu layout options. One of them
-is the spacing functionality. Just press the Key labelled "Flip" to
+is the spacing functionality. Just press the Key labeled "Flip" to
flip between the non-spaced and a spaced version of the menu. Please
note that this functionality is unique for ncurses and is not found
in the SVr4 menu implementation.
-This is a menu that sometimes doesn't fit into it's window and
+This is a menu that sometimes does not fit into it's window and
therefore it becomes a scroll menu.
You can also see here very nicely the pattern matching functionality
of menus. Type for example a 'J' and you will be positioned to the
next item after the current starting with a 'J'. Any more characters
you type in make the pattern more specific. With CTRL-A and CTRL-Z
-(for more details press the Key labelled "Keys") you can browse
+(for more details press the Key labeled "Keys") you can browse
through all the items matching the pattern.
You may change the format of the menu. Just press one of the keys
-labelled "4x1", "4x2" or "4x3" to get a menu with that many rows
+labeled "4x1", "4x2" or "4x3" to get a menu with that many rows
and columns.
With the Keys "O-Row" or "O-Col" (they occupy the same label and
@@ -121,7 +121,7 @@
switch on selection) you can change whether or not the descriptions
for each item should be displayed. Please not that this key is
not visible in the "4x3" layout mode, because in this case the
-menu wouldn't fit on a typicall 80x24 screen.
+menu would not fit on a typical 80x24 screen.
With the Keys "Disab" or "Enab" (they occupy the same label and
switch on selection) you can dis- or enable the selectability of
@@ -131,13 +131,13 @@
The Keys "4x1", "4x2" and "4x3" will change the format of the menu.
Please note that this is a scrolling menu. You may also play with the
pattern matching functionality or try to change the format of the menu.
-For more details press the Key labelled "Help".
+For more details press the Key labeled "Help".
#FORM00
This is a demo of the forms package.
#FORM-PAD00
Please note that this demo is far from being complete. It really shows
only a small part of the functionality of the forms package. Let's hope
-the next version will have a richer demo (You wan't to contribute ?).
+the next version will have a richer demo (You want to contribute ?).
#NOTIMPL
Sorry this functionality of the demo is not implemented at the moment.
Remember this is a freeware project, so I can use only my very rare
@@ -149,13 +149,13 @@
#CURSES-PAD00
Please note that this demo is far from being complete. It really shows
only a small part of the functionality of the curses package. Let's hope
-the next version will have a richer demo (You wan't to contribute ?).
+the next version will have a richer demo (You want to contribute ?).
#MOUSEKEYS
In this demo you may use this keys:
- - Key labelled "Help" to get a help
- - Key labelled "Keys" is what you are reading now
- - Key labelled "Quit" to leave the demo
+ - Key labeled "Help" to get a help
+ - Key labeled "Keys" is what you are reading now
+ - Key labeled "Quit" to leave the demo
You may click the mouse buttons at any location at the screen and look
at the protocol window !
@@ -179,7 +179,7 @@
You may press one of the three well known standard keys of this demo.
#ATTRIB-PAD00
Again this is a more than simple demo and just here to give you the
-sourcecode. Feel free to contribute more.
+source code. Feel free to contribute more.
#TEXTIO
#TEXTIOKEYS
#TEXTIO-PAD00
diff --git a/Ada95/samples/ncurses2-acs_and_scroll.adb b/Ada95/samples/ncurses2-acs_and_scroll.adb
index 07b2d91..00e9afc 100644
--- a/Ada95/samples/ncurses2-acs_and_scroll.adb
+++ b/Ada95/samples/ncurses2-acs_and_scroll.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.8 $
--- $Date: 2008/07/26 18:47:42 $
+-- $Revision: 1.11 $
+-- $Date: 2011/03/23 00:33:00 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Windows and scrolling tester.
@@ -93,8 +93,6 @@
dx : Column_Position);
function delete_framed (fp : FrameA; showit : Boolean) return FrameA;
- use Ada.Streams.Stream_IO;
-
-- A linked list
-- I wish there was a standard library linked list. Oh well.
type Frame is record
@@ -285,11 +283,11 @@
else
Add (Str => "All other");
end if;
- Add (str => " characters are echoed, window should ");
+ Add (Str => " characters are echoed, window should ");
if not HaveScroll (curpw) then
Add (Str => "not ");
end if;
- Add (str => "scroll");
+ Add (Str => "scroll");
Clear_To_End_Of_Line;
end transient;
@@ -347,7 +345,7 @@
return;
when KEY_UP =>
i := i + si - 1;
- -- same as i := i - 1 because of Modulus arithetic,
+ -- same as i := i - 1 because of Modulus arithmetic,
-- on Line_Position, which is a Natural
-- the C version uses this form too, interestingly.
when KEY_DOWN =>
@@ -454,19 +452,19 @@
function delete_framed (fp : FrameA; showit : Boolean) return FrameA is
np : FrameA;
begin
- fp.last.next := fp.next;
- fp.next.last := fp.last;
+ fp.all.last.all.next := fp.all.next;
+ fp.all.next.all.last := fp.all.last;
if showit then
- Erase (fp.wind);
- Refresh (fp.wind);
+ Erase (fp.all.wind);
+ Refresh (fp.all.wind);
end if;
- Delete (fp.wind);
+ Delete (fp.all.wind);
- if fp = fp.next then
+ if fp = fp.all.next then
np := null;
else
- np := fp.next;
+ np := fp.all.next;
end if;
-- TODO free(fp);
return np;
@@ -496,64 +494,64 @@
False, False,
Null_Window);
begin
- neww.wind := getwindow;
- if neww.wind = Null_Window then
+ neww.all.wind := getwindow;
+ if neww.all.wind = Null_Window then
exit;
-- was goto breakout; ha ha ha
else
if current = null then
- neww.next := neww;
- neww.last := neww;
+ neww.all.next := neww;
+ neww.all.last := neww;
else
- neww.next := current.next;
- neww.last := current;
- neww.last.next := neww;
- neww.next.last := neww;
+ neww.all.next := current.all.next;
+ neww.all.last := current;
+ neww.all.last.all.next := neww;
+ neww.all.next.all.last := neww;
end if;
current := neww;
- Set_KeyPad_Mode (current.wind, True);
- current.do_keypad := HaveKeyPad (current.wind);
- current.do_scroll := HaveScroll (current.wind);
+ Set_KeyPad_Mode (current.all.wind, True);
+ current.all.do_keypad := HaveKeyPad (current.all.wind);
+ current.all.do_scroll := HaveScroll (current.all.wind);
end if;
end;
when Character'Pos ('N') mod 16#20# => -- Ctrl('N')
if current /= null then
- current := current.next;
+ current := current.all.next;
end if;
when Character'Pos ('P') mod 16#20# => -- Ctrl('P')
if current /= null then
- current := current.last;
+ current := current.all.last;
end if;
when Character'Pos ('F') mod 16#20# => -- Ctrl('F')
- if current /= null and then HaveScroll (current.wind) then
- Scroll (current.wind, 1);
+ if current /= null and then HaveScroll (current.all.wind) then
+ Scroll (current.all.wind, 1);
end if;
when Character'Pos ('B') mod 16#20# => -- Ctrl('B')
- if current /= null and then HaveScroll (current.wind) then
+ if current /= null and then HaveScroll (current.all.wind) then
-- The C version of Scroll may return ERR which is ignored
-- we need to avoid the exception
-- with the 'and HaveScroll(current.wind)'
- Scroll (current.wind, -1);
+ Scroll (current.all.wind, -1);
end if;
when Character'Pos ('K') mod 16#20# => -- Ctrl('K')
if current /= null then
- current.do_keypad := not current.do_keypad;
- Set_KeyPad_Mode (current.wind, current.do_keypad);
+ current.all.do_keypad := not current.all.do_keypad;
+ Set_KeyPad_Mode (current.all.wind, current.all.do_keypad);
end if;
when Character'Pos ('S') mod 16#20# => -- Ctrl('S')
if current /= null then
- current.do_scroll := not current.do_scroll;
- Allow_Scrolling (current.wind, current.do_scroll);
+ current.all.do_scroll := not current.all.do_scroll;
+ Allow_Scrolling (current.all.wind, current.all.do_scroll);
end if;
when Character'Pos ('W') mod 16#20# => -- Ctrl('W')
- if current /= current.next then
+ if current /= current.all.next then
Create (f, Name => dumpfile); -- TODO error checking
if not Is_Open (f) then
raise Curses_Exception;
end if;
- Put_Window (current.wind, f);
+ Put_Window (current.all.wind, f);
Close (f);
current := delete_framed (current, True);
end if;
@@ -565,15 +563,15 @@
Open (f, Mode => In_File, Name => dumpfile);
neww := new Frame'(null, null, False, False, Null_Window);
- neww.next := current.next;
- neww.last := current;
- neww.last.next := neww;
- neww.next.last := neww;
+ neww.all.next := current.all.next;
+ neww.all.last := current;
+ neww.all.last.all.next := neww;
+ neww.all.next.all.last := neww;
- neww.wind := Get_Window (f);
+ neww.all.wind := Get_Window (f);
Close (f);
- Refresh (neww.wind);
+ Refresh (neww.all.wind);
end;
when Character'Pos ('X') mod 16#20# => -- Ctrl('X')
if current /= null then
@@ -589,7 +587,7 @@
"to mark new corner");
Refresh;
- Get_Window_Position (current.wind, ul.y, ul.x);
+ Get_Window_Position (current.all.wind, ul.y, ul.x);
selectcell (ul.y, ul.x, Lines - Botlines - 2, Columns - 2,
tmp, tmpbool);
@@ -597,43 +595,43 @@
-- the C version had a goto. I refuse gotos.
Beep;
else
- Get_Size (current.wind, lr.y, lr.x);
+ Get_Size (current.all.wind, lr.y, lr.x);
lr.y := lr.y + ul.y - 1;
lr.x := lr.x + ul.x - 1;
Outerbox (ul, lr, False);
Refresh_Without_Update;
- Get_Size (current.wind, my, mx);
+ Get_Size (current.all.wind, my, mx);
if my > tmp.y - ul.y then
- Get_Cursor_Position (current.wind, lr.y, lr.x);
- Move_Cursor (current.wind, tmp.y - ul.y + 1, 0);
- Clear_To_End_Of_Screen (current.wind);
- Move_Cursor (current.wind, lr.y, lr.x);
+ Get_Cursor_Position (current.all.wind, lr.y, lr.x);
+ Move_Cursor (current.all.wind, tmp.y - ul.y + 1, 0);
+ Clear_To_End_Of_Screen (current.all.wind);
+ Move_Cursor (current.all.wind, lr.y, lr.x);
end if;
if mx > tmp.x - ul.x then
for i in 0 .. my - 1 loop
- Move_Cursor (current.wind, i, tmp.x - ul.x + 1);
- Clear_To_End_Of_Line (current.wind);
+ Move_Cursor (current.all.wind, i, tmp.x - ul.x + 1);
+ Clear_To_End_Of_Line (current.all.wind);
end loop;
end if;
- Refresh_Without_Update (current.wind);
+ Refresh_Without_Update (current.all.wind);
lr := tmp;
-- The C version passes invalid args to resize
-- which returns an ERR. For Ada we avoid the exception.
if lr.y /= ul.y and lr.x /= ul.x then
- Resize (current.wind, lr.y - ul.y + 0,
+ Resize (current.all.wind, lr.y - ul.y + 0,
lr.x - ul.x + 0);
end if;
- Get_Window_Position (current.wind, ul.y, ul.x);
- Get_Size (current.wind, lr.y, lr.x);
+ Get_Window_Position (current.all.wind, ul.y, ul.x);
+ Get_Size (current.all.wind, lr.y, lr.x);
lr.y := lr.y + ul.y - 1;
lr.x := lr.x + ul.x - 1;
Outerbox (ul, lr, True);
Refresh_Without_Update;
- Refresh_Without_Update (current.wind);
+ Refresh_Without_Update (current.all.wind);
Move_Cursor (Line => 0, Column => 0);
Clear_To_End_Of_Line;
Update_Screen;
@@ -649,30 +647,30 @@
Refresh;
end;
when Key_Cursor_Up =>
- newwin_move (current.wind, -1, 0);
+ newwin_move (current.all.wind, -1, 0);
when Key_Cursor_Down =>
- newwin_move (current.wind, 1, 0);
+ newwin_move (current.all.wind, 1, 0);
when Key_Cursor_Left =>
- newwin_move (current.wind, 0, -1);
+ newwin_move (current.all.wind, 0, -1);
when Key_Cursor_Right =>
- newwin_move (current.wind, 0, 1);
+ newwin_move (current.all.wind, 0, 1);
when Key_Backspace | Key_Delete_Char =>
declare
y : Line_Position;
x : Column_Position;
tmp : Line_Position;
begin
- Get_Cursor_Position (current.wind, y, x);
+ Get_Cursor_Position (current.all.wind, y, x);
-- x := x - 1;
-- I got tricked by the -1 = Max_Natural - 1 result
-- y := y - 1;
if not (x = 0 and y = 0) then
if x = 0 then
y := y - 1;
- Get_Size (current.wind, tmp, x);
+ Get_Size (current.all.wind, tmp, x);
end if;
x := x - 1;
- Delete_Character (current.wind, y, x);
+ Delete_Character (current.all.wind, y, x);
end if;
end;
when others =>
@@ -680,7 +678,7 @@
if current /= null then
declare
begin
- Add (current.wind, Ch => Code_To_Char (c));
+ Add (current.all.wind, Ch => Code_To_Char (c));
exception
when Curses_Exception => null;
-- this happens if we are at the
@@ -690,9 +688,9 @@
Beep;
end if;
end case;
- newwin_report (current.wind);
+ newwin_report (current.all.wind);
if current /= null then
- usescr := current.wind;
+ usescr := current.all.wind;
else
usescr := Standard_Window;
end if;
diff --git a/Ada95/samples/ncurses2-color_edit.adb b/Ada95/samples/ncurses2-color_edit.adb
index a6a35de..098f98d 100644
--- a/Ada95/samples/ncurses2-color_edit.adb
+++ b/Ada95/samples/ncurses2-color_edit.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.5 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.6 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -171,7 +171,7 @@
Set_Character_Attributes;
end if;
Set_Character_Attributes;
- Add (ch => ')');
+ Add (Ch => ')');
end loop;
Add (Line => Line_Position (Number_Of_Colors + 3), Column => 0,
Str => "Use up/down to select a color, left/right to change " &
diff --git a/Ada95/samples/ncurses2-demo_forms.adb b/Ada95/samples/ncurses2-demo_forms.adb
index 7137aa0..0eeeb5e 100644
--- a/Ada95/samples/ncurses2-demo_forms.adb
+++ b/Ada95/samples/ncurses2-demo_forms.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.5 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.7 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -317,8 +317,9 @@
function my_form_driver (f : Form; c : Key_Code) return Boolean is
flag : constant Driver_Result := Driver (f, F_Validate_Field);
begin
- if c = Form_Request_Code'Last + 1
- and flag = Form_Ok then
+ if c = Form_Request_Code'Last + 1 and
+ flag = Form_Ok
+ then
return True;
else
Beep;
@@ -451,19 +452,19 @@
Refresh;
-- describe the form
- f (1) := make_label (0, 15, "Sample Form");
- f (2) := make_label (2, 0, "Last Name");
- f (3) := make_field (3, 0, 1, 18, False);
- f (4) := make_label (2, 20, "First Name");
- f (5) := make_field (3, 20, 1, 12, False);
- f (6) := make_label (2, 34, "Middle Name");
- f (7) := make_field (3, 34, 1, 12, False);
- f (8) := make_label (5, 0, "Comments");
- f (9) := make_field (6, 0, 4, 46, False);
- f (10) := make_label (5, 20, "Password:");
- f (11) := make_field (5, 30, 1, 9, True);
- secure := f (11);
- f (12) := Null_Field;
+ f.all (1) := make_label (0, 15, "Sample Form");
+ f.all (2) := make_label (2, 0, "Last Name");
+ f.all (3) := make_field (3, 0, 1, 18, False);
+ f.all (4) := make_label (2, 20, "First Name");
+ f.all (5) := make_field (3, 20, 1, 12, False);
+ f.all (6) := make_label (2, 34, "Middle Name");
+ f.all (7) := make_field (3, 34, 1, 12, False);
+ f.all (8) := make_label (5, 0, "Comments");
+ f.all (9) := make_field (6, 0, 4, 46, False);
+ f.all (10) := make_label (5, 20, "Password:");
+ f.all (11) := make_field (5, 30, 1, 9, True);
+ secure := f.all (11);
+ f.all (12) := Null_Field;
myform := New_Form (f);
diff --git a/Ada95/samples/ncurses2-demo_pad.adb b/Ada95/samples/ncurses2-demo_pad.adb
index 862b8b7..062ec53 100644
--- a/Ada95/samples/ncurses2-demo_pad.adb
+++ b/Ada95/samples/ncurses2-demo_pad.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2008/07/26 18:47:06 $
+-- $Revision: 1.9 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -121,8 +121,8 @@
retval.seconds := 0;
retval.microseconds := 0;
else
- retval.seconds := Integer (t.tv_sec);
- retval.microseconds := Integer (t.tv_usec);
+ retval.seconds := Integer (t.all.tv_sec);
+ retval.microseconds := Integer (t.all.tv_usec);
end if;
return retval;
end gettime;
@@ -437,7 +437,8 @@
-- pan rightwards
-- if (basex + portx - (pymax > porty) < pxmax)
if basex + portx -
- Column_Position (greater (pymax, porty)) < pxmax then
+ Column_Position (greater (pymax, porty)) < pxmax
+ then
-- if basex + portx < pxmax or
-- (pymax > porty and basex + portx - 1 < pxmax) then
basex := basex + 1;
@@ -457,7 +458,8 @@
-- pan downwards
-- same as if (basey + porty - (pxmax > portx) < pymax)
if basey + porty -
- Line_Position (greater (pxmax, portx)) < pymax then
+ Line_Position (greater (pxmax, portx)) < pymax
+ then
-- if (basey + porty < pymax) or
-- (pxmax > portx and basey + porty - 1 < pymax) then
basey := basey + 1;
diff --git a/Ada95/samples/ncurses2-demo_panels.adb b/Ada95/samples/ncurses2-demo_panels.adb
index d2558ed..9693e1a 100644
--- a/Ada95/samples/ncurses2-demo_panels.adb
+++ b/Ada95/samples/ncurses2-demo_panels.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2008/08/30 23:35:01 $
+-- $Revision: 1.7 $
+-- $Date: 2011/03/23 00:44:12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -139,7 +139,7 @@
procedure fill_panel (pan : Panel) is
win : constant Window := Panel_Window (pan);
- num : constant Character := Get_User_Data (pan) (2);
+ num : constant Character := Get_User_Data (pan).all (2);
tmp6 : String (1 .. 6) := "-panx-";
maxy : Line_Count;
maxx : Column_Count;
diff --git a/Ada95/samples/ncurses2-genericputs.adb b/Ada95/samples/ncurses2-genericputs.adb
index 6ca6583..829d08d 100644
--- a/Ada95/samples/ncurses2-genericputs.adb
+++ b/Ada95/samples/ncurses2-genericputs.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2008,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.3 $
--- $Date: 2008/07/26 18:46:18 $
+-- $Revision: 1.4 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -44,9 +44,9 @@
package body ncurses2.genericPuts is
- procedure myGet (Win : in Window := Standard_Window;
+ procedure myGet (Win : Window := Standard_Window;
Str : out BS.Bounded_String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
function Wgetnstr (Win : Window;
Str : char_array;
@@ -74,7 +74,7 @@
procedure myPut (Str : out BS.Bounded_String;
i : Integer;
- Base : in Number_Base := 10) is
+ Base : Number_Base := 10) is
package Int_IO is new Integer_IO (Integer); use Int_IO;
tmp : String (1 .. BS.Max_Length);
begin
@@ -89,7 +89,7 @@
end myAdd;
-- from ncurses-aux
- procedure Fill_String (Cp : in chars_ptr;
+ procedure Fill_String (Cp : chars_ptr;
Str : out BS.Bounded_String)
is
-- Fill the string with the characters referenced by the
diff --git a/Ada95/samples/ncurses2-genericputs.ads b/Ada95/samples/ncurses2-genericputs.ads
index 1614a11..accc3cc 100644
--- a/Ada95/samples/ncurses2-genericputs.ads
+++ b/Ada95/samples/ncurses2-genericputs.ads
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.2 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.3 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -56,17 +56,17 @@
Ada.Strings.Bounded.Generic_Bounded_Length (Max);
use BS;
- procedure myGet (Win : in Terminal_Interface.Curses.Window
- := Terminal_Interface.Curses.Standard_Window;
+ procedure myGet (Win : Terminal_Interface.Curses.Window
+ := Terminal_Interface.Curses.Standard_Window;
Str : out BS.Bounded_String;
- Len : in Integer := -1);
+ Len : Integer := -1);
- procedure myPut (Str : out BS.Bounded_String;
- i : Integer;
- Base : in Number_Base := 10);
+ procedure myPut (Str : out BS.Bounded_String;
+ i : Integer;
+ Base : Number_Base := 10);
-- the default should be Ada.Text_IO.Integer_IO.Default_Base
-- but Default_Base is hidden in the generic so doesn't exist!
procedure myAdd (Str : BS.Bounded_String);
- procedure Fill_String (Cp : in chars_ptr; Str : out BS.Bounded_String);
+ procedure Fill_String (Cp : chars_ptr; Str : out BS.Bounded_String);
end ncurses2.genericPuts;
diff --git a/Ada95/samples/ncurses2-getch_test.adb b/Ada95/samples/ncurses2-getch_test.adb
index 172312c..8f020e7 100644
--- a/Ada95/samples/ncurses2-getch_test.adb
+++ b/Ada95/samples/ncurses2-getch_test.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2008/07/26 18:46:58 $
+-- $Revision: 1.9 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Character input test
@@ -205,13 +205,15 @@
Add (Str => " I saw '");
myAdd (Str => boundedbuf);
Add (Str => "'.");
- Add (ch => newl);
+ Add (Ch => newl);
end if;
end;
elsif c = Character'Pos ('s') then
ShellOut (True);
- elsif c = Character'Pos ('x') or c = Character'Pos ('q') or
- (c = Key_None and blockflag = Blocking) then
+ elsif c = Character'Pos ('x') or
+ c = Character'Pos ('q') or
+ (c = Key_None and blockflag = Blocking)
+ then
exit;
elsif c = Character'Pos ('?') then
Add (Str => "Type any key to see its keypad value. Also:");
diff --git a/Ada95/samples/ncurses2-getopt.adb b/Ada95/samples/ncurses2-getopt.adb
index 238c439..29f1fee 100644
--- a/Ada95/samples/ncurses2-getopt.adb
+++ b/Ada95/samples/ncurses2-getopt.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2008/07/26 18:46:44 $
+-- $Revision: 1.8 $
+-- $Date: 2011/03/19 12:09:51 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- A simplified version of the GNU getopt function
@@ -56,7 +56,7 @@
-- also the user is not allowed to modify argv or argc
-- Doing so is Erroneous execution.
- -- longoptions are not handled.
+ -- long options are not handled.
procedure Qgetopt (retval : out Integer;
argc : Integer;
@@ -67,7 +67,7 @@
-- ignored for ncurses, must be initialized to 1 by
-- the caller
Optarg : out stringa
- -- a garbage colector would be useful here.
+ -- a garbage collector would be useful here.
) is
package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (200);
diff --git a/Ada95/samples/ncurses2-menu_test.adb b/Ada95/samples/ncurses2-menu_test.adb
index a4c4807..bce9782 100644
--- a/Ada95/samples/ncurses2-menu_test.adb
+++ b/Ada95/samples/ncurses2-menu_test.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.6 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.8 $
+-- $Date: 2011/03/23 00:39:28 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -46,10 +46,10 @@
with Terminal_Interface.Curses.Mouse; use Terminal_Interface.Curses.Mouse;
procedure ncurses2.menu_test is
- function menu_virtualize (c : Key_Code) return Menu_Request_Code;
+ function menu_virtualize (c : Key_Code) return Key_Code;
procedure xAdd (l : Line_Position; c : Column_Position; s : String);
- function menu_virtualize (c : Key_Code) return Menu_Request_Code is
+ function menu_virtualize (c : Key_Code) return Key_Code is
begin
case c is
when Character'Pos (newl) | Key_Exit =>
@@ -110,7 +110,7 @@
c1 : Key_Code;
c : Driver_Result;
- r : Menu_Request_Code;
+ r : Key_Code;
begin
tmp := Start_Mouse;
xAdd (0, 0, "This is the menu test:");
@@ -121,9 +121,9 @@
Refresh;
for i in animals'Range loop
- items_a (i) := New_Item (animals (i).all);
+ items_a.all (i) := New_Item (animals (i).all);
end loop;
- items_a (animals'Last + 1) := Null_Item;
+ items_a.all (animals'Last + 1) := Null_Item;
m := New_Menu (items_a);
diff --git a/Ada95/samples/ncurses2-overlap_test.adb b/Ada95/samples/ncurses2-overlap_test.adb
index 37e8d4c..948b2b3 100644
--- a/Ada95/samples/ncurses2-overlap_test.adb
+++ b/Ada95/samples/ncurses2-overlap_test.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2014,2015 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.4 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.7 $
+-- $Date: 2015/07/25 23:43:19 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -72,8 +72,9 @@
Get_Size (win, y1, x1);
for y in 0 .. y1 - 1 loop
for x in 0 .. x1 - 1 loop
- if ((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3))
- or (((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3))) then
+ if ((x > (x1 - 1) / 3) and (x <= (2 * (x1 - 1)) / 3)) or
+ (((y > (y1 - 1) / 3) and (y <= (2 * (y1 - 1)) / 3)))
+ then
Move_Cursor (win, y, x);
Add (win, Ch => ch);
end if;
@@ -93,7 +94,7 @@
Add (Str => "This test shows the behavior of wnoutrefresh() with " &
"respect to");
Add (Ch => newl);
- Add (Str => "the shared region of two overlapping windows A and B. "&
+ Add (Str => "the shared region of two overlapping windows A and B. " &
"The cross");
Add (Ch => newl);
Add (Str => "pattern in each window does not overlap the other.");
@@ -101,7 +102,7 @@
Move_Cursor (Line => 18, Column => 0);
Add (Str => "a = refresh A, then B, then doupdate. b = refresh B, " &
- "then A, then doupdaute");
+ "then A, then doupdate");
Add (Ch => newl);
Add (Str => "c = fill window A with letter A. d = fill window B " &
"with letter B.");
diff --git a/Ada95/samples/ncurses2-slk_test.adb b/Ada95/samples/ncurses2-slk_test.adb
index 8bfee4e..aa368ba 100644
--- a/Ada95/samples/ncurses2-slk_test.adb
+++ b/Ada95/samples/ncurses2-slk_test.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.9 $
+-- $Date: 2011/03/19 12:03:08 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -47,13 +47,13 @@
with Terminal_Interface.Curses.Aux;
procedure ncurses2.slk_test is
- procedure myGet (Win : in Window := Standard_Window;
+ procedure myGet (Win : Window := Standard_Window;
Str : out Ada.Strings.Unbounded.Unbounded_String;
- Len : in Integer := -1);
+ Len : Integer := -1);
- procedure myGet (Win : in Window := Standard_Window;
+ procedure myGet (Win : Window := Standard_Window;
Str : out Ada.Strings.Unbounded.Unbounded_String;
- Len : in Integer := -1)
+ Len : Integer := -1)
is
use Ada.Strings.Unbounded;
use Interfaces.C;
@@ -161,7 +161,7 @@
when 'x' | 'q' =>
exit;
-- the C version needed a goto, ha ha
- -- breaks exit the case not the loop because fall-throuh
+ -- breaks exit the case not the loop because fall-through
-- happens in C!
when others =>
Beep;
diff --git a/Ada95/samples/ncurses2-trace_set.adb b/Ada95/samples/ncurses2-trace_set.adb
index 1e2716e..df4468b 100644
--- a/Ada95/samples/ncurses2-trace_set.adb
+++ b/Ada95/samples/ncurses2-trace_set.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.3 $
--- $Date: 2008/07/26 18:46:18 $
+-- $Revision: 1.6 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with ncurses2.util; use ncurses2.util;
@@ -50,14 +50,14 @@
procedure ncurses2.trace_set is
- function menu_virtualize (c : Key_Code) return Menu_Request_Code;
+ function menu_virtualize (c : Key_Code) return Key_Code;
function subset (super, sub : Trace_Attribute_Set) return Boolean;
function trace_or (a, b : Trace_Attribute_Set) return Trace_Attribute_Set;
function trace_num (tlevel : Trace_Attribute_Set) return String;
function tracetrace (tlevel : Trace_Attribute_Set) return String;
function run_trace_menu (m : Menu; count : Integer) return Boolean;
- function menu_virtualize (c : Key_Code) return Menu_Request_Code is
+ function menu_virtualize (c : Key_Code) return Key_Code is
begin
case c is
when Character'Pos (newl) | Key_Exit =>
@@ -141,7 +141,8 @@
(super.Internal_Calls or not sub.Internal_Calls) and
(super.Character_Calls or not sub.Character_Calls) and
(super.Termcap_TermInfo or not sub.Termcap_TermInfo) and
- True then
+ True
+ then
return True;
else
return False;
@@ -250,93 +251,107 @@
else
if subset (tlevel,
- Trace_Attribute_Set'(Times => True, others => False)) then
+ Trace_Attribute_Set'(Times => True, others => False))
+ then
Append (buf, "Times");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Attribute_Set'(Tputs => True, others => False)) then
+ Trace_Attribute_Set'(Tputs => True, others => False))
+ then
Append (buf, "Tputs");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Attribute_Set'(Update => True, others => False)) then
+ Trace_Attribute_Set'(Update => True, others => False))
+ then
Append (buf, "Update");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Cursor_Move => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Cursor_Move");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Character_Output => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Character_Output");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Ordinary) then
+ Trace_Ordinary)
+ then
Append (buf, "Ordinary");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Attribute_Set'(Calls => True, others => False)) then
+ Trace_Attribute_Set'(Calls => True, others => False))
+ then
Append (buf, "Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Virtual_Puts => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Virtual_Puts");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Input_Events => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Input_Events");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(TTY_State => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "TTY_State");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Internal_Calls => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Internal_Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Character_Calls => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Character_Calls");
Append (buf, ", ");
end if;
if subset (tlevel,
Trace_Attribute_Set'(Termcap_TermInfo => True,
- others => False)) then
+ others => False))
+ then
Append (buf, "Termcap_TermInfo");
Append (buf, ", ");
end if;
if subset (tlevel,
- Trace_Maximum) then
+ Trace_Maximum)
+ then
Append (buf, "Maximium");
Append (buf, ", ");
end if;
@@ -416,9 +431,9 @@
Refresh;
for n in t_tbl'Range loop
- items_a (n) := New_Item (t_tbl (n).name.all);
+ items_a.all (n) := New_Item (t_tbl (n).name.all);
end loop;
- items_a (t_tbl'Last + 1) := Null_Item;
+ items_a.all (t_tbl'Last + 1) := Null_Item;
m := New_Menu (items_a);
diff --git a/Ada95/samples/ncurses2-util.adb b/Ada95/samples/ncurses2-util.adb
index 8ae3272..e0f3d35 100644
--- a/Ada95/samples/ncurses2-util.adb
+++ b/Ada95/samples/ncurses2-util.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2008,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,16 +35,12 @@
------------------------------------------------------------------------------
-- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000
-- Version Control
--- $Revision: 1.7 $
--- $Date: 2008/07/26 18:51:20 $
+-- $Revision: 1.9 $
+-- $Date: 2014/05/24 21:32:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
-pragma Warnings (Off);
-with Terminal_Interface.Curses.Aux;
-pragma Warnings (On);
-
with Terminal_Interface.Curses.Trace; use Terminal_Interface.Curses.Trace;
with Interfaces.C;
@@ -115,7 +111,6 @@
procedure Cannot (s : String) is
use Interfaces.C;
use Interfaces.C.Strings;
- use Terminal_Interface.Curses.Aux;
function getenv (x : char_array) return chars_ptr;
pragma Import (C, getenv, "getenv");
tmp1 : char_array (0 .. 10);
diff --git a/Ada95/samples/sample-curses_demo.adb b/Ada95/samples/sample-curses_demo.adb
index 700da76..4dd96a7 100644
--- a/Ada95/samples/sample-curses_demo.adb
+++ b/Ada95/samples/sample-curses_demo.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.15 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.17 $
+-- $Date: 2011/03/23 00:29:04 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -61,7 +61,7 @@
type User_Data_Access is access all User_Data;
package PUD is new Panels.User_Data (User_Data, User_Data_Access);
-- We use above instantiation of the generic User_Data package to
- -- demonstrate and test the use of the user data maechanism.
+ -- demonstrate and test the use of the user data mechanism.
procedure Demo
is
@@ -122,9 +122,9 @@
declare
O : Item_Option_Set;
begin
- Get_Options (Itm (2), O);
+ Get_Options (Itm.all (2), O);
O.Selectable := False;
- Set_Options (Itm (2), O);
+ Set_Options (Itm.all (2), O);
end;
end if;
diff --git a/Ada95/samples/sample-explanation.adb b/Ada95/samples/sample-explanation.adb
index 12a8deb..a2d1822 100644
--- a/Ada95/samples/sample-explanation.adb
+++ b/Ada95/samples/sample-explanation.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.20 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.27 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Poor mans help system. This scans a sequential file for key lines and
@@ -58,7 +58,7 @@
Help_Keys : constant String := "HELPKEYS";
In_Help : constant String := "INHELP";
- File_Name : constant String := "explain.msg";
+ File_Name : constant String := "explain.txt";
F : File_Type;
type Help_Line;
@@ -73,8 +73,8 @@
Line : String_Access;
end record;
- procedure Explain (Key : in String;
- Win : in Window);
+ procedure Explain (Key : String;
+ Win : Window);
procedure Release_String is
new Ada.Unchecked_Deallocation (String,
@@ -86,14 +86,16 @@
function Search (Key : String) return Help_Line_Access;
procedure Release_Help (Root : in out Help_Line_Access);
- procedure Explain (Key : in String)
+ function Check_File (Name : String) return Boolean;
+
+ procedure Explain (Key : String)
is
begin
Explain (Key, Null_Window);
end Explain;
- procedure Explain (Key : in String;
- Win : in Window)
+ procedure Explain (Key : String;
+ Win : Window)
is
-- Retrieve the text associated with this key and display it in this
-- window. If no window argument is passed, the routine will create
@@ -126,7 +128,7 @@
Add (W, Key);
Add (W, " not found.");
Add (W, Character'Val (10));
- Add (W, "Press the Function key labelled 'Quit' key to continue.");
+ Add (W, "Press the Function key labeled 'Quit' key to continue.");
end Unknown_Key;
procedure Redo
@@ -135,9 +137,9 @@
begin
if Top_Line /= null then
for L in 0 .. (Height - 1) loop
- Add (W, L, 0, H.Line.all);
- exit when H.Next = null;
- H := H.Next;
+ Add (W, L, 0, H.all.Line.all);
+ exit when H.all.Next = null;
+ H := H.all.Next;
end loop;
else
Unknown_Key;
@@ -181,12 +183,12 @@
L : Line_Position := 0;
begin
loop
- Add (W, L, 0, C.Line.all);
+ Add (W, L, 0, C.all.Line.all);
L := L + 1;
- exit when C.Next = null or else L = Height;
- C := C.Next;
+ exit when C.all.Next = null or else L = Height;
+ C := C.all.Next;
end loop;
- if C.Next /= null then
+ if C.all.Next /= null then
pragma Assert (L = Height);
More := True;
else
@@ -248,20 +250,20 @@
if K in Special_Key_Code'Range then
case K is
when Key_Cursor_Down =>
- if Current.Next /= null then
+ if Current.all.Next /= null then
Move_Cursor (W, Height - 1, 0);
Scroll (W, 1);
- Current := Current.Next;
- Top_Line := Top_Line.Next;
- Add (W, Current.Line.all);
+ Current := Current.all.Next;
+ Top_Line := Top_Line.all.Next;
+ Add (W, Current.all.Line.all);
end if;
when Key_Cursor_Up =>
- if Top_Line.Prev /= null then
+ if Top_Line.all.Prev /= null then
Move_Cursor (W, 0, 0);
Scroll (W, -1);
- Top_Line := Top_Line.Prev;
- Current := Current.Prev;
- Add (W, Top_Line.Line.all);
+ Top_Line := Top_Line.all.Prev;
+ Current := Current.all.Prev;
+ Add (W, Top_Line.all.Line.all);
end if;
when QUIT_CODE => exit;
when others => null;
@@ -319,8 +321,10 @@
Outer :
loop
exit Outer when not Next_Line;
- if Last = (1 + Key'Length) and then Key = Buffer (2 .. Last)
- and then Buffer (1) = '#' then
+ if Last = (1 + Key'Length)
+ and then Key = Buffer (2 .. Last)
+ and then Buffer (1) = '#'
+ then
loop
exit when not Next_Line;
exit when Buffer (1) = '#';
@@ -330,8 +334,8 @@
Release_Help (Root);
Root := Current;
else
- Tail.Next := Current;
- Current.Prev := Tail;
+ Tail.all.Next := Current;
+ Current.all.Prev := Tail;
end if;
Tail := Current;
end loop;
@@ -347,8 +351,8 @@
begin
loop
exit when Root = null;
- Next := Root.Next;
- Release_String (Root.Line);
+ Next := Root.all.Next;
+ Release_String (Root.all.Line);
Release_Help_Line (Root);
Root := Next;
end loop;
@@ -360,7 +364,7 @@
Explain (Context);
end Explain_Context;
- procedure Notepad (Key : in String)
+ procedure Notepad (Key : String)
is
H : constant Help_Line_Access := Search (Key);
T : Help_Line_Access := H;
@@ -371,7 +375,7 @@
begin
if H /= null then
loop
- T := T.Next;
+ T := T.all.Next;
exit when T = null;
N := N + 1;
end loop;
@@ -391,9 +395,9 @@
P := New_Panel (W);
T := H;
loop
- Add (W, L + 1, 1, T.Line.all, Integer (Columns - 2));
+ Add (W, L + 1, 1, T.all.Line.all, Integer (Columns - 2));
L := L + 1;
- T := T.Next;
+ T := T.all.Next;
exit when T = null;
end loop;
T := H;
@@ -403,6 +407,26 @@
end if;
end Notepad;
+ function Check_File (Name : String) return Boolean is
+ The_File : File_Type;
+ begin
+ Open (The_File, In_File, Name);
+ Close (The_File);
+ return True;
+ exception
+ when Name_Error =>
+ return False;
+ end Check_File;
+
begin
- Open (F, In_File, File_Name);
+ if Check_File ("/usr/share/AdaCurses/" & File_Name) then
+ Open (F, In_File, "/usr/share/AdaCurses/" & File_Name);
+ elsif Check_File (File_Name) then
+ Open (F, In_File, File_Name);
+ else
+ Put_Line (Standard_Error,
+ "The file explain.txt was not found in the current directory."
+ );
+ raise Name_Error;
+ end if;
end Sample.Explanation;
diff --git a/Ada95/samples/sample-explanation.ads b/Ada95/samples/sample-explanation.ads
index 18617ac..728825e 100644
--- a/Ada95/samples/sample-explanation.ads
+++ b/Ada95/samples/sample-explanation.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Poor mans help system. This scans a sequential file for key lines and
@@ -44,13 +44,13 @@
--
package Sample.Explanation is
- procedure Explain (Key : in String);
+ procedure Explain (Key : String);
-- Retrieve the text associated with this key and display it.
procedure Explain_Context;
-- Explain the current context.
- procedure Notepad (Key : in String);
+ procedure Notepad (Key : String);
-- Put a note on the screen and maintain it with the context
Explanation_Not_Found : exception;
diff --git a/Ada95/samples/sample-form_demo-aux.adb b/Ada95/samples/sample-form_demo-aux.adb
index 81c97ad..a3b044d 100644
--- a/Ada95/samples/sample-form_demo-aux.adb
+++ b/Ada95/samples/sample-form_demo-aux.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.16 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.17 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
@@ -48,7 +48,7 @@
package body Sample.Form_Demo.Aux is
- procedure Geometry (F : in Form;
+ procedure Geometry (F : Form;
L : out Line_Count; -- Lines used for menu
C : out Column_Count; -- Columns used for menu
Y : out Line_Position; -- Proposed Line for menu
@@ -105,7 +105,7 @@
return Pan;
end Create;
- procedure Destroy (F : in Form;
+ procedure Destroy (F : Form;
P : in out Panel)
is
W, S : Window;
diff --git a/Ada95/samples/sample-form_demo-aux.ads b/Ada95/samples/sample-form_demo-aux.ads
index 2317e14..7e7f7cd 100644
--- a/Ada95/samples/sample-form_demo-aux.ads
+++ b/Ada95/samples/sample-form_demo-aux.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.9 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -44,12 +44,12 @@
package Sample.Form_Demo.Aux is
- procedure Geometry (F : in Form;
+ procedure Geometry (F : Form;
L : out Line_Count;
C : out Column_Count;
Y : out Line_Position;
X : out Column_Position);
- -- Calculate the geometry for a panel beeing able to be used to display
+ -- Calculate the geometry for a panel being able to be used to display
-- the menu.
function Create (F : Form;
@@ -59,7 +59,7 @@
-- Create a panel decorated with a frame and the title at the specified
-- position. The dimension of the panel is derived from the menus layout.
- procedure Destroy (F : in Form;
+ procedure Destroy (F : Form;
P : in out Panel);
-- Destroy all the windowing structures associated with this menu and
-- panel.
diff --git a/Ada95/samples/sample-form_demo-handler.adb b/Ada95/samples/sample-form_demo-handler.adb
index afe86f7..d871c1c 100644
--- a/Ada95/samples/sample-form_demo-handler.adb
+++ b/Ada95/samples/sample-form_demo-handler.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.13 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.14 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Sample.Form_Demo.Aux;
@@ -45,8 +45,8 @@
package Aux renames Sample.Form_Demo.Aux;
- procedure Drive_Me (F : in Form;
- Title : in String := "")
+ procedure Drive_Me (F : Form;
+ Title : String := "")
is
L : Line_Count;
C : Column_Count;
@@ -57,10 +57,10 @@
Drive_Me (F, Y, X, Title);
end Drive_Me;
- procedure Drive_Me (F : in Form;
- Lin : in Line_Position;
- Col : in Column_Position;
- Title : in String := "")
+ procedure Drive_Me (F : Form;
+ Lin : Line_Position;
+ Col : Column_Position;
+ Title : String := "")
is
Pan : Panel := Aux.Create (F, Title, Lin, Col);
V : Cursor_Visibility := Normal;
diff --git a/Ada95/samples/sample-form_demo-handler.ads b/Ada95/samples/sample-form_demo-handler.ads
index 4a56412..7d875a0 100644
--- a/Ada95/samples/sample-form_demo-handler.ads
+++ b/Ada95/samples/sample-form_demo-handler.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.9 $
+-- $Revision: 1.10 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses;
@@ -51,14 +51,14 @@
Pan : Panel) return Boolean;
package Sample.Form_Demo.Handler is
- procedure Drive_Me (F : in Form;
- Lin : in Line_Position;
- Col : in Column_Position;
- Title : in String := "");
+ procedure Drive_Me (F : Form;
+ Lin : Line_Position;
+ Col : Column_Position;
+ Title : String := "");
-- Position the menu at the given point and drive it.
- procedure Drive_Me (F : in Form;
- Title : in String := "");
+ procedure Drive_Me (F : Form;
+ Title : String := "");
-- Center menu and drive it.
end Sample.Form_Demo.Handler;
diff --git a/Ada95/samples/sample-form_demo.adb b/Ada95/samples/sample-form_demo.adb
index e26a5d9..ed84526 100644
--- a/Ada95/samples/sample-form_demo.adb
+++ b/Ada95/samples/sample-form_demo.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.15 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.16 $
+-- $Date: 2011/03/23 00:44:12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -108,16 +108,16 @@
Notepad ("FORM-PAD00");
Default_Labels;
- Set_Field_Type (FA (6), Enum_Field);
- Set_Field_Type (FA (7), I_F);
- Set_Field_Type (FA (8), Mft);
+ Set_Field_Type (FA.all (6), Enum_Field);
+ Set_Field_Type (FA.all (7), I_F);
+ Set_Field_Type (FA.all (8), Mft);
F1 := new User_Data'(Data => 4711);
- Fld_U.Set_User_Data (FA (1), F1);
+ Fld_U.Set_User_Data (FA.all (1), F1);
Fh.Drive_Me (Frm);
- Fld_U.Get_User_Data (FA (1), F2);
+ Fld_U.Get_User_Data (FA.all (1), F2);
pragma Assert (F1 = F2);
pragma Assert (F1.Data = F2.Data);
diff --git a/Ada95/samples/sample-function_key_setting.adb b/Ada95/samples/sample-function_key_setting.adb
index e40e4a4..4ff70be 100644
--- a/Ada95/samples/sample-function_key_setting.adb
+++ b/Ada95/samples/sample-function_key_setting.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.13 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.15 $
+-- $Date: 2011/03/23 00:44:12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
@@ -81,25 +81,25 @@
Top_Of_Stack : Env_Ptr := null;
- procedure Push_Environment (Key : in String;
- Reset : in Boolean := True)
+ procedure Push_Environment (Key : String;
+ Reset : Boolean := True)
is
P : constant Env_Ptr := new Key_Environment (Number_Of_Keys);
begin
-- Store the current labels in the environment
for I in 1 .. Number_Of_Keys loop
- Get_Soft_Label_Key (I, P.Labels (I));
+ Get_Soft_Label_Key (I, P.all.Labels (I));
if Reset then
Set_Soft_Label_Key (I, " ");
end if;
end loop;
- P.Prev := Top_Of_Stack;
+ P.all.Prev := Top_Of_Stack;
-- now store active help context and notepad
- P.Help := Active_Context;
- P.Notepad := Active_Notepad;
+ P.all.Help := Active_Context;
+ P.all.Notepad := Active_Notepad;
-- The notepad must now vanish and the new notepad is empty.
- if P.Notepad /= Null_Panel then
- Hide (P.Notepad);
+ if P.all.Notepad /= Null_Panel then
+ Hide (P.all.Notepad);
Update_Panels;
end if;
Active_Notepad := Null_Panel;
@@ -119,14 +119,14 @@
raise Function_Key_Stack_Error;
else
for I in 1 .. Number_Of_Keys loop
- Set_Soft_Label_Key (I, P.Labels (I), Justification);
+ Set_Soft_Label_Key (I, P.all.Labels (I), Justification);
end loop;
pragma Assert (Active_Context /= null);
Release_String (Active_Context);
- Active_Context := P.Help;
+ Active_Context := P.all.Help;
Refresh_Soft_Label_Keys_Without_Update;
- Notepad_To_Context (P.Notepad);
- Top_Of_Stack := P.Prev;
+ Notepad_To_Context (P.all.Notepad);
+ Top_Of_Stack := P.all.Prev;
Release_Environment (P);
end if;
end Pop_Environment;
@@ -150,17 +150,17 @@
else
loop
exit when P = null;
- if P.Help.all = Key then
+ if P.all.Help.all = Key then
return True;
else
- P := P.Prev;
+ P := P.all.Prev;
end if;
end loop;
return False;
end if;
end Find_Context;
- procedure Notepad_To_Context (Pan : in Panel)
+ procedure Notepad_To_Context (Pan : Panel)
is
W : Window;
begin
diff --git a/Ada95/samples/sample-function_key_setting.ads b/Ada95/samples/sample-function_key_setting.ads
index e20f619..4188158 100644
--- a/Ada95/samples/sample-function_key_setting.ads
+++ b/Ada95/samples/sample-function_key_setting.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.9 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -45,8 +45,8 @@
--
package Sample.Function_Key_Setting is
- procedure Push_Environment (Key : in String;
- Reset : in Boolean := True);
+ procedure Push_Environment (Key : String;
+ Reset : Boolean := True);
-- Push the definition of the current function keys on an internal
-- stack. If the reset flag is true, all labels are reset while
-- pushed, so the new environment can assume a tabula rasa.
@@ -62,13 +62,13 @@
-- Initialize the environment
function Context return String;
- -- Return the current context identitfier
+ -- Return the current context identifier
function Find_Context (Key : String) return Boolean;
-- Look for a context, return true if it is in the stack,
-- false otherwise.
- procedure Notepad_To_Context (Pan : in Panel);
+ procedure Notepad_To_Context (Pan : Panel);
-- Add a panel representing a notepad to the current context.
Function_Key_Stack_Error : exception;
diff --git a/Ada95/samples/sample-header_handler.adb b/Ada95/samples/sample-header_handler.adb
index d198d66..f552e20 100644
--- a/Ada95/samples/sample-header_handler.adb
+++ b/Ada95/samples/sample-header_handler.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,14 +35,16 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.16 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.20 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Calendar; use Ada.Calendar;
with Terminal_Interface.Curses.Text_IO.Integer_IO;
with Sample.Manifest; use Sample.Manifest;
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Integer_IO);
+
-- This package handles the painting of the header line of the screen.
--
package body Sample.Header_Handler is
@@ -65,7 +67,7 @@
Columns : Column_Count) return Integer;
pragma Convention (C, Init_Header_Window);
- procedure Internal_Update_Header_Window (Do_Update : in Boolean);
+ procedure Internal_Update_Header_Window (Do_Update : Boolean);
-- The initialization must be called before Init_Screen. It steals two
-- lines from the top of the screen.
@@ -75,11 +77,11 @@
Rip_Off_Lines (2, Init_Header_Window'Access);
end Init_Header_Handler;
- procedure N_Out (N : in Integer);
+ procedure N_Out (N : Integer);
-- Emit a two digit number and ensure that a leading zero is generated if
-- necessary.
- procedure N_Out (N : in Integer)
+ procedure N_Out (N : Integer)
is
begin
if N < 10 then
@@ -92,7 +94,7 @@
-- Paint the header window. The input parameter is a flag indicating
-- whether or not the screen should be updated physically after painting.
- procedure Internal_Update_Header_Window (Do_Update : in Boolean)
+ procedure Internal_Update_Header_Window (Do_Update : Boolean)
is
type Month_Name_Array is
array (Month_Number'First .. Month_Number'Last) of String (1 .. 9);
@@ -119,8 +121,11 @@
D : constant Day_Number := Day (Now);
begin
if Header_Window /= Null_Window then
- if Minute /= Display_Min or else Hour /= Display_Hour
- or else Display_Day /= D or else Display_Month /= Mon then
+ if Minute /= Display_Min
+ or else Hour /= Display_Hour
+ or else Display_Day /= D
+ or else Display_Month /= Mon
+ then
Move_Cursor (Header_Window, 0, 0);
N_Out (D); Add (Header_Window, '.');
Add (Header_Window, Month_Names (Mon));
@@ -169,7 +174,7 @@
Pos := Columns - Column_Position (Title'Length);
Add (Win, 0, Pos / 2, Title);
-- In this phase we must not allow a physical update, because
- -- ncurses isn´t properly initialized at this point.
+ -- ncurses is not properly initialized at this point.
Internal_Update_Header_Window (False);
return 0;
else
diff --git a/Ada95/samples/sample-helpers.adb b/Ada95/samples/sample-helpers.adb
index d04853e..ceef268 100644
--- a/Ada95/samples/sample-helpers.adb
+++ b/Ada95/samples/sample-helpers.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,19 +35,19 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.12 $
--- $Date: 2008/07/26 18:48:08 $
+-- $Revision: 1.14 $
+-- $Date: 2011/03/19 12:13:21 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Sample.Explanation; use Sample.Explanation;
--- This package contains some conveniant helper routines used throughout
+-- This package contains some convenient helper routines used throughout
-- this example.
--
package body Sample.Helpers is
- procedure Window_Title (Win : in Window;
- Title : in String)
+ procedure Window_Title (Win : Window;
+ Title : String)
is
Height : Line_Count;
Width : Column_Count;
diff --git a/Ada95/samples/sample-helpers.ads b/Ada95/samples/sample-helpers.ads
index c1c8e79..28e89bb 100644
--- a/Ada95/samples/sample-helpers.ads
+++ b/Ada95/samples/sample-helpers.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,18 +35,18 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.9 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
--- This package contains some conveniant helper routines used throughout
+-- This package contains some convenient helper routines used throughout
-- this example.
--
package Sample.Helpers is
- procedure Window_Title (Win : in Window;
- Title : in String);
+ procedure Window_Title (Win : Window;
+ Title : String);
-- Put a title string into the first line of the window
procedure Not_Implemented;
diff --git a/Ada95/samples/sample-keyboard_handler.adb b/Ada95/samples/sample-keyboard_handler.adb
index fdac054..1d3f20c 100644
--- a/Ada95/samples/sample-keyboard_handler.adb
+++ b/Ada95/samples/sample-keyboard_handler.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.14 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.16 $
+-- $Date: 2011/03/23 00:34:24 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Strings; use Ada.Strings;
@@ -111,7 +111,7 @@
Buffer : String (1 .. Positive (Columns - 11));
Cmdc : String (1 .. 8);
begin
- Get_Buffer (Fld => FA (2), Str => Buffer);
+ Get_Buffer (Fld => FA.all (2), Str => Buffer);
Trim (Buffer, Left);
if Buffer (1) /= ' ' then
Cmdc := To_Upper (Buffer (Cmdc'Range));
@@ -157,8 +157,8 @@
end if;
end loop;
Enum_Field := Create (Enum_Info, True);
- Set_Field_Type (FA (2), Enum_Field);
- Set_Background (FA (2), Normal_Video);
+ Set_Field_Type (FA.all (2), Enum_Field);
+ Set_Background (FA.all (2), Normal_Video);
Fh.Drive_Me (Frm, Lines - 3, 0);
Delete (Frm);
@@ -174,7 +174,7 @@
Set_Timeout_Mode (Win, Delayed, 30000);
loop
K := Get_Keystroke (Win);
- if K = Key_None then -- a timeout occured
+ if K = Key_None then -- a timeout occurred
Update_Header_Window;
elsif K = 3 and then not In_Command then -- CTRL-C
K := Command;
diff --git a/Ada95/samples/sample-menu_demo-aux.adb b/Ada95/samples/sample-menu_demo-aux.adb
index b9b237c..091f08b 100644
--- a/Ada95/samples/sample-menu_demo-aux.adb
+++ b/Ada95/samples/sample-menu_demo-aux.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.13 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.14 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
@@ -48,7 +48,7 @@
package body Sample.Menu_Demo.Aux is
- procedure Geometry (M : in Menu;
+ procedure Geometry (M : Menu;
L : out Line_Count;
C : out Column_Count;
Y : out Line_Position;
@@ -56,7 +56,7 @@
Fy : out Line_Position;
Fx : out Column_Position);
- procedure Geometry (M : in Menu;
+ procedure Geometry (M : Menu;
L : out Line_Count; -- Lines used for menu
C : out Column_Count; -- Columns used for menu
Y : out Line_Position; -- Proposed Line for menu
@@ -82,11 +82,11 @@
end Geometry;
- procedure Geometry (M : in Menu;
+ procedure Geometry (M : Menu;
L : out Line_Count; -- Lines used for menu
C : out Column_Count; -- Columns used for menu
Y : out Line_Position; -- Proposed Line for menu
- X : out Column_Position) -- Proposed Column for menu
+ X : out Column_Position) -- Proposed Column for menu
is
Fy : Line_Position;
Fx : Column_Position;
@@ -134,7 +134,7 @@
return Pan;
end Create;
- procedure Destroy (M : in Menu;
+ procedure Destroy (M : Menu;
P : in out Panel)
is
W, S : Window;
diff --git a/Ada95/samples/sample-menu_demo-aux.ads b/Ada95/samples/sample-menu_demo-aux.ads
index 964e38e..e82aedf 100644
--- a/Ada95/samples/sample-menu_demo-aux.ads
+++ b/Ada95/samples/sample-menu_demo-aux.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.9 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -44,12 +44,12 @@
package Sample.Menu_Demo.Aux is
- procedure Geometry (M : in Menu;
+ procedure Geometry (M : Menu;
L : out Line_Count;
C : out Column_Count;
Y : out Line_Position;
X : out Column_Position);
- -- Calculate the geometry for a panel beeing able to be used to display
+ -- Calculate the geometry for a panel being able to be used to display
-- the menu.
function Create (M : Menu;
@@ -59,7 +59,7 @@
-- Create a panel decorated with a frame and the title at the specified
-- position. The dimension of the panel is derived from the menus layout.
- procedure Destroy (M : in Menu;
+ procedure Destroy (M : Menu;
P : in out Panel);
-- Destroy all the windowing structures associated with this menu and
-- panel.
diff --git a/Ada95/samples/sample-menu_demo-handler.adb b/Ada95/samples/sample-menu_demo-handler.adb
index 18747e9..84d29f6 100644
--- a/Ada95/samples/sample-menu_demo-handler.adb
+++ b/Ada95/samples/sample-menu_demo-handler.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -15,7 +15,7 @@
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
--- furnished to do so, subject to the following conditions: --
+-- furnished to do so, subject to the following conditions : --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.15 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.16 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Sample.Menu_Demo.Aux;
@@ -47,8 +47,8 @@
package Aux renames Sample.Menu_Demo.Aux;
- procedure Drive_Me (M : in Menu;
- Title : in String := "")
+ procedure Drive_Me (M : Menu;
+ Title : String := "")
is
L : Line_Count;
C : Column_Count;
@@ -59,10 +59,10 @@
Drive_Me (M, Y, X, Title);
end Drive_Me;
- procedure Drive_Me (M : in Menu;
- Lin : in Line_Position;
- Col : in Column_Position;
- Title : in String := "")
+ procedure Drive_Me (M : Menu;
+ Lin : Line_Position;
+ Col : Column_Position;
+ Title : String := "")
is
Mask : Event_Mask := No_Events;
Old : Event_Mask;
diff --git a/Ada95/samples/sample-menu_demo-handler.ads b/Ada95/samples/sample-menu_demo-handler.ads
index 1a82f9f..e9eaa6b 100644
--- a/Ada95/samples/sample-menu_demo-handler.ads
+++ b/Ada95/samples/sample-menu_demo-handler.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.9 $
+-- $Revision: 1.10 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses;
@@ -51,14 +51,14 @@
Pan : Panel) return Boolean;
package Sample.Menu_Demo.Handler is
- procedure Drive_Me (M : in Menu;
- Lin : in Line_Position;
- Col : in Column_Position;
- Title : in String := "");
+ procedure Drive_Me (M : Menu;
+ Lin : Line_Position;
+ Col : Column_Position;
+ Title : String := "");
-- Position the menu at the given point and drive it.
- procedure Drive_Me (M : in Menu;
- Title : in String := "");
+ procedure Drive_Me (M : Menu;
+ Title : String := "");
-- Center menu and drive it.
end Sample.Menu_Demo.Handler;
diff --git a/Ada95/samples/sample-menu_demo.adb b/Ada95/samples/sample-menu_demo.adb
index 3864674..80cd94b 100644
--- a/Ada95/samples/sample-menu_demo.adb
+++ b/Ada95/samples/sample-menu_demo.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.18 $
--- $Date: 2008/07/26 18:48:30 $
+-- $Revision: 1.19 $
+-- $Date: 2011/03/23 00:44:12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses; use Terminal_Interface.Curses;
@@ -154,7 +154,7 @@
O : Item_Option_Set;
begin
for J in I'Range loop
- Get_Options (I (J), O);
+ Get_Options (I.all (J), O);
O.Selectable := True;
if Hide_Long then
case J is
@@ -163,7 +163,7 @@
when others => null;
end case;
end if;
- Set_Options (I (J), O);
+ Set_Options (I.all (J), O);
end loop;
end;
return False;
@@ -378,14 +378,14 @@
Set_Pad_Character (M, '|');
MUD.Set_User_Data (M, U1);
- IUD.Set_User_Data (Itm (1), U3);
+ IUD.Set_User_Data (Itm.all (1), U3);
Mh.Drive_Me (M);
MUD.Get_User_Data (M, U2);
pragma Assert (U1 = U2 and U1.all = 4711);
- IUD.Get_User_Data (Itm (1), U4);
+ IUD.Get_User_Data (Itm.all (1), U4);
pragma Assert (U3 = U4 and U3.all = 4712);
Pop_Environment;
diff --git a/Ada95/samples/sample-text_io_demo.adb b/Ada95/samples/sample-text_io_demo.adb
index 0b385c4..a458a37 100644
--- a/Ada95/samples/sample-text_io_demo.adb
+++ b/Ada95/samples/sample-text_io_demo.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,18 +35,24 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.16 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.17 $
+-- $Date: 2011/03/23 00:44:12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Numerics.Generic_Elementary_Functions;
+
with Ada.Numerics.Complex_Types;
use Ada.Numerics.Complex_Types;
-with Terminal_Interface.Curses; use Terminal_Interface.Curses;
-with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels;
+with Terminal_Interface.Curses;
+use Terminal_Interface.Curses;
+
+with Terminal_Interface.Curses.Panels;
+use Terminal_Interface.Curses.Panels;
+
with Terminal_Interface.Curses.Text_IO;
use Terminal_Interface.Curses.Text_IO;
+
with Terminal_Interface.Curses.Text_IO.Integer_IO;
with Terminal_Interface.Curses.Text_IO.Float_IO;
with Terminal_Interface.Curses.Text_IO.Enumeration_IO;
@@ -60,6 +66,14 @@
with Sample.Keyboard_Handler; use Sample.Keyboard_Handler;
with Sample.Explanation; use Sample.Explanation;
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Complex_IO);
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Decimal_IO);
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Enumeration_IO);
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Fixed_IO);
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Float_IO);
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Integer_IO);
+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Modular_IO);
+
package body Sample.Text_IO_Demo is
type Weekday is (Sunday,
diff --git a/Ada95/samples/sample.adb b/Ada95/samples/sample.adb
index 648036f..9b3759f 100644
--- a/Ada95/samples/sample.adb
+++ b/Ada95/samples/sample.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.17 $
--- $Date: 2008/09/27 14:42:40 $
+-- $Revision: 1.18 $
+-- $Date: 2011/03/23 00:44:12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Text_IO;
@@ -143,7 +143,7 @@
Ud.Set_User_Data (M, D1);
I1 := new User_Data'(Data => 1174);
- Id.Set_User_Data (I (1), I1);
+ Id.Set_User_Data (I.all (1), I1);
Set_Spacing (Men => M, Row => 2);
@@ -156,7 +156,7 @@
pragma Assert (D1 = D2);
pragma Assert (D1.Data = D2.Data);
- Id.Get_User_Data (I (1), I2);
+ Id.Get_User_Data (I.all (1), I2);
pragma Assert (I1 = I2);
pragma Assert (I1.Data = I2.Data);
diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in
index 1c072bf..b0e80de 100644
--- a/Ada95/src/Makefile.in
+++ b/Ada95/src/Makefile.in
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,32 +28,41 @@
#
# Author: Juergen Pfeifer, 1996
#
-# $Id: Makefile.in,v 1.31 2007/09/15 18:22:24 tom Exp $
+# $Id: Makefile.in,v 1.71 2015/08/05 23:15:41 tom Exp $
#
.SUFFIXES:
-SHELL = /bin/sh
+SHELL = @SHELL@
+VPATH = @srcdir@
THIS = Makefile
MODEL = ../../@DFT_OBJ_SUBDIR@
+
DESTDIR = @DESTDIR@
+
+top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-ADA_INCLUDE = @ADA_INCLUDE@
+includedir = @includedir@
+libdir = @libdir@
+
+LIBDIR = $(DESTDIR)$(libdir)
+ADA_INCLUDE = $(DESTDIR)@ADA_INCLUDE@
+ADA_OBJECTS = $(DESTDIR)@ADA_OBJECTS@
INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
+INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
AR = @AR@
-AR_OPTS = @AR_OPTS@
+ARFLAGS = @ARFLAGS@
AWK = @AWK@
LN_S = @LN_S@
CC = @CC@
CFLAGS = @CFLAGS@
-CPPFLAGS = @ACPPFLAGS@ \
+CPPFLAGS = @ACPPFLAGS@ @CPPFLAGS@ \
-DHAVE_CONFIG_H -I$(srcdir)
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
@@ -69,60 +78,58 @@
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
RANLIB = @RANLIB@
+
################################################################################
ADA = @cf_ada_compiler@
ADAPREP = gnatprep
ADAFLAGS = @ADAFLAGS@ -I. -I$(srcdir)
+LIB_NAME = AdaCurses
+SONAME = @ADA_SHAREDLIB@
+
+GNAT_PROJECT = $(srcdir)/library.gpr
+
+# build/source are the Ada95 tree
+BUILD_DIR = ..
+SOURCE_DIR = ..
+
+BUILD_DIR_LIB = $(BUILD_DIR)/lib
+SOURCE_DIR_SRC = $(SOURCE_DIR)/src
+
ADAMAKE = @cf_ada_make@
-ADAMAKEFLAGS =
+ADAMAKEFLAGS = \
+ -P$(GNAT_PROJECT) \
+ -XBUILD_DIR=`cd $(BUILD_DIR);pwd` \
+ -XSOURCE_DIR=`cd $(SOURCE_DIR);pwd` \
+ -XSOURCE_DIR2=`cd $(srcdir);pwd` \
+ -XLIB_NAME=$(LIB_NAME) \
+ -XSONAME=$(SONAME)
CARGS = -cargs $(ADAFLAGS)
LARGS =
+STATIC_LIBNAME = lib$(LIB_NAME).a
+SHARED_LIBNAME = $(SONAME)
+SHARED_SYMLINK = lib$(LIB_NAME).so
+
ALIB = @cf_ada_package@
ABASE = $(ALIB)-curses
-
-LIBALIS=$(ALIB).ali \
- $(ABASE)-aux.ali \
- $(ABASE).ali \
- $(ABASE)-terminfo.ali \
- $(ABASE)-termcap.ali \
- $(ABASE)-putwin.ali \
- $(ABASE)-trace.ali \
- $(ABASE)-mouse.ali \
- $(ABASE)-panels.ali \
- $(ABASE)-menus.ali \
- $(ABASE)-forms.ali \
- $(ABASE)-forms-field_types.ali \
- $(ABASE)-forms-field_types-alpha.ali \
- $(ABASE)-forms-field_types-alphanumeric.ali \
- $(ABASE)-forms-field_types-intfield.ali \
- $(ABASE)-forms-field_types-numeric.ali \
- $(ABASE)-forms-field_types-regexp.ali \
- $(ABASE)-forms-field_types-enumeration.ali \
- $(ABASE)-forms-field_types-ipv4_address.ali \
- $(ABASE)-forms-field_types-user.ali \
- $(ABASE)-forms-field_types-user-choice.ali \
- $(ABASE)-text_io.ali \
- $(ABASE)-text_io-aux.ali
-
-# Ada Library files for generic packages. Since gnat 3.10 they are
-# also compiled
-GENALIS=$(ABASE)-menus-menu_user_data.ali \
- $(ABASE)-menus-item_user_data.ali \
- $(ABASE)-forms-form_user_data.ali \
- $(ABASE)-forms-field_user_data.ali \
- $(ABASE)-forms-field_types-enumeration-ada.ali \
- $(ABASE)-panels-user_data.ali \
- $(ABASE)-text_io-integer_io.ali \
- $(ABASE)-text_io-float_io.ali \
- $(ABASE)-text_io-fixed_io.ali \
- $(ABASE)-text_io-decimal_io.ali \
- $(ABASE)-text_io-enumeration_io.ali \
- $(ABASE)-text_io-modular_io.ali \
- $(ABASE)-text_io-complex_io.ali
-
+################################################################################
+GENERATED_SOURCES=$(ABASE).ads \
+ $(ABASE).adb \
+ $(ABASE)-aux.ads \
+ $(ABASE)-trace.ads \
+ $(ABASE)-menus.ads \
+ $(ABASE)-forms.ads \
+ $(ABASE)-mouse.ads \
+ $(ABASE)-panels.ads \
+ $(ABASE)-menus-menu_user_data.ads \
+ $(ABASE)-menus-item_user_data.ads \
+ $(ABASE)-forms-form_user_data.ads \
+ $(ABASE)-forms-field_types.ads \
+ $(ABASE)-forms-field_user_data.ads \
+ $(ABASE)-panels-user_data.ads
+################################################################################
LIBOBJS=$(ALIB).o \
$(ABASE)-aux.o \
$(ABASE).o \
@@ -163,34 +170,41 @@
$(ABASE)-text_io-modular_io.o \
$(ABASE)-text_io-complex_io.o
-
-all :: libAdaCurses.a
+all :: $(BUILD_DIR_LIB)/$(STATIC_LIBNAME)
@echo done
-libAdaCurses.a :: dotouch $(LIBOBJS) @cf_generic_objects@
- $(AR) $(AR_OPTS) $@ $(LIBOBJS) @cf_generic_objects@
-
-dotouch :
- @sh -c 'for f in $(LIBALIS) $(GENALIS); do test -f $$f || touch $$f; done'
+$(ADA_INCLUDE) \
+$(ADA_OBJECTS) \
+$(LIBDIR) \
+$(BUILD_DIR_LIB) :
+ mkdir -p $@
sources :
@echo made $@
libs \
install \
-install.libs \
+install.libs :: \
+ $(BUILD_DIR_LIB)/$(STATIC_LIBNAME)
+ @echo made $(STATIC_LIBNAME)
+
+install \
+install.libs :: \
+ $(BUILD_DIR_LIB)/$(STATIC_LIBNAME) \
+ $(ADA_OBJECTS)
+ @$(INSTALL_LIB) \
+ $(BUILD_DIR_LIB)/$(STATIC_LIBNAME) \
+ $(ADA_OBJECTS)
+
uninstall \
uninstall.libs ::
- @echo made $@
-
-generics: $(GENALIS)
- @echo made $@
+ @rm -f $(ADA_OBJECTS)/$(STATIC_LIBNAME)
mostlyclean ::
rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] *.a
clean :: mostlyclean
- rm -f $(LIBALIS) $(GENALIS) $(LIBOBJS) $(GENOBJS) $(ABASE)-trace.adb
+ rm -f $(ABASE)-trace.adb
distclean :: clean
rm -f Makefile
@@ -199,190 +213,127 @@
BASEDEPS=$(ABASE).ads $(ABASE)-aux.ads $(ABASE).adb
-$(ALIB).o: $(srcdir)/$(ALIB).ads
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ALIB).ads
-
-
-$(ABASE)-aux.o: $(srcdir)/$(ABASE)-aux.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-aux.adb
-
-
-$(ABASE).o: $(ABASE).adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(ABASE).adb
-
-
-$(ABASE)-terminfo.o: \
- $(srcdir)/$(ABASE)-terminfo.ads \
- $(srcdir)/$(ABASE)-terminfo.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-terminfo.adb
-
-
-$(ABASE)-termcap.o: \
- $(srcdir)/$(ABASE)-termcap.ads \
- $(srcdir)/$(ABASE)-termcap.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-termcap.adb
-
-
-$(ABASE)-putwin.o: \
- $(srcdir)/$(ABASE)-putwin.ads \
- $(srcdir)/$(ABASE)-putwin.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-putwin.adb
-
-
$(ABASE)-trace.adb : $(srcdir)/$(ABASE)-trace.adb_p
rm -f $@
- $(ADAPREP) -DADA_TRACE=@ADA_TRACE@ -DPRAGMA_UNREF=@PRAGMA_UNREF@ $(srcdir)/$(ABASE)-trace.adb_p $@
+ $(ADAPREP) -DADA_TRACE=@ADA_TRACE@ @GNATPREP_OPTS@ $(srcdir)/$(ABASE)-trace.adb_p $@
-$(ABASE)-trace.o: \
- $(ABASE)-trace.ads \
- $(ABASE)-trace.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(ABASE)-trace.adb
+###############################################################################
+# Use these definitions when building a shared library.
+SHARED_C_OBJS = c_varargs_to_ada.o c_threaded_variables.o ncurses_compat.o
+SHARED_OBJS = $(SHARED_C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
+c_varargs_to_ada.o : $(srcdir)/c_varargs_to_ada.c
+ $(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/c_varargs_to_ada.c
-$(ABASE)-mouse.o: \
- $(ABASE)-mouse.ads \
- $(srcdir)/$(ABASE)-mouse.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-mouse.adb
+c_threaded_variables.o : $(srcdir)/c_threaded_variables.c
+ $(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/c_threaded_variables.c
+ncurses_compat.o : $(srcdir)/ncurses_compat.c
+ $(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/ncurses_compat.c
-$(ABASE)-panels.o: \
- $(ABASE)-panels.ads \
- $(srcdir)/$(ABASE)-panels.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-panels.adb
+###############################################################################
+# Use these definitions when building a static library.
+STATIC_C_OBJS = static_c_varargs_to_ada.o static_c_threaded_variables.o static_ncurses_compat.o
+STATIC_OBJS = $(STATIC_C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
+static_c_varargs_to_ada.o : $(srcdir)/c_varargs_to_ada.c
+ $(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/c_varargs_to_ada.c
-$(ABASE)-menus.o: \
- $(ABASE)-menus.ads \
- $(srcdir)/$(ABASE)-menus.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-menus.adb
+static_c_threaded_variables.o : $(srcdir)/c_threaded_variables.c
+ $(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/c_threaded_variables.c
+static_ncurses_compat.o : $(srcdir)/ncurses_compat.c
+ $(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/ncurses_compat.c
-$(ABASE)-forms.o: \
- $(ABASE)-forms.ads \
- $(srcdir)/$(ABASE)-forms.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms.adb
+###############################################################################
-$(ABASE)-forms-field_types.o: \
- $(ABASE)-forms-field_types.ads \
- $(srcdir)/$(ABASE)-forms-field_types.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types.adb
+@USE_OLD_MAKERULES@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \
+@USE_OLD_MAKERULES@ $(BUILD_DIR_LIB) \
+@USE_OLD_MAKERULES@ $(STATIC_OBJS)
+@USE_OLD_MAKERULES@ $(AR) $(ARFLAGS) $@ $(STATIC_OBJS)
-$(ABASE)-forms-field_types-alpha.o: \
- $(srcdir)/$(ABASE)-forms-field_types-alpha.ads \
- $(srcdir)/$(ABASE)-forms-field_types-alpha.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-alpha.adb
+$(BUILD_DIR)/static-ali : ; mkdir -p $@
+$(BUILD_DIR)/static-obj : ; mkdir -p $@
-$(ABASE)-forms-field_types-alphanumeric.o: \
- $(srcdir)/$(ABASE)-forms-field_types-alphanumeric.ads \
- $(srcdir)/$(ABASE)-forms-field_types-alphanumeric.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-alphanumeric.adb
+STATIC_DIRS = \
+ $(BUILD_DIR_LIB) \
+ $(BUILD_DIR)/static-ali \
+ $(BUILD_DIR)/static-obj
-$(ABASE)-forms-field_types-intfield.o: \
- $(srcdir)/$(ABASE)-forms-field_types-intfield.ads \
- $(srcdir)/$(ABASE)-forms-field_types-intfield.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-intfield.adb
+@USE_GNAT_PROJECTS@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \
+@USE_GNAT_PROJECTS@ $(ABASE)-trace.adb \
+@USE_GNAT_PROJECTS@ $(STATIC_C_OBJS) \
+@USE_GNAT_PROJECTS@ $(STATIC_DIRS)
+@USE_GNAT_PROJECTS@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static
+@USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS)
+@USE_GNAT_PROJECTS@
+@USE_GNAT_LIBRARIES@install \
+@USE_GNAT_LIBRARIES@install.libs :: \
+@USE_GNAT_LIBRARIES@ $(ADA_OBJECTS)
+@USE_GNAT_LIBRARIES@ $(INSTALL_LIB) \
+@USE_GNAT_LIBRARIES@ $(BUILD_DIR)/static-ali/*.ali \
+@USE_GNAT_LIBRARIES@ $(ADA_OBJECTS)
-$(ABASE)-forms-field_types-numeric.o: \
- $(srcdir)/$(ABASE)-forms-field_types-numeric.ads \
- $(srcdir)/$(ABASE)-forms-field_types-numeric.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-numeric.adb
+uninstall \
+uninstall.libs ::
+ @rm -f $(ADA_OBJECTS)/$(STATIC_LIBNAME)
-$(ABASE)-forms-field_types-regexp.o: \
- $(srcdir)/$(ABASE)-forms-field_types-regexp.ads \
- $(srcdir)/$(ABASE)-forms-field_types-regexp.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-regexp.adb
+@USE_GNAT_LIBRARIES@uninstall \
+@USE_GNAT_LIBRARIES@uninstall.libs ::
+@USE_GNAT_LIBRARIES@ @$(SHELL) -c 'for name in $(BUILD_DIR)/static-ali/*.ali ; do rm -f $(ADA_OBJECTS)/`basename $$name`; done'
-$(ABASE)-forms-field_types-enumeration.o: \
- $(srcdir)/$(ABASE)-forms-field_types-enumeration.ads \
- $(srcdir)/$(ABASE)-forms-field_types-enumeration.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-enumeration.adb
+$(BUILD_DIR)/dynamic-ali : ; mkdir -p $@
+$(BUILD_DIR)/dynamic-obj : ; mkdir -p $@
-$(ABASE)-forms-field_types-ipv4_address.o: \
- $(srcdir)/$(ABASE)-forms-field_types-ipv4_address.ads \
- $(srcdir)/$(ABASE)-forms-field_types-ipv4_address.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-ipv4_address.adb
+SHARED_DIRS = \
+ $(BUILD_DIR_LIB) \
+ $(BUILD_DIR)/dynamic-ali \
+ $(BUILD_DIR)/dynamic-obj
-$(ABASE)-forms-field_types-user.o: \
- $(srcdir)/$(ABASE)-forms-field_types-user.ads \
- $(srcdir)/$(ABASE)-forms-field_types-user.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-user.adb
+@MAKE_ADA_SHAREDLIB@all :: $(BUILD_DIR_LIB)/$(SHARED_LIBNAME)
+@MAKE_ADA_SHAREDLIB@$(BUILD_DIR_LIB)/$(SHARED_LIBNAME) :: \
+@MAKE_ADA_SHAREDLIB@ $(ABASE)-trace.adb \
+@MAKE_ADA_SHAREDLIB@ $(SHARED_DIRS) \
+@MAKE_ADA_SHAREDLIB@ $(SHARED_OBJS)
+@MAKE_ADA_SHAREDLIB@ cp $(SHARED_OBJS) $(BUILD_DIR)/dynamic-obj/
+@MAKE_ADA_SHAREDLIB@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic
-$(ABASE)-forms-field_types-user-choice.o: \
- $(srcdir)/$(ABASE)-forms-field_types-user-choice.ads \
- $(srcdir)/$(ABASE)-forms-field_types-user-choice.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-user-choice.adb
+install \
+install.libs :: $(ADA_INCLUDE)
+ $(INSTALL_LIB) \
+ $(SOURCE_DIR_SRC)/*.ad[sb] \
+ $(ADA_INCLUDE)
-$(ABASE)-text_io.o: \
- $(srcdir)/$(ABASE)-text_io.ads \
- $(srcdir)/$(ABASE)-text_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io.adb
+install \
+install.libs :: $(ADA_INCLUDE)
+ $(INSTALL_LIB) \
+ $(GENERATED_SOURCES) \
+ $(ADA_INCLUDE)
-$(ABASE)-text_io-aux.o: \
- $(srcdir)/$(ABASE)-text_io-aux.ads \
- $(srcdir)/$(ABASE)-text_io-aux.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-aux.adb
+uninstall \
+uninstall.libs ::
+ $(SHELL) -c 'for name in $(SOURCE_DIR_SRC)/*.ad[sb] $(GENERATED_SOURCES); do rm -f $(ADA_INCLUDE)/`basename $$name`; done'
-$(ABASE)-menus-menu_user_data.o: \
- $(ABASE)-menus-menu_user_data.ads \
- $(srcdir)/$(ABASE)-menus-menu_user_data.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-menus-menu_user_data.adb
+@MAKE_ADA_SHAREDLIB@install \
+@MAKE_ADA_SHAREDLIB@install.libs :: $(ADA_OBJECTS) $(LIBDIR)
+@MAKE_ADA_SHAREDLIB@ $(INSTALL_LIB) \
+@MAKE_ADA_SHAREDLIB@ $(BUILD_DIR)/dynamic-ali/* \
+@MAKE_ADA_SHAREDLIB@ $(ADA_OBJECTS)
+@MAKE_ADA_SHAREDLIB@ $(INSTALL_LIB) \
+@MAKE_ADA_SHAREDLIB@ $(BUILD_DIR_LIB)/$(SHARED_LIBNAME) \
+@MAKE_ADA_SHAREDLIB@ $(LIBDIR)
+@MAKE_ADA_SHAREDLIB@ cd $(LIBDIR) && $(LN_S) $(SHARED_LIBNAME) $(SHARED_SYMLINK)
+@MAKE_ADA_SHAREDLIB@
+@MAKE_ADA_SHAREDLIB@uninstall \
+@MAKE_ADA_SHAREDLIB@uninstall.libs ::
+@MAKE_ADA_SHAREDLIB@ $(SHELL) -c 'for name in $(BUILD_DIR)/dynamic-ali/* ; do rm -f $(ADA_OBJECTS)/`basename $$name`; done'
+@MAKE_ADA_SHAREDLIB@
+@MAKE_ADA_SHAREDLIB@uninstall \
+@MAKE_ADA_SHAREDLIB@uninstall.libs ::
+@MAKE_ADA_SHAREDLIB@ rm -f $(LIBDIR)/$(SHARED_SYMLINK)
+@MAKE_ADA_SHAREDLIB@ rm -f $(LIBDIR)/$(SHARED_LIBNAME)
-$(ABASE)-menus-item_user_data.o: \
- $(ABASE)-menus-item_user_data.ads \
- $(srcdir)/$(ABASE)-menus-item_user_data.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-menus-item_user_data.adb
-
-$(ABASE)-forms-form_user_data.o: \
- $(ABASE)-forms-form_user_data.ads \
- $(srcdir)/$(ABASE)-forms-form_user_data.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-form_user_data.adb
-
-$(ABASE)-forms-field_user_data.o: \
- $(ABASE)-forms-field_user_data.ads \
- $(srcdir)/$(ABASE)-forms-field_user_data.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_user_data.adb
-
-$(ABASE)-forms-field_types-enumeration-ada.o: \
- $(srcdir)/$(ABASE)-forms-field_types-enumeration-ada.ads \
- $(srcdir)/$(ABASE)-forms-field_types-enumeration-ada.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-enumeration-ada.adb
-
-$(ABASE)-panels-user_data.o: \
- $(ABASE)-panels-user_data.ads \
- $(srcdir)/$(ABASE)-panels-user_data.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-panels-user_data.adb
-
-$(ABASE)-text_io-integer_io.o: \
- $(srcdir)/$(ABASE)-text_io-integer_io.ads \
- $(srcdir)/$(ABASE)-text_io-integer_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-integer_io.adb
-
-$(ABASE)-text_io-float_io.o: \
- $(srcdir)/$(ABASE)-text_io-float_io.ads \
- $(srcdir)/$(ABASE)-text_io-float_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-float_io.adb
-
-$(ABASE)-text_io-fixed_io.o: \
- $(srcdir)/$(ABASE)-text_io-fixed_io.ads \
- $(srcdir)/$(ABASE)-text_io-fixed_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-fixed_io.adb
-
-$(ABASE)-text_io-decimal_io.o: \
- $(srcdir)/$(ABASE)-text_io-decimal_io.ads \
- $(srcdir)/$(ABASE)-text_io-decimal_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-decimal_io.adb
-
-$(ABASE)-text_io-enumeration_io.o: \
- $(srcdir)/$(ABASE)-text_io-enumeration_io.ads \
- $(srcdir)/$(ABASE)-text_io-enumeration_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-enumeration_io.adb
-
-$(ABASE)-text_io-modular_io.o: \
- $(srcdir)/$(ABASE)-text_io-modular_io.ads \
- $(srcdir)/$(ABASE)-text_io-modular_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-modular_io.adb
-
-$(ABASE)-text_io-complex_io.o: \
- $(srcdir)/$(ABASE)-text_io-complex_io.ads \
- $(srcdir)/$(ABASE)-text_io-complex_io.adb $(BASEDEPS)
- $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-complex_io.adb
+clean ::
+ rm -rf $(BUILD_DIR)/*-ali
+ rm -rf $(BUILD_DIR)/*-obj
+ rm -rf $(BUILD_DIR_LIB)
diff --git a/Ada95/src/c_threaded_variables.c b/Ada95/src/c_threaded_variables.c
new file mode 100644
index 0000000..bc58c46
--- /dev/null
+++ b/Ada95/src/c_threaded_variables.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * Copyright (c) 2011,2014 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Nicolas Boulenguez, 2011 *
+ ****************************************************************************/
+
+#include "c_threaded_variables.h"
+
+#define WRAP(type, name) \
+ type \
+ name ## _as_function () \
+ { \
+ return name; \
+ }
+/* *INDENT-OFF* */
+WRAP(WINDOW *, stdscr)
+WRAP(WINDOW *, curscr)
+
+WRAP(int, LINES)
+WRAP(int, COLS)
+WRAP(int, TABSIZE)
+WRAP(int, COLORS)
+WRAP(int, COLOR_PAIRS)
+
+chtype
+acs_map_as_function(char inx)
+{
+ return acs_map[(unsigned char) inx];
+}
+/* *INDENT-ON* */
diff --git a/Ada95/src/c_threaded_variables.h b/Ada95/src/c_threaded_variables.h
new file mode 100644
index 0000000..5f0f62f
--- /dev/null
+++ b/Ada95/src/c_threaded_variables.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+ * Copyright (c) 2011-2014,2015 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/* $Id: c_threaded_variables.h,v 1.3 2015/08/06 23:09:47 tom Exp $ */
+
+#ifndef __C_THREADED_VARIABLES_H
+#define __C_THREADED_VARIABLES_H
+
+#include <ncurses_cfg.h>
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+
+#include <curses.h>
+
+extern WINDOW *stdscr_as_function(void);
+extern WINDOW *curscr_as_function(void);
+
+extern int LINES_as_function(void);
+extern int LINES_as_function(void);
+extern int COLS_as_function(void);
+extern int TABSIZE_as_function(void);
+extern int COLORS_as_function(void);
+extern int COLOR_PAIRS_as_function(void);
+
+extern chtype acs_map_as_function(char /* index */ );
+
+#endif /* __C_THREADED_VARIABLES_H */
diff --git a/Ada95/src/c_varargs_to_ada.c b/Ada95/src/c_varargs_to_ada.c
new file mode 100644
index 0000000..f0b1bbe
--- /dev/null
+++ b/Ada95/src/c_varargs_to_ada.c
@@ -0,0 +1,117 @@
+/****************************************************************************
+ * Copyright (c) 2011,2014 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Nicolas Boulenguez, 2011 *
+ ****************************************************************************/
+
+/*
+ Version Control
+ $Id: c_varargs_to_ada.c,v 1.6 2014/05/24 21:32:18 tom Exp $
+ --------------------------------------------------------------------------*/
+/*
+ */
+
+#include "c_varargs_to_ada.h"
+
+int
+set_field_type_alnum(FIELD *field,
+ int minimum_width)
+{
+ return set_field_type(field, TYPE_ALNUM, minimum_width);
+}
+
+int
+set_field_type_alpha(FIELD *field,
+ int minimum_width)
+{
+ return set_field_type(field, TYPE_ALPHA, minimum_width);
+}
+
+int
+set_field_type_enum(FIELD *field,
+ char **value_list,
+ int case_sensitive,
+ int unique_match)
+{
+ return set_field_type(field, TYPE_ENUM, value_list, case_sensitive,
+ unique_match);
+}
+
+int
+set_field_type_integer(FIELD *field,
+ int precision,
+ long minimum,
+ long maximum)
+{
+ return set_field_type(field, TYPE_INTEGER, precision, minimum, maximum);
+}
+
+int
+set_field_type_numeric(FIELD *field,
+ int precision,
+ double minimum,
+ double maximum)
+{
+ return set_field_type(field, TYPE_NUMERIC, precision, minimum, maximum);
+}
+
+int
+set_field_type_regexp(FIELD *field,
+ char *regular_expression)
+{
+ return set_field_type(field, TYPE_REGEXP, regular_expression);
+}
+
+int
+set_field_type_ipv4(FIELD *field)
+{
+ return set_field_type(field, TYPE_IPV4);
+}
+
+int
+set_field_type_user(FIELD *field,
+ FIELDTYPE *fieldtype,
+ void *arg)
+{
+ return set_field_type(field, fieldtype, arg);
+}
+
+void *
+void_star_make_arg(va_list *list)
+{
+ return va_arg(*list, void *);
+}
+
+#ifdef TRACE
+void
+_traces(const char *fmt, char *arg)
+{
+ _tracef(fmt, arg);
+}
+#endif
diff --git a/Ada95/src/c_varargs_to_ada.h b/Ada95/src/c_varargs_to_ada.h
new file mode 100644
index 0000000..f269705
--- /dev/null
+++ b/Ada95/src/c_varargs_to_ada.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ * Copyright (c) 2011,2015 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/* $Id: c_varargs_to_ada.h,v 1.4 2015/08/06 23:08:47 tom Exp $ */
+
+#ifndef __C_VARARGS_TO_ADA_H
+#define __C_VARARGS_TO_ADA_H
+
+#ifdef HAVE_CONFIG_H
+#include <ncurses_cfg.h>
+#else
+#include <ncurses.h>
+#endif
+
+#include <stdlib.h>
+
+#include <form.h>
+
+extern int set_field_type_alnum(FIELD * /* field */ ,
+ int /* minimum_width */ );
+
+extern int set_field_type_alpha(FIELD * /* field */ ,
+ int /* minimum_width */ );
+
+extern int set_field_type_enum(FIELD * /* field */ ,
+ char ** /* value_list */ ,
+ int /* case_sensitive */ ,
+ int /* unique_match */ );
+
+extern int set_field_type_integer(FIELD * /* field */ ,
+ int /* precision */ ,
+ long /* minimum */ ,
+ long /* maximum */ );
+
+extern int set_field_type_numeric(FIELD * /* field */ ,
+ int /* precision */ ,
+ double /* minimum */ ,
+ double /* maximum */ );
+
+extern int set_field_type_regexp(FIELD * /* field */ ,
+ char * /* regular_expression */ );
+
+extern int set_field_type_ipv4(FIELD * /* field */ );
+
+extern int set_field_type_user(FIELD * /* field */ ,
+ FIELDTYPE * /* fieldtype */ ,
+ void * /* arg */ );
+
+extern void *void_star_make_arg(va_list * /* list */ );
+
+#ifdef TRACE
+extern void _traces(const char * /* fmt */
+ ,char * /* arg */ );
+#endif
+
+#endif /* __C_VARARGS_TO_ADA_H */
diff --git a/Ada95/src/library.gpr b/Ada95/src/library.gpr
new file mode 100644
index 0000000..e7380f0
--- /dev/null
+++ b/Ada95/src/library.gpr
@@ -0,0 +1,56 @@
+------------------------------------------------------------------------------
+-- Copyright (c) 2010-2011,2014 Free Software Foundation, Inc. --
+-- --
+-- Permission is hereby granted, free of charge, to any person obtaining a --
+-- copy of this software and associated documentation files (the --
+-- "Software"), to deal in the Software without restriction, including --
+-- without limitation the rights to use, copy, modify, merge, publish, --
+-- distribute, distribute with modifications, sublicense, and/or sell --
+-- copies of the Software, and to permit persons to whom the Software is --
+-- furnished to do so, subject to the following conditions: --
+-- --
+-- The above copyright notice and this permission notice shall be included --
+-- in all copies or substantial portions of the Software. --
+-- --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
+-- --
+-- Except as contained in this notice, the name(s) of the above copyright --
+-- holders shall not be used in advertising or otherwise to promote the --
+-- sale, use or other dealings in this Software without prior written --
+-- authorization. --
+------------------------------------------------------------------------------
+-- $Id: library.gpr,v 1.9 2014/06/01 01:13:09 tom Exp $
+-- http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Library-Projects.html
+-- http://www.adaworld.com/debian/debian-ada-policy.html
+project Library is
+ Build_Dir := External ("BUILD_DIR");
+ Source_Dir := External ("SOURCE_DIR");
+ Source_Dir2 := External ("SOURCE_DIR2");
+ Kind := External ("LIB_KIND");
+ for Library_Name use External ("LIB_NAME");
+ for Library_Version use External ("SONAME");
+
+ for Library_Kind use Kind;
+ for Library_Dir use Build_Dir & "/lib";
+ for Object_Dir use Build_Dir & "/" & Kind & "-obj";
+ for Library_ALI_Dir use Build_Dir & "/" & Kind & "-ali";
+ for Source_Dirs use (Source_Dir & "/src",
+ Source_Dir2,
+ Build_Dir & "/src");
+ for Library_Options use ("-lncurses", "-lpanel", "-lmenu", "-lform");
+ package Compiler is
+ for Default_Switches ("Ada") use
+ ("-g",
+ "-O2",
+ "-gnatafno",
+ "-gnatVa", -- All validity checks
+ "-gnatwa"); -- Activate all optional errors
+ end Compiler;
+ for Languages use ("C", "Ada");
+end Library;
diff --git a/Ada95/src/modules b/Ada95/src/modules
new file mode 100644
index 0000000..9f5e030
--- /dev/null
+++ b/Ada95/src/modules
@@ -0,0 +1,70 @@
+# $Id: modules,v 1.3 2010/06/26 23:33:14 tom Exp $
+##############################################################################
+# Copyright (c) 2010 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey 2010
+#
+
+# Library objects
+# rootname depend-spec depend-body unit
+$(ALIB) $(srcdir) none spec
+$(ABASE)-aux none $(srcdir) body
+$(ABASE) none . body
+$(ABASE)-terminfo $(srcdir) $(srcdir) body
+$(ABASE)-termcap $(srcdir) $(srcdir) body
+$(ABASE)-putwin $(srcdir) $(srcdir) body
+$(ABASE)-trace . . body
+$(ABASE)-mouse . $(srcdir) body
+$(ABASE)-panels . $(srcdir) body
+$(ABASE)-menus . $(srcdir) body
+$(ABASE)-forms . $(srcdir) body
+$(ABASE)-forms-field_types . $(srcdir) body
+$(ABASE)-forms-field_types-alpha $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-alphanumeric $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-intfield $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-numeric $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-regexp $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-enumeration $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-ipv4_address $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-user $(srcdir) $(srcdir) body
+$(ABASE)-forms-field_types-user-choice $(srcdir) $(srcdir) body
+$(ABASE)-text_io $(srcdir) $(srcdir) body
+$(ABASE)-text_io-aux $(srcdir) $(srcdir) body
+$(ABASE)-menus-menu_user_data . $(srcdir) body
+$(ABASE)-menus-item_user_data . $(srcdir) body
+$(ABASE)-forms-form_user_data . $(srcdir) body
+$(ABASE)-forms-field_user_data . $(srcdir) body
+$(ABASE)-forms-field_types-enumeration-ada $(srcdir) $(srcdir) body
+$(ABASE)-panels-user_data . $(srcdir) body
+$(ABASE)-text_io-integer_io $(srcdir) $(srcdir) body
+$(ABASE)-text_io-float_io $(srcdir) $(srcdir) body
+$(ABASE)-text_io-fixed_io $(srcdir) $(srcdir) body
+$(ABASE)-text_io-decimal_io $(srcdir) $(srcdir) body
+$(ABASE)-text_io-enumeration_io $(srcdir) $(srcdir) body
+$(ABASE)-text_io-modular_io $(srcdir) $(srcdir) body
+$(ABASE)-text_io-complex_io $(srcdir) $(srcdir) body
diff --git a/Ada95/src/ncurses_compat.c b/Ada95/src/ncurses_compat.c
new file mode 100644
index 0000000..e44f3d0
--- /dev/null
+++ b/Ada95/src/ncurses_compat.c
@@ -0,0 +1,145 @@
+/****************************************************************************
+ * Copyright (c) 2011,2015 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey, 2011 *
+ ****************************************************************************/
+
+/*
+ Version Control
+ $Id: ncurses_compat.c,v 1.3 2015/08/06 23:09:10 tom Exp $
+ --------------------------------------------------------------------------*/
+
+/*
+ * Provide compatibility with older versions of ncurses.
+ */
+#include <ncurses_cfg.h>
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+
+#include <curses.h>
+
+#if defined(NCURSES_VERSION_PATCH)
+
+#if NCURSES_VERSION_PATCH < 20081122
+extern bool has_mouse(void);
+extern int _nc_has_mouse(void);
+
+bool
+has_mouse(void)
+{
+ return (bool)_nc_has_mouse();
+}
+#endif
+
+/*
+ * These are provided by lib_gen.c:
+ */
+#if NCURSES_VERSION_PATCH < 20070331
+extern bool (is_keypad) (const WINDOW *);
+extern bool (is_scrollok) (const WINDOW *);
+
+bool
+is_keypad(const WINDOW *win)
+{
+ return ((win)->_use_keypad);
+}
+
+bool
+ (is_scrollok) (const WINDOW *win)
+{
+ return ((win)->_scroll);
+}
+#endif
+
+#if NCURSES_VERSION_PATCH < 20060107
+extern int (getbegx) (WINDOW *);
+extern int (getbegy) (WINDOW *);
+extern int (getcurx) (WINDOW *);
+extern int (getcury) (WINDOW *);
+extern int (getmaxx) (WINDOW *);
+extern int (getmaxy) (WINDOW *);
+extern int (getparx) (WINDOW *);
+extern int (getpary) (WINDOW *);
+
+int
+ (getbegy) (WINDOW *win)
+{
+ return ((win) ? (win)->_begy : ERR);
+}
+
+int
+ (getbegx) (WINDOW *win)
+{
+ return ((win) ? (win)->_begx : ERR);
+}
+
+int
+ (getcury) (WINDOW *win)
+{
+ return ((win) ? (win)->_cury : ERR);
+}
+
+int
+ (getcurx) (WINDOW *win)
+{
+ return ((win) ? (win)->_curx : ERR);
+}
+
+int
+ (getmaxy) (WINDOW *win)
+{
+ return ((win) ? ((win)->_maxy + 1) : ERR);
+}
+
+int
+ (getmaxx) (WINDOW *win)
+{
+ return ((win) ? ((win)->_maxx + 1) : ERR);
+}
+
+int
+ (getpary) (WINDOW *win)
+{
+ return ((win) ? (win)->_pary : ERR);
+}
+
+int
+ (getparx) (WINDOW *win)
+{
+ return ((win) ? (win)->_parx : ERR);
+}
+#endif
+
+#endif
diff --git a/Ada95/src/terminal_interface-curses-aux.adb b/Ada95/src/terminal_interface-curses-aux.adb
index 812e8cc..9c2f8cd 100644
--- a/Ada95/src/terminal_interface-curses-aux.adb
+++ b/Ada95/src/terminal_interface-curses-aux.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,13 +35,13 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package body Terminal_Interface.Curses.Aux is
--
-- Some helpers
- procedure Fill_String (Cp : in chars_ptr;
+ procedure Fill_String (Cp : chars_ptr;
Str : out String)
is
-- Fill the string with the characters referenced by the
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb
index f437ce6..9c614ca 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,31 +35,23 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.9 $
--- $Date: 2008/07/26 18:50:25 $
+-- $Revision: 1.13 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.Alpha is
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Alpha_Field)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Alpha_Field)
is
- C_Alpha_Field_Type : C_Field_Type;
- pragma Import (C, C_Alpha_Field_Type, "TYPE_ALPHA");
-
function Set_Fld_Type (F : Field := Fld;
- Cft : C_Field_Type := C_Alpha_Field_Type;
- Arg1 : C_Int) return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
+ Arg1 : C_Int) return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_alpha");
- Res : Eti_Error;
begin
- Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width));
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)));
Wrap_Builtin (Fld, Typ);
end Set_Field_Type;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads
index 6f0b79d..7878f73 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Forms.Field_Types.Alpha is
@@ -46,8 +46,8 @@
Minimum_Field_Width : Natural := 0;
end record;
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Alpha_Field);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Alpha_Field);
pragma Inline (Set_Field_Type);
end Terminal_Interface.Curses.Forms.Field_Types.Alpha;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb
index 0c3ca29..270906d 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,31 +35,23 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.9 $
--- $Date: 2008/07/26 18:50:15 $
+-- $Revision: 1.13 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is
- procedure Set_Field_Type (Fld : in Field;
- Typ : in AlphaNumeric_Field)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : AlphaNumeric_Field)
is
- C_AlphaNumeric_Field_Type : C_Field_Type;
- pragma Import (C, C_AlphaNumeric_Field_Type, "TYPE_ALNUM");
-
function Set_Fld_Type (F : Field := Fld;
- Cft : C_Field_Type := C_AlphaNumeric_Field_Type;
- Arg1 : C_Int) return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
+ Arg1 : C_Int) return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_alnum");
- Res : Eti_Error;
begin
- Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width));
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)));
Wrap_Builtin (Fld, Typ);
end Set_Field_Type;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads
index 1f21950..c1009ac 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is
@@ -47,8 +47,8 @@
Minimum_Field_Width : Natural := 0;
end record;
- procedure Set_Field_Type (Fld : in Field;
- Typ : in AlphaNumeric_Field);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : AlphaNumeric_Field);
pragma Inline (Set_Field_Type);
end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
index b3eaf44..d38e062 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.11 $
+-- $Date: 2011/03/22 23:36:20 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Characters.Handling; use Ada.Characters.Handling;
@@ -61,8 +61,8 @@
if Set /= Upper_Case then
I.Names (J).all := To_Lower (I.Names (J).all);
if Set = Mixed_Case then
- I.Names (J)(I.Names (J).all'First) :=
- To_Upper (I.Names (J)(I.Names (J).all'First));
+ I.Names (J).all (I.Names (J).all'First) :=
+ To_Upper (I.Names (J).all (I.Names (J).all'First));
end if;
end if;
J := J + 1;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb
index 8be20f2..8d4c9ce 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.7 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
@@ -63,13 +63,13 @@
if Info.Names (I) = null then
raise Form_Exception;
end if;
- E.Arr (size_t (I)) := New_String (Info.Names (I).all);
+ E.Arr.all (size_t (I)) := New_String (Info.Names (I).all);
if Auto_Release_Names then
S := Info.Names (I);
Release_String (S);
end if;
end loop;
- E.Arr (L) := Null_Ptr;
+ E.Arr.all (L) := Null_Ptr;
return E;
end Create;
@@ -79,40 +79,33 @@
P : chars_ptr;
begin
loop
- P := Enum.Arr (I);
+ P := Enum.Arr.all (I);
exit when P = Null_Ptr;
Free (P);
- Enum.Arr (I) := Null_Ptr;
+ Enum.Arr.all (I) := Null_Ptr;
I := I + 1;
end loop;
Enum.Arr := null;
end Release;
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Enumeration_Field)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Enumeration_Field)
is
- C_Enum_Type : C_Field_Type;
- pragma Import (C, C_Enum_Type, "TYPE_ENUM");
-
function Set_Fld_Type (F : Field := Fld;
- Cft : C_Field_Type := C_Enum_Type;
Arg1 : chars_ptr_array;
Arg2 : C_Int;
- Arg3 : C_Int) return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
+ Arg3 : C_Int) return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_enum");
- Res : Eti_Error;
begin
if Typ.Arr = null then
raise Form_Exception;
end if;
- Res := Set_Fld_Type (Arg1 => Typ.Arr.all,
- Arg2 => C_Int (Boolean'Pos (Typ.Case_Sensitive)),
- Arg3 => C_Int (Boolean'Pos
- (Typ.Match_Must_Be_Unique)));
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception
+ (Set_Fld_Type
+ (Arg1 => Typ.Arr.all,
+ Arg2 => C_Int (Boolean'Pos (Typ.Case_Sensitive)),
+ Arg3 => C_Int (Boolean'Pos (Typ.Match_Must_Be_Unique))));
Wrap_Builtin (Fld, Typ, C_Choice_Router);
end Set_Field_Type;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads
index 5a7e411..e6924f6 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C.Strings;
@@ -81,8 +81,8 @@
-- The next type defintions are all ncurses extensions. They are typically
-- not available in other curses implementations.
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Enumeration_Field);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Enumeration_Field);
pragma Inline (Set_Field_Type);
private
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb
index 61d66c4..5ec3305 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,35 +35,27 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.9 $
--- $Date: 2008/07/26 18:50:06 $
+-- $Revision: 1.13 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.IntField is
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Integer_Field)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Integer_Field)
is
- C_Integer_Field_Type : C_Field_Type;
- pragma Import (C, C_Integer_Field_Type, "TYPE_INTEGER");
-
function Set_Fld_Type (F : Field := Fld;
- Cft : C_Field_Type := C_Integer_Field_Type;
Arg1 : C_Int;
Arg2 : C_Long_Int;
- Arg3 : C_Long_Int) return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
+ Arg3 : C_Long_Int) return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_integer");
- Res : Eti_Error;
begin
- Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision),
- Arg2 => C_Long_Int (Typ.Lower_Limit),
- Arg3 => C_Long_Int (Typ.Upper_Limit));
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Type (Arg1 => C_Int (Typ.Precision),
+ Arg2 => C_Long_Int (Typ.Lower_Limit),
+ Arg3 => C_Long_Int (Typ.Upper_Limit)));
Wrap_Builtin (Fld, Typ);
end Set_Field_Type;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads
index b285ca2..e90f0d0 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Forms.Field_Types.IntField is
@@ -48,8 +48,8 @@
Upper_Limit : Integer;
end record;
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Integer_Field);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Integer_Field);
pragma Inline (Set_Field_Type);
end Terminal_Interface.Curses.Forms.Field_Types.IntField;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
index 3d7c5b5..978a47a 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,31 +35,23 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.9 $
--- $Date: 2008/07/26 18:49:47 $
+-- $Revision: 1.13 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Internet_V4_Address_Field)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Internet_V4_Address_Field)
is
- C_IPV4_Field_Type : C_Field_Type;
- pragma Import (C, C_IPV4_Field_Type, "TYPE_IPV4");
+ function Set_Fld_Type (F : Field := Fld)
+ return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_ipv4");
- function Set_Fld_Type (F : Field := Fld;
- Cft : C_Field_Type := C_IPV4_Field_Type)
- return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
-
- Res : Eti_Error;
begin
- Res := Set_Fld_Type;
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Type);
Wrap_Builtin (Fld, Typ);
end Set_Field_Type;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads
index 6d0aef0..af367e7 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is
@@ -44,8 +44,8 @@
type Internet_V4_Address_Field is new Field_Type with null record;
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Internet_V4_Address_Field);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Internet_V4_Address_Field);
pragma Inline (Set_Field_Type);
end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb
index 79f8489..94e2aa7 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
--- $Date: 2008/07/26 18:49:57 $
+-- $Revision: 1.14 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
@@ -44,29 +44,21 @@
package body Terminal_Interface.Curses.Forms.Field_Types.Numeric is
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Numeric_Field)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Numeric_Field)
is
type Double is new Interfaces.C.double;
- C_Numeric_Field_Type : C_Field_Type;
- pragma Import (C, C_Numeric_Field_Type, "TYPE_NUMERIC");
-
function Set_Fld_Type (F : Field := Fld;
- Cft : C_Field_Type := C_Numeric_Field_Type;
Arg1 : C_Int;
Arg2 : Double;
- Arg3 : Double) return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
+ Arg3 : Double) return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_numeric");
- Res : Eti_Error;
begin
- Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision),
- Arg2 => Double (Typ.Lower_Limit),
- Arg3 => Double (Typ.Upper_Limit));
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Type (Arg1 => C_Int (Typ.Precision),
+ Arg2 => Double (Typ.Lower_Limit),
+ Arg3 => Double (Typ.Upper_Limit)));
Wrap_Builtin (Fld, Typ);
end Set_Field_Type;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads
index f211bc8..7c6f9fa 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Forms.Field_Types.Numeric is
@@ -48,8 +48,8 @@
Upper_Limit : Float;
end record;
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Numeric_Field);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Numeric_Field);
pragma Inline (Set_Field_Type);
end Terminal_Interface.Curses.Forms.Field_Types.Numeric;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb
index cbd9e2f..f5ea0db 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.8 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C; use Interfaces.C;
@@ -43,28 +43,15 @@
package body Terminal_Interface.Curses.Forms.Field_Types.RegExp is
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Regular_Expression_Field)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Regular_Expression_Field)
is
- type Char_Ptr is access all Interfaces.C.char;
-
- C_Regexp_Field_Type : C_Field_Type;
- pragma Import (C, C_Regexp_Field_Type, "TYPE_REGEXP");
-
function Set_Ftyp (F : Field := Fld;
- Cft : C_Field_Type := C_Regexp_Field_Type;
- Arg1 : Char_Ptr) return C_Int;
- pragma Import (C, Set_Ftyp, "set_field_type");
+ Arg1 : char_array) return Eti_Error;
+ pragma Import (C, Set_Ftyp, "set_field_type_regexp");
- Txt : char_array (0 .. Typ.Regular_Expression.all'Length);
- Len : size_t;
- Res : Eti_Error;
begin
- To_C (Typ.Regular_Expression.all, Txt, Len);
- Res := Set_Ftyp (Arg1 => Txt (Txt'First)'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Ftyp (Arg1 => To_C (Typ.Regular_Expression.all)));
Wrap_Builtin (Fld, Typ);
end Set_Field_Type;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads
index 1e451ab..2684138 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package Terminal_Interface.Curses.Forms.Field_Types.RegExp is
@@ -48,8 +48,8 @@
Regular_Expression : String_Access;
end record;
- procedure Set_Field_Type (Fld : in Field;
- Typ : in Regular_Expression_Field);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : Regular_Expression_Field);
pragma Inline (Set_Field_Type);
end Terminal_Interface.Curses.Forms.Field_Types.RegExp;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
index f26a42c..8414cd0 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,42 +35,40 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.15 $
--- $Date: 2008/07/26 18:48:58 $
+-- $Revision: 1.20 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Ada.Unchecked_Conversion;
+with System.Address_To_Access_Conversions;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
- pragma Warnings (Off);
- function To_Argument_Access is new Ada.Unchecked_Conversion
- (System.Address, Argument_Access);
- pragma Warnings (On);
+ package Argument_Conversions is
+ new System.Address_To_Access_Conversions (Argument);
function Generic_Next (Fld : Field;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
Result : Boolean;
Udf : constant User_Defined_Field_Type_With_Choice_Access :=
User_Defined_Field_Type_With_Choice_Access
- (To_Argument_Access (Usr).Typ);
+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ);
begin
Result := Next (Fld, Udf.all);
- return C_Int (Boolean'Pos (Result));
+ return Curses_Bool (Boolean'Pos (Result));
end Generic_Next;
function Generic_Prev (Fld : Field;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
Result : Boolean;
Udf : constant User_Defined_Field_Type_With_Choice_Access :=
User_Defined_Field_Type_With_Choice_Access
- (To_Argument_Access (Usr).Typ);
+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ);
begin
Result := Previous (Fld, Udf.all);
- return C_Int (Boolean'Pos (Result));
+ return Curses_Bool (Boolean'Pos (Result));
end Generic_Prev;
-- -----------------------------------------------------------------------
@@ -90,16 +88,12 @@
Make_Arg'Access,
Copy_Arg'Access,
Free_Arg'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Res);
Res := Set_Fieldtype_Choice (T,
Generic_Next'Access,
Generic_Prev'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Res);
end if;
M_Generic_Choice := T;
end if;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads
index 1e69f43..5b132c9 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.12 $
--- $Date: 2008/07/26 18:49:20 $
+-- $Revision: 1.14 $
+-- $Date: 2011/03/19 12:27:47 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
@@ -78,17 +78,17 @@
function C_Generic_Choice return C_Field_Type;
function Generic_Next (Fld : Field;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Generic_Next);
-- This is the generic next Choice_Function for the low-level fieldtype
- -- representing all the User_Defined_Field_Type derivates. It routes
+ -- representing all the User_Defined_Field_Type derivatives. It routes
-- the call to the Next implementation for the type.
function Generic_Prev (Fld : Field;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Generic_Prev);
-- This is the generic prev Choice_Function for the low-level fieldtype
- -- representing all the User_Defined_Field_Type derivates. It routes
+ -- representing all the User_Defined_Field_Type derivatives. It routes
-- the call to the Previous implementation for the type.
end Terminal_Interface.Curses.Forms.Field_Types.User.Choice;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user.adb b/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
index 0b4c136..98bcd24 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,17 +35,17 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.15 $
--- $Date: 2008/07/26 18:49:28 $
+-- $Revision: 1.23 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-with Ada.Unchecked_Conversion;
+with System.Address_To_Access_Conversions;
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
package body Terminal_Interface.Curses.Forms.Field_Types.User is
- procedure Set_Field_Type (Fld : in Field;
- Typ : in User_Defined_Field_Type)
+ procedure Set_Field_Type (Fld : Field;
+ Typ : User_Defined_Field_Type)
is
function Allocate_Arg (T : User_Defined_Field_Type'Class)
return Argument_Access;
@@ -53,10 +53,8 @@
function Set_Fld_Type (F : Field := Fld;
Cft : C_Field_Type := C_Generic_Type;
Arg1 : Argument_Access)
- return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
-
- Res : Eti_Error;
+ return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_user");
function Allocate_Arg (T : User_Defined_Field_Type'Class)
return Argument_Access
@@ -70,37 +68,34 @@
end Allocate_Arg;
begin
- Res := Set_Fld_Type (Arg1 => Allocate_Arg (Typ));
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Type (Arg1 => Allocate_Arg (Typ)));
end Set_Field_Type;
- pragma Warnings (Off);
- function To_Argument_Access is new Ada.Unchecked_Conversion
- (System.Address, Argument_Access);
- pragma Warnings (On);
+ package Argument_Conversions is
+ new System.Address_To_Access_Conversions (Argument);
function Generic_Field_Check (Fld : Field;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
Result : Boolean;
Udf : constant User_Defined_Field_Type_Access :=
- User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
+ User_Defined_Field_Type_Access
+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ);
begin
Result := Field_Check (Fld, Udf.all);
- return C_Int (Boolean'Pos (Result));
+ return Curses_Bool (Boolean'Pos (Result));
end Generic_Field_Check;
function Generic_Char_Check (Ch : C_Int;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
Result : Boolean;
Udf : constant User_Defined_Field_Type_Access :=
- User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
+ User_Defined_Field_Type_Access
+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ);
begin
Result := Character_Check (Character'Val (Ch), Udf.all);
- return C_Int (Boolean'Pos (Result));
+ return Curses_Bool (Boolean'Pos (Result));
end Generic_Char_Check;
-- -----------------------------------------------------------------------
@@ -120,9 +115,7 @@
Make_Arg'Access,
Copy_Arg'Access,
Free_Arg'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Res);
end if;
M_Generic_Type := T;
end if;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types-user.ads b/Ada95/src/terminal_interface-curses-forms-field_types-user.ads
index acec636..7000fce 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types-user.ads
+++ b/Ada95/src/terminal_interface-curses-forms-field_types-user.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.12 $
--- $Date: 2008/07/26 18:49:38 $
+-- $Revision: 1.15 $
+-- $Date: 2011/03/19 12:27:21 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
@@ -67,8 +67,8 @@
-- If True is returned, the character is considered as valid for the
-- field, otherwise as invalid.
- procedure Set_Field_Type (Fld : in Field;
- Typ : in User_Defined_Field_Type);
+ procedure Set_Field_Type (Fld : Field;
+ Typ : User_Defined_Field_Type);
-- This should work for all types derived from User_Defined_Field_Type.
-- No need to reimplement it for your derived type.
@@ -79,17 +79,17 @@
function C_Generic_Type return C_Field_Type;
function Generic_Field_Check (Fld : Field;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Generic_Field_Check);
-- This is the generic Field_Check_Function for the low-level fieldtype
- -- representing all the User_Defined_Field_Type derivates. It routes
+ -- representing all the User_Defined_Field_Type derivatives. It routes
-- the call to the Field_Check implementation for the type.
function Generic_Char_Check (Ch : C_Int;
- Usr : System.Address) return C_Int;
+ Usr : System.Address) return Curses_Bool;
pragma Convention (C, Generic_Char_Check);
-- This is the generic Char_Check_Function for the low-level fieldtype
- -- representing all the User_Defined_Field_Type derivates. It routes
+ -- representing all the User_Defined_Field_Type derivatives. It routes
-- the call to the Character_Check implementation for the type.
end Terminal_Interface.Curses.Forms.Field_Types.User;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_types.adb b/Ada95/src/terminal_interface-curses-forms-field_types.adb
index c681c80..bda6e51 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_types.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_types.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,13 +35,14 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.20 $
--- $Date: 2008/07/26 18:50:33 $
+-- $Revision: 1.28 $
+-- $Date: 2014/09/13 19:00:47 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
with Ada.Unchecked_Deallocation;
-with Ada.Unchecked_Conversion;
+with System.Address_To_Access_Conversions;
+
-- |
-- |=====================================================================
-- | man page form_fieldtype.3x
@@ -51,10 +52,8 @@
use type System.Address;
- pragma Warnings (Off);
- function To_Argument_Access is new Ada.Unchecked_Conversion
- (System.Address, Argument_Access);
- pragma Warnings (On);
+ package Argument_Conversions is
+ new System.Address_To_Access_Conversions (Argument);
function Get_Fieldtype (F : Field) return C_Field_Type;
pragma Import (C, Get_Fieldtype, "field_type");
@@ -68,7 +67,7 @@
-- |
-- |
-- |
- function Get_Type (Fld : in Field) return Field_Type_Access
+ function Get_Type (Fld : Field) return Field_Type_Access
is
Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
Arg : Argument_Access;
@@ -77,14 +76,16 @@
return null;
else
if Low_Level = M_Builtin_Router or else
- Low_Level = M_Generic_Type or else
- Low_Level = M_Choice_Router or else
- Low_Level = M_Generic_Choice then
- Arg := To_Argument_Access (Get_Arg (Fld));
+ Low_Level = M_Generic_Type or else
+ Low_Level = M_Choice_Router or else
+ Low_Level = M_Generic_Choice
+ then
+ Arg := Argument_Access
+ (Argument_Conversions.To_Pointer (Get_Arg (Fld)));
if Arg = null then
raise Form_Exception;
else
- return Arg.Typ;
+ return Arg.all.Typ;
end if;
else
raise Form_Exception;
@@ -92,49 +93,32 @@
end if;
end Get_Type;
- function Make_Arg (Args : System.Address) return System.Address
- is
- -- Actually args is a double indirected pointer to the arguments
- -- of a C variable argument list. In theory it is now quite
- -- complicated to write portable routine that reads the arguments,
- -- because one has to know the growth direction of the stack and
- -- the sizes of the individual arguments.
- -- Fortunately we are only interested in the first argument (#0),
- -- we know its size and for the first arg we don't care about
- -- into which stack direction we have to proceed. We simply
- -- resolve the double indirection and thats it.
- type V is access all System.Address;
- function To_Access is new Ada.Unchecked_Conversion (System.Address,
- V);
- begin
- return To_Access (To_Access (Args).all).all;
- end Make_Arg;
-
function Copy_Arg (Usr : System.Address) return System.Address
is
begin
return Usr;
end Copy_Arg;
- procedure Free_Arg (Usr : in System.Address)
+ procedure Free_Arg (Usr : System.Address)
is
procedure Free_Type is new Ada.Unchecked_Deallocation
(Field_Type'Class, Field_Type_Access);
procedure Freeargs is new Ada.Unchecked_Deallocation
(Argument, Argument_Access);
- To_Be_Free : Argument_Access := To_Argument_Access (Usr);
+ To_Be_Free : Argument_Access
+ := Argument_Access (Argument_Conversions.To_Pointer (Usr));
Low_Level : C_Field_Type;
begin
if To_Be_Free /= null then
- if To_Be_Free.Usr /= System.Null_Address then
- Low_Level := To_Be_Free.Cft;
- if Low_Level.Freearg /= null then
- Low_Level.Freearg (To_Be_Free.Usr);
+ if To_Be_Free.all.Usr /= System.Null_Address then
+ Low_Level := To_Be_Free.all.Cft;
+ if Low_Level.all.Freearg /= null then
+ Low_Level.all.Freearg (To_Be_Free.all.Usr);
end if;
end if;
- if To_Be_Free.Typ /= null then
- Free_Type (To_Be_Free.Typ);
+ if To_Be_Free.all.Typ /= null then
+ Free_Type (To_Be_Free.all.Typ);
end if;
Freeargs (To_Be_Free);
end if;
@@ -147,11 +131,10 @@
Usr_Arg : constant System.Address := Get_Arg (Fld);
Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
Arg : Argument_Access;
- Res : Eti_Error;
function Set_Fld_Type (F : Field := Fld;
Cf : C_Field_Type := Cft;
- Arg1 : Argument_Access) return C_Int;
- pragma Import (C, Set_Fld_Type, "set_field_type");
+ Arg1 : Argument_Access) return Eti_Error;
+ pragma Import (C, Set_Fld_Type, "set_field_type_user");
begin
pragma Assert (Low_Level /= Null_Field_Type);
@@ -162,71 +145,72 @@
Typ => new Field_Type'Class'(Typ),
Cft => Get_Fieldtype (Fld));
if Usr_Arg /= System.Null_Address then
- if Low_Level.Copyarg /= null then
- Arg.Usr := Low_Level.Copyarg (Usr_Arg);
+ if Low_Level.all.Copyarg /= null then
+ Arg.all.Usr := Low_Level.all.Copyarg (Usr_Arg);
else
- Arg.Usr := Usr_Arg;
+ Arg.all.Usr := Usr_Arg;
end if;
end if;
- Res := Set_Fld_Type (Arg1 => Arg);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Type (Arg1 => Arg));
end if;
end Wrap_Builtin;
function Field_Check_Router (Fld : Field;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access := To_Argument_Access (Usr);
+ Arg : constant Argument_Access
+ := Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
- and then Arg.Typ /= null);
- if Arg.Cft.Fcheck /= null then
- return Arg.Cft.Fcheck (Fld, Arg.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Fcheck /= null then
+ return Arg.all.Cft.all.Fcheck (Fld, Arg.all.Usr);
else
return 1;
end if;
end Field_Check_Router;
function Char_Check_Router (Ch : C_Int;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access := To_Argument_Access (Usr);
+ Arg : constant Argument_Access
+ := Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
- and then Arg.Typ /= null);
- if Arg.Cft.Ccheck /= null then
- return Arg.Cft.Ccheck (Ch, Arg.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Ccheck /= null then
+ return Arg.all.Cft.all.Ccheck (Ch, Arg.all.Usr);
else
return 1;
end if;
end Char_Check_Router;
function Next_Router (Fld : Field;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access := To_Argument_Access (Usr);
+ Arg : constant Argument_Access
+ := Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
- and then Arg.Typ /= null);
- if Arg.Cft.Next /= null then
- return Arg.Cft.Next (Fld, Arg.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Next /= null then
+ return Arg.all.Cft.all.Next (Fld, Arg.all.Usr);
else
return 1;
end if;
end Next_Router;
function Prev_Router (Fld : Field;
- Usr : System.Address) return C_Int
+ Usr : System.Address) return Curses_Bool
is
- Arg : constant Argument_Access := To_Argument_Access (Usr);
+ Arg : constant Argument_Access :=
+ Argument_Access (Argument_Conversions.To_Pointer (Usr));
begin
- pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
- and then Arg.Typ /= null);
- if Arg.Cft.Prev /= null then
- return Arg.Cft.Prev (Fld, Arg.Usr);
+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type
+ and then Arg.all.Typ /= null);
+ if Arg.all.Cft.all.Prev /= null then
+ return Arg.all.Cft.all.Prev (Fld, Arg.all.Usr);
else
return 1;
end if;
@@ -236,7 +220,6 @@
--
function C_Builtin_Router return C_Field_Type
is
- Res : Eti_Error;
T : C_Field_Type;
begin
if M_Builtin_Router = Null_Field_Type then
@@ -245,13 +228,10 @@
if T = Null_Field_Type then
raise Form_Exception;
else
- Res := Set_Fieldtype_Arg (T,
- Make_Arg'Access,
- Copy_Arg'Access,
- Free_Arg'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fieldtype_Arg (T,
+ Make_Arg'Access,
+ Copy_Arg'Access,
+ Free_Arg'Access));
end if;
M_Builtin_Router := T;
end if;
@@ -263,7 +243,6 @@
--
function C_Choice_Router return C_Field_Type
is
- Res : Eti_Error;
T : C_Field_Type;
begin
if M_Choice_Router = Null_Field_Type then
@@ -272,20 +251,14 @@
if T = Null_Field_Type then
raise Form_Exception;
else
- Res := Set_Fieldtype_Arg (T,
- Make_Arg'Access,
- Copy_Arg'Access,
- Free_Arg'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fieldtype_Arg (T,
+ Make_Arg'Access,
+ Copy_Arg'Access,
+ Free_Arg'Access));
- Res := Set_Fieldtype_Choice (T,
- Next_Router'Access,
- Prev_Router'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fieldtype_Choice (T,
+ Next_Router'Access,
+ Prev_Router'Access));
end if;
M_Choice_Router := T;
end if;
diff --git a/Ada95/src/terminal_interface-curses-forms-field_user_data.adb b/Ada95/src/terminal_interface-curses-forms-field_user_data.adb
index 817ebe5..2497614 100644
--- a/Ada95/src/terminal_interface-curses-forms-field_user_data.adb
+++ b/Ada95/src/terminal_interface-curses-forms-field_user_data.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.12 $
+-- $Revision: 1.15 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -51,23 +51,20 @@
-- |
use type Interfaces.C.int;
- procedure Set_User_Data (Fld : in Field;
- Data : in User_Access)
+ procedure Set_User_Data (Fld : Field;
+ Data : User_Access)
is
function Set_Field_Userptr (Fld : Field;
- Usr : User_Access) return C_Int;
+ Usr : User_Access) return Eti_Error;
pragma Import (C, Set_Field_Userptr, "set_field_userptr");
- Res : constant Eti_Error := Set_Field_Userptr (Fld, Data);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Userptr (Fld, Data));
end Set_User_Data;
-- |
-- |
-- |
- function Get_User_Data (Fld : in Field) return User_Access
+ function Get_User_Data (Fld : Field) return User_Access
is
function Field_Userptr (Fld : Field) return User_Access;
pragma Import (C, Field_Userptr, "field_userptr");
@@ -75,7 +72,7 @@
return Field_Userptr (Fld);
end Get_User_Data;
- procedure Get_User_Data (Fld : in Field;
+ procedure Get_User_Data (Fld : Field;
Data : out User_Access)
is
begin
diff --git a/Ada95/src/terminal_interface-curses-forms-form_user_data.adb b/Ada95/src/terminal_interface-curses-forms-form_user_data.adb
index 50c6708..a8b7464 100644
--- a/Ada95/src/terminal_interface-curses-forms-form_user_data.adb
+++ b/Ada95/src/terminal_interface-curses-forms-form_user_data.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.12 $
+-- $Revision: 1.15 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- |
@@ -52,23 +52,20 @@
-- |
-- |
-- |
- procedure Set_User_Data (Frm : in Form;
- Data : in User_Access)
+ procedure Set_User_Data (Frm : Form;
+ Data : User_Access)
is
function Set_Form_Userptr (Frm : Form;
- Data : User_Access) return C_Int;
+ Data : User_Access) return Eti_Error;
pragma Import (C, Set_Form_Userptr, "set_form_userptr");
- Res : constant Eti_Error := Set_Form_Userptr (Frm, Data);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Form_Userptr (Frm, Data));
end Set_User_Data;
-- |
-- |
-- |
- function Get_User_Data (Frm : in Form) return User_Access
+ function Get_User_Data (Frm : Form) return User_Access
is
function Form_Userptr (Frm : Form) return User_Access;
pragma Import (C, Form_Userptr, "form_userptr");
@@ -76,7 +73,7 @@
return Form_Userptr (Frm);
end Get_User_Data;
- procedure Get_User_Data (Frm : in Form;
+ procedure Get_User_Data (Frm : Form;
Data : out User_Access)
is
begin
diff --git a/Ada95/src/terminal_interface-curses-forms.adb b/Ada95/src/terminal_interface-curses-forms.adb
index 8b01e16..3ed053a 100644
--- a/Ada95/src/terminal_interface-curses-forms.adb
+++ b/Ada95/src/terminal_interface-curses-forms.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,12 +35,11 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.26 $
--- $Date: 2008/07/26 18:50:44 $
+-- $Revision: 1.32 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
-with Ada.Unchecked_Conversion;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings; use Interfaces.C.Strings;
@@ -62,23 +61,7 @@
-- |
-- subtype chars_ptr is Interfaces.C.Strings.chars_ptr;
- function FOS_2_CInt is new
- Ada.Unchecked_Conversion (Field_Option_Set,
- C_Int);
-
- function CInt_2_FOS is new
- Ada.Unchecked_Conversion (C_Int,
- Field_Option_Set);
-
- function FrmOS_2_CInt is new
- Ada.Unchecked_Conversion (Form_Option_Set,
- C_Int);
-
- function CInt_2_FrmOS is new
- Ada.Unchecked_Conversion (C_Int,
- Form_Option_Set);
-
- procedure Request_Name (Key : in Form_Request_Code;
+ procedure Request_Name (Key : Form_Request_Code;
Name : out String)
is
function Form_Request_Name (Key : C_Int) return chars_ptr;
@@ -130,15 +113,11 @@
-- |
procedure Delete (Fld : in out Field)
is
- function Free_Field (Fld : Field) return C_Int;
+ function Free_Field (Fld : Field) return Eti_Error;
pragma Import (C, Free_Field, "free_field");
- Res : Eti_Error;
begin
- Res := Free_Field (Fld);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Free_Field (Fld));
Fld := Null_Field;
end Delete;
-- |
@@ -190,20 +169,16 @@
-- |
-- |
-- |
- procedure Set_Justification (Fld : in Field;
- Just : in Field_Justification := None)
+ procedure Set_Justification (Fld : Field;
+ Just : Field_Justification := None)
is
function Set_Field_Just (Fld : Field;
- Just : C_Int) return C_Int;
+ Just : C_Int) return Eti_Error;
pragma Import (C, Set_Field_Just, "set_field_just");
- Res : constant Eti_Error :=
- Set_Field_Just (Fld,
- C_Int (Field_Justification'Pos (Just)));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Just (Fld,
+ C_Int (Field_Justification'Pos (Just))));
end Set_Justification;
-- |
-- |
@@ -223,33 +198,25 @@
-- |
-- |
procedure Set_Buffer
- (Fld : in Field;
- Buffer : in Buffer_Number := Buffer_Number'First;
- Str : in String)
+ (Fld : Field;
+ Buffer : Buffer_Number := Buffer_Number'First;
+ Str : String)
is
- type Char_Ptr is access all Interfaces.C.char;
function Set_Fld_Buffer (Fld : Field;
Bufnum : C_Int;
- S : Char_Ptr)
- return C_Int;
+ S : char_array)
+ return Eti_Error;
pragma Import (C, Set_Fld_Buffer, "set_field_buffer");
- Txt : char_array (0 .. Str'Length);
- Len : size_t;
- Res : Eti_Error;
begin
- To_C (Str, Txt, Len);
- Res := Set_Fld_Buffer (Fld, C_Int (Buffer), Txt (Txt'First)'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Fld_Buffer (Fld, C_Int (Buffer), To_C (Str)));
end Set_Buffer;
-- |
-- |
-- |
procedure Get_Buffer
- (Fld : in Field;
- Buffer : in Buffer_Number := Buffer_Number'First;
+ (Fld : Field;
+ Buffer : Buffer_Number := Buffer_Number'First;
Str : out String)
is
function Field_Buffer (Fld : Field;
@@ -260,8 +227,8 @@
end Get_Buffer;
function Get_Buffer
- (Fld : in Field;
- Buffer : in Buffer_Number := Buffer_Number'First) return String
+ (Fld : Field;
+ Buffer : Buffer_Number := Buffer_Number'First) return String
is
function Field_Buffer (Fld : Field;
B : C_Int) return chars_ptr;
@@ -272,16 +239,15 @@
-- |
-- |
-- |
- procedure Set_Status (Fld : in Field;
- Status : in Boolean := True)
+ procedure Set_Status (Fld : Field;
+ Status : Boolean := True)
is
function Set_Fld_Status (Fld : Field;
- St : C_Int) return C_Int;
+ St : C_Int) return Eti_Error;
pragma Import (C, Set_Fld_Status, "set_field_status");
- Res : constant Eti_Error := Set_Fld_Status (Fld, Boolean'Pos (Status));
begin
- if Res /= E_Ok then
+ if Set_Fld_Status (Fld, Boolean'Pos (Status)) /= E_Ok then
raise Form_Exception;
end if;
end Set_Status;
@@ -304,18 +270,15 @@
-- |
-- |
-- |
- procedure Set_Maximum_Size (Fld : in Field;
- Max : in Natural := 0)
+ procedure Set_Maximum_Size (Fld : Field;
+ Max : Natural := 0)
is
function Set_Field_Max (Fld : Field;
- M : C_Int) return C_Int;
+ M : C_Int) return Eti_Error;
pragma Import (C, Set_Field_Max, "set_max_field");
- Res : constant Eti_Error := Set_Field_Max (Fld, C_Int (Max));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Max (Fld, C_Int (Max)));
end Set_Maximum_Size;
-- |
-- |=====================================================================
@@ -324,59 +287,48 @@
-- |
-- |
-- |
- procedure Set_Options (Fld : in Field;
- Options : in Field_Option_Set)
+ procedure Set_Options (Fld : Field;
+ Options : Field_Option_Set)
is
function Set_Field_Opts (Fld : Field;
- Opt : C_Int) return C_Int;
+ Opt : Field_Option_Set) return Eti_Error;
pragma Import (C, Set_Field_Opts, "set_field_opts");
- Opt : constant C_Int := FOS_2_CInt (Options);
- Res : Eti_Error;
begin
- Res := Set_Field_Opts (Fld, Opt);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Opts (Fld, Options));
end Set_Options;
-- |
-- |
-- |
- procedure Switch_Options (Fld : in Field;
- Options : in Field_Option_Set;
+ procedure Switch_Options (Fld : Field;
+ Options : Field_Option_Set;
On : Boolean := True)
is
function Field_Opts_On (Fld : Field;
- Opt : C_Int) return C_Int;
+ Opt : Field_Option_Set) return Eti_Error;
pragma Import (C, Field_Opts_On, "field_opts_on");
function Field_Opts_Off (Fld : Field;
- Opt : C_Int) return C_Int;
+ Opt : Field_Option_Set) return Eti_Error;
pragma Import (C, Field_Opts_Off, "field_opts_off");
- Err : Eti_Error;
- Opt : constant C_Int := FOS_2_CInt (Options);
begin
if On then
- Err := Field_Opts_On (Fld, Opt);
+ Eti_Exception (Field_Opts_On (Fld, Options));
else
- Err := Field_Opts_Off (Fld, Opt);
- end if;
- if Err /= E_Ok then
- Eti_Exception (Err);
+ Eti_Exception (Field_Opts_Off (Fld, Options));
end if;
end Switch_Options;
-- |
-- |
-- |
- procedure Get_Options (Fld : in Field;
+ procedure Get_Options (Fld : Field;
Options : out Field_Option_Set)
is
- function Field_Opts (Fld : Field) return C_Int;
+ function Field_Opts (Fld : Field) return Field_Option_Set;
pragma Import (C, Field_Opts, "field_opts");
- Res : constant C_Int := Field_Opts (Fld);
begin
- Options := CInt_2_FOS (Res);
+ Options := Field_Opts (Fld);
end Get_Options;
-- |
-- |
@@ -397,111 +349,98 @@
-- |
-- |
procedure Set_Foreground
- (Fld : in Field;
- Fore : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Fld : Field;
+ Fore : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
function Set_Field_Fore (Fld : Field;
- Attr : C_Chtype) return C_Int;
+ Attr : Attributed_Character) return Eti_Error;
pragma Import (C, Set_Field_Fore, "set_field_fore");
- Ch : constant Attributed_Character := (Ch => Character'First,
- Color => Color,
- Attr => Fore);
- Res : constant Eti_Error :=
- Set_Field_Fore (Fld, AttrChar_To_Chtype (Ch));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Fore (Fld, (Ch => Character'First,
+ Color => Color,
+ Attr => Fore)));
end Set_Foreground;
-- |
-- |
-- |
- procedure Foreground (Fld : in Field;
+ procedure Foreground (Fld : Field;
Fore : out Character_Attribute_Set)
is
- function Field_Fore (Fld : Field) return C_Chtype;
+ function Field_Fore (Fld : Field) return Attributed_Character;
pragma Import (C, Field_Fore, "field_fore");
begin
- Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr;
+ Fore := Field_Fore (Fld).Attr;
end Foreground;
- procedure Foreground (Fld : in Field;
+ procedure Foreground (Fld : Field;
Fore : out Character_Attribute_Set;
Color : out Color_Pair)
is
- function Field_Fore (Fld : Field) return C_Chtype;
+ function Field_Fore (Fld : Field) return Attributed_Character;
pragma Import (C, Field_Fore, "field_fore");
begin
- Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr;
- Color := Chtype_To_AttrChar (Field_Fore (Fld)).Color;
+ Fore := Field_Fore (Fld).Attr;
+ Color := Field_Fore (Fld).Color;
end Foreground;
-- |
-- |
-- |
procedure Set_Background
- (Fld : in Field;
- Back : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Fld : Field;
+ Back : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
function Set_Field_Back (Fld : Field;
- Attr : C_Chtype) return C_Int;
+ Attr : Attributed_Character) return Eti_Error;
pragma Import (C, Set_Field_Back, "set_field_back");
- Ch : constant Attributed_Character := (Ch => Character'First,
- Color => Color,
- Attr => Back);
- Res : constant Eti_Error :=
- Set_Field_Back (Fld, AttrChar_To_Chtype (Ch));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Back (Fld, (Ch => Character'First,
+ Color => Color,
+ Attr => Back)));
end Set_Background;
-- |
-- |
-- |
- procedure Background (Fld : in Field;
+ procedure Background (Fld : Field;
Back : out Character_Attribute_Set)
is
- function Field_Back (Fld : Field) return C_Chtype;
+ function Field_Back (Fld : Field) return Attributed_Character;
pragma Import (C, Field_Back, "field_back");
begin
- Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr;
+ Back := Field_Back (Fld).Attr;
end Background;
- procedure Background (Fld : in Field;
+ procedure Background (Fld : Field;
Back : out Character_Attribute_Set;
Color : out Color_Pair)
is
- function Field_Back (Fld : Field) return C_Chtype;
+ function Field_Back (Fld : Field) return Attributed_Character;
pragma Import (C, Field_Back, "field_back");
begin
- Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr;
- Color := Chtype_To_AttrChar (Field_Back (Fld)).Color;
+ Back := Field_Back (Fld).Attr;
+ Color := Field_Back (Fld).Color;
end Background;
-- |
-- |
-- |
- procedure Set_Pad_Character (Fld : in Field;
- Pad : in Character := Space)
+ procedure Set_Pad_Character (Fld : Field;
+ Pad : Character := Space)
is
function Set_Field_Pad (Fld : Field;
- Ch : C_Int) return C_Int;
+ Ch : C_Int) return Eti_Error;
pragma Import (C, Set_Field_Pad, "set_field_pad");
- Res : constant Eti_Error := Set_Field_Pad (Fld,
- C_Int (Character'Pos (Pad)));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Pad (Fld,
+ C_Int (Character'Pos (Pad))));
end Set_Pad_Character;
-- |
-- |
-- |
- procedure Pad_Character (Fld : in Field;
+ procedure Pad_Character (Fld : Field;
Pad : out Character)
is
function Field_Pad (Fld : Field) return C_Int;
@@ -516,7 +455,7 @@
-- |
-- |
-- |
- procedure Info (Fld : in Field;
+ procedure Info (Fld : Field;
Lines : out Line_Count;
Columns : out Column_Count;
First_Row : out Line_Position;
@@ -527,50 +466,42 @@
type C_Int_Access is access all C_Int;
function Fld_Info (Fld : Field;
L, C, Fr, Fc, Os, Ab : C_Int_Access)
- return C_Int;
+ return Eti_Error;
pragma Import (C, Fld_Info, "field_info");
L, C, Fr, Fc, Os, Ab : aliased C_Int;
- Res : constant Eti_Error := Fld_Info (Fld,
- L'Access, C'Access,
- Fr'Access, Fc'Access,
- Os'Access, Ab'Access);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- else
- Lines := Line_Count (L);
- Columns := Column_Count (C);
- First_Row := Line_Position (Fr);
- First_Column := Column_Position (Fc);
- Off_Screen := Natural (Os);
- Additional_Buffers := Buffer_Number (Ab);
- end if;
+ Eti_Exception (Fld_Info (Fld,
+ L'Access, C'Access,
+ Fr'Access, Fc'Access,
+ Os'Access, Ab'Access));
+ Lines := Line_Count (L);
+ Columns := Column_Count (C);
+ First_Row := Line_Position (Fr);
+ First_Column := Column_Position (Fc);
+ Off_Screen := Natural (Os);
+ Additional_Buffers := Buffer_Number (Ab);
end Info;
-- |
-- |
-- |
- procedure Dynamic_Info (Fld : in Field;
+ procedure Dynamic_Info (Fld : Field;
Lines : out Line_Count;
Columns : out Column_Count;
Max : out Natural)
is
type C_Int_Access is access all C_Int;
- function Dyn_Info (Fld : Field; L, C, M : C_Int_Access) return C_Int;
+ function Dyn_Info (Fld : Field; L, C, M : C_Int_Access) return Eti_Error;
pragma Import (C, Dyn_Info, "dynamic_field_info");
L, C, M : aliased C_Int;
- Res : constant Eti_Error := Dyn_Info (Fld,
- L'Access, C'Access,
- M'Access);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- else
- Lines := Line_Count (L);
- Columns := Column_Count (C);
- Max := Natural (M);
- end if;
+ Eti_Exception (Dyn_Info (Fld,
+ L'Access, C'Access,
+ M'Access));
+ Lines := Line_Count (L);
+ Columns := Column_Count (C);
+ Max := Natural (M);
end Dynamic_Info;
-- |
-- |=====================================================================
@@ -579,18 +510,15 @@
-- |
-- |
-- |
- procedure Set_Window (Frm : in Form;
- Win : in Window)
+ procedure Set_Window (Frm : Form;
+ Win : Window)
is
function Set_Form_Win (Frm : Form;
- Win : Window) return C_Int;
+ Win : Window) return Eti_Error;
pragma Import (C, Set_Form_Win, "set_form_win");
- Res : constant Eti_Error := Set_Form_Win (Frm, Win);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Form_Win (Frm, Win));
end Set_Window;
-- |
-- |
@@ -607,18 +535,15 @@
-- |
-- |
-- |
- procedure Set_Sub_Window (Frm : in Form;
- Win : in Window)
+ procedure Set_Sub_Window (Frm : Form;
+ Win : Window)
is
function Set_Form_Sub (Frm : Form;
- Win : Window) return C_Int;
+ Win : Window) return Eti_Error;
pragma Import (C, Set_Form_Sub, "set_form_sub");
- Res : constant Eti_Error := Set_Form_Sub (Frm, Win);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Form_Sub (Frm, Win));
end Set_Sub_Window;
-- |
-- |
@@ -635,21 +560,18 @@
-- |
-- |
-- |
- procedure Scale (Frm : in Form;
+ procedure Scale (Frm : Form;
Lines : out Line_Count;
Columns : out Column_Count)
is
type C_Int_Access is access all C_Int;
- function M_Scale (Frm : Form; Yp, Xp : C_Int_Access) return C_Int;
+ function M_Scale (Frm : Form; Yp, Xp : C_Int_Access) return Eti_Error;
pragma Import (C, M_Scale, "scale_form");
X, Y : aliased C_Int;
- Res : constant Eti_Error := M_Scale (Frm, Y'Access, X'Access);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
- Lines := Line_Count (Y);
+ Eti_Exception (M_Scale (Frm, Y'Access, X'Access));
+ Lines := Line_Count (Y);
Columns := Column_Count (X);
end Scale;
-- |
@@ -659,66 +581,54 @@
-- |
-- |
-- |
- procedure Set_Field_Init_Hook (Frm : in Form;
- Proc : in Form_Hook_Function)
+ procedure Set_Field_Init_Hook (Frm : Form;
+ Proc : Form_Hook_Function)
is
function Set_Field_Init (Frm : Form;
- Proc : Form_Hook_Function) return C_Int;
+ Proc : Form_Hook_Function) return Eti_Error;
pragma Import (C, Set_Field_Init, "set_field_init");
- Res : constant Eti_Error := Set_Field_Init (Frm, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Init (Frm, Proc));
end Set_Field_Init_Hook;
-- |
-- |
-- |
- procedure Set_Field_Term_Hook (Frm : in Form;
- Proc : in Form_Hook_Function)
+ procedure Set_Field_Term_Hook (Frm : Form;
+ Proc : Form_Hook_Function)
is
function Set_Field_Term (Frm : Form;
- Proc : Form_Hook_Function) return C_Int;
+ Proc : Form_Hook_Function) return Eti_Error;
pragma Import (C, Set_Field_Term, "set_field_term");
- Res : constant Eti_Error := Set_Field_Term (Frm, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Field_Term (Frm, Proc));
end Set_Field_Term_Hook;
-- |
-- |
-- |
- procedure Set_Form_Init_Hook (Frm : in Form;
- Proc : in Form_Hook_Function)
+ procedure Set_Form_Init_Hook (Frm : Form;
+ Proc : Form_Hook_Function)
is
function Set_Form_Init (Frm : Form;
- Proc : Form_Hook_Function) return C_Int;
+ Proc : Form_Hook_Function) return Eti_Error;
pragma Import (C, Set_Form_Init, "set_form_init");
- Res : constant Eti_Error := Set_Form_Init (Frm, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Form_Init (Frm, Proc));
end Set_Form_Init_Hook;
-- |
-- |
-- |
- procedure Set_Form_Term_Hook (Frm : in Form;
- Proc : in Form_Hook_Function)
+ procedure Set_Form_Term_Hook (Frm : Form;
+ Proc : Form_Hook_Function)
is
function Set_Form_Term (Frm : Form;
- Proc : Form_Hook_Function) return C_Int;
+ Proc : Form_Hook_Function) return Eti_Error;
pragma Import (C, Set_Form_Term, "set_form_term");
- Res : constant Eti_Error := Set_Form_Term (Frm, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Form_Term (Frm, Proc));
end Set_Form_Term_Hook;
-- |
-- |=====================================================================
@@ -727,23 +637,19 @@
-- |
-- |
-- |
- procedure Redefine (Frm : in Form;
- Flds : in Field_Array_Access)
+ procedure Redefine (Frm : Form;
+ Flds : Field_Array_Access)
is
function Set_Frm_Fields (Frm : Form;
- Items : System.Address) return C_Int;
+ Items : System.Address) return Eti_Error;
pragma Import (C, Set_Frm_Fields, "set_form_fields");
- Res : Eti_Error;
begin
- pragma Assert (Flds (Flds'Last) = Null_Field);
- if Flds (Flds'Last) /= Null_Field then
+ pragma Assert (Flds.all (Flds'Last) = Null_Field);
+ if Flds.all (Flds'Last) /= Null_Field then
raise Form_Exception;
else
- Res := Set_Frm_Fields (Frm, Flds (Flds'First)'Address);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Frm_Fields (Frm, Flds.all (Flds'First)'Address));
end if;
end Redefine;
-- |
@@ -779,18 +685,15 @@
-- |
-- |
-- |
- procedure Move (Fld : in Field;
- Line : in Line_Position;
- Column : in Column_Position)
+ procedure Move (Fld : Field;
+ Line : Line_Position;
+ Column : Column_Position)
is
- function Move (Fld : Field; L, C : C_Int) return C_Int;
+ function Move (Fld : Field; L, C : C_Int) return Eti_Error;
pragma Import (C, Move, "move_field");
- Res : constant Eti_Error := Move (Fld, C_Int (Line), C_Int (Column));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Move (Fld, C_Int (Line), C_Int (Column)));
end Move;
-- |
-- |=====================================================================
@@ -806,11 +709,11 @@
M : Form;
begin
- pragma Assert (Fields (Fields'Last) = Null_Field);
- if Fields (Fields'Last) /= Null_Field then
+ pragma Assert (Fields.all (Fields'Last) = Null_Field);
+ if Fields.all (Fields'Last) /= Null_Field then
raise Form_Exception;
else
- M := NewForm (Fields (Fields'First)'Address);
+ M := NewForm (Fields.all (Fields'First)'Address);
if M = Null_Form then
raise Form_Exception;
end if;
@@ -822,14 +725,11 @@
-- |
procedure Delete (Frm : in out Form)
is
- function Free (Frm : Form) return C_Int;
+ function Free (Frm : Form) return Eti_Error;
pragma Import (C, Free, "free_form");
- Res : constant Eti_Error := Free (Frm);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Free (Frm));
Frm := Null_Form;
end Delete;
-- |
@@ -839,59 +739,48 @@
-- |
-- |
-- |
- procedure Set_Options (Frm : in Form;
- Options : in Form_Option_Set)
+ procedure Set_Options (Frm : Form;
+ Options : Form_Option_Set)
is
function Set_Form_Opts (Frm : Form;
- Opt : C_Int) return C_Int;
+ Opt : Form_Option_Set) return Eti_Error;
pragma Import (C, Set_Form_Opts, "set_form_opts");
- Opt : constant C_Int := FrmOS_2_CInt (Options);
- Res : Eti_Error;
begin
- Res := Set_Form_Opts (Frm, Opt);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Form_Opts (Frm, Options));
end Set_Options;
-- |
-- |
-- |
- procedure Switch_Options (Frm : in Form;
- Options : in Form_Option_Set;
+ procedure Switch_Options (Frm : Form;
+ Options : Form_Option_Set;
On : Boolean := True)
is
function Form_Opts_On (Frm : Form;
- Opt : C_Int) return C_Int;
+ Opt : Form_Option_Set) return Eti_Error;
pragma Import (C, Form_Opts_On, "form_opts_on");
function Form_Opts_Off (Frm : Form;
- Opt : C_Int) return C_Int;
+ Opt : Form_Option_Set) return Eti_Error;
pragma Import (C, Form_Opts_Off, "form_opts_off");
- Err : Eti_Error;
- Opt : constant C_Int := FrmOS_2_CInt (Options);
begin
if On then
- Err := Form_Opts_On (Frm, Opt);
+ Eti_Exception (Form_Opts_On (Frm, Options));
else
- Err := Form_Opts_Off (Frm, Opt);
- end if;
- if Err /= E_Ok then
- Eti_Exception (Err);
+ Eti_Exception (Form_Opts_Off (Frm, Options));
end if;
end Switch_Options;
-- |
-- |
-- |
- procedure Get_Options (Frm : in Form;
+ procedure Get_Options (Frm : Form;
Options : out Form_Option_Set)
is
- function Form_Opts (Frm : Form) return C_Int;
+ function Form_Opts (Frm : Form) return Form_Option_Set;
pragma Import (C, Form_Opts, "form_opts");
- Res : constant C_Int := Form_Opts (Frm);
begin
- Options := CInt_2_FrmOS (Res);
+ Options := Form_Opts (Frm);
end Get_Options;
-- |
-- |
@@ -910,23 +799,19 @@
-- |
-- |
-- |
- procedure Post (Frm : in Form;
- Post : in Boolean := True)
+ procedure Post (Frm : Form;
+ Post : Boolean := True)
is
- function M_Post (Frm : Form) return C_Int;
+ function M_Post (Frm : Form) return Eti_Error;
pragma Import (C, M_Post, "post_form");
- function M_Unpost (Frm : Form) return C_Int;
+ function M_Unpost (Frm : Form) return Eti_Error;
pragma Import (C, M_Unpost, "unpost_form");
- Res : Eti_Error;
begin
if Post then
- Res := M_Post (Frm);
+ Eti_Exception (M_Post (Frm));
else
- Res := M_Unpost (Frm);
- end if;
- if Res /= E_Ok then
- Eti_Exception (Res);
+ Eti_Exception (M_Unpost (Frm));
end if;
end Post;
-- |
@@ -938,14 +823,11 @@
-- |
procedure Position_Cursor (Frm : Form)
is
- function Pos_Form_Cursor (Frm : Form) return C_Int;
+ function Pos_Form_Cursor (Frm : Form) return Eti_Error;
pragma Import (C, Pos_Form_Cursor, "pos_form_cursor");
- Res : constant Eti_Error := Pos_Form_Cursor (Frm);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Pos_Form_Cursor (Frm));
end Position_Cursor;
-- |
-- |=====================================================================
@@ -993,25 +875,22 @@
function Driver (Frm : Form;
Key : Key_Code) return Driver_Result
is
- function Frm_Driver (Frm : Form; Key : C_Int) return C_Int;
+ function Frm_Driver (Frm : Form; Key : C_Int) return Eti_Error;
pragma Import (C, Frm_Driver, "form_driver");
R : constant Eti_Error := Frm_Driver (Frm, C_Int (Key));
begin
- if R /= E_Ok then
- if R = E_Unknown_Command then
+ case R is
+ when E_Unknown_Command =>
return Unknown_Request;
- elsif R = E_Invalid_Field then
+ when E_Invalid_Field =>
return Invalid_Field;
- elsif R = E_Request_Denied then
+ when E_Request_Denied =>
return Request_Denied;
- else
+ when others =>
Eti_Exception (R);
return Form_Ok;
- end if;
- else
- return Form_Ok;
- end if;
+ end case;
end Driver;
-- |
-- |=====================================================================
@@ -1020,22 +899,19 @@
-- |
-- |
-- |
- procedure Set_Current (Frm : in Form;
- Fld : in Field)
+ procedure Set_Current (Frm : Form;
+ Fld : Field)
is
- function Set_Current_Fld (Frm : Form; Fld : Field) return C_Int;
+ function Set_Current_Fld (Frm : Form; Fld : Field) return Eti_Error;
pragma Import (C, Set_Current_Fld, "set_current_field");
- Res : constant Eti_Error := Set_Current_Fld (Frm, Fld);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Current_Fld (Frm, Fld));
end Set_Current;
-- |
-- |
-- |
- function Current (Frm : in Form) return Field
+ function Current (Frm : Form) return Field
is
function Current_Fld (Frm : Form) return Field;
pragma Import (C, Current_Fld, "current_field");
@@ -1050,17 +926,14 @@
-- |
-- |
-- |
- procedure Set_Page (Frm : in Form;
- Page : in Page_Number := Page_Number'First)
+ procedure Set_Page (Frm : Form;
+ Page : Page_Number := Page_Number'First)
is
- function Set_Frm_Page (Frm : Form; Pg : C_Int) return C_Int;
+ function Set_Frm_Page (Frm : Form; Pg : C_Int) return Eti_Error;
pragma Import (C, Set_Frm_Page, "set_form_page");
- Res : constant Eti_Error := Set_Frm_Page (Frm, C_Int (Page));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Frm_Page (Frm, C_Int (Page)));
end Set_Page;
-- |
-- |
@@ -1099,17 +972,14 @@
-- |
-- |
-- |
- procedure Set_New_Page (Fld : in Field;
- New_Page : in Boolean := True)
+ procedure Set_New_Page (Fld : Field;
+ New_Page : Boolean := True)
is
- function Set_Page (Fld : Field; Flg : C_Int) return C_Int;
+ function Set_Page (Fld : Field; Flg : C_Int) return Eti_Error;
pragma Import (C, Set_Page, "set_new_page");
- Res : constant Eti_Error := Set_Page (Fld, Boolean'Pos (New_Page));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Page (Fld, Boolean'Pos (New_Page)));
end Set_New_Page;
-- |
-- |
@@ -1129,15 +999,15 @@
end Is_New_Page;
procedure Free (FA : in out Field_Array_Access;
- Free_Fields : in Boolean := False)
+ Free_Fields : Boolean := False)
is
procedure Release is new Ada.Unchecked_Deallocation
(Field_Array, Field_Array_Access);
begin
if FA /= null and then Free_Fields then
for I in FA'First .. (FA'Last - 1) loop
- if FA (I) /= Null_Field then
- Delete (FA (I));
+ if FA.all (I) /= Null_Field then
+ Delete (FA.all (I));
end if;
end loop;
end if;
diff --git a/Ada95/src/terminal_interface-curses-menus-item_user_data.adb b/Ada95/src/terminal_interface-curses-menus-item_user_data.adb
index 6c35d33..da26f80 100644
--- a/Ada95/src/terminal_interface-curses-menus-item_user_data.adb
+++ b/Ada95/src/terminal_interface-curses-menus-item_user_data.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.14 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
@@ -45,21 +45,18 @@
use type Interfaces.C.int;
- procedure Set_User_Data (Itm : in Item;
- Data : in User_Access)
+ procedure Set_User_Data (Itm : Item;
+ Data : User_Access)
is
function Set_Item_Userptr (Itm : Item;
- Addr : User_Access) return C_Int;
+ Addr : User_Access) return Eti_Error;
pragma Import (C, Set_Item_Userptr, "set_item_userptr");
- Res : constant Eti_Error := Set_Item_Userptr (Itm, Data);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Item_Userptr (Itm, Data));
end Set_User_Data;
- function Get_User_Data (Itm : in Item) return User_Access
+ function Get_User_Data (Itm : Item) return User_Access
is
function Item_Userptr (Itm : Item) return User_Access;
pragma Import (C, Item_Userptr, "item_userptr");
@@ -67,7 +64,7 @@
return Item_Userptr (Itm);
end Get_User_Data;
- procedure Get_User_Data (Itm : in Item;
+ procedure Get_User_Data (Itm : Item;
Data : out User_Access)
is
begin
diff --git a/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb b/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb
index 20b9e86..746e7b4 100644
--- a/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb
+++ b/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.12 $
+-- $Revision: 1.15 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -44,21 +44,19 @@
use type Interfaces.C.int;
- procedure Set_User_Data (Men : in Menu;
- Data : in User_Access)
+ procedure Set_User_Data (Men : Menu;
+ Data : User_Access)
is
function Set_Menu_Userptr (Men : Menu;
- Data : User_Access) return C_Int;
+ Data : User_Access) return Eti_Error;
pragma Import (C, Set_Menu_Userptr, "set_menu_userptr");
- Res : constant Eti_Error := Set_Menu_Userptr (Men, Data);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Userptr (Men, Data));
+
end Set_User_Data;
- function Get_User_Data (Men : in Menu) return User_Access
+ function Get_User_Data (Men : Menu) return User_Access
is
function Menu_Userptr (Men : Menu) return User_Access;
pragma Import (C, Menu_Userptr, "menu_userptr");
@@ -66,7 +64,7 @@
return Menu_Userptr (Men);
end Get_User_Data;
- procedure Get_User_Data (Men : in Menu;
+ procedure Get_User_Data (Men : Menu;
Data : out User_Access)
is
begin
diff --git a/Ada95/src/terminal_interface-curses-menus.adb b/Ada95/src/terminal_interface-curses-menus.adb
index 0b24c74..ef3a0d3 100644
--- a/Ada95/src/terminal_interface-curses-menus.adb
+++ b/Ada95/src/terminal_interface-curses-menus.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.26 $
--- $Date: 2008/07/26 18:50:58 $
+-- $Revision: 1.32 $
+-- $Date: 2014/05/24 21:31:05 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
@@ -46,8 +46,6 @@
with Interfaces.C.Strings; use Interfaces.C.Strings;
with Interfaces.C.Pointers;
-with Ada.Unchecked_Conversion;
-
package body Terminal_Interface.Curses.Menus is
type C_Item_Array is array (Natural range <>) of aliased Item;
@@ -57,24 +55,8 @@
use type System.Bit_Order;
subtype chars_ptr is Interfaces.C.Strings.chars_ptr;
- function MOS_2_CInt is new
- Ada.Unchecked_Conversion (Menu_Option_Set,
- C_Int);
-
- function CInt_2_MOS is new
- Ada.Unchecked_Conversion (C_Int,
- Menu_Option_Set);
-
- function IOS_2_CInt is new
- Ada.Unchecked_Conversion (Item_Option_Set,
- C_Int);
-
- function CInt_2_IOS is new
- Ada.Unchecked_Conversion (C_Int,
- Item_Option_Set);
-
------------------------------------------------------------------------------
- procedure Request_Name (Key : in Menu_Request_Code;
+ procedure Request_Name (Key : Menu_Request_Code;
Name : out String)
is
function Request_Name (Key : C_Int) return chars_ptr;
@@ -128,10 +110,9 @@
function Itemname (Itm : Item) return chars_ptr;
pragma Import (C, Itemname, "item_name");
- function Freeitem (Itm : Item) return C_Int;
+ function Freeitem (Itm : Item) return Eti_Error;
pragma Import (C, Freeitem, "free_item");
- Res : Eti_Error;
Ptr : chars_ptr;
begin
Ptr := Descname (Itm);
@@ -142,25 +123,19 @@
if Ptr /= Null_Ptr then
Interfaces.C.Strings.Free (Ptr);
end if;
- Res := Freeitem (Itm);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Freeitem (Itm));
Itm := Null_Item;
end Delete;
-------------------------------------------------------------------------------
- procedure Set_Value (Itm : in Item;
- Value : in Boolean := True)
+ procedure Set_Value (Itm : Item;
+ Value : Boolean := True)
is
function Set_Item_Val (Itm : Item;
- Val : C_Int) return C_Int;
+ Val : C_Int) return Eti_Error;
pragma Import (C, Set_Item_Val, "set_item_value");
- Res : constant Eti_Error := Set_Item_Val (Itm, Boolean'Pos (Value));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Item_Val (Itm, Boolean'Pos (Value)));
end Set_Value;
function Value (Itm : Item) return Boolean
@@ -188,55 +163,44 @@
end if;
end Visible;
-------------------------------------------------------------------------------
- procedure Set_Options (Itm : in Item;
- Options : in Item_Option_Set)
+ procedure Set_Options (Itm : Item;
+ Options : Item_Option_Set)
is
function Set_Item_Opts (Itm : Item;
- Opt : C_Int) return C_Int;
+ Opt : Item_Option_Set) return Eti_Error;
pragma Import (C, Set_Item_Opts, "set_item_opts");
- Opt : constant C_Int := IOS_2_CInt (Options);
- Res : Eti_Error;
begin
- Res := Set_Item_Opts (Itm, Opt);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Item_Opts (Itm, Options));
end Set_Options;
- procedure Switch_Options (Itm : in Item;
- Options : in Item_Option_Set;
+ procedure Switch_Options (Itm : Item;
+ Options : Item_Option_Set;
On : Boolean := True)
is
function Item_Opts_On (Itm : Item;
- Opt : C_Int) return C_Int;
+ Opt : Item_Option_Set) return Eti_Error;
pragma Import (C, Item_Opts_On, "item_opts_on");
function Item_Opts_Off (Itm : Item;
- Opt : C_Int) return C_Int;
+ Opt : Item_Option_Set) return Eti_Error;
pragma Import (C, Item_Opts_Off, "item_opts_off");
- Opt : constant C_Int := IOS_2_CInt (Options);
- Err : Eti_Error;
begin
if On then
- Err := Item_Opts_On (Itm, Opt);
+ Eti_Exception (Item_Opts_On (Itm, Options));
else
- Err := Item_Opts_Off (Itm, Opt);
- end if;
- if Err /= E_Ok then
- Eti_Exception (Err);
+ Eti_Exception (Item_Opts_Off (Itm, Options));
end if;
end Switch_Options;
- procedure Get_Options (Itm : in Item;
+ procedure Get_Options (Itm : Item;
Options : out Item_Option_Set)
is
- function Item_Opts (Itm : Item) return C_Int;
+ function Item_Opts (Itm : Item) return Item_Option_Set;
pragma Import (C, Item_Opts, "item_opts");
- Res : constant C_Int := Item_Opts (Itm);
begin
- Options := CInt_2_IOS (Res);
+ Options := Item_Opts (Itm);
end Get_Options;
function Get_Options (Itm : Item := Null_Item) return Item_Option_Set
@@ -247,7 +211,7 @@
return Ios;
end Get_Options;
-------------------------------------------------------------------------------
- procedure Name (Itm : in Item;
+ procedure Name (Itm : Item;
Name : out String)
is
function Itemname (Itm : Item) return chars_ptr;
@@ -256,7 +220,7 @@
Fill_String (Itemname (Itm), Name);
end Name;
- function Name (Itm : in Item) return String
+ function Name (Itm : Item) return String
is
function Itemname (Itm : Item) return chars_ptr;
pragma Import (C, Itemname, "item_name");
@@ -264,7 +228,7 @@
return Fill_String (Itemname (Itm));
end Name;
- procedure Description (Itm : in Item;
+ procedure Description (Itm : Item;
Description : out String)
is
function Descname (Itm : Item) return chars_ptr;
@@ -273,7 +237,7 @@
Fill_String (Descname (Itm), Description);
end Description;
- function Description (Itm : in Item) return String
+ function Description (Itm : Item) return String
is
function Descname (Itm : Item) return chars_ptr;
pragma Import (C, Descname, "item_description");
@@ -281,18 +245,15 @@
return Fill_String (Descname (Itm));
end Description;
-------------------------------------------------------------------------------
- procedure Set_Current (Men : in Menu;
- Itm : in Item)
+ procedure Set_Current (Men : Menu;
+ Itm : Item)
is
function Set_Curr_Item (Men : Menu;
- Itm : Item) return C_Int;
+ Itm : Item) return Eti_Error;
pragma Import (C, Set_Curr_Item, "set_current_item");
- Res : constant Eti_Error := Set_Curr_Item (Men, Itm);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Curr_Item (Men, Itm));
end Set_Current;
function Current (Men : Menu) return Item
@@ -308,18 +269,15 @@
return Res;
end Current;
- procedure Set_Top_Row (Men : in Menu;
- Line : in Line_Position)
+ procedure Set_Top_Row (Men : Menu;
+ Line : Line_Position)
is
function Set_Toprow (Men : Menu;
- Line : C_Int) return C_Int;
+ Line : C_Int) return Eti_Error;
pragma Import (C, Set_Toprow, "set_top_row");
- Res : constant Eti_Error := Set_Toprow (Men, C_Int (Line));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Toprow (Men, C_Int (Line)));
end Set_Top_Row;
function Top_Row (Men : Menu) return Line_Position
@@ -348,75 +306,60 @@
return Positive (Natural (Res) + Positive'First);
end Get_Index;
-------------------------------------------------------------------------------
- procedure Post (Men : in Menu;
- Post : in Boolean := True)
+ procedure Post (Men : Menu;
+ Post : Boolean := True)
is
- function M_Post (Men : Menu) return C_Int;
+ function M_Post (Men : Menu) return Eti_Error;
pragma Import (C, M_Post, "post_menu");
- function M_Unpost (Men : Menu) return C_Int;
+ function M_Unpost (Men : Menu) return Eti_Error;
pragma Import (C, M_Unpost, "unpost_menu");
- Res : Eti_Error;
begin
if Post then
- Res := M_Post (Men);
+ Eti_Exception (M_Post (Men));
else
- Res := M_Unpost (Men);
- end if;
- if Res /= E_Ok then
- Eti_Exception (Res);
+ Eti_Exception (M_Unpost (Men));
end if;
end Post;
-------------------------------------------------------------------------------
- procedure Set_Options (Men : in Menu;
- Options : in Menu_Option_Set)
+ procedure Set_Options (Men : Menu;
+ Options : Menu_Option_Set)
is
function Set_Menu_Opts (Men : Menu;
- Opt : C_Int) return C_Int;
+ Opt : Menu_Option_Set) return Eti_Error;
pragma Import (C, Set_Menu_Opts, "set_menu_opts");
- Opt : constant C_Int := MOS_2_CInt (Options);
- Res : Eti_Error;
begin
- Res := Set_Menu_Opts (Men, Opt);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Opts (Men, Options));
end Set_Options;
- procedure Switch_Options (Men : in Menu;
- Options : in Menu_Option_Set;
- On : in Boolean := True)
+ procedure Switch_Options (Men : Menu;
+ Options : Menu_Option_Set;
+ On : Boolean := True)
is
function Menu_Opts_On (Men : Menu;
- Opt : C_Int) return C_Int;
+ Opt : Menu_Option_Set) return Eti_Error;
pragma Import (C, Menu_Opts_On, "menu_opts_on");
function Menu_Opts_Off (Men : Menu;
- Opt : C_Int) return C_Int;
+ Opt : Menu_Option_Set) return Eti_Error;
pragma Import (C, Menu_Opts_Off, "menu_opts_off");
- Opt : constant C_Int := MOS_2_CInt (Options);
- Err : Eti_Error;
begin
if On then
- Err := Menu_Opts_On (Men, Opt);
+ Eti_Exception (Menu_Opts_On (Men, Options));
else
- Err := Menu_Opts_Off (Men, Opt);
- end if;
- if Err /= E_Ok then
- Eti_Exception (Err);
+ Eti_Exception (Menu_Opts_Off (Men, Options));
end if;
end Switch_Options;
- procedure Get_Options (Men : in Menu;
- Options : out Menu_Option_Set)
+ procedure Get_Options (Men : Menu;
+ Options : out Menu_Option_Set)
is
- function Menu_Opts (Men : Menu) return C_Int;
+ function Menu_Opts (Men : Menu) return Menu_Option_Set;
pragma Import (C, Menu_Opts, "menu_opts");
- Res : constant C_Int := Menu_Opts (Men);
begin
- Options := CInt_2_MOS (Res);
+ Options := Menu_Opts (Men);
end Get_Options;
function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set
@@ -427,18 +370,15 @@
return Mos;
end Get_Options;
-------------------------------------------------------------------------------
- procedure Set_Window (Men : in Menu;
- Win : in Window)
+ procedure Set_Window (Men : Menu;
+ Win : Window)
is
function Set_Menu_Win (Men : Menu;
- Win : Window) return C_Int;
+ Win : Window) return Eti_Error;
pragma Import (C, Set_Menu_Win, "set_menu_win");
- Res : constant Eti_Error := Set_Menu_Win (Men, Win);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Win (Men, Win));
end Set_Window;
function Get_Window (Men : Menu) return Window
@@ -451,18 +391,15 @@
return W;
end Get_Window;
- procedure Set_Sub_Window (Men : in Menu;
- Win : in Window)
+ procedure Set_Sub_Window (Men : Menu;
+ Win : Window)
is
function Set_Menu_Sub (Men : Menu;
- Win : Window) return C_Int;
+ Win : Window) return Eti_Error;
pragma Import (C, Set_Menu_Sub, "set_menu_sub");
- Res : constant Eti_Error := Set_Menu_Sub (Men, Win);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Sub (Men, Win));
end Set_Sub_Window;
function Get_Sub_Window (Men : Menu) return Window
@@ -475,58 +412,48 @@
return W;
end Get_Sub_Window;
- procedure Scale (Men : in Menu;
+ procedure Scale (Men : Menu;
Lines : out Line_Count;
Columns : out Column_Count)
is
type C_Int_Access is access all C_Int;
function M_Scale (Men : Menu;
- Yp, Xp : C_Int_Access) return C_Int;
+ Yp, Xp : C_Int_Access) return Eti_Error;
pragma Import (C, M_Scale, "scale_menu");
X, Y : aliased C_Int;
- Res : constant Eti_Error := M_Scale (Men, Y'Access, X'Access);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (M_Scale (Men, Y'Access, X'Access));
Lines := Line_Count (Y);
Columns := Column_Count (X);
end Scale;
-------------------------------------------------------------------------------
procedure Position_Cursor (Men : Menu)
is
- function Pos_Menu_Cursor (Men : Menu) return C_Int;
+ function Pos_Menu_Cursor (Men : Menu) return Eti_Error;
pragma Import (C, Pos_Menu_Cursor, "pos_menu_cursor");
- Res : constant Eti_Error := Pos_Menu_Cursor (Men);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Pos_Menu_Cursor (Men));
end Position_Cursor;
-------------------------------------------------------------------------------
- procedure Set_Mark (Men : in Menu;
- Mark : in String)
+ procedure Set_Mark (Men : Menu;
+ Mark : String)
is
type Char_Ptr is access all Interfaces.C.char;
function Set_Mark (Men : Menu;
- Mark : Char_Ptr) return C_Int;
+ Mark : Char_Ptr) return Eti_Error;
pragma Import (C, Set_Mark, "set_menu_mark");
Txt : char_array (0 .. Mark'Length);
Len : size_t;
- Res : Eti_Error;
begin
To_C (Mark, Txt, Len);
- Res := Set_Mark (Men, Txt (Txt'First)'Access);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Mark (Men, Txt (Txt'First)'Access));
end Set_Mark;
- procedure Mark (Men : in Menu;
+ procedure Mark (Men : Menu;
Mark : out String)
is
function Get_Menu_Mark (Men : Menu) return chars_ptr;
@@ -545,138 +472,125 @@
-------------------------------------------------------------------------------
procedure Set_Foreground
- (Men : in Menu;
- Fore : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Men : Menu;
+ Fore : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
function Set_Menu_Fore (Men : Menu;
- Attr : C_Chtype) return C_Int;
+ Attr : Attributed_Character) return Eti_Error;
pragma Import (C, Set_Menu_Fore, "set_menu_fore");
Ch : constant Attributed_Character := (Ch => Character'First,
Color => Color,
Attr => Fore);
- Res : constant Eti_Error := Set_Menu_Fore (Men, AttrChar_To_Chtype (Ch));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Fore (Men, Ch));
end Set_Foreground;
- procedure Foreground (Men : in Menu;
+ procedure Foreground (Men : Menu;
Fore : out Character_Attribute_Set)
is
- function Menu_Fore (Men : Menu) return C_Chtype;
+ function Menu_Fore (Men : Menu) return Attributed_Character;
pragma Import (C, Menu_Fore, "menu_fore");
begin
- Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr;
+ Fore := Menu_Fore (Men).Attr;
end Foreground;
- procedure Foreground (Men : in Menu;
+ procedure Foreground (Men : Menu;
Fore : out Character_Attribute_Set;
Color : out Color_Pair)
is
- function Menu_Fore (Men : Menu) return C_Chtype;
+ function Menu_Fore (Men : Menu) return Attributed_Character;
pragma Import (C, Menu_Fore, "menu_fore");
begin
- Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr;
- Color := Chtype_To_AttrChar (Menu_Fore (Men)).Color;
+ Fore := Menu_Fore (Men).Attr;
+ Color := Menu_Fore (Men).Color;
end Foreground;
procedure Set_Background
- (Men : in Menu;
- Back : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ (Men : Menu;
+ Back : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
function Set_Menu_Back (Men : Menu;
- Attr : C_Chtype) return C_Int;
+ Attr : Attributed_Character) return Eti_Error;
pragma Import (C, Set_Menu_Back, "set_menu_back");
Ch : constant Attributed_Character := (Ch => Character'First,
Color => Color,
Attr => Back);
- Res : constant Eti_Error := Set_Menu_Back (Men, AttrChar_To_Chtype (Ch));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Back (Men, Ch));
end Set_Background;
- procedure Background (Men : in Menu;
+ procedure Background (Men : Menu;
Back : out Character_Attribute_Set)
is
- function Menu_Back (Men : Menu) return C_Chtype;
+ function Menu_Back (Men : Menu) return Attributed_Character;
pragma Import (C, Menu_Back, "menu_back");
begin
- Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr;
+ Back := Menu_Back (Men).Attr;
end Background;
- procedure Background (Men : in Menu;
+ procedure Background (Men : Menu;
Back : out Character_Attribute_Set;
Color : out Color_Pair)
is
- function Menu_Back (Men : Menu) return C_Chtype;
+ function Menu_Back (Men : Menu) return Attributed_Character;
pragma Import (C, Menu_Back, "menu_back");
begin
- Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr;
- Color := Chtype_To_AttrChar (Menu_Back (Men)).Color;
+ Back := Menu_Back (Men).Attr;
+ Color := Menu_Back (Men).Color;
end Background;
- procedure Set_Grey (Men : in Menu;
- Grey : in Character_Attribute_Set := Normal_Video;
- Color : in Color_Pair := Color_Pair'First)
+ procedure Set_Grey (Men : Menu;
+ Grey : Character_Attribute_Set := Normal_Video;
+ Color : Color_Pair := Color_Pair'First)
is
function Set_Menu_Grey (Men : Menu;
- Attr : C_Chtype) return C_Int;
+ Attr : Attributed_Character) return Eti_Error;
pragma Import (C, Set_Menu_Grey, "set_menu_grey");
Ch : constant Attributed_Character := (Ch => Character'First,
Color => Color,
Attr => Grey);
- Res : constant Eti_Error := Set_Menu_Grey (Men, AttrChar_To_Chtype (Ch));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Grey (Men, Ch));
end Set_Grey;
- procedure Grey (Men : in Menu;
+ procedure Grey (Men : Menu;
Grey : out Character_Attribute_Set)
is
- function Menu_Grey (Men : Menu) return C_Chtype;
+ function Menu_Grey (Men : Menu) return Attributed_Character;
pragma Import (C, Menu_Grey, "menu_grey");
begin
- Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr;
+ Grey := Menu_Grey (Men).Attr;
end Grey;
- procedure Grey (Men : in Menu;
+ procedure Grey (Men : Menu;
Grey : out Character_Attribute_Set;
Color : out Color_Pair)
is
- function Menu_Grey (Men : Menu) return C_Chtype;
+ function Menu_Grey (Men : Menu) return Attributed_Character;
pragma Import (C, Menu_Grey, "menu_grey");
begin
- Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr;
- Color := Chtype_To_AttrChar (Menu_Grey (Men)).Color;
+ Grey := Menu_Grey (Men).Attr;
+ Color := Menu_Grey (Men).Color;
end Grey;
- procedure Set_Pad_Character (Men : in Menu;
- Pad : in Character := Space)
+ procedure Set_Pad_Character (Men : Menu;
+ Pad : Character := Space)
is
function Set_Menu_Pad (Men : Menu;
- Ch : C_Int) return C_Int;
+ Ch : C_Int) return Eti_Error;
pragma Import (C, Set_Menu_Pad, "set_menu_pad");
- Res : constant Eti_Error := Set_Menu_Pad (Men,
- C_Int (Character'Pos (Pad)));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Pad (Men, C_Int (Character'Pos (Pad))));
end Set_Pad_Character;
- procedure Pad_Character (Men : in Menu;
+ procedure Pad_Character (Men : Menu;
Pad : out Character)
is
function Menu_Pad (Men : Menu) return C_Int;
@@ -685,48 +599,41 @@
Pad := Character'Val (Menu_Pad (Men));
end Pad_Character;
-------------------------------------------------------------------------------
- procedure Set_Spacing (Men : in Menu;
- Descr : in Column_Position := 0;
- Row : in Line_Position := 0;
- Col : in Column_Position := 0)
+ procedure Set_Spacing (Men : Menu;
+ Descr : Column_Position := 0;
+ Row : Line_Position := 0;
+ Col : Column_Position := 0)
is
function Set_Spacing (Men : Menu;
- D, R, C : C_Int) return C_Int;
+ D, R, C : C_Int) return Eti_Error;
pragma Import (C, Set_Spacing, "set_menu_spacing");
- Res : constant Eti_Error := Set_Spacing (Men,
- C_Int (Descr),
- C_Int (Row),
- C_Int (Col));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Spacing (Men,
+ C_Int (Descr),
+ C_Int (Row),
+ C_Int (Col)));
end Set_Spacing;
- procedure Spacing (Men : in Menu;
+ procedure Spacing (Men : Menu;
Descr : out Column_Position;
Row : out Line_Position;
Col : out Column_Position)
is
type C_Int_Access is access all C_Int;
function Get_Spacing (Men : Menu;
- D, R, C : C_Int_Access) return C_Int;
+ D, R, C : C_Int_Access) return Eti_Error;
pragma Import (C, Get_Spacing, "menu_spacing");
D, R, C : aliased C_Int;
- Res : constant Eti_Error := Get_Spacing (Men,
- D'Access,
- R'Access,
- C'Access);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- else
- Descr := Column_Position (D);
- Row := Line_Position (R);
- Col := Column_Position (C);
- end if;
+ Eti_Exception (Get_Spacing (Men,
+ D'Access,
+ R'Access,
+ C'Access));
+ Descr := Column_Position (D);
+ Row := Line_Position (R);
+ Col := Column_Position (C);
end Spacing;
-------------------------------------------------------------------------------
function Set_Pattern (Men : Menu;
@@ -734,7 +641,7 @@
is
type Char_Ptr is access all Interfaces.C.char;
function Set_Pattern (Men : Menu;
- Pattern : Char_Ptr) return C_Int;
+ Pattern : Char_Ptr) return Eti_Error;
pragma Import (C, Set_Pattern, "set_menu_pattern");
S : char_array (0 .. Text'Length);
@@ -744,15 +651,15 @@
To_C (Text, S, L);
Res := Set_Pattern (Men, S (S'First)'Access);
case Res is
- when E_No_Match => return False;
- when E_Ok => return True;
+ when E_No_Match =>
+ return False;
when others =>
Eti_Exception (Res);
- return False;
+ return True;
end case;
end Set_Pattern;
- procedure Pattern (Men : in Menu;
+ procedure Pattern (Men : Menu;
Text : out String)
is
function Get_Pattern (Men : Menu) return chars_ptr;
@@ -761,98 +668,80 @@
Fill_String (Get_Pattern (Men), Text);
end Pattern;
-------------------------------------------------------------------------------
- procedure Set_Format (Men : in Menu;
- Lines : in Line_Count;
- Columns : in Column_Count)
+ procedure Set_Format (Men : Menu;
+ Lines : Line_Count;
+ Columns : Column_Count)
is
function Set_Menu_Fmt (Men : Menu;
Lin : C_Int;
- Col : C_Int) return C_Int;
+ Col : C_Int) return Eti_Error;
pragma Import (C, Set_Menu_Fmt, "set_menu_format");
- Res : constant Eti_Error := Set_Menu_Fmt (Men,
- C_Int (Lines),
- C_Int (Columns));
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Fmt (Men,
+ C_Int (Lines),
+ C_Int (Columns)));
+
end Set_Format;
- procedure Format (Men : in Menu;
+ procedure Format (Men : Menu;
Lines : out Line_Count;
Columns : out Column_Count)
is
type C_Int_Access is access all C_Int;
function Menu_Fmt (Men : Menu;
- Y, X : C_Int_Access) return C_Int;
+ Y, X : C_Int_Access) return Eti_Error;
pragma Import (C, Menu_Fmt, "menu_format");
L, C : aliased C_Int;
- Res : constant Eti_Error := Menu_Fmt (Men, L'Access, C'Access);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- else
- Lines := Line_Count (L);
- Columns := Column_Count (C);
- end if;
+ Eti_Exception (Menu_Fmt (Men, L'Access, C'Access));
+ Lines := Line_Count (L);
+ Columns := Column_Count (C);
end Format;
-------------------------------------------------------------------------------
- procedure Set_Item_Init_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function)
+ procedure Set_Item_Init_Hook (Men : Menu;
+ Proc : Menu_Hook_Function)
is
function Set_Item_Init (Men : Menu;
- Proc : Menu_Hook_Function) return C_Int;
+ Proc : Menu_Hook_Function) return Eti_Error;
pragma Import (C, Set_Item_Init, "set_item_init");
- Res : constant Eti_Error := Set_Item_Init (Men, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Item_Init (Men, Proc));
end Set_Item_Init_Hook;
- procedure Set_Item_Term_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function)
+ procedure Set_Item_Term_Hook (Men : Menu;
+ Proc : Menu_Hook_Function)
is
function Set_Item_Term (Men : Menu;
- Proc : Menu_Hook_Function) return C_Int;
+ Proc : Menu_Hook_Function) return Eti_Error;
pragma Import (C, Set_Item_Term, "set_item_term");
- Res : constant Eti_Error := Set_Item_Term (Men, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Item_Term (Men, Proc));
end Set_Item_Term_Hook;
- procedure Set_Menu_Init_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function)
+ procedure Set_Menu_Init_Hook (Men : Menu;
+ Proc : Menu_Hook_Function)
is
function Set_Menu_Init (Men : Menu;
- Proc : Menu_Hook_Function) return C_Int;
+ Proc : Menu_Hook_Function) return Eti_Error;
pragma Import (C, Set_Menu_Init, "set_menu_init");
- Res : constant Eti_Error := Set_Menu_Init (Men, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Init (Men, Proc));
end Set_Menu_Init_Hook;
- procedure Set_Menu_Term_Hook (Men : in Menu;
- Proc : in Menu_Hook_Function)
+ procedure Set_Menu_Term_Hook (Men : Menu;
+ Proc : Menu_Hook_Function)
is
function Set_Menu_Term (Men : Menu;
- Proc : Menu_Hook_Function) return C_Int;
+ Proc : Menu_Hook_Function) return Eti_Error;
pragma Import (C, Set_Menu_Term, "set_menu_term");
- Res : constant Eti_Error := Set_Menu_Term (Men, Proc);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Menu_Term (Men, Proc));
end Set_Menu_Term_Hook;
function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function
@@ -887,23 +776,19 @@
return Menu_Term (Men);
end Get_Menu_Term_Hook;
-------------------------------------------------------------------------------
- procedure Redefine (Men : in Menu;
- Items : in Item_Array_Access)
+ procedure Redefine (Men : Menu;
+ Items : Item_Array_Access)
is
function Set_Items (Men : Menu;
- Items : System.Address) return C_Int;
+ Items : System.Address) return Eti_Error;
pragma Import (C, Set_Items, "set_menu_items");
- Res : Eti_Error;
begin
- pragma Assert (Items (Items'Last) = Null_Item);
- if Items (Items'Last) /= Null_Item then
+ pragma Assert (Items.all (Items'Last) = Null_Item);
+ if Items.all (Items'Last) /= Null_Item then
raise Menu_Exception;
else
- Res := Set_Items (Men, Items.all'Address);
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Set_Items (Men, Items.all'Address));
end if;
end Redefine;
@@ -941,8 +826,8 @@
M : Menu;
begin
- pragma Assert (Items (Items'Last) = Null_Item);
- if Items (Items'Last) /= Null_Item then
+ pragma Assert (Items.all (Items'Last) = Null_Item);
+ if Items.all (Items'Last) /= Null_Item then
raise Menu_Exception;
else
M := Newmenu (Items.all'Address);
@@ -955,14 +840,11 @@
procedure Delete (Men : in out Menu)
is
- function Free (Men : Menu) return C_Int;
+ function Free (Men : Menu) return Eti_Error;
pragma Import (C, Free, "free_menu");
- Res : constant Eti_Error := Free (Men);
begin
- if Res /= E_Ok then
- Eti_Exception (Res);
- end if;
+ Eti_Exception (Free (Men));
Men := Null_Menu;
end Delete;
@@ -971,34 +853,34 @@
Key : Key_Code) return Driver_Result
is
function Driver (Men : Menu;
- Key : C_Int) return C_Int;
+ Key : C_Int) return Eti_Error;
pragma Import (C, Driver, "menu_driver");
R : constant Eti_Error := Driver (Men, C_Int (Key));
begin
- if R /= E_Ok then
- case R is
- when E_Unknown_Command => return Unknown_Request;
- when E_No_Match => return No_Match;
- when E_Request_Denied |
- E_Not_Selectable => return Request_Denied;
- when others =>
- Eti_Exception (R);
- end case;
- end if;
- return Menu_Ok;
+ case R is
+ when E_Unknown_Command =>
+ return Unknown_Request;
+ when E_No_Match =>
+ return No_Match;
+ when E_Request_Denied | E_Not_Selectable =>
+ return Request_Denied;
+ when others =>
+ Eti_Exception (R);
+ return Menu_Ok;
+ end case;
end Driver;
procedure Free (IA : in out Item_Array_Access;
- Free_Items : in Boolean := False)
+ Free_Items : Boolean := False)
is
procedure Release is new Ada.Unchecked_Deallocation
(Item_Array, Item_Array_Access);
begin
if IA /= null and then Free_Items then
for I in IA'First .. (IA'Last - 1) loop
- if IA (I) /= Null_Item then
- Delete (IA (I));
+ if IA.all (I) /= Null_Item then
+ Delete (IA.all (I));
end if;
end loop;
end if;
diff --git a/Ada95/src/terminal_interface-curses-mouse.adb b/Ada95/src/terminal_interface-curses-mouse.adb
index fa4c69d..7a6075c 100644
--- a/Ada95/src/terminal_interface-curses-mouse.adb
+++ b/Ada95/src/terminal_interface-curses-mouse.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.22 $
--- $Date: 2008/07/26 18:51:11 $
+-- $Revision: 1.25 $
+-- $Date: 2014/09/13 19:10:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -50,7 +50,7 @@
function Has_Mouse return Boolean
is
function Mouse_Avail return C_Int;
- pragma Import (C, Mouse_Avail, "_nc_has_mouse");
+ pragma Import (C, Mouse_Avail, "has_mouse");
begin
if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then
return True;
@@ -74,8 +74,8 @@
return Event;
end Get_Mouse;
- procedure Register_Reportable_Event (Button : in Mouse_Button;
- State : in Button_State;
+ procedure Register_Reportable_Event (Button : Mouse_Button;
+ State : Button_State;
Mask : in out Event_Mask)
is
Button_Nr : constant Natural := Mouse_Button'Pos (Button);
@@ -92,8 +92,8 @@
end if;
end Register_Reportable_Event;
- procedure Register_Reportable_Events (Button : in Mouse_Button;
- State : in Button_States;
+ procedure Register_Reportable_Events (Button : Mouse_Button;
+ State : Button_States;
Mask : in out Event_Mask)
is
begin
@@ -120,7 +120,7 @@
return Old;
end Start_Mouse;
- procedure End_Mouse (Mask : in Event_Mask := No_Events)
+ procedure End_Mouse (Mask : Event_Mask := No_Events)
is
begin
if Mask /= No_Events then
@@ -128,11 +128,11 @@
end if;
end End_Mouse;
- procedure Dispatch_Event (Mask : in Event_Mask;
+ procedure Dispatch_Event (Mask : Event_Mask;
Button : out Mouse_Button;
State : out Button_State);
- procedure Dispatch_Event (Mask : in Event_Mask;
+ procedure Dispatch_Event (Mask : Event_Mask;
Button : out Mouse_Button;
State : out Button_State) is
L : Event_Mask;
@@ -168,7 +168,7 @@
end if;
end Dispatch_Event;
- procedure Get_Event (Event : in Mouse_Event;
+ procedure Get_Event (Event : Mouse_Event;
Y : out Line_Position;
X : out Column_Position;
Button : out Mouse_Button;
@@ -181,7 +181,7 @@
Dispatch_Event (Mask, Button, State);
end Get_Event;
- procedure Unget_Mouse (Event : in Mouse_Event)
+ procedure Unget_Mouse (Event : Mouse_Event)
is
function Ungetmouse (Ev : Mouse_Event) return C_Int;
pragma Import (C, Ungetmouse, "ungetmouse");
@@ -199,7 +199,8 @@
pragma Import (C, Wenclose, "wenclose");
begin
if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X))
- = Curses_Bool_False then
+ = Curses_Bool_False
+ then
return False;
else
return True;
diff --git a/Ada95/src/terminal_interface-curses-panels-user_data.adb b/Ada95/src/terminal_interface-curses-panels-user_data.adb
index 231efae..d855f54 100644
--- a/Ada95/src/terminal_interface-curses-panels-user_data.adb
+++ b/Ada95/src/terminal_interface-curses-panels-user_data.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Interfaces.C;
@@ -48,8 +48,8 @@
use type Interfaces.C.int;
- procedure Set_User_Data (Pan : in Panel;
- Data : in User_Access)
+ procedure Set_User_Data (Pan : Panel;
+ Data : User_Access)
is
function Set_Panel_Userptr (Pan : Panel;
Addr : User_Access) return C_Int;
@@ -60,7 +60,7 @@
end if;
end Set_User_Data;
- function Get_User_Data (Pan : in Panel) return User_Access
+ function Get_User_Data (Pan : Panel) return User_Access
is
function Panel_Userptr (Pan : Panel) return User_Access;
pragma Import (C, Panel_Userptr, "panel_userptr");
@@ -68,7 +68,7 @@
return Panel_Userptr (Pan);
end Get_User_Data;
- procedure Get_User_Data (Pan : in Panel;
+ procedure Get_User_Data (Pan : Panel;
Data : out User_Access)
is
begin
diff --git a/Ada95/src/terminal_interface-curses-panels.adb b/Ada95/src/terminal_interface-curses-panels.adb
index d7e18fa..84e29e5 100644
--- a/Ada95/src/terminal_interface-curses-panels.adb
+++ b/Ada95/src/terminal_interface-curses-panels.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.13 $
--- $Date: 2004/08/21 21:37:00 $
+-- $Revision: 1.14 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
@@ -60,7 +60,7 @@
return Pan;
end Create;
- procedure Bottom (Pan : in Panel)
+ procedure Bottom (Pan : Panel)
is
function Bottompanel (Pan : Panel) return C_Int;
pragma Import (C, Bottompanel, "bottom_panel");
@@ -70,7 +70,7 @@
end if;
end Bottom;
- procedure Top (Pan : in Panel)
+ procedure Top (Pan : Panel)
is
function Toppanel (Pan : Panel) return C_Int;
pragma Import (C, Toppanel, "top_panel");
@@ -80,7 +80,7 @@
end if;
end Top;
- procedure Show (Pan : in Panel)
+ procedure Show (Pan : Panel)
is
function Showpanel (Pan : Panel) return C_Int;
pragma Import (C, Showpanel, "show_panel");
@@ -90,7 +90,7 @@
end if;
end Show;
- procedure Hide (Pan : in Panel)
+ procedure Hide (Pan : Panel)
is
function Hidepanel (Pan : Panel) return C_Int;
pragma Import (C, Hidepanel, "hide_panel");
@@ -113,8 +113,8 @@
return Win;
end Get_Window;
- procedure Replace (Pan : in Panel;
- Win : in Window)
+ procedure Replace (Pan : Panel;
+ Win : Window)
is
function Replace_Pan (Pan : Panel;
Win : Window) return C_Int;
@@ -125,9 +125,9 @@
end if;
end Replace;
- procedure Move (Pan : in Panel;
- Line : in Line_Position;
- Column : in Column_Position)
+ procedure Move (Pan : Panel;
+ Line : Line_Position;
+ Column : Column_Position)
is
function Move (Pan : Panel;
Line : C_Int;
diff --git a/Ada95/src/terminal_interface-curses-termcap.adb b/Ada95/src/terminal_interface-curses-termcap.adb
index fd3c646..6438657 100644
--- a/Ada95/src/terminal_interface-curses-termcap.adb
+++ b/Ada95/src/terminal_interface-curses-termcap.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.12 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -82,7 +82,7 @@
end Get_Flag;
------------------------------------------------------------------------------
- procedure Get_Number (Name : in String;
+ procedure Get_Number (Name : String;
Value : out Integer;
Result : out Boolean)
is
diff --git a/Ada95/src/terminal_interface-curses-terminfo.adb b/Ada95/src/terminal_interface-curses-terminfo.adb
index a3fbe25..9b3c9d5 100644
--- a/Ada95/src/terminal_interface-curses-terminfo.adb
+++ b/Ada95/src/terminal_interface-curses-terminfo.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.5 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.6 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
@@ -47,9 +47,9 @@
package body Terminal_Interface.Curses.Terminfo is
- function Is_MinusOne_Pointer (P : in chars_ptr) return Boolean;
+ function Is_MinusOne_Pointer (P : chars_ptr) return Boolean;
- function Is_MinusOne_Pointer (P : in chars_ptr) return Boolean is
+ function Is_MinusOne_Pointer (P : chars_ptr) return Boolean is
type Weird_Address is new System.Storage_Elements.Integer_Address;
Invalid_Pointer : constant Weird_Address := -1;
function To_Weird is new Ada.Unchecked_Conversion
diff --git a/Ada95/src/terminal_interface-curses-text_io-aux.adb b/Ada95/src/terminal_interface-curses-text_io-aux.adb
index 06b4876..50a4e44 100644
--- a/Ada95/src/terminal_interface-curses-text_io-aux.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-aux.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,18 +35,18 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.12 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.13 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package body Terminal_Interface.Curses.Text_IO.Aux is
procedure Put_Buf
- (Win : in Window;
- Buf : in String;
- Width : in Field;
- Signal : in Boolean := True;
- Ljust : in Boolean := False)
+ (Win : Window;
+ Buf : String;
+ Width : Field;
+ Signal : Boolean := True;
+ Ljust : Boolean := False)
is
L : Field;
Len : Field;
diff --git a/Ada95/src/terminal_interface-curses-text_io-aux.ads b/Ada95/src/terminal_interface-curses-text_io-aux.ads
index df8a9bd..6b50b33 100644
--- a/Ada95/src/terminal_interface-curses-text_io-aux.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-aux.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,8 +35,8 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.13 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.14 $
+-- $Date: 2009/12/26 17:38:58 $
-- Binding Version 01.00
------------------------------------------------------------------------------
private package Terminal_Interface.Curses.Text_IO.Aux is
@@ -46,10 +46,10 @@
-- and enumeration types.
--
procedure Put_Buf
- (Win : in Window; -- The output window
- Buf : in String; -- The buffer containing the text
- Width : in Field; -- The width of the output field
- Signal : in Boolean := True; -- If true, we raise Layout_Error
- Ljust : in Boolean := False); -- The Buf is left justified
+ (Win : Window; -- The output window
+ Buf : String; -- The buffer containing the text
+ Width : Field; -- The width of the output field
+ Signal : Boolean := True; -- If true, we raise Layout_Error
+ Ljust : Boolean := False); -- The Buf is left justified
end Terminal_Interface.Curses.Text_IO.Aux;
diff --git a/Ada95/src/terminal_interface-curses-text_io-complex_io.adb b/Ada95/src/terminal_interface-curses-text_io-complex_io.adb
index 3b5871e..6c2e144 100644
--- a/Ada95/src/terminal_interface-curses-text_io-complex_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-complex_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Terminal_Interface.Curses.Text_IO.Float_IO;
@@ -46,11 +46,11 @@
Terminal_Interface.Curses.Text_IO.Float_IO (Complex_Types.Real'Base);
procedure Put
- (Win : in Window;
- Item : in Complex;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp)
+ (Win : Window;
+ Item : Complex;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp)
is
begin
Put (Win, '(');
@@ -61,10 +61,10 @@
end Put;
procedure Put
- (Item : in Complex;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp)
+ (Item : Complex;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp)
is
begin
Put (Get_Window, Item, Fore, Aft, Exp);
diff --git a/Ada95/src/terminal_interface-curses-text_io-complex_io.ads b/Ada95/src/terminal_interface-curses-text_io-complex_io.ads
index 233eb3c..e613458 100644
--- a/Ada95/src/terminal_interface-curses-text_io-complex_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-complex_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Numerics.Generic_Complex_Types;
@@ -52,17 +52,17 @@
Default_Exp : Field := 3;
procedure Put
- (Win : in Window;
- Item : in Complex;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Win : Window;
+ Item : Complex;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
procedure Put
- (Item : in Complex;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Item : Complex;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
private
pragma Inline (Put);
diff --git a/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb b/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb
index 02068a0..1b1ad8c 100644
--- a/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
@@ -47,11 +47,11 @@
package DIO is new Ada.Text_IO.Decimal_IO (Num);
procedure Put
- (Win : in Window;
- Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp)
+ (Win : Window;
+ Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp)
is
Buf : String (1 .. Field'Last);
Len : Field := Fore + 1 + Aft;
@@ -64,10 +64,10 @@
end Put;
procedure Put
- (Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp) is
+ (Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp) is
begin
Put (Get_Window, Item, Fore, Aft, Exp);
end Put;
diff --git a/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads b/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads
index 6f6fe75..1590127 100644
--- a/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
generic
@@ -48,17 +48,17 @@
Default_Exp : Field := 0;
procedure Put
- (Win : in Window;
- Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Win : Window;
+ Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
procedure Put
- (Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
private
pragma Inline (Put);
diff --git a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb
index 528873a..53f3e55 100644
--- a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
@@ -48,10 +48,10 @@
package EIO is new Ada.Text_IO.Enumeration_IO (Enum);
procedure Put
- (Win : in Window;
- Item : in Enum;
- Width : in Field := Default_Width;
- Set : in Type_Set := Default_Setting)
+ (Win : Window;
+ Item : Enum;
+ Width : Field := Default_Width;
+ Set : Type_Set := Default_Setting)
is
Buf : String (1 .. Field'Last);
Tset : Ada.Text_IO.Type_Set;
@@ -69,9 +69,9 @@
end Put;
procedure Put
- (Item : in Enum;
- Width : in Field := Default_Width;
- Set : in Type_Set := Default_Setting)
+ (Item : Enum;
+ Width : Field := Default_Width;
+ Set : Type_Set := Default_Setting)
is
begin
Put (Get_Window, Item, Width, Set);
diff --git a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads
index b221d7f..a981f0e 100644
--- a/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
generic
@@ -47,15 +47,15 @@
Default_Setting : Type_Set := Mixed_Case;
procedure Put
- (Win : in Window;
- Item : in Enum;
- Width : in Field := Default_Width;
- Set : in Type_Set := Default_Setting);
+ (Win : Window;
+ Item : Enum;
+ Width : Field := Default_Width;
+ Set : Type_Set := Default_Setting);
procedure Put
- (Item : in Enum;
- Width : in Field := Default_Width;
- Set : in Type_Set := Default_Setting);
+ (Item : Enum;
+ Width : Field := Default_Width;
+ Set : Type_Set := Default_Setting);
private
pragma Inline (Put);
diff --git a/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb b/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb
index e74f148..13a3420 100644
--- a/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
@@ -47,11 +47,11 @@
package FIXIO is new Ada.Text_IO.Fixed_IO (Num);
procedure Put
- (Win : in Window;
- Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp)
+ (Win : Window;
+ Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp)
is
Buf : String (1 .. Field'Last);
Len : Field := Fore + 1 + Aft;
@@ -64,10 +64,10 @@
end Put;
procedure Put
- (Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp) is
+ (Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp) is
begin
Put (Get_Window, Item, Fore, Aft, Exp);
end Put;
diff --git a/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads b/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads
index 4b8b136..3c22a01 100644
--- a/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
generic
@@ -48,17 +48,17 @@
Default_Exp : Field := 0;
procedure Put
- (Win : in Window;
- Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Win : Window;
+ Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
procedure Put
- (Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
private
pragma Inline (Put);
diff --git a/Ada95/src/terminal_interface-curses-text_io-float_io.adb b/Ada95/src/terminal_interface-curses-text_io-float_io.adb
index 19d261b..af667b4 100644
--- a/Ada95/src/terminal_interface-curses-text_io-float_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-float_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
@@ -47,11 +47,11 @@
package FIO is new Ada.Text_IO.Float_IO (Num);
procedure Put
- (Win : in Window;
- Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp)
+ (Win : Window;
+ Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp)
is
Buf : String (1 .. Field'Last);
Len : Field := Fore + 1 + Aft;
@@ -64,10 +64,10 @@
end Put;
procedure Put
- (Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp)
+ (Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp)
is
begin
Put (Get_Window, Item, Fore, Aft, Exp);
diff --git a/Ada95/src/terminal_interface-curses-text_io-float_io.ads b/Ada95/src/terminal_interface-curses-text_io-float_io.ads
index 0856523..b0a68d0 100644
--- a/Ada95/src/terminal_interface-curses-text_io-float_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-float_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
generic
@@ -48,17 +48,17 @@
Default_Exp : Field := 3;
procedure Put
- (Win : in Window;
- Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Win : Window;
+ Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
procedure Put
- (Item : in Num;
- Fore : in Field := Default_Fore;
- Aft : in Field := Default_Aft;
- Exp : in Field := Default_Exp);
+ (Item : Num;
+ Fore : Field := Default_Fore;
+ Aft : Field := Default_Aft;
+ Exp : Field := Default_Exp);
private
pragma Inline (Put);
diff --git a/Ada95/src/terminal_interface-curses-text_io-integer_io.adb b/Ada95/src/terminal_interface-curses-text_io-integer_io.adb
index e694e08..4d19c42 100644
--- a/Ada95/src/terminal_interface-curses-text_io-integer_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-integer_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
@@ -47,10 +47,10 @@
package IIO is new Ada.Text_IO.Integer_IO (Num);
procedure Put
- (Win : in Window;
- Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base)
+ (Win : Window;
+ Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base)
is
Buf : String (1 .. Field'Last);
begin
@@ -59,9 +59,9 @@
end Put;
procedure Put
- (Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base)
+ (Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base)
is
begin
Put (Get_Window, Item, Width, Base);
diff --git a/Ada95/src/terminal_interface-curses-text_io-integer_io.ads b/Ada95/src/terminal_interface-curses-text_io-integer_io.ads
index d8b169a..9ffe1e0 100644
--- a/Ada95/src/terminal_interface-curses-text_io-integer_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-integer_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
generic
@@ -47,15 +47,15 @@
Default_Base : Number_Base := 10;
procedure Put
- (Win : in Window;
- Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base);
+ (Win : Window;
+ Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base);
procedure Put
- (Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base);
+ (Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base);
private
pragma Inline (Put);
diff --git a/Ada95/src/terminal_interface-curses-text_io-modular_io.adb b/Ada95/src/terminal_interface-curses-text_io-modular_io.adb
index 8cc1d4a..fe8a6d0 100644
--- a/Ada95/src/terminal_interface-curses-text_io-modular_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io-modular_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.10 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
@@ -47,10 +47,10 @@
package MIO is new Ada.Text_IO.Modular_IO (Num);
procedure Put
- (Win : in Window;
- Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base)
+ (Win : Window;
+ Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base)
is
Buf : String (1 .. Field'Last);
begin
@@ -59,9 +59,9 @@
end Put;
procedure Put
- (Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base)
+ (Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base)
is
begin
Put (Get_Window, Item, Width, Base);
diff --git a/Ada95/src/terminal_interface-curses-text_io-modular_io.ads b/Ada95/src/terminal_interface-curses-text_io-modular_io.ads
index 618706f..68e70e5 100644
--- a/Ada95/src/terminal_interface-curses-text_io-modular_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io-modular_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.11 $
+-- $Revision: 1.12 $
-- Binding Version 01.00
------------------------------------------------------------------------------
generic
@@ -47,15 +47,15 @@
Default_Base : Number_Base := 10;
procedure Put
- (Win : in Window;
- Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base);
+ (Win : Window;
+ Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base);
procedure Put
- (Item : in Num;
- Width : in Field := Default_Width;
- Base : in Number_Base := Default_Base);
+ (Item : Num;
+ Width : Field := Default_Width;
+ Base : Number_Base := Default_Base);
private
pragma Inline (Put);
diff --git a/Ada95/src/terminal_interface-curses-text_io.adb b/Ada95/src/terminal_interface-curses-text_io.adb
index 255b123..85a4f44 100644
--- a/Ada95/src/terminal_interface-curses-text_io.adb
+++ b/Ada95/src/terminal_interface-curses-text_io.adb
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2011,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,15 +35,15 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.18 $
--- $Date: 2006/06/25 14:24:40 $
+-- $Revision: 1.22 $
+-- $Date: 2014/05/24 21:32:18 $
-- Binding Version 01.00
------------------------------------------------------------------------------
package body Terminal_Interface.Curses.Text_IO is
Default_Window : Window := Null_Window;
- procedure Set_Window (Win : in Window)
+ procedure Set_Window (Win : Window)
is
begin
Default_Window := Win;
@@ -60,7 +60,7 @@
end Get_Window;
pragma Inline (Get_Window);
- procedure Flush (Win : in Window)
+ procedure Flush (Win : Window)
is
begin
Refresh (Win);
@@ -81,7 +81,7 @@
-- A scroll-window is interpreted as an page with unbounded page length,
-- i.e. it returns the conventional 0 as page length.
- function Line_Length (Win : in Window) return Count
+ function Line_Length (Win : Window) return Count
is
N_Lines : Line_Count;
N_Cols : Column_Count;
@@ -99,7 +99,7 @@
return Line_Length (Get_Window);
end Line_Length;
- function Page_Length (Win : in Window) return Count
+ function Page_Length (Win : Window) return Count
is
N_Lines : Line_Count;
N_Cols : Column_Count;
@@ -124,7 +124,7 @@
------------------------------------
-- Column, Line, and Page Control --
------------------------------------
- procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1)
+ procedure New_Line (Win : Window; Spacing : Positive_Count := 1)
is
P_Size : constant Count := Page_Length (Win);
begin
@@ -141,13 +141,13 @@
end loop;
end New_Line;
- procedure New_Line (Spacing : in Positive_Count := 1)
+ procedure New_Line (Spacing : Positive_Count := 1)
is
begin
New_Line (Get_Window, Spacing);
end New_Line;
- procedure New_Page (Win : in Window)
+ procedure New_Page (Win : Window)
is
begin
Clear (Win);
@@ -159,7 +159,7 @@
New_Page (Get_Window);
end New_Page;
- procedure Set_Col (Win : in Window; To : in Positive_Count)
+ procedure Set_Col (Win : Window; To : Positive_Count)
is
Y : Line_Position;
X1 : Column_Position;
@@ -187,13 +187,13 @@
end if;
end Set_Col;
- procedure Set_Col (To : in Positive_Count)
+ procedure Set_Col (To : Positive_Count)
is
begin
Set_Col (Get_Window, To);
end Set_Col;
- procedure Set_Line (Win : in Window; To : in Positive_Count)
+ procedure Set_Line (Win : Window; To : Positive_Count)
is
Y1 : Line_Position;
Y2 : Line_Position;
@@ -205,6 +205,7 @@
end if;
Get_Cursor_Position (Win, Y1, X);
+ pragma Warnings (Off, X); -- unreferenced
N := Natural (To); N := N - 1;
Y2 := Line_Position (N);
if Y2 < Y1 then
@@ -216,13 +217,13 @@
end if;
end Set_Line;
- procedure Set_Line (To : in Positive_Count)
+ procedure Set_Line (To : Positive_Count)
is
begin
Set_Line (Get_Window, To);
end Set_Line;
- function Col (Win : in Window) return Positive_Count
+ function Col (Win : Window) return Positive_Count
is
Y : Line_Position;
X : Column_Position;
@@ -242,7 +243,7 @@
return Col (Get_Window);
end Col;
- function Line (Win : in Window) return Positive_Count
+ function Line (Win : Window) return Positive_Count
is
Y : Line_Position;
X : Column_Position;
@@ -266,7 +267,7 @@
-- Characters Output --
-----------------------
- procedure Put (Win : in Window; Item : in Character)
+ procedure Put (Win : Window; Item : Character)
is
P_Size : constant Count := Page_Length (Win);
Y : Line_Position;
@@ -284,7 +285,7 @@
Add (Win, Item);
end Put;
- procedure Put (Item : in Character)
+ procedure Put (Item : Character)
is
begin
Put (Get_Window, Item);
@@ -294,7 +295,7 @@
-- Strings-Output --
--------------------
- procedure Put (Win : in Window; Item : in String)
+ procedure Put (Win : Window; Item : String)
is
P_Size : constant Count := Page_Length (Win);
Y : Line_Position;
@@ -312,15 +313,15 @@
Add (Win, Item);
end Put;
- procedure Put (Item : in String)
+ procedure Put (Item : String)
is
begin
Put (Get_Window, Item);
end Put;
procedure Put_Line
- (Win : in Window;
- Item : in String)
+ (Win : Window;
+ Item : String)
is
begin
Put (Win, Item);
@@ -328,7 +329,7 @@
end Put_Line;
procedure Put_Line
- (Item : in String)
+ (Item : String)
is
begin
Put_Line (Get_Window, Item);
diff --git a/Ada95/src/terminal_interface-curses-text_io.ads b/Ada95/src/terminal_interface-curses-text_io.ads
index 2f6c48a..9c40329 100644
--- a/Ada95/src/terminal_interface-curses-text_io.ads
+++ b/Ada95/src/terminal_interface-curses-text_io.ads
@@ -7,7 +7,7 @@
-- S P E C --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,7 +35,7 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.13 $
+-- $Revision: 1.14 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with Ada.Text_IO;
@@ -56,13 +56,13 @@
-- type parameter. They will operate on a default window, which can
-- be set by the user. It is initially equal to Standard_Window.
- procedure Set_Window (Win : in Window);
+ procedure Set_Window (Win : Window);
-- Set Win as the default window
function Get_Window return Window;
-- Get the current default window
- procedure Flush (Win : in Window);
+ procedure Flush (Win : Window);
procedure Flush;
--------------------------------------------
@@ -74,53 +74,53 @@
-- A scroll-window is interpreted as an page with unbounded page length,
-- i.e. it returns the conventional 0 as page length.
- function Line_Length (Win : in Window) return Count;
+ function Line_Length (Win : Window) return Count;
function Line_Length return Count;
- function Page_Length (Win : in Window) return Count;
+ function Page_Length (Win : Window) return Count;
function Page_Length return Count;
------------------------------------
-- Column, Line, and Page Control --
------------------------------------
- procedure New_Line (Win : in Window; Spacing : in Positive_Count := 1);
- procedure New_Line (Spacing : in Positive_Count := 1);
+ procedure New_Line (Win : Window; Spacing : Positive_Count := 1);
+ procedure New_Line (Spacing : Positive_Count := 1);
- procedure New_Page (Win : in Window);
+ procedure New_Page (Win : Window);
procedure New_Page;
- procedure Set_Col (Win : in Window; To : in Positive_Count);
- procedure Set_Col (To : in Positive_Count);
+ procedure Set_Col (Win : Window; To : Positive_Count);
+ procedure Set_Col (To : Positive_Count);
- procedure Set_Line (Win : in Window; To : in Positive_Count);
- procedure Set_Line (To : in Positive_Count);
+ procedure Set_Line (Win : Window; To : Positive_Count);
+ procedure Set_Line (To : Positive_Count);
- function Col (Win : in Window) return Positive_Count;
+ function Col (Win : Window) return Positive_Count;
function Col return Positive_Count;
- function Line (Win : in Window) return Positive_Count;
+ function Line (Win : Window) return Positive_Count;
function Line return Positive_Count;
-----------------------
-- Characters-Output --
-----------------------
- procedure Put (Win : in Window; Item : in Character);
- procedure Put (Item : in Character);
+ procedure Put (Win : Window; Item : Character);
+ procedure Put (Item : Character);
--------------------
-- Strings-Output --
--------------------
- procedure Put (Win : in Window; Item : in String);
- procedure Put (Item : in String);
+ procedure Put (Win : Window; Item : String);
+ procedure Put (Item : String);
procedure Put_Line
- (Win : in Window;
- Item : in String);
+ (Win : Window;
+ Item : String);
procedure Put_Line
- (Item : in String);
+ (Item : String);
-- Exceptions
diff --git a/Ada95/src/terminal_interface-curses-trace.adb_p b/Ada95/src/terminal_interface-curses-trace.adb_p
index 747454a..0dead37 100644
--- a/Ada95/src/terminal_interface-curses-trace.adb_p
+++ b/Ada95/src/terminal_interface-curses-trace.adb_p
@@ -7,7 +7,7 @@
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 2000,2004 Free Software Foundation, Inc. --
+-- Copyright (c) 2000-2009,2014 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -35,60 +35,39 @@
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.5 $
+-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
#if ADA_TRACE then
with Interfaces.C; use Interfaces.C;
-with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
-with Ada.Unchecked_Conversion;
#end if;
package body Terminal_Interface.Curses.Trace is
#if ADA_TRACE then
- type C_TraceType is new C_UInt;
-
- function TraceAda_To_TraceC is new
- Ada.Unchecked_Conversion (Source => Trace_Attribute_Set,
- Target => C_TraceType);
-
procedure Trace_On (x : Trace_Attribute_Set) is
- procedure traceC (y : C_TraceType);
+ procedure traceC (y : Trace_Attribute_Set);
pragma Import (C, traceC, "trace");
begin
- traceC (TraceAda_To_TraceC (x));
+ traceC (x);
end Trace_On;
- -- 75. (12) A C function that takes a variable number of arguments can
- -- correspond to several Ada subprograms, taking various specific
- -- numbers and types of parameters.
-
procedure Trace_Put (str : String) is
procedure tracef (format : char_array; s : char_array);
- pragma Import (C, tracef, "_tracef");
- Txt : char_array (0 .. str'Length);
- Length : size_t;
- formatstr : constant String := "%s" & ASCII.Nul;
- formattxt : char_array (0 .. formatstr'Length);
+ pragma Import (C, tracef, "_traces");
+ -- _traces() is defined in c_varargs_to_ada.h
begin
- To_C (formatstr, formattxt, Length);
- To_C (str, Txt, Length);
- tracef (formattxt, Txt);
+ tracef (To_C ("%s"), To_C (str));
end Trace_Put;
#else
procedure Trace_On (x : Trace_Attribute_Set) is
-#if PRAGMA_UNREF
- pragma Unreferenced (x);
-#end if;
+ pragma Warnings (Off, x); -- unreferenced
begin
null;
end Trace_On;
procedure Trace_Put (str : String) is
-#if PRAGMA_UNREF
- pragma Unreferenced (str);
-#end if;
+ pragma Warnings (Off, str); -- unreferenced
begin
null;
end Trace_Put;