[vlc-devel] [PATCH] configure: only enable ncurses if wcswidth() can be used

Rémi Denis-Courmont remi at remlab.net
Tue Feb 9 16:02:09 CET 2016


Le 2016-02-09 16:04, Steve Lhomme a écrit :
> In MinGW the wchar.h that is used in the one defining Windows APIs,
> ncurses tries to build even though it can't
> ---
>  configure.ac | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 344d93e..74cbb57 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3950,12 +3950,20 @@ AC_ARG_ENABLE(ncurses,
>  have_ncurses="no"
>  AS_IF([test "${enable_ncurses}" != "no"] ,[
>    PKG_CHECK_MODULES([NCURSES], [ncursesw], [
> +   AC_CHECK_DECLS([wcswidth],[
>      have_ncurses="yes"
>      ALIASES="${ALIASES} nvlc"
>    ], [
>      AS_IF([test -n "${enable_ncurses}"], [
>        AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
>      ])
> +  ], [
> +#define _XOPEN_SOURCE 1
> +#define _XOPEN_SOURCE_EXTENDED 1
> +#include <wchar.h>])  ], [
> +    AS_IF([test -n "${enable_ncurses}"], [
> +      AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
> +    ])
>    ])
>  ])
>  AM_CONDITIONAL([HAVE_NCURSES], [test "${have_ncurses}" = "yes"])

Patch violates POSIX reqs. Also I don't really see the point in 
building ncurses, especially on Windows, and then not using it.

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list