summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-07-22 15:08:58 +0000
committerBruno Haible <bruno@clisp.org>2006-07-22 15:08:58 +0000
commite25db6ef2883dff6f76a689bda4a109d92d38f1d (patch)
treedc451c1206148ce0433107de4a600ddf6e3fd5ea
parent52572f2de8f852f738e2e1874a9d31e8f00386cd (diff)
downloadgnulib-e25db6ef2883dff6f76a689bda4a109d92d38f1d.tar.gz
Avoid causing trouble in relocatable.c.
-rw-r--r--m4/ChangeLog7
-rw-r--r--m4/getline.m417
2 files changed, 21 insertions, 3 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 55a3c99bbc..b9eb01e45c 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,10 @@
+2006-07-19 Bruno Haible <bruno@clisp.org>
+
+ * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume that
+ getline works on glibc2 systems. Needed to avoid trouble in
+ relocatable.c.
+ Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
+
2005-12-04 Bruno Haible <bruno@clisp.org>
* csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix' launcher
diff --git a/m4/getline.m4 b/m4/getline.m4
index ff255a3664..f49c50eed8 100644
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -1,6 +1,6 @@
-# getline.m4 serial 13
+# getline.m4 serial 14
-dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software
+dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software
dnl Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
@@ -47,7 +47,18 @@ AC_DEFUN([gl_FUNC_GETLINE],
}
], am_cv_func_working_getline=yes dnl The library version works.
, am_cv_func_working_getline=no dnl The library version does NOT work.
- , am_cv_func_working_getline=no dnl We're cross compiling.
+ , dnl We're cross compiling. Assume it works on glibc2 systems.
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [am_cv_func_working_getline=yes],
+ [am_cv_func_working_getline=no])]
)])
fi