]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/configure.in
ncurses 5.6 - patch 20070317
[ncurses.git] / test / configure.in
index 928b24674e66dd107156ddc1e68a0095e326677b..b98d890b285b540aa71dad432c4413d658eee7e4 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1996, etc.
 dnl
-dnl $Id: configure.in,v 1.58 2006/07/15 18:54:07 tom Exp $
+dnl $Id: configure.in,v 1.61 2007/01/27 22:56:49 tom Exp $
 dnl This is a simple configuration-script for the ncurses test programs that
 dnl allows the test-directory to be separately configured against a reference
 dnl system (i.e., sysvr4 curses)
@@ -206,6 +206,7 @@ winsstr \
 wresize \
 )
 
+AC_CACHE_CHECK(for ncurses extended functions,cf_cv_ncurses_ext_funcs,[
 AC_TRY_LINK([
 #include <${cf_cv_ncurses_header-curses.h}>],
 [
@@ -220,8 +221,28 @@ AC_TRY_LINK([
        (void) resizeterm (0, 0);
        (void) use_default_colors ();
        (void) use_extended_names (0);
-       (void) wresize (0, 0, 0);
-       ],[AC_DEFINE(NCURSES_EXT_FUNCS)])
+       (void) wresize (0, 0, 0);],
+       [cf_cv_ncurses_ext_funcs=yes],
+       [cf_cv_ncurses_ext_funcs=no])
+])
+test "$cf_cv_ncurses_ext_funcs" != no && AC_DEFINE(NCURSES_EXT_FUNCS)
+
+AC_CACHE_CHECK(for wide-character functions,cf_cv_widechar_funcs,[
+AC_TRY_LINK([
+#include <${cf_cv_ncurses_header-curses.h}>],
+[
+       static wchar_t src_wchar[2];
+       static cchar_t dst_cchar;
+       setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
+       ],
+       [cf_cv_widechar_funcs=yes],
+       [cf_cv_widechar_funcs=no])
+])
+if test "$cf_cv_widechar_funcs" != no ; then
+       AC_DEFINE(USE_WIDEC_SUPPORT,1)
+else
+       AC_DEFINE(USE_WIDEC_SUPPORT,0)
+fi
 
 CF_SYS_TIME_SELECT
 CF_FUNC_CURSES_VERSION