dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
dnl -----------------
dnl Tie together the configure-script macros for ncurses.
dnl Prefer the "-config" script from ncurses 5.6, to simplify analysis.
dnl -----------------
dnl Tie together the configure-script macros for ncurses.
dnl Prefer the "-config" script from ncurses 5.6, to simplify analysis.
# even with config script, some packages use no-override for curses.h
CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
# even with config script, some packages use no-override for curses.h
CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
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 ---------------
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.
if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then
CF_ADD_LIBDIR($cf_cv_curses_dir/lib)
if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then
CF_ADD_LIBDIR($cf_cv_curses_dir/lib)
else
CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root,
[#include <${cf_cv_ncurses_header-curses.h}>],
else
CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root,
[#include <${cf_cv_ncurses_header-curses.h}>],
$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
])dnl
dnl ---------------------------------------------------------------------------
$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
])dnl
dnl ---------------------------------------------------------------------------
AC_DEFINE(HAVE_LIBUTF8_H)
CF_ADD_INCDIR($cf_cv_header_path_utf8)
CF_ADD_LIBDIR($cf_cv_library_path_utf8)
AC_DEFINE(HAVE_LIBUTF8_H)
CF_ADD_INCDIR($cf_cv_header_path_utf8)
CF_ADD_LIBDIR($cf_cv_library_path_utf8)
dnl --------------------
dnl Command-line option to specify the Ada95 compiler.
AC_DEFUN([CF_WITH_ADA_COMPILER],[
dnl --------------------
dnl Command-line option to specify the Ada95 compiler.
AC_DEFUN([CF_WITH_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_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)
dnl -------------------
dnl Command-line option to specify where Ada includes will install.
AC_DEFUN([CF_WITH_ADA_INCLUDE],[
dnl -------------------
dnl Command-line option to specify where Ada includes will install.
AC_DEFUN([CF_WITH_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)
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)
dnl -------------------
dnl Command-line option to specify where Ada objects will install.
AC_DEFUN([CF_WITH_ADA_OBJECTS],[
dnl -------------------
dnl Command-line option to specify where Ada objects will install.
AC_DEFUN([CF_WITH_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)
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)
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],[
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_ARG_WITH(ada-sharedlib,
[ --with-ada-sharedlib=XX build Ada95 shared-library],
[with_ada_sharedlib=$withval],
[with_ada_sharedlib=no])
AC_MSG_RESULT($with_ada_sharedlib)
AC_ARG_WITH(ada-sharedlib,
[ --with-ada-sharedlib=XX build Ada95 shared-library],
[with_ada_sharedlib=$withval],
[with_ada_sharedlib=no])
AC_MSG_RESULT($with_ada_sharedlib)
if test "x$with_ada_sharedlib" != xno
then
MAKE_ADA_SHAREDLIB=
if test "x$with_ada_sharedlib" != xyes
then
ADA_SHAREDLIB="$with_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"