[configure] fail if ncurses was not found and fix the date test

This commit is contained in:
Timothy Stack 2014-03-22 10:13:45 -07:00
parent 8372cef11c
commit 530a0a94b5
3 changed files with 14 additions and 4 deletions

5
configure vendored
View File

@ -6955,6 +6955,11 @@ fi
LIBS=$ax_saved_LIBS
if test "x$ax_cv_curses" != xyes; then
as_fn_error $? "requires an X/Open-compatible Curses library with color" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lib pcre" >&5
$as_echo_n "checking lib pcre... " >&6; }

View File

@ -93,6 +93,11 @@ AC_SEARCH_LIBS(Gpm_Open, gpm)
AC_CHECK_HEADERS(execinfo.h pty.h util.h zlib.h bzlib.h libutil.h sys/ttydefaults.h)
AX_WITH_CURSES
if test "x$ax_cv_curses" != xyes; then
AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])
fi
AX_PATH_LIB_PCRE([], [AC_MSG_ERROR([pcre required to build])])
AX_PATH_LIB_READLINE([], [AC_MSG_ERROR([readline required to build])])

View File

@ -66,9 +66,9 @@ int main(int argc, char *argv[])
struct tm en_tm, es_tm;
date_time_scanner dts;
setlocale(LC_TIME, "es_ES");
assert(dts.scan(en_date, NULL, &en_tm, en_tv) != NULL);
assert(dts.scan(bg_date, NULL, &es_tm, es_tv) != NULL);
if (setlocale(LC_TIME, "es_ES.utf8") != NULL) {
assert(dts.scan(en_date, NULL, &en_tm, en_tv) != NULL);
assert(dts.scan(bg_date, NULL, &es_tm, es_tv) != NULL);
}
}
}