From: Karel Zak Date: Fri, 3 Jun 2016 11:41:51 +0000 (+0200) Subject: build-sys: add --disable-widechar X-Git-Tag: v2.29-rc1~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4cb6fea5ccd7ce5e258c52160de167dd7aa24494;p=thirdparty%2Futil-linux.git build-sys: add --disable-widechar Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index f36b18c3cd..d9a9f4eadc 100644 --- a/configure.ac +++ b/configure.ac @@ -633,21 +633,31 @@ AC_CHECK_TYPES([union semun], [], [], [[ ]]) AC_CHECK_TYPES([loff_t]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ - wchar_t wc; - wint_t w; - w = fgetwc(stdin); - if (w == WEOF) exit(1); - wc = w; - fputwc(wc,stdout); -]])], -[AC_DEFINE([HAVE_WIDECHAR], [1], [Do we have wide character support?]) + +AC_ARG_ENABLE([widechar], + AS_HELP_STRING([--disable-widechar], [do not compile wide character support]), + [], [enable_widechar=check] +) +UL_BUILD_INIT([widechar]) +UL_REQUIRES_COMPILE([widechar], [[ + #include + #include + #include + ]], [[ + wchar_t wc; + wint_t w; + w = fgetwc(stdin); + if (w == WEOF) exit(1); + wc = w; + fputwc(wc,stdout); + ]], + [wchar_t support]) + +AS_IF([test "x$build_widechar" = xyes ], [ + AC_DEFINE([HAVE_WIDECHAR], [1], [Do we have wide character support?]) ]) + AC_CHECK_TYPES([cpu_set_t], [have_cpu_set_t=yes], [], [[ #include ]])