configure.ac and related cleanups

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2200 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2004-12-24 18:11:53 +00:00
parent fe3627ddfd
commit 4fd76bab73
3 changed files with 15 additions and 12 deletions

View File

@ -146,9 +146,16 @@ CVS code -
- configure.ac:
- Remove specific references to control key shortcuts. (DLR)
- Check for the wide version of ncurses, without which multibyte
strings don't seem to be displayed properly. (DLR)
- Check for stddef.h and wchar.h, for those systems that need
one of the two for the wcwidth() prototype. (DLR)
strings don't seem to be displayed properly, and associated
wide character functions. (DLR)
- Check for wchar.h, for those systems that need it for the
wcwidth() prototype. (DLR)
- Remove checks for all include files that we include
unconditionally. (DLR)
- Remove references to termio.h here and elsewhere, since it's
obsolete and it defines a struct termio that we don't use
anywhere. (DLR)
- Typo fixes. (DLR)
- doc/nanorc.sample:
- Add return to the "c-file" regexes. (DLR)

View File

@ -40,7 +40,7 @@ AM_GNU_GETTEXT([external], [need-ngettext])
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h stddef.h termio.h termios.h unistd.h wchar.h)
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termios.h wchar.h)
AC_CHECK_HEADER(regex.h,
AC_MSG_CHECKING([for broken regexec])
AC_TRY_RUN([
@ -291,8 +291,8 @@ AC_MSG_WARN([*** Can not use slang when cross-compiling])),
esac], [AC_MSG_RESULT(no)])
dnl Checks for functions
AC_CHECK_FUNCS(snprintf vsnprintf isblank strcasecmp strncasecmp strcasestr strnlen getline getdelim)
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
AC_CHECK_FUNCS(snprintf vsnprintf isblank strcasecmp strncasecmp strcasestr strnlen getline getdelim mbtowc wctomb wcwidth)
if test "x$ac_cv_func_snprintf" = "xno" -o "x$ac_cv_func_vsnprintf" = "xno"
then
AM_PATH_GLIB_2_0(2.0.0,,
AC_MSG_ERROR([
@ -357,9 +357,9 @@ then
LDFLAGS="$LDFLAGS $GLIB_LIBS"
fi
if test "x$CURSES_LIB_WIDE" == "xyes"
if test "x$CURSES_LIB_WIDE" = "xyes" -a "x$ac_cv_func_mbtowc" = "xyes" -a "x$ac_cv_func_wctomb" = "xyes" -a "x$ac_cv_func_wcwidth" = "xyes"
then
AC_DEFINE(NANO_WIDE, 1, [Define this if your system has wide character support.])
AC_DEFINE(NANO_WIDE, 1, [Define this if your system has wide character support (a wide curses library, mbtowc(), wctomb(), and wcwidth()).])
else
AC_MSG_WARN([No wide character support found. nano will not be able to support UTF-8.])
fi

View File

@ -44,10 +44,6 @@
#include <termios.h>
#endif
#ifdef HAVE_TERMIO_H
#include <termio.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif