summaryrefslogtreecommitdiffstats
path: root/gl/m4/getline.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/getline.m4')
-rw-r--r--gl/m4/getline.m423
1 files changed, 13 insertions, 10 deletions
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 03569f0..36513cd 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,6 +1,7 @@
1# getline.m4 serial 30 1# getline.m4
2# serial 33
2 3
3dnl Copyright (C) 1998-2003, 2005-2007, 2009-2023 Free Software Foundation, 4dnl Copyright (C) 1998-2003, 2005-2007, 2009-2024 Free Software Foundation,
4dnl Inc. 5dnl Inc.
5dnl 6dnl
6dnl This file is free software; the Free Software Foundation 7dnl This file is free software; the Free Software Foundation
@@ -23,12 +24,9 @@ AC_DEFUN([gl_FUNC_GETLINE],
23 24
24 AC_CHECK_DECLS_ONCE([getline]) 25 AC_CHECK_DECLS_ONCE([getline])
25 26
26 gl_getline_needs_run_time_check=no 27 gl_CHECK_FUNCS_ANDROID([getline], [[#include <stdio.h>]])
27 AC_CHECK_FUNC([getline], 28 if test $ac_cv_func_getline = yes; then
28 [dnl Found it in some library. Verify that it works. 29 dnl Found it in some library. Verify that it works.
29 gl_getline_needs_run_time_check=yes],
30 [am_cv_func_working_getline=no])
31 if test $gl_getline_needs_run_time_check = yes; then
32 AC_CACHE_CHECK([for working getline function], 30 AC_CACHE_CHECK([for working getline function],
33 [am_cv_func_working_getline], 31 [am_cv_func_working_getline],
34 [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data 32 [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
@@ -79,12 +77,17 @@ AC_DEFUN([gl_FUNC_GETLINE],
79 ], 77 ],
80 [am_cv_func_working_getline="guessing yes"], 78 [am_cv_func_working_getline="guessing yes"],
81 [case "$host_os" in 79 [case "$host_os" in
82 *-musl*) am_cv_func_working_getline="guessing yes" ;; 80 *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;;
83 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; 81 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
84 esac 82 esac
85 ]) 83 ])
86 ]) 84 ])
87 ]) 85 ])
86 else
87 am_cv_func_working_getline=no
88 case "$gl_cv_onwards_func_getline" in
89 future*) REPLACE_GETLINE=1 ;;
90 esac
88 fi 91 fi
89 92
90 if test $ac_cv_have_decl_getline = no; then 93 if test $ac_cv_have_decl_getline = no; then