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.m424
1 files changed, 14 insertions, 10 deletions
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 03569f06..b97b8011 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,11 +1,13 @@
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-2025 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
7dnl gives unlimited permission to copy and/or distribute it, 8dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved. 9dnl with or without modifications, as long as this notice is preserved.
10dnl This file is offered as-is, without any warranty.
9 11
10AC_PREREQ([2.59]) 12AC_PREREQ([2.59])
11 13
@@ -23,12 +25,9 @@ AC_DEFUN([gl_FUNC_GETLINE],
23 25
24 AC_CHECK_DECLS_ONCE([getline]) 26 AC_CHECK_DECLS_ONCE([getline])
25 27
26 gl_getline_needs_run_time_check=no 28 gl_CHECK_FUNCS_ANDROID([getline], [[#include <stdio.h>]])
27 AC_CHECK_FUNC([getline], 29 if test $ac_cv_func_getline = yes; then
28 [dnl Found it in some library. Verify that it works. 30 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], 31 AC_CACHE_CHECK([for working getline function],
33 [am_cv_func_working_getline], 32 [am_cv_func_working_getline],
34 [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data 33 [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
@@ -79,12 +78,17 @@ AC_DEFUN([gl_FUNC_GETLINE],
79 ], 78 ],
80 [am_cv_func_working_getline="guessing yes"], 79 [am_cv_func_working_getline="guessing yes"],
81 [case "$host_os" in 80 [case "$host_os" in
82 *-musl*) am_cv_func_working_getline="guessing yes" ;; 81 *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;;
83 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; 82 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
84 esac 83 esac
85 ]) 84 ])
86 ]) 85 ])
87 ]) 86 ])
87 else
88 am_cv_func_working_getline=no
89 case "$gl_cv_onwards_func_getline" in
90 future*) REPLACE_GETLINE=1 ;;
91 esac
88 fi 92 fi
89 93
90 if test $ac_cv_have_decl_getline = no; then 94 if test $ac_cv_have_decl_getline = no; then