diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-10-23 19:00:27 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2017-10-24 22:00:46 +0000 |
commit | e1ef8e5f7555a1608d0cddde6c824c5a897f6e58 (patch) | |
tree | 9da653772c2ba7d97ac17385597811bd86aa3f06 /configure.ac | |
parent | 08a490328387eafb7f9d20293a2a5e97e6cf4268 (diff) |
Test g_printf() thousands grouping flag at runtime
This tests the runtime environment so avoid hard-coding it during the build.
For now we avoid messing with locales for the test, unless it turns out to
be necessary (ISO C printf behaviour with invalid conversion specifier is
undefined).
Change-Id: I341c2ab5e716973689cf9002f13435404a41369f
Reviewed-on: https://code.wireshark.org/review/24038
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac index b504b5520c..cfbfb88c5a 100644 --- a/configure.ac +++ b/configure.ac @@ -1515,41 +1515,6 @@ then LIBS="$ac_save_LIBS" fi -# -# Check whether GLib's printf supports thousands grouping. (This might -# be different from the system's printf since GLib can optionally use -# its own printf implementation.) -# -AC_CACHE_CHECK([whether GLib supports POSIX/XSI thousands grouping], - [ac_cv_glib_supports_printf_grouping], [ -ac_save_CFLAGS="$CFLAGS" -ac_save_LIBS="$LIBS" -CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS" -LIBS="$LIBS $GLIB_LIBS" -AC_TRY_RUN([ -#include <glib.h> -#include <locale.h> -#include <stdio.h> -#include <string.h> - -int -main () -{ - gchar *str; - setlocale(LC_ALL, "en_US.UTF-8"); - str = g_strdup_printf("%'u", 123456); - return (strcmp (str, "123,456") != 0); -} -], ac_cv_glib_supports_printf_grouping=yes, ac_cv_glib_supports_printf_grouping=no, - [echo $ac_n "cross compiling; playing it safe... $ac_c" - ac_cv_glib_supports_printf_grouping=no]) -CFLAGS="$ac_save_CFLAGS" -LIBS="$ac_save_LIBS" -]) -if test "$ac_cv_glib_supports_printf_grouping" = yes ; then - AC_DEFINE(HAVE_GLIB_PRINTF_GROUPING, 1, [Define if GLib's printf functions support thousands grouping.]) -fi - AC_SUBST(wireshark_bin) AC_SUBST(wireshark_man) AC_SUBST(wireshark_SUBDIRS) |