diff --git a/ChangeLog b/ChangeLog index 5e3308ad..27962ce5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2013-01-20 Chris Allegretta * src/text.c (do_histify): Don't allow sigwinch to be received while justifying as that puts us into a wacky state. Fixess crash on justify by Joshua Rogers. + * configure.ac: Added --with-wordbounds option to let cross compilers force + whether their target system support GNU-style word boundaries or not. + Originally reported by dave festing. 2013-01-19 Chris Allegretta * configure.ac: Make ncursesw checking dependent on the presence of ncursesw.h, diff --git a/configure.ac b/configure.ac index c1eb123c..c1489f9c 100644 --- a/configure.ac +++ b/configure.ac @@ -528,7 +528,22 @@ 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([ + + AC_ARG_WITH(wordbounds, + [ --with-wordbounds Use GNU-style word boundary delimiters], + [ case "$with_wordbounds" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_RESULT(yes) + # We explicitly don't check if the user forced the option, because + # this is needed for cross compilers and we cant test the target + AC_DEFINE(GNU_WORDBOUNDS, 1, [Define if the system supports GNU-style word boundaries in regexes.]) gnu_wordbounds=yes, + ;; + esac + ], [ + AC_TRY_RUN([ #ifdef HAVE_SYS_TYPES_H #include #endif @@ -545,11 +560,13 @@ int main(void) 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-style word boundary support when cross-compiling]) -) + 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-style word boundary support when cross-compiling]) + ) +]) + # if test x$CURSES_LIB_NAME = xcurses; then AC_MSG_CHECKING([whether _XOPEN_SOURCE_EXTENDED is needed]) AC_TRY_RUN([