X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgetline.m4;h=5b55c3045bb16936d6efd0dd38694b9bb030a8e6;hb=0adf8a67b854087b7623261527f7950052a31ddf;hp=ff255a36649f9d5413d2e8187872d9cd317714a1;hpb=f5e93ef0613280d12d81460251dc3084d12beb28;p=gnulib.git diff --git a/m4/getline.m4 b/m4/getline.m4 index ff255a366..5b55c3045 100644 --- a/m4/getline.m4 +++ b/m4/getline.m4 @@ -1,6 +1,6 @@ -# getline.m4 serial 13 +# getline.m4 serial 15 -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 @@ -15,8 +15,6 @@ dnl have a function by that name in -linet that doesn't have anything dnl to do with the function we need. AC_DEFUN([gl_FUNC_GETLINE], [ - AC_LIBSOURCES([getline.c, getline.h]) - dnl Persuade glibc to declare getline(). AC_REQUIRE([AC_GNU_SOURCE]) @@ -47,7 +45,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 +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) + Lucky GNU user + #endif +#endif + ], + [am_cv_func_working_getline=yes], + [am_cv_func_working_getline=no])] )]) fi