~ubuntu-branches/ubuntu/hardy/renameutils/hardy

« back to all changes in this revision

Viewing changes to m4/getline.m4

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2006-07-21 16:39:15 UTC
  • mfrom: (1.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060721163915-k3kqs080hol8uw1n
Tags: 0.8.1-4
* Enable large file support on 32-bit platforms (closes: #377845)
* Bump Standards-Version up to 3.7.2 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# getline.m4 serial 10
 
1
# getline.m4 serial 13
2
2
 
3
 
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
 
3
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software
4
4
dnl Foundation, Inc.
5
 
 
6
 
dnl This file is free software, distributed under the terms of the GNU
7
 
dnl General Public License.  As a special exception to the GNU General
8
 
dnl Public License, this file may be distributed as part of a program
9
 
dnl that contains a configuration script generated by Autoconf, under
10
 
dnl the same distribution terms as the rest of that program.
 
5
dnl
 
6
dnl This file is free software; the Free Software Foundation
 
7
dnl gives unlimited permission to copy and/or distribute it,
 
8
dnl with or without modifications, as long as this notice is preserved.
11
9
 
12
10
AC_PREREQ(2.52)
13
11
 
15
13
dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
16
14
dnl have a function by that name in -linet that doesn't have anything
17
15
dnl to do with the function we need.
18
 
AC_DEFUN([AM_FUNC_GETLINE],
 
16
AC_DEFUN([gl_FUNC_GETLINE],
19
17
[
20
 
  dnl Persuade glibc <stdio.h> to declare getline() and getdelim().
 
18
  AC_LIBSOURCES([getline.c, getline.h])
 
19
 
 
20
  dnl Persuade glibc <stdio.h> to declare getline().
21
21
  AC_REQUIRE([AC_GNU_SOURCE])
22
22
 
23
 
  am_getline_needs_run_time_check=no
 
23
  AC_CHECK_DECLS([getline])
 
24
 
 
25
  gl_getline_needs_run_time_check=no
24
26
  AC_CHECK_FUNC(getline,
25
27
                dnl Found it in some library.  Verify that it works.
26
 
                am_getline_needs_run_time_check=yes,
 
28
                gl_getline_needs_run_time_check=yes,
27
29
                am_cv_func_working_getline=no)
28
 
  if test $am_getline_needs_run_time_check = yes; then
 
30
  if test $gl_getline_needs_run_time_check = yes; then
29
31
    AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
30
32
    [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
31
33
    AC_TRY_RUN([
57
59
      [Define to a replacement function name for getline().])
58
60
    AC_LIBOBJ(getline)
59
61
 
60
 
    # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
61
 
    # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
62
 
    case " $LIB@&t@OBJS " in
63
 
    *" getndelim2.$ac_objext "* ) ;;
64
 
    *) AC_LIBOBJ(getndelim2);;
65
 
    esac
66
 
 
67
62
    gl_PREREQ_GETLINE
68
 
    gl_PREREQ_GETNDELIM2
69
63
  fi
70
64
])
71
65
 
72
66
# Prerequisites of lib/getline.c.
73
67
AC_DEFUN([gl_PREREQ_GETLINE],
74
68
[
75
 
  AC_CHECK_FUNCS(getdelim)
 
69
  gl_FUNC_GETDELIM
76
70
])