- 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)
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([
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([
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