stdin is not defined any more on Android; use a different test program

This commit is contained in:
Frank Denis 2017-05-07 15:29:17 +02:00
parent f6cab99f64
commit 2d210e0771
2 changed files with 4 additions and 4 deletions

View File

@ -63,8 +63,8 @@ AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_TRY_LINK([#include <stdio.h>], AC_TRY_LINK([#include <time.h>],
[char x[42U], fodder = 0;if (fodder > -1000 && fgets(x,1000,stdin)) puts(x)], [time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x],
[AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])]) [AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])

View File

@ -63,8 +63,8 @@ AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1" LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
[[char x[42U];if (fgets(x,1000,stdin)) puts(x)]])], [[time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x]])],
[AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])]) [AS_VAR_SET(CACHEVAR,[no])])
LDFLAGS=$ax_check_save_flags]) LDFLAGS=$ax_check_save_flags])