From 95a9de0d3fcac8012c71a20b1f5247f6b875104b Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sat, 30 Aug 2008 21:32:55 +0000 Subject: [PATCH] Move the wordbounds check down so it will happen if either --enable-all or --enable-color git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4318 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- configure.ac | 56 +++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index 0850a7d3..db26b49d 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ # # $Id$ -AC_INIT([GNU nano], [2.1.4-svn], [nano-devel@gnu.org], [nano]) +AC_INIT([GNU nano], [2.1.5], [nano-devel@gnu.org], [nano]) AC_CONFIG_SRCDIR([src/nano.c]) AC_CANONICAL_TARGET([]) AM_INIT_AUTOMAKE @@ -144,32 +144,6 @@ AC_ARG_ENABLE(color, if test x$ac_cv_header_regex_h = xyes; then AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires regex.h and ENABLE_NANORC too!]) color_support=yes - - # now check for the end of word boundary support (/< and />) - AC_MSG_CHECKING([for GNU-style word boundary regex support]) - AC_TRY_RUN([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#include -int main(void) -{ - regex_t r; - size_t nmatch; - regmatch_t pmatch; - - if (regcomp(&r, "\\\\>", REG_EXTENDED|REG_NOSUB)) - return 1; - if (regexec(&r, "word boundary", nmatch, &pmatch, 0)) - return 1; - return 0; -}], - AC_MSG_RESULT(yes) - AC_DEFINE(GNU_WORDBOUNDS, 1, [Define if the system supports GNU-style word boundaries in regexes.]) gnu_wordbounds=yes, - AC_MSG_RESULT(no), - AC_MSG_WARN([*** Can't check for gnu word boundary support when cross-compiling]) -) - else AC_MSG_ERROR([ *** The header file regex.h was not found. If you wish to use color @@ -200,6 +174,34 @@ AC_ARG_ENABLE(all, AC_DEFINE(NANO_EXTRA, 1, [Define this to enable extra stuff.]) extra_support=yes fi]) +if test x$color_support = xyes; then + # now check for the end of word boundary support (/< and />) + AC_MSG_CHECKING([for GNU-style word boundary regex support]) + AC_TRY_RUN([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include +int main(void) +{ + regex_t r; + size_t nmatch; + regmatch_t pmatch; + + if (regcomp(&r, "\\\\>", REG_EXTENDED|REG_NOSUB)) + return 1; + if (regexec(&r, "word boundary", nmatch, &pmatch, 0)) + return 1; + return 0; +}], + AC_MSG_RESULT(yes) + AC_DEFINE(GNU_WORDBOUNDS, 1, [Define if the system supports GNU-style word boundaries in regexes.]) gnu_wordbounds=yes, + AC_MSG_RESULT(no), + AC_MSG_WARN([*** Can't check for gnu word boundary support when cross-compiling]) +) +fi + + AC_MSG_CHECKING([whether to enable UTF-8 support]) AC_ARG_ENABLE(utf8, [ --enable-utf8 Enable UTF-8 support], -- 2.39.5