aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-06-15 15:27:54 -0700
committerPaul Eggert2011-06-15 15:27:54 -0700
commit8aeb5be96aa28c4770299a54758a8fb339993a97 (patch)
treedbf3821be90ab7a043a6552aa9b838a6259677e4
parent4bba86e6210a74326e843a8fdc8409127105e1fe (diff)
downloademacs-8aeb5be96aa28c4770299a54758a8fb339993a97.tar.gz
emacs-8aeb5be96aa28c4770299a54758a8fb339993a97.zip
Merge from gnulib: lib/gnulib.mk, m4/*.m4.
-rw-r--r--ChangeLog7
-rw-r--r--lib/gnulib.mk20
-rw-r--r--m4/c-strtod.m410
-rw-r--r--m4/filemode.m43
-rw-r--r--m4/getloadavg.m46
-rw-r--r--m4/getopt.m439
-rw-r--r--m4/gl-comp.m447
-rw-r--r--m4/lstat.m435
-rw-r--r--m4/md5.m44
-rw-r--r--m4/mktime.m456
-rw-r--r--m4/readlink.m46
-rw-r--r--m4/sha1.m44
-rw-r--r--m4/stat.m414
-rw-r--r--m4/strftime.m44
-rw-r--r--m4/strtoull.m45
-rw-r--r--m4/strtoumax.m47
-rw-r--r--m4/symlink.m44
-rw-r--r--m4/time_r.m44
18 files changed, 146 insertions, 129 deletions
diff --git a/ChangeLog b/ChangeLog
index c6531ffba3f..f9d1c974359 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
12011-06-15 Paul Eggert <eggert@cs.ucla.edu> 12011-06-15 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib. 3 * lib/ftoastr.c, lib/stdio.in.h, lib/verify.h:
4 * lib/gnulib.mk, m4/c-strtod.m4, m4/filemode.m4, m4/getloadavg.m4:
5 * m4/getopt.m4, m4/gl-comp.m4, m4/lstat.m4, m4/md5.m4, m4/mktime.m4:
6 * m4/readlink.m4, m4/sha1.m4, m4/stat.m4, m4/strftime.m4:
7 * m4/strtoull.m4, m4/strtoumax.m4, m4/symlink.m4, m4/time_r.m4:
8 Merge from gnulib.
4 9
52011-06-14 Jan Djärv <jan.h.d@swipnet.se> 102011-06-14 Jan Djärv <jan.h.d@swipnet.se>
6 11
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index 5f24b81aea7..284d273b266 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -87,19 +87,17 @@ EXTRA_DIST += careadlinkat.h
87 87
88## begin gnulib module crypto/md5 88## begin gnulib module crypto/md5
89 89
90libgnu_a_SOURCES += md5.c
90 91
91EXTRA_DIST += md5.c md5.h 92EXTRA_DIST += md5.h
92
93EXTRA_libgnu_a_SOURCES += md5.c
94 93
95## end gnulib module crypto/md5 94## end gnulib module crypto/md5
96 95
97## begin gnulib module crypto/sha1 96## begin gnulib module crypto/sha1
98 97
98libgnu_a_SOURCES += sha1.c
99 99
100EXTRA_DIST += sha1.c sha1.h 100EXTRA_DIST += sha1.h
101
102EXTRA_libgnu_a_SOURCES += sha1.c
103 101
104## end gnulib module crypto/sha1 102## end gnulib module crypto/sha1
105 103
@@ -124,10 +122,9 @@ EXTRA_libgnu_a_SOURCES += ftoastr.c
124 122
125## begin gnulib module filemode 123## begin gnulib module filemode
126 124
125libgnu_a_SOURCES += filemode.c
127 126
128EXTRA_DIST += filemode.c filemode.h 127EXTRA_DIST += filemode.h
129
130EXTRA_libgnu_a_SOURCES += filemode.c
131 128
132## end gnulib module filemode 129## end gnulib module filemode
133 130
@@ -616,10 +613,9 @@ EXTRA_DIST += stdlib.in.h
616 613
617## begin gnulib module strftime 614## begin gnulib module strftime
618 615
616libgnu_a_SOURCES += strftime.c
619 617
620EXTRA_DIST += strftime.c strftime.h 618EXTRA_DIST += strftime.h
621
622EXTRA_libgnu_a_SOURCES += strftime.c
623 619
624## end gnulib module strftime 620## end gnulib module strftime
625 621
diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4
index d5f5f502cba..20c65b82584 100644
--- a/m4/c-strtod.m4
+++ b/m4/c-strtod.m4
@@ -1,4 +1,4 @@
1# c-strtod.m4 serial 12 1# c-strtod.m4 serial 14
2 2
3# Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
@@ -33,11 +33,9 @@ AC_DEFUN([gl_C99_STRTOLD],
33 fi 33 fi
34]) 34])
35 35
36dnl Prerequisites of lib/c-strtod.c.
36AC_DEFUN([gl_C_STRTOD], 37AC_DEFUN([gl_C_STRTOD],
37[ 38[
38 AC_LIBOBJ([c-strtod])
39
40 dnl Prerequisites of lib/c-strtod.c.
41 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 39 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
42 AC_CHECK_FUNCS([strtod_l]) 40 AC_CHECK_FUNCS([strtod_l])
43 41
@@ -45,11 +43,9 @@ AC_DEFUN([gl_C_STRTOD],
45 : 43 :
46]) 44])
47 45
46dnl Prerequisites of lib/c-strtold.c.
48AC_DEFUN([gl_C_STRTOLD], 47AC_DEFUN([gl_C_STRTOLD],
49[ 48[
50 AC_LIBOBJ([c-strtold])
51
52 dnl Prerequisites of lib/c-strtold.c.
53 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 49 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
54 AC_REQUIRE([gl_C99_STRTOLD]) 50 AC_REQUIRE([gl_C99_STRTOLD])
55 AC_CHECK_FUNCS([strtold_l]) 51 AC_CHECK_FUNCS([strtold_l])
diff --git a/m4/filemode.m4 b/m4/filemode.m4
index 4147fd01e28..8f6e8bc3bb0 100644
--- a/m4/filemode.m4
+++ b/m4/filemode.m4
@@ -1,4 +1,4 @@
1# filemode.m4 serial 7 1# filemode.m4 serial 8
2dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,5 @@ dnl with or without modifications, as long as this notice is preserved.
7AC_DEFUN([gl_FILEMODE], 7AC_DEFUN([gl_FILEMODE],
8[ 8[
9 AC_REQUIRE([AC_STRUCT_ST_DM_MODE]) 9 AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
10 AC_LIBOBJ([filemode])
11 AC_CHECK_DECLS_ONCE([strmode]) 10 AC_CHECK_DECLS_ONCE([strmode])
12]) 11])
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index 0e44b694e40..967dfd797fb 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -7,7 +7,7 @@
7# gives unlimited permission to copy and/or distribute it, 7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved. 8# with or without modifications, as long as this notice is preserved.
9 9
10#serial 3 10#serial 4
11 11
12# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. 12# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
13# New applications should use gl_GETLOADAVG instead. 13# New applications should use gl_GETLOADAVG instead.
@@ -24,6 +24,7 @@ gl_save_LIBS=$LIBS
24 24
25# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, 25# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
26# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. 26# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
27HAVE_GETLOADAVG=1
27AC_CHECK_FUNC([getloadavg], [], 28AC_CHECK_FUNC([getloadavg], [],
28 [gl_have_func=no 29 [gl_have_func=no
29 30
@@ -52,8 +53,7 @@ AC_CHECK_FUNC([getloadavg], [],
52 53
53 # Set up the replacement function if necessary. 54 # Set up the replacement function if necessary.
54 if test $gl_have_func = no; then 55 if test $gl_have_func = no; then
55 AC_LIBOBJ([getloadavg]) 56 HAVE_GETLOADAVG=0
56 gl_PREREQ_GETLOADAVG
57 fi]) 57 fi])
58 58
59if test "x$gl_save_LIBS" = x; then 59if test "x$gl_save_LIBS" = x; then
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 035a530df2d..4d8450ff907 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,4 +1,4 @@
1# getopt.m4 serial 34 1# getopt.m4 serial 35
2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -9,10 +9,25 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
9[ 9[
10 m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) 10 m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
11 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) 11 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
12 gl_GETOPT_IFELSE([ 12 dnl Other modules can request the gnulib implementation of the getopt
13 gl_REPLACE_GETOPT 13 dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
14 ], 14 dnl argp.m4 does this.
15 []) 15 m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
16 gl_GETOPT_IFELSE([], [])
17 REPLACE_GETOPT=1
18 ], [
19 REPLACE_GETOPT=0
20 gl_GETOPT_IFELSE([
21 REPLACE_GETOPT=1
22 ],
23 [])
24 ])
25 if test $REPLACE_GETOPT = 1; then
26 dnl Arrange for getopt.h to be created.
27 gl_GETOPT_SUBSTITUTE_HEADER
28 dnl Arrange for unistd.h to include getopt.h.
29 GNULIB_UNISTD_H_GETOPT=1
30 fi
16]) 31])
17 32
18# Request a POSIX compliant getopt function with GNU extensions (such as 33# Request a POSIX compliant getopt function with GNU extensions (such as
@@ -25,20 +40,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU],
25 AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) 40 AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
26]) 41])
27 42
28# Request the gnulib implementation of the getopt functions unconditionally.
29# argp.m4 uses this.
30AC_DEFUN([gl_REPLACE_GETOPT],
31[
32 dnl Arrange for getopt.h to be created.
33 gl_GETOPT_SUBSTITUTE_HEADER
34 dnl Arrange for unistd.h to include getopt.h.
35 GNULIB_UNISTD_H_GETOPT=1
36 dnl Arrange to compile the getopt implementation.
37 AC_LIBOBJ([getopt])
38 AC_LIBOBJ([getopt1])
39 gl_PREREQ_GETOPT
40])
41
42# emacs' configure.in uses this. 43# emacs' configure.in uses this.
43AC_DEFUN([gl_GETOPT_IFELSE], 44AC_DEFUN([gl_GETOPT_IFELSE],
44[ 45[
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4
index cb9f11a6284..b170693ffea 100644
--- a/m4/gl-comp.m4
+++ b/m4/gl-comp.m4
@@ -97,18 +97,44 @@ gl_SHA1
97AC_REQUIRE([gl_C99_STRTOLD]) 97AC_REQUIRE([gl_C99_STRTOLD])
98gl_FILEMODE 98gl_FILEMODE
99gl_GETLOADAVG 99gl_GETLOADAVG
100if test $HAVE_GETLOADAVG = 0; then
101 AC_LIBOBJ([getloadavg])
102 gl_PREREQ_GETLOADAVG
103fi
100gl_STDLIB_MODULE_INDICATOR([getloadavg]) 104gl_STDLIB_MODULE_INDICATOR([getloadavg])
101gl_FUNC_GETOPT_GNU 105gl_FUNC_GETOPT_GNU
106if test $REPLACE_GETOPT = 1; then
107 AC_LIBOBJ([getopt])
108 AC_LIBOBJ([getopt1])
109 gl_PREREQ_GETOPT
110fi
102gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) 111gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
103gl_FUNC_GETOPT_POSIX 112gl_FUNC_GETOPT_POSIX
113if test $REPLACE_GETOPT = 1; then
114 AC_LIBOBJ([getopt])
115 AC_LIBOBJ([getopt1])
116 gl_PREREQ_GETOPT
117fi
104AC_REQUIRE([AC_C_INLINE]) 118AC_REQUIRE([AC_C_INLINE])
105gl_INTTYPES_INCOMPLETE 119gl_INTTYPES_INCOMPLETE
106gl_FUNC_LSTAT 120gl_FUNC_LSTAT
121if test $REPLACE_LSTAT = 1; then
122 AC_LIBOBJ([lstat])
123 gl_PREREQ_LSTAT
124fi
107gl_SYS_STAT_MODULE_INDICATOR([lstat]) 125gl_SYS_STAT_MODULE_INDICATOR([lstat])
108gl_FUNC_MKTIME 126gl_FUNC_MKTIME
127if test $REPLACE_MKTIME = 1; then
128 AC_LIBOBJ([mktime])
129 gl_PREREQ_MKTIME
130fi
109gl_TIME_MODULE_INDICATOR([mktime]) 131gl_TIME_MODULE_INDICATOR([mktime])
110gl_MULTIARCH 132gl_MULTIARCH
111gl_FUNC_READLINK 133gl_FUNC_READLINK
134if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
135 AC_LIBOBJ([readlink])
136 gl_PREREQ_READLINK
137fi
112gl_UNISTD_MODULE_INDICATOR([readlink]) 138gl_UNISTD_MODULE_INDICATOR([readlink])
113gl_TYPE_SOCKLEN_T 139gl_TYPE_SOCKLEN_T
114gt_TYPE_SSIZE_T 140gt_TYPE_SSIZE_T
@@ -120,13 +146,24 @@ gl_STDIO_H
120gl_STDLIB_H 146gl_STDLIB_H
121gl_FUNC_GNU_STRFTIME 147gl_FUNC_GNU_STRFTIME
122gl_FUNC_STRTOUMAX 148gl_FUNC_STRTOUMAX
149if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
150 AC_LIBOBJ([strtoumax])
151 gl_PREREQ_STRTOUMAX
152fi
123gl_INTTYPES_MODULE_INDICATOR([strtoumax]) 153gl_INTTYPES_MODULE_INDICATOR([strtoumax])
124gl_FUNC_SYMLINK 154gl_FUNC_SYMLINK
155if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
156 AC_LIBOBJ([symlink])
157fi
125gl_UNISTD_MODULE_INDICATOR([symlink]) 158gl_UNISTD_MODULE_INDICATOR([symlink])
126gl_HEADER_SYS_STAT_H 159gl_HEADER_SYS_STAT_H
127AC_PROG_MKDIR_P 160AC_PROG_MKDIR_P
128gl_HEADER_TIME_H 161gl_HEADER_TIME_H
129gl_TIME_R 162gl_TIME_R
163if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
164 AC_LIBOBJ([time_r])
165 gl_PREREQ_TIME_R
166fi
130gl_TIME_MODULE_INDICATOR([time_r]) 167gl_TIME_MODULE_INDICATOR([time_r])
131gl_UNISTD_H 168gl_UNISTD_H
132 gl_gnulib_enabled_dosname=false 169 gl_gnulib_enabled_dosname=false
@@ -152,6 +189,10 @@ AC_SUBST([LTLIBINTL])
152 { 189 {
153 if ! $gl_gnulib_enabled_stat; then 190 if ! $gl_gnulib_enabled_stat; then
154gl_FUNC_STAT 191gl_FUNC_STAT
192if test $REPLACE_STAT = 1; then
193 AC_LIBOBJ([stat])
194 gl_PREREQ_STAT
195fi
155gl_SYS_STAT_MODULE_INDICATOR([stat]) 196gl_SYS_STAT_MODULE_INDICATOR([stat])
156 gl_gnulib_enabled_stat=true 197 gl_gnulib_enabled_stat=true
157 if $condition; then 198 if $condition; then
@@ -163,6 +204,10 @@ gl_SYS_STAT_MODULE_INDICATOR([stat])
163 { 204 {
164 if ! $gl_gnulib_enabled_strtoull; then 205 if ! $gl_gnulib_enabled_strtoull; then
165gl_FUNC_STRTOULL 206gl_FUNC_STRTOULL
207if test $HAVE_STRTOULL = 0; then
208 AC_LIBOBJ([strtoull])
209 gl_PREREQ_STRTOULL
210fi
166gl_STDLIB_MODULE_INDICATOR([strtoull]) 211gl_STDLIB_MODULE_INDICATOR([strtoull])
167 gl_gnulib_enabled_strtoull=true 212 gl_gnulib_enabled_strtoull=true
168 fi 213 fi
@@ -173,7 +218,7 @@ gl_STDLIB_MODULE_INDICATOR([strtoull])
173 gl_gnulib_enabled_verify=true 218 gl_gnulib_enabled_verify=true
174 fi 219 fi
175 } 220 }
176 if test $GNULIB_UNISTD_H_GETOPT = 1; then 221 if test $REPLACE_GETOPT = 1; then
177 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 222 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
178 fi 223 fi
179 if test $REPLACE_LSTAT = 1; then 224 if test $REPLACE_LSTAT = 1; then
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index b9b22a6b20e..72c76c6cf3b 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,4 +1,4 @@
1# serial 21 1# serial 22
2 2
3# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc. 3# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
4# 4#
@@ -16,23 +16,27 @@ AC_DEFUN([gl_FUNC_LSTAT],
16 AC_CHECK_FUNCS_ONCE([lstat]) 16 AC_CHECK_FUNCS_ONCE([lstat])
17 if test $ac_cv_func_lstat = yes; then 17 if test $ac_cv_func_lstat = yes; then
18 AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) 18 AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
19 if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then 19 if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
20 dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
21 REPLACE_LSTAT=1 20 REPLACE_LSTAT=1
22 fi 21 fi
23 # Prerequisites of lib/lstat.c.
24 AC_REQUIRE([AC_C_INLINE])
25 else 22 else
26 HAVE_LSTAT=0 23 HAVE_LSTAT=0
27 fi 24 fi
28]) 25])
29 26
30# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer 27# Prerequisites of lib/lstat.c.
31# maintained in Autoconf. 28AC_DEFUN([gl_PREREQ_LSTAT],
32AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
33[ 29[
30 AC_REQUIRE([AC_C_INLINE])
31 :
32])
33
34AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
35[
36 dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
37 dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
34 AC_CACHE_CHECK([whether lstat correctly handles trailing slash], 38 AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
35 [ac_cv_func_lstat_dereferences_slashed_symlink], 39 [gl_cv_func_lstat_dereferences_slashed_symlink],
36 [rm -f conftest.sym conftest.file 40 [rm -f conftest.sym conftest.file
37 echo >conftest.file 41 echo >conftest.file
38 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then 42 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
@@ -45,25 +49,22 @@ AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
45 have to compile and use the lstat wrapper. */ 49 have to compile and use the lstat wrapper. */
46 return lstat ("conftest.sym/", &sbuf) == 0; 50 return lstat ("conftest.sym/", &sbuf) == 0;
47 ]])], 51 ]])],
48 [ac_cv_func_lstat_dereferences_slashed_symlink=yes], 52 [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
49 [ac_cv_func_lstat_dereferences_slashed_symlink=no], 53 [gl_cv_func_lstat_dereferences_slashed_symlink=no],
50 [# When cross-compiling, be pessimistic so we will end up using the 54 [# When cross-compiling, be pessimistic so we will end up using the
51 # replacement version of lstat that checks for trailing slashes and 55 # replacement version of lstat that checks for trailing slashes and
52 # calls lstat a second time when necessary. 56 # calls lstat a second time when necessary.
53 ac_cv_func_lstat_dereferences_slashed_symlink=no 57 gl_cv_func_lstat_dereferences_slashed_symlink=no
54 ]) 58 ])
55 else 59 else
56 # If the 'ln -s' command failed, then we probably don't even 60 # If the 'ln -s' command failed, then we probably don't even
57 # have an lstat function. 61 # have an lstat function.
58 ac_cv_func_lstat_dereferences_slashed_symlink=no 62 gl_cv_func_lstat_dereferences_slashed_symlink=no
59 fi 63 fi
60 rm -f conftest.sym conftest.file 64 rm -f conftest.sym conftest.file
61 ]) 65 ])
62 test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && 66 test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
63 AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], 67 AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
64 [Define to 1 if `lstat' dereferences a symlink specified 68 [Define to 1 if `lstat' dereferences a symlink specified
65 with a trailing slash.]) 69 with a trailing slash.])
66 if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
67 AC_LIBOBJ([lstat])
68 fi
69]) 70])
diff --git a/m4/md5.m4 b/m4/md5.m4
index ce7671d6cea..4b41a85b354 100644
--- a/m4/md5.m4
+++ b/m4/md5.m4
@@ -1,4 +1,4 @@
1# md5.m4 serial 11 1# md5.m4 serial 12
2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -6,8 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
6 6
7AC_DEFUN([gl_MD5], 7AC_DEFUN([gl_MD5],
8[ 8[
9 AC_LIBOBJ([md5])
10
11 dnl Prerequisites of lib/md5.c. 9 dnl Prerequisites of lib/md5.c.
12 AC_REQUIRE([gl_BIGENDIAN]) 10 AC_REQUIRE([gl_BIGENDIAN])
13 AC_REQUIRE([AC_C_INLINE]) 11 AC_REQUIRE([AC_C_INLINE])
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 01167a1ec0e..8ed6d5d2a30 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
1# serial 20 1# serial 21
2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
@@ -7,21 +7,24 @@ dnl with or without modifications, as long as this notice is preserved.
7 7
8dnl From Jim Meyering. 8dnl From Jim Meyering.
9 9
10# Redefine AC_FUNC_MKTIME, because it is no longer maintained in Autoconf. 10AC_DEFUN([gl_FUNC_MKTIME],
11# AC_FUNC_MKTIME 11[
12# -------------- 12 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
13AC_DEFUN([AC_FUNC_MKTIME], 13
14[AC_CHECK_HEADERS_ONCE([unistd.h]) 14 dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained
15AC_CHECK_FUNCS_ONCE([alarm]) 15 dnl in Autoconf and because it invokes AC_LIBOBJ.
16AC_REQUIRE([gl_MULTIARCH]) 16 AC_CHECK_HEADERS_ONCE([unistd.h])
17if test $APPLE_UNIVERSAL_BUILD = 1; then 17 AC_CHECK_FUNCS_ONCE([alarm])
18 # A universal build on Apple MacOS X platforms. 18 AC_REQUIRE([gl_MULTIARCH])
19 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. 19 if test $APPLE_UNIVERSAL_BUILD = 1; then
20 # But we need a configuration result that is valid in both modes. 20 # A universal build on Apple MacOS X platforms.
21 ac_cv_func_working_mktime=no 21 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
22fi 22 # But we need a configuration result that is valid in both modes.
23AC_CACHE_CHECK([for working mktime], [ac_cv_func_working_mktime], 23 gl_cv_func_working_mktime=no
24[AC_RUN_IFELSE([AC_LANG_SOURCE( 24 fi
25 AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime],
26 [AC_RUN_IFELSE(
27 [AC_LANG_SOURCE(
25[[/* Test program from Paul Eggert and Tony Leneis. */ 28[[/* Test program from Paul Eggert and Tony Leneis. */
26#include <limits.h> 29#include <limits.h>
27#include <stdlib.h> 30#include <stdlib.h>
@@ -213,22 +216,13 @@ main ()
213 result |= 64; 216 result |= 64;
214 return result; 217 return result;
215}]])], 218}]])],
216 [ac_cv_func_working_mktime=yes], 219 [gl_cv_func_working_mktime=yes],
217 [ac_cv_func_working_mktime=no], 220 [gl_cv_func_working_mktime=no],
218 [ac_cv_func_working_mktime=no])]) 221 [gl_cv_func_working_mktime=no])
219if test $ac_cv_func_working_mktime = no; then 222 ])
220 AC_LIBOBJ([mktime])
221fi
222])# AC_FUNC_MKTIME
223 223
224AC_DEFUN([gl_FUNC_MKTIME], 224 if test $gl_cv_func_working_mktime = no; then
225[
226 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
227 AC_FUNC_MKTIME
228 dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ([mktime]).
229 if test $ac_cv_func_working_mktime = no; then
230 REPLACE_MKTIME=1 225 REPLACE_MKTIME=1
231 gl_PREREQ_MKTIME
232 else 226 else
233 REPLACE_MKTIME=0 227 REPLACE_MKTIME=0
234 fi 228 fi
@@ -245,8 +239,6 @@ AC_DEFUN([gl_FUNC_MKTIME_INTERNAL], [
245 [dnl mktime works but it doesn't export __mktime_internal, 239 [dnl mktime works but it doesn't export __mktime_internal,
246 dnl so we need to substitute our own mktime implementation. 240 dnl so we need to substitute our own mktime implementation.
247 REPLACE_MKTIME=1 241 REPLACE_MKTIME=1
248 AC_LIBOBJ([mktime])
249 gl_PREREQ_MKTIME
250 ]) 242 ])
251 fi 243 fi
252]) 244])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index ec737d3f408..91d7df3c91c 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,4 +1,4 @@
1# readlink.m4 serial 10 1# readlink.m4 serial 11
2dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -10,8 +10,6 @@ AC_DEFUN([gl_FUNC_READLINK],
10 AC_CHECK_FUNCS_ONCE([readlink]) 10 AC_CHECK_FUNCS_ONCE([readlink])
11 if test $ac_cv_func_readlink = no; then 11 if test $ac_cv_func_readlink = no; then
12 HAVE_READLINK=0 12 HAVE_READLINK=0
13 AC_LIBOBJ([readlink])
14 gl_PREREQ_READLINK
15 else 13 else
16 AC_CACHE_CHECK([whether readlink signature is correct], 14 AC_CACHE_CHECK([whether readlink signature is correct],
17 [gl_cv_decl_readlink_works], 15 [gl_cv_decl_readlink_works],
@@ -40,10 +38,8 @@ AC_DEFUN([gl_FUNC_READLINK],
40 AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink 38 AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
41 fails to recognize a trailing slash.]) 39 fails to recognize a trailing slash.])
42 REPLACE_READLINK=1 40 REPLACE_READLINK=1
43 AC_LIBOBJ([readlink])
44 elif test "$gl_cv_decl_readlink_works" != yes; then 41 elif test "$gl_cv_decl_readlink_works" != yes; then
45 REPLACE_READLINK=1 42 REPLACE_READLINK=1
46 AC_LIBOBJ([readlink])
47 fi 43 fi
48 fi 44 fi
49]) 45])
diff --git a/m4/sha1.m4 b/m4/sha1.m4
index e40505f2f70..b8f5c1dcafe 100644
--- a/m4/sha1.m4
+++ b/m4/sha1.m4
@@ -1,4 +1,4 @@
1# sha1.m4 serial 9 1# sha1.m4 serial 10
2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -6,8 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
6 6
7AC_DEFUN([gl_SHA1], 7AC_DEFUN([gl_SHA1],
8[ 8[
9 AC_LIBOBJ([sha1])
10
11 dnl Prerequisites of lib/sha1.c. 9 dnl Prerequisites of lib/sha1.c.
12 AC_REQUIRE([gl_BIGENDIAN]) 10 AC_REQUIRE([gl_BIGENDIAN])
13 AC_REQUIRE([AC_C_INLINE]) 11 AC_REQUIRE([AC_C_INLINE])
diff --git a/m4/stat.m4 b/m4/stat.m4
index 27f82d5a91a..c63f59fd533 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,4 +1,4 @@
1# serial 7 1# serial 8
2 2
3# Copyright (C) 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 2009-2011 Free Software Foundation, Inc.
4# 4#
@@ -58,9 +58,11 @@ AC_DEFUN([gl_FUNC_STAT],
58 AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs 58 AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
59 help when passed a file name with a trailing slash]);; 59 help when passed a file name with a trailing slash]);;
60 esac 60 esac
61 if test $REPLACE_STAT = 1; then 61])
62 AC_LIBOBJ([stat]) 62
63 dnl Prerequisites of lib/stat.c. 63# Prerequisites of lib/stat.c.
64 AC_REQUIRE([AC_C_INLINE]) 64AC_DEFUN([gl_PREREQ_STAT],
65 fi 65[
66 AC_REQUIRE([AC_C_INLINE])
67 :
66]) 68])
diff --git a/m4/strftime.m4 b/m4/strftime.m4
index d9de341bf6d..dd30ccfc054 100644
--- a/m4/strftime.m4
+++ b/m4/strftime.m4
@@ -1,4 +1,4 @@
1# serial 32 1# serial 33
2 2
3# Copyright (C) 1996-1997, 1999-2007, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 1996-1997, 1999-2007, 2009-2011 Free Software Foundation, Inc.
4# 4#
@@ -16,8 +16,6 @@ AC_DEFUN([gl_FUNC_GNU_STRFTIME],
16# These are the prerequisite macros for GNU's strftime.c replacement. 16# These are the prerequisite macros for GNU's strftime.c replacement.
17AC_DEFUN([gl_FUNC_STRFTIME], 17AC_DEFUN([gl_FUNC_STRFTIME],
18[ 18[
19 AC_LIBOBJ([strftime])
20
21 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. 19 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
22 AC_REQUIRE([AC_STRUCT_TIMEZONE]) 20 AC_REQUIRE([AC_STRUCT_TIMEZONE])
23 21
diff --git a/m4/strtoull.m4 b/m4/strtoull.m4
index abf607fd7b1..57ef75423df 100644
--- a/m4/strtoull.m4
+++ b/m4/strtoull.m4
@@ -1,4 +1,4 @@
1# strtoull.m4 serial 6 1# strtoull.m4 serial 7
2dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -11,10 +11,9 @@ AC_DEFUN([gl_FUNC_STRTOULL],
11 dnl unless the type 'unsigned long long int' exists. 11 dnl unless the type 'unsigned long long int' exists.
12 AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) 12 AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
13 if test "$ac_cv_type_unsigned_long_long_int" = yes; then 13 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
14 AC_REPLACE_FUNCS([strtoull]) 14 AC_CHECK_FUNCS([strtoull])
15 if test $ac_cv_func_strtoull = no; then 15 if test $ac_cv_func_strtoull = no; then
16 HAVE_STRTOULL=0 16 HAVE_STRTOULL=0
17 gl_PREREQ_STRTOULL
18 fi 17 fi
19 fi 18 fi
20]) 19])
diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
index 7fa563642a8..58b310de85a 100644
--- a/m4/strtoumax.m4
+++ b/m4/strtoumax.m4
@@ -1,4 +1,4 @@
1# strtoumax.m4 serial 9 1# strtoumax.m4 serial 10
2dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -12,10 +12,7 @@ AC_DEFUN([gl_FUNC_STRTOUMAX],
12 if test "$ac_cv_have_decl_strtoumax" != yes; then 12 if test "$ac_cv_have_decl_strtoumax" != yes; then
13 HAVE_DECL_STRTOUMAX=0 13 HAVE_DECL_STRTOUMAX=0
14 14
15 AC_REPLACE_FUNCS([strtoumax]) 15 AC_CHECK_FUNCS([strtoumax])
16 if test $ac_cv_func_strtoumax = no; then
17 gl_PREREQ_STRTOUMAX
18 fi
19 fi 16 fi
20]) 17])
21 18
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 917d5f0ec2c..680c14f6610 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,4 +1,4 @@
1# serial 4 1# serial 5
2# See if we need to provide symlink replacement. 2# See if we need to provide symlink replacement.
3 3
4dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. 4dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
@@ -17,7 +17,6 @@ AC_DEFUN([gl_FUNC_SYMLINK],
17 dnl and Solaris 9, we want to fix a bug with trailing slash handling. 17 dnl and Solaris 9, we want to fix a bug with trailing slash handling.
18 if test $ac_cv_func_symlink = no; then 18 if test $ac_cv_func_symlink = no; then
19 HAVE_SYMLINK=0 19 HAVE_SYMLINK=0
20 AC_LIBOBJ([symlink])
21 else 20 else
22 AC_CACHE_CHECK([whether symlink handles trailing slash correctly], 21 AC_CACHE_CHECK([whether symlink handles trailing slash correctly],
23 [gl_cv_func_symlink_works], 22 [gl_cv_func_symlink_works],
@@ -39,7 +38,6 @@ AC_DEFUN([gl_FUNC_SYMLINK],
39 rm -f conftest.f conftest.link conftest.lnk2]) 38 rm -f conftest.f conftest.link conftest.lnk2])
40 if test "$gl_cv_func_symlink_works" != yes; then 39 if test "$gl_cv_func_symlink_works" != yes; then
41 REPLACE_SYMLINK=1 40 REPLACE_SYMLINK=1
42 AC_LIBOBJ([symlink])
43 fi 41 fi
44 fi 42 fi
45]) 43])
diff --git a/m4/time_r.m4 b/m4/time_r.m4
index 9bb28005fc0..d646edc2d3c 100644
--- a/m4/time_r.m4
+++ b/m4/time_r.m4
@@ -50,10 +50,6 @@ AC_DEFUN([gl_TIME_R],
50 else 50 else
51 HAVE_LOCALTIME_R=0 51 HAVE_LOCALTIME_R=0
52 fi 52 fi
53 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
54 AC_LIBOBJ([time_r])
55 gl_PREREQ_TIME_R
56 fi
57]) 53])
58 54
59# Prerequisites of lib/time_r.c. 55# Prerequisites of lib/time_r.c.