File: [Development] / xfs-cmds / xfsdump / m4 / package_ncurses.m4 (download)
Revision 1.1, Fri May 2 01:20:12 2003 UTC (14 years, 5 months ago) by nathans
Branch: MAIN
CVS Tags: XFS-1_3_0pre1, HEAD
Bunch of configure updates for xfsdump to allow packages to better be kept
in sync in this area.
Macros for checking aspects of the installed curses packages.
|
AC_DEFUN([AC_PACKAGE_NEED_NCURSES_H],
[ AC_CHECK_HEADERS([ncurses.h])
if test "$ac_cv_header_ncurses_h" != yes; then
echo
echo 'FATAL ERROR: could not find a valid ncurses header.'
echo 'Install the ncurses development package.'
exit 1
fi
])
AC_DEFUN([AC_PACKAGE_WANT_WORKING_LIBNCURSES],
[ AC_CHECK_LIB(ncurses, initscr,, [
echo
echo 'FATAL ERROR: could not find a valid ncurses library.'
echo 'Install the ncurses library package.'
exit 1
])
AC_MSG_CHECKING([for bad glibc/ncurses header interaction])
libcurses="-lncurses"
LIBS="$LIBS $libcurses"
CFLAGS="$CFLAGS -D_GNU_SOURCE"
AC_TRY_LINK([
#include <ncurses.h>
#include <signal.h>],
[wgetch(stdscr);],
[enable_curses=yes; AC_MSG_RESULT([ok])],
[enable_curses=no; libcurses=""; AC_MSG_RESULT([disabling curses])])
AC_SUBST(enable_curses)
AC_SUBST(libcurses)
])