configure.ac and related cleanups

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2200 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
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: - configure.ac:
- Remove specific references to control key shortcuts. (DLR) - Remove specific references to control key shortcuts. (DLR)
- Check for the wide version of ncurses, without which multibyte - Check for the wide version of ncurses, without which multibyte
strings don't seem to be displayed properly. (DLR) strings don't seem to be displayed properly, and associated
- Check for stddef.h and wchar.h, for those systems that need wide character functions. (DLR)
one of the two for the wcwidth() prototype. (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: - doc/nanorc.sample:
- Add return to the "c-file" regexes. (DLR) - 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. dnl Checks for header files.
AC_HEADER_STDC 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_CHECK_HEADER(regex.h,
AC_MSG_CHECKING([for broken regexec]) AC_MSG_CHECKING([for broken regexec])
AC_TRY_RUN([ AC_TRY_RUN([
@ -291,8 +291,8 @@ AC_MSG_WARN([*** Can not use slang when cross-compiling])),
esac], [AC_MSG_RESULT(no)]) esac], [AC_MSG_RESULT(no)])
dnl Checks for functions dnl Checks for functions
AC_CHECK_FUNCS(snprintf vsnprintf isblank strcasecmp strncasecmp strcasestr strnlen getline getdelim) AC_CHECK_FUNCS(snprintf vsnprintf isblank strcasecmp strncasecmp strcasestr strnlen getline getdelim mbtowc wctomb wcwidth)
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno" if test "x$ac_cv_func_snprintf" = "xno" -o "x$ac_cv_func_vsnprintf" = "xno"
then then
AM_PATH_GLIB_2_0(2.0.0,, AM_PATH_GLIB_2_0(2.0.0,,
AC_MSG_ERROR([ AC_MSG_ERROR([
@ -357,9 +357,9 @@ then
LDFLAGS="$LDFLAGS $GLIB_LIBS" LDFLAGS="$LDFLAGS $GLIB_LIBS"
fi 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 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 else
AC_MSG_WARN([No wide character support found. nano will not be able to support UTF-8.]) AC_MSG_WARN([No wide character support found. nano will not be able to support UTF-8.])
fi fi

View File

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