/[inetutils]/inetutils/m4/getline.m4
ViewVC logotype

Diff of /inetutils/m4/getline.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by gray, Fri Jul 29 10:52:44 2005 UTC revision 1.3 by ams, Fri Dec 2 14:00:00 2005 UTC
# Line 1  Line 1 
1  # getline.m4 serial 12  # getline.m4 serial 13
2    
3  dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software  dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software
4  dnl Foundation, Inc.  dnl Foundation, Inc.
# Line 13  dnl See if there's a working, system-sup Line 13  dnl See if there's a working, system-sup
13  dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems  dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
14  dnl have a function by that name in -linet that doesn't have anything  dnl have a function by that name in -linet that doesn't have anything
15  dnl to do with the function we need.  dnl to do with the function we need.
16  AC_DEFUN([AM_FUNC_GETLINE],  AC_DEFUN([gl_FUNC_GETLINE],
17  [  [
18    AC_LIBSOURCES([getline.c, getline.h])    AC_LIBSOURCES([getline.c, getline.h])
19    
20    dnl Persuade glibc <stdio.h> to declare getline() and getdelim().    dnl Persuade glibc <stdio.h> to declare getline().
21    AC_REQUIRE([AC_GNU_SOURCE])    AC_REQUIRE([AC_GNU_SOURCE])
22    
23    am_getline_needs_run_time_check=no    AC_CHECK_DECLS([getline])
24    
25      gl_getline_needs_run_time_check=no
26    AC_CHECK_FUNC(getline,    AC_CHECK_FUNC(getline,
27                  dnl Found it in some library.  Verify that it works.                  dnl Found it in some library.  Verify that it works.
28                  am_getline_needs_run_time_check=yes,                  gl_getline_needs_run_time_check=yes,
29                  am_cv_func_working_getline=no)                  am_cv_func_working_getline=no)
30    if test $am_getline_needs_run_time_check = yes; then    if test $gl_getline_needs_run_time_check = yes; then
31      AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,      AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
32      [echo fooN |tr -d '\012'|tr N '\012' > conftest.data      [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
33      AC_TRY_RUN([      AC_TRY_RUN([
# Line 57  AC_DEFUN([AM_FUNC_GETLINE], Line 59  AC_DEFUN([AM_FUNC_GETLINE],
59        [Define to a replacement function name for getline().])        [Define to a replacement function name for getline().])
60      AC_LIBOBJ(getline)      AC_LIBOBJ(getline)
61    
     # Avoid multiple inclusions of getndelim2.o into LIBOBJS.  
     # This hack won't be needed after gnulib requires Autoconf 2.58 or later.  
     case " $LIB@&t@OBJS " in  
     *" getndelim2.$ac_objext "* ) ;;  
     *) AC_LIBOBJ(getndelim2);;  
     esac  
   
62      gl_PREREQ_GETLINE      gl_PREREQ_GETLINE
     gl_PREREQ_GETNDELIM2  
63    fi    fi
64  ])  ])
65    
66  # Prerequisites of lib/getline.c.  # Prerequisites of lib/getline.c.
67  AC_DEFUN([gl_PREREQ_GETLINE],  AC_DEFUN([gl_PREREQ_GETLINE],
68  [  [
69    AC_CHECK_FUNCS(getdelim)    gl_FUNC_GETDELIM
70  ])  ])

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26