diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 57 |
1 files changed, 57 insertions, 0 deletions
@@ -17694,6 +17694,63 @@ $as_echo "no" >&6; } fi fi +LL_FMT="" +oCFLAGS=$CFLAGS +CFLAGS="$WFLAGS $CFLAGS" +for fmt in "%lld" "%I64d" "%I64lld"; do + if test "$LL_FMT" = ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking printf format for long long: $fmt" >&5 +$as_echo_n "checking printf format for long long: $fmt... " >&6; } + if test "$cross_compiling" = yes; then : + LL_FMT="%lld" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _CRT_SECURE_NO_WARNINGS + #include <stdio.h> + #include <string.h> + +int +main () +{ + + long long int a = 123456789012345ll; + char s[30]; + sprintf(s, "$fmt", a); + return (strcmp(s, "123456789012345") == 0) ? 0 : 1 + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + LL_FMT=$fmt +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + if test "$LL_FMT" != ""; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + fi +done +CFLAGS=$oCFLAGS +if test "LL_FMT" = ""; then + LL_FMT="%lld%" +fi + +cat >>confdefs.h <<_ACEOF +#define LL_FMT "$LL_FMT" +_ACEOF + + if test "$BUILDRULES" = "msvc"; then |