diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/iconv.m4 | 24 | ||||
-rw-r--r-- | m4/lib-ld.m4 | 142 | ||||
-rw-r--r-- | m4/lib-prefix.m4 | 109 |
3 files changed, 113 insertions, 162 deletions
diff --git a/m4/iconv.m4 b/m4/iconv.m4 index bdafc54e..aa159c53 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 | |||
@@ -1,4 +1,4 @@ | |||
1 | # iconv.m4 serial 20 | 1 | # iconv.m4 serial 19 (gettext-0.18.2) |
2 | dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
@@ -258,18 +258,14 @@ size_t iconv(); | |||
258 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | 258 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
259 | AC_MSG_RESULT([ | 259 | AC_MSG_RESULT([ |
260 | $am_cv_proto_iconv]) | 260 | $am_cv_proto_iconv]) |
261 | else | 261 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], |
262 | dnl When compiling GNU libiconv on a system that does not have iconv yet, | 262 | [Define as const if the declaration of iconv() needs const.]) |
263 | dnl pick the POSIX compliant declaration without 'const'. | 263 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. |
264 | am_cv_proto_iconv_arg1="" | 264 | m4_ifdef([gl_ICONV_H_DEFAULTS], |
265 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | ||
266 | if test -n "$am_cv_proto_iconv_arg1"; then | ||
267 | ICONV_CONST="const" | ||
268 | fi | ||
269 | ]) | ||
265 | fi | 270 | fi |
266 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | ||
267 | [Define as const if the declaration of iconv() needs const.]) | ||
268 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | ||
269 | m4_ifdef([gl_ICONV_H_DEFAULTS], | ||
270 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | ||
271 | if test -n "$am_cv_proto_iconv_arg1"; then | ||
272 | ICONV_CONST="const" | ||
273 | fi | ||
274 | ]) | ||
275 | ]) | 271 | ]) |
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index 8b8a26e8..6209de65 100644 --- a/m4/lib-ld.m4 +++ b/m4/lib-ld.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # lib-ld.m4 serial 7 | 1 | # lib-ld.m4 serial 6 |
2 | dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -47,101 +47,73 @@ if test "${PATH_SEPARATOR+set}" != set; then | |||
47 | } | 47 | } |
48 | fi | 48 | fi |
49 | 49 | ||
50 | if test -n "$LD"; then | 50 | ac_prog=ld |
51 | AC_MSG_CHECKING([for ld]) | 51 | if test "$GCC" = yes; then |
52 | elif test "$GCC" = yes; then | 52 | # Check if gcc -print-prog-name=ld gives a path. |
53 | AC_MSG_CHECKING([for ld used by $CC]) | 53 | AC_MSG_CHECKING([for ld used by $CC]) |
54 | case $host in | ||
55 | *-*-mingw*) | ||
56 | # gcc leaves a trailing carriage return which upsets mingw | ||
57 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
58 | *) | ||
59 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
60 | esac | ||
61 | case $ac_prog in | ||
62 | # Accept absolute paths. | ||
63 | [[\\/]]* | ?:[[\\/]]*) | ||
64 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
65 | # Canonicalize the pathname of ld | ||
66 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` | ||
67 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do | ||
68 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | ||
69 | done | ||
70 | test -z "$LD" && LD="$ac_prog" | ||
71 | ;; | ||
72 | "") | ||
73 | # If it fails, then pretend we aren't using GCC. | ||
74 | ac_prog=ld | ||
75 | ;; | ||
76 | *) | ||
77 | # If it is relative, then search for the first ld in PATH. | ||
78 | with_gnu_ld=unknown | ||
79 | ;; | ||
80 | esac | ||
54 | elif test "$with_gnu_ld" = yes; then | 81 | elif test "$with_gnu_ld" = yes; then |
55 | AC_MSG_CHECKING([for GNU ld]) | 82 | AC_MSG_CHECKING([for GNU ld]) |
56 | else | 83 | else |
57 | AC_MSG_CHECKING([for non-GNU ld]) | 84 | AC_MSG_CHECKING([for non-GNU ld]) |
58 | fi | 85 | fi |
59 | if test -n "$LD"; then | 86 | AC_CACHE_VAL([acl_cv_path_LD], |
60 | # Let the user override the test with a path. | 87 | [if test -z "$LD"; then |
61 | : | 88 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
62 | else | 89 | for ac_dir in $PATH; do |
63 | AC_CACHE_VAL([acl_cv_path_LD], | 90 | IFS="$acl_save_ifs" |
64 | [ | 91 | test -z "$ac_dir" && ac_dir=. |
65 | acl_cv_path_LD= # Final result of this test | 92 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
66 | ac_prog=ld # Program to search in $PATH | 93 | acl_cv_path_LD="$ac_dir/$ac_prog" |
67 | if test "$GCC" = yes; then | 94 | # Check to see if the program is GNU ld. I'd rather use --version, |
68 | # Check if gcc -print-prog-name=ld gives a path. | 95 | # but apparently some variants of GNU ld only accept -v. |
69 | case $host in | 96 | # Break only if it was the GNU/non-GNU ld that we prefer. |
70 | *-*-mingw*) | 97 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in |
71 | # gcc leaves a trailing carriage return which upsets mingw | 98 | *GNU* | *'with BFD'*) |
72 | acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | 99 | test "$with_gnu_ld" != no && break |
73 | *) | 100 | ;; |
74 | acl_output=`($CC -print-prog-name=ld) 2>&5` ;; | 101 | *) |
75 | esac | 102 | test "$with_gnu_ld" != yes && break |
76 | case $acl_output in | 103 | ;; |
77 | # Accept absolute paths. | ||
78 | [[\\/]]* | ?:[[\\/]]*) | ||
79 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
80 | # Canonicalize the pathname of ld | ||
81 | acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` | ||
82 | while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do | ||
83 | acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` | ||
84 | done | ||
85 | # Got the pathname. No search in PATH is needed. | ||
86 | acl_cv_path_LD="$acl_output" | ||
87 | ac_prog= | ||
88 | ;; | ||
89 | "") | ||
90 | # If it fails, then pretend we aren't using GCC. | ||
91 | ;; | ||
92 | *) | ||
93 | # If it is relative, then search for the first ld in PATH. | ||
94 | with_gnu_ld=unknown | ||
95 | ;; | ||
96 | esac | 104 | esac |
97 | fi | 105 | fi |
98 | if test -n "$ac_prog"; then | 106 | done |
99 | # Search for $ac_prog in $PATH. | 107 | IFS="$acl_save_ifs" |
100 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | 108 | else |
101 | for ac_dir in $PATH; do | 109 | acl_cv_path_LD="$LD" # Let the user override the test with a path. |
102 | IFS="$acl_save_ifs" | 110 | fi]) |
103 | test -z "$ac_dir" && ac_dir=. | 111 | LD="$acl_cv_path_LD" |
104 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
105 | acl_cv_path_LD="$ac_dir/$ac_prog" | ||
106 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
107 | # but apparently some variants of GNU ld only accept -v. | ||
108 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
109 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | ||
110 | *GNU* | *'with BFD'*) | ||
111 | test "$with_gnu_ld" != no && break | ||
112 | ;; | ||
113 | *) | ||
114 | test "$with_gnu_ld" != yes && break | ||
115 | ;; | ||
116 | esac | ||
117 | fi | ||
118 | done | ||
119 | IFS="$acl_save_ifs" | ||
120 | fi | ||
121 | case $host in | ||
122 | *-*-aix*) | ||
123 | AC_EGREP_CPP([yes], | ||
124 | [#if defined __powerpc64__ || defined _ARCH_PPC64 | ||
125 | yes | ||
126 | #endif | ||
127 | ], | ||
128 | [# The compiler produces 64-bit code. Add option '-b64' so that the | ||
129 | # linker groks 64-bit object files. | ||
130 | case "$acl_cv_path_LD " in | ||
131 | *" -b64 "*) ;; | ||
132 | *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; | ||
133 | esac | ||
134 | ], []) | ||
135 | ;; | ||
136 | esac | ||
137 | ]) | ||
138 | LD="$acl_cv_path_LD" | ||
139 | fi | ||
140 | if test -n "$LD"; then | 112 | if test -n "$LD"; then |
141 | AC_MSG_RESULT([$LD]) | 113 | AC_MSG_RESULT([$LD]) |
142 | else | 114 | else |
143 | AC_MSG_RESULT([no]) | 115 | AC_MSG_RESULT([no]) |
144 | AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
145 | fi | 116 | fi |
117 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
146 | AC_LIB_PROG_LD_GNU | 118 | AC_LIB_PROG_LD_GNU |
147 | ]) | 119 | ]) |
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index a5d56c8d..6851031d 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # lib-prefix.m4 serial 8 | 1 | # lib-prefix.m4 serial 7 (gettext-0.18) |
2 | dnl Copyright (C) 2001-2005, 2008-2017 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -174,68 +174,51 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | |||
174 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or | 174 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or |
175 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. | 175 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. |
176 | AC_REQUIRE([AC_CANONICAL_HOST]) | 176 | AC_REQUIRE([AC_CANONICAL_HOST]) |
177 | dnl Allow the user to override the result by setting acl_cv_libdirstems. | 177 | acl_libdirstem=lib |
178 | AC_CACHE_CHECK([for the common suffixes of directories in the library search path], | 178 | acl_libdirstem2= |
179 | [acl_cv_libdirstems], | 179 | case "$host_os" in |
180 | [acl_libdirstem=lib | 180 | solaris*) |
181 | acl_libdirstem2= | 181 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment |
182 | case "$host_os" in | 182 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. |
183 | solaris*) | 183 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." |
184 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment | 184 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the |
185 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. | 185 | dnl symlink is missing, so we set acl_libdirstem2 too. |
186 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." | 186 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], |
187 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the | 187 | [AC_EGREP_CPP([sixtyfour bits], [ |
188 | dnl symlink is missing, so we set acl_libdirstem2 too. | ||
189 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], | ||
190 | [AC_EGREP_CPP([sixtyfour bits], [ | ||
191 | #ifdef _LP64 | 188 | #ifdef _LP64 |
192 | sixtyfour bits | 189 | sixtyfour bits |
193 | #endif | 190 | #endif |
194 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) | 191 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) |
195 | ]) | 192 | ]) |
196 | if test $gl_cv_solaris_64bit = yes; then | 193 | if test $gl_cv_solaris_64bit = yes; then |
197 | acl_libdirstem=lib/64 | 194 | acl_libdirstem=lib/64 |
198 | case "$host_cpu" in | 195 | case "$host_cpu" in |
199 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | 196 | sparc*) acl_libdirstem2=lib/sparcv9 ;; |
200 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | 197 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; |
201 | esac | 198 | esac |
202 | fi | 199 | fi |
203 | ;; | 200 | ;; |
204 | *) | 201 | *) |
205 | dnl The result is a property of the system. However, non-system | 202 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
206 | dnl compilers sometimes have odd library search paths. Therefore | 203 | if test -n "$searchpath"; then |
207 | dnl prefer asking /usr/bin/gcc, if available, rather than $CC. | 204 | acl_save_IFS="${IFS= }"; IFS=":" |
208 | searchpath=`(if test -f /usr/bin/gcc \ | 205 | for searchdir in $searchpath; do |
209 | && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ | 206 | if test -d "$searchdir"; then |
210 | LC_ALL=C /usr/bin/gcc -print-search-dirs; \ | 207 | case "$searchdir" in |
211 | else \ | 208 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; |
212 | LC_ALL=C $CC -print-search-dirs; \ | 209 | */../ | */.. ) |
213 | fi) 2>/dev/null \ | 210 | # Better ignore directories of this form. They are misleading. |
214 | | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | 211 | ;; |
215 | if test -n "$searchpath"; then | 212 | *) searchdir=`cd "$searchdir" && pwd` |
216 | acl_save_IFS="${IFS= }"; IFS=":" | 213 | case "$searchdir" in |
217 | for searchdir in $searchpath; do | 214 | */lib64 ) acl_libdirstem=lib64 ;; |
218 | if test -d "$searchdir"; then | 215 | esac ;; |
219 | case "$searchdir" in | 216 | esac |
220 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | 217 | fi |
221 | */../ | */.. ) | 218 | done |
222 | # Better ignore directories of this form. They are misleading. | 219 | IFS="$acl_save_IFS" |
223 | ;; | 220 | fi |
224 | *) searchdir=`cd "$searchdir" && pwd` | 221 | ;; |
225 | case "$searchdir" in | 222 | esac |
226 | */lib64 ) acl_libdirstem=lib64 ;; | 223 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" |
227 | esac ;; | ||
228 | esac | ||
229 | fi | ||
230 | done | ||
231 | IFS="$acl_save_IFS" | ||
232 | fi | ||
233 | ;; | ||
234 | esac | ||
235 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | ||
236 | acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" | ||
237 | ]) | ||
238 | # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. | ||
239 | acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` | ||
240 | acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` | ||
241 | ]) | 224 | ]) |