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 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 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 "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 "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 (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],
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],
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 "$cf_nculib_root" = ncurses ; then
AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"])
fi
if test "$cf_nculib_root" = ncurses ; then
AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"])
fi
AC_DEFUN([CF_SHARED_OPTS],
[
AC_REQUIRE([CF_LD_RPATH_OPT])
AC_DEFUN([CF_SHARED_OPTS],
[
AC_REQUIRE([CF_LD_RPATH_OPT])
dnl ------------
dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
dnl defaulting to yes/no.
dnl ------------
dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
dnl defaulting to yes/no.
dnl $2 = help-text
dnl $3 = environment variable to set
dnl $4 = default value, shown in the help-message, must be a constant
dnl $2 = help-text
dnl $3 = environment variable to set
dnl $4 = default value, shown in the help-message, must be a constant
dnl
AC_DEFUN([CF_WITH_PATH],
[AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),,
dnl
AC_DEFUN([CF_WITH_PATH],
[AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),,