aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac198
-rw-r--r--m4/ac_define_dir.m470
-rw-r--r--m4/gettext.m458
-rw-r--r--m4/iconv.m4112
-rw-r--r--m4/lib-ld.m477
-rw-r--r--m4/lib-link.m445
-rw-r--r--m4/lib-prefix.m44
-rw-r--r--m4/libtool.m415
-rw-r--r--m4/nls.m42
-rw-r--r--m4/pkg.m4320
-rw-r--r--m4/po.m436
-rw-r--r--m4/progtest.m421
12 files changed, 726 insertions, 232 deletions
diff --git a/configure.ac b/configure.ac
index 5276c8b..5f6e8e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,17 +20,16 @@
20# Process this file with autoconf to produce a configure script. 20# Process this file with autoconf to produce a configure script.
21# 21#
22AC_PREREQ(2.61) 22AC_PREREQ(2.61)
23AC_INIT([gnunet-secushare],[0.0.0],[bug-gnunet@gnu.org]) 23AC_INIT([gnunet-secushare],[0.11.0],[bug-gnunet@gnu.org])
24AM_INIT_AUTOMAKE([gnunet-secushare], [0.0.0]) 24AM_INIT_AUTOMAKE
25AM_CONFIG_HEADER(gnunet_secushare_config.h) 25AC_CONFIG_HEADERS([gnunet_secushare_config.h])
26 26AC_CONFIG_MACRO_DIR([m4])
27AH_TOP([#define _GNU_SOURCE 1]) 27AH_TOP([#define _GNU_SOURCE 1])
28 28
29AC_ISC_POSIX 29AC_ISC_POSIX
30AC_PROG_AWK 30AC_PROG_AWK
31AC_PROG_CC 31AC_PROG_CC
32 32
33AC_PROG_MKDIR_P
34AC_PROG_CPP 33AC_PROG_CPP
35AC_PROG_INSTALL 34AC_PROG_INSTALL
36AC_PROG_LN_S 35AC_PROG_LN_S
@@ -40,6 +39,7 @@ AC_PROG_CC
40AM_PROG_CC_STDC 39AM_PROG_CC_STDC
41AC_HEADER_STDC 40AC_HEADER_STDC
42AC_CANONICAL_HOST 41AC_CANONICAL_HOST
42AC_SUBST(MKDIR_P)
43 43
44# dynamic libraries/plugins 44# dynamic libraries/plugins
45AC_DISABLE_STATIC 45AC_DISABLE_STATIC
@@ -168,6 +168,45 @@ then
168fi 168fi
169 169
170 170
171# gcov compilation
172AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
173AC_ARG_ENABLE([coverage],
174 AS_HELP_STRING([--enable-coverage],
175 [compile the library with code coverage support]),
176 [use_gcov=${enableval}],
177 [use_gcov=no])
178AC_MSG_RESULT($use_gcov)
179AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
180
181# should 'make check' run tests?
182AC_MSG_CHECKING(whether to run tests)
183AC_ARG_ENABLE([testruns],
184 [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])],
185 [enable_tests_run=${enableval}],
186 [enable_tests_run=yes])
187AC_MSG_RESULT($enable_test_run)
188AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
189
190
191
192# should gnunet-testing be compiled
193AC_MSG_CHECKING(wether to compile gnunet-testing)
194AC_ARG_ENABLE([testing],
195 [AS_HELP_STRING([--disable-testing], [do not build gnunet-testing])],
196 [enable_testing=${enableval}],
197 [enable_testing=yes])
198AC_MSG_RESULT($enable_testing)
199AM_CONDITIONAL([HAVE_TESTING], [test "x$enable_testing" = "xyes"])
200
201# should experimental code be compiled (code that may not yet compile)?
202AC_MSG_CHECKING(whether to compile experimental code)
203AC_ARG_ENABLE([experimental],
204 [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])],
205 [enable_experimental=${enableval}],
206 [enable_experimental=no])
207AC_MSG_RESULT($enable_experimental)
208AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
209
171 210
172# Linker hardening options 211# Linker hardening options
173# Currently these options are ELF specific - you can't use this with MacOSX 212# Currently these options are ELF specific - you can't use this with MacOSX
@@ -178,6 +217,155 @@ AC_ARG_ENABLE(linker-hardening,
178fi]) 217fi])
179 218
180 219
220SAVE_LDFLAGS=$LDFLAGS
221SAVE_CPPFLAGS=$CPPFLAGS
222
223# test for sqlite
224sqlite=false
225AC_MSG_CHECKING(for SQLite)
226AC_ARG_WITH(sqlite,
227 [ --with-sqlite=PFX base of SQLite installation],
228 [AC_MSG_RESULT("$with_sqlite")
229 case $with_sqlite in
230 no)
231 ;;
232 yes)
233 AC_CHECK_HEADERS(sqlite3.h,
234 sqlite=true)
235 ;;
236 *)
237 LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
238 CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
239 AC_CHECK_HEADERS(sqlite3.h,
240 EXT_LIB_PATH="-L$with_sqlite/lib $EXT_LIB_PATH"
241 SQLITE_LDFLAGS="-L$with_sqlite/lib"
242 SQLITE_CPPFLAGS="-I$with_sqlite/include"
243 sqlite=true)
244 LDFLAGS=$SAVE_LDFLAGS
245 CPPFLAGS=$SAVE_CPPFLAGS
246 ;;
247 esac
248 ],
249 [AC_MSG_RESULT([--with-sqlite not specified])
250 AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
251AM_CONDITIONAL(HAVE_SQLITE, test x$sqlite = xtrue)
252AC_SUBST(SQLITE_CPPFLAGS)
253AC_SUBST(SQLITE_LDFLAGS)
254
255LDFLAGS=$SAVE_LDFLAGS
256CPPFLAGS=$SAVE_CPPFLAGS
257
258# test for postgres
259postgres=false
260# even running the check for postgres breaks emscripten ...
261AS_IF([test "$taler_only" != yes],
262 [AX_LIB_POSTGRESQL([9.5],
263 [CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
264 AC_CHECK_HEADERS([libpq-fe.h],
265 postgres=true)
266 ],
267 [AC_MSG_RESULT([no postgres])])])
268AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue)
269
270
271LDFLAGS=$SAVE_LDFLAGS
272CPPFLAGS=$SAVE_CPPFLAGS
273
274# mysql & windows
275AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
276AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
277
278if test "$build_target" = "mingw"
279then
280 CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"
281fi
282
283# test for mysql
284mysql=false
285mysqlfail=false
286SAVE_LDFLAGS=$LDFLAGS
287SAVE_CPPFLAGS=$CPPFLAGS
288AC_MSG_CHECKING(for mysql)
289AC_ARG_WITH(mysql,
290 [ --with-mysql=PFX base of MySQL installation],
291 [AC_MSG_RESULT([$with_mysql])
292 case $with_mysql in
293 no)
294 ;;
295 yes|"")
296 AC_CHECK_HEADERS(mysql/mysql.h,
297 AC_CHECK_LIB(mysqlclient, mysql_init,
298
299 mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
300 ;;
301 *)
302 LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS"
303 CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
304 AC_CHECK_HEADERS(mysql/mysql.h,
305 AC_CHECK_LIB(mysqlclient, mysql_init,
306 MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql"
307 MYSQL_CPPFLAGS="-I$with_mysql/include"
308
309 mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
310 ;;
311 esac
312 ],
313 [AC_MSG_RESULT([--with-mysql not specified])
314 if test -d "/usr/lib64/mysql"; then
315 MYSQL_LIBDIR="/usr/lib64/mysql"
316 elif test -d "/usr/lib/mysql"; then
317 MYSQL_LIBDIR="/usr/lib/mysql"
318 else
319 MYSQL_LIBDIR="/usr/lib"
320 fi
321 LDFLAGS="-L$MYSQL_LIBDIR $LDFLAGS $ZLIBS"
322 AC_CHECK_LIB(mysqlclient, mysql_init,
323 [AC_CHECK_HEADERS(mysql/mysql.h,
324 MYSQL_LDFLAGS="-L$MYSQL_LIBDIR"
325 mysql=true
326
327 , [], [$CYGWIN_MYSQL_MAGIC])])
328 ])
329
330AC_SUBST(MYSQL_LDFLAGS)
331AC_SUBST(MYSQL_CPPFLAGS)
332
333# additional version check for mysql
334AC_ARG_ENABLE(mysql-version-check, [ --disable-mysql-version-check do not check MySQL version],, enable_mysql_version_check=yes)
335if test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"
336then
337 AC_MSG_CHECKING(mysql version)
338 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
339 [[$CYGWIN_MYSQL_MAGIC
340 #include <mysql/mysql.h>]],
341 [[
342 #if (MYSQL_VERSION_ID < 40100)
343 #error needs at least version >= 4.1
344 #endif
345 int main () { return 0; }
346 ]])
347 ],mysql=true,mysql=false)
348 if test "$mysql" = "false"
349 then
350 mysqlfail=true
351 AC_MSG_RESULT([fail, >= 4.1 required])
352 else
353 AC_MSG_RESULT(ok)
354 fi
355fi
356AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
357AM_CONDITIONAL(HAVE_MYSQLE, false)
358# restore LIBS
359LIBS=$SAVE_LIBS
360LDFLAGS=$SAVE_LDFLAGS
361CPPFLAGS=$SAVE_CPPFLAGS
362
363if test "$sqlite" = 0 -a "$mysql" = 0
364then
365 AC_MSG_ERROR([GNUnet requires SQLite or MySQL])
366fi
367
368
181extra_logging=GNUNET_NO 369extra_logging=GNUNET_NO
182AC_ARG_ENABLE([logging], 370AC_ARG_ENABLE([logging],
183 AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]), 371 AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]),
diff --git a/m4/ac_define_dir.m4 b/m4/ac_define_dir.m4
index f7e028f..c4f07c5 100644
--- a/m4/ac_define_dir.m4
+++ b/m4/ac_define_dir.m4
@@ -1,35 +1,35 @@
1dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) 1dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
2dnl 2dnl
3dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR 3dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR
4dnl variable, taking care of fixing up ${prefix} and such. 4dnl variable, taking care of fixing up ${prefix} and such.
5dnl 5dnl
6dnl VARNAME is offered as both a C preprocessor symbol, and an output 6dnl VARNAME is offered as both a C preprocessor symbol, and an output
7dnl variable. 7dnl variable.
8dnl 8dnl
9dnl Note that the 3 argument form is only supported with autoconf 2.13 9dnl Note that the 3 argument form is only supported with autoconf 2.13
10dnl and later (i.e. only where _AC_DEFINE supports 3 arguments). 10dnl and later (i.e. only where _AC_DEFINE supports 3 arguments).
11dnl 11dnl
12dnl Examples: 12dnl Examples:
13dnl 13dnl
14dnl AC_DEFINE_DIR(DATADIR, datadir) 14dnl AC_DEFINE_DIR(DATADIR, datadir)
15dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries]) 15dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
16dnl 16dnl
17dnl @category Misc 17dnl @category Misc
18dnl @author Stepan Kasal <kasal@ucw.cz> 18dnl @author Stepan Kasal <kasal@ucw.cz>
19dnl @author Andreas Schwab <schwab@suse.de> 19dnl @author Andreas Schwab <schwab@suse.de>
20dnl @author Guido Draheim <guidod@gmx.de> 20dnl @author Guido Draheim <guidod@gmx.de>
21dnl @author Alexandre Oliva 21dnl @author Alexandre Oliva
22dnl @version 2005-01-17 22dnl @version 2005-01-17
23dnl @license AllPermissive 23dnl @license AllPermissive
24 24
25AC_DEFUN([AC_DEFINE_DIR], [ 25AC_DEFUN([AC_DEFINE_DIR], [
26 prefix_NONE= 26 prefix_NONE=
27 exec_prefix_NONE= 27 exec_prefix_NONE=
28 test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix 28 test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
29 test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix 29 test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
30 eval ac_define_dir="\"[$]$2\"" 30 eval ac_define_dir="\"[$]$2\""
31 AC_SUBST($1, "$ac_define_dir") 31 AC_SUBST($1, "$ac_define_dir")
32 AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) 32 AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
33 test "$prefix_NONE" && prefix=NONE 33 test "$prefix_NONE" && prefix=NONE
34 test "$exec_prefix_NONE" && exec_prefix=NONE 34 test "$exec_prefix_NONE" && exec_prefix=NONE
35]) 35])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index f84e6a5..8d1f066 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -1,5 +1,5 @@
1# gettext.m4 serial 63 (gettext-0.18) 1# gettext.m4 serial 66 (gettext-0.18.2)
2dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2013 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -35,7 +35,7 @@ dnl will be ignored. If NEEDSYMBOL is specified and is
35dnl 'need-formatstring-macros', then GNU gettext implementations that don't 35dnl 'need-formatstring-macros', then GNU gettext implementations that don't
36dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. 36dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
37dnl INTLDIR is used to find the intl libraries. If empty, 37dnl INTLDIR is used to find the intl libraries. If empty,
38dnl the value `$(top_builddir)/intl/' is used. 38dnl the value '$(top_builddir)/intl/' is used.
39dnl 39dnl
40dnl The result of the configuration is one of three cases: 40dnl The result of the configuration is one of three cases:
41dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 41dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
@@ -97,7 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
97 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) 97 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
98 ]) 98 ])
99 99
100 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. 100 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
101 gt_INTL_MACOSX 101 gt_INTL_MACOSX
102 102
103 dnl Set USE_NLS. 103 dnl Set USE_NLS.
@@ -157,12 +157,18 @@ changequote([,])dnl
157 fi 157 fi
158 158
159 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], 159 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
160 [AC_TRY_LINK([#include <libintl.h> 160 [AC_LINK_IFELSE(
161 [AC_LANG_PROGRAM(
162 [[
163#include <libintl.h>
161$gt_revision_test_code 164$gt_revision_test_code
162extern int _nl_msg_cat_cntr; 165extern int _nl_msg_cat_cntr;
163extern int *_nl_domain_bindings;], 166extern int *_nl_domain_bindings;
164 [bindtextdomain ("", ""); 167 ]],
165return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], 168 [[
169bindtextdomain ("", "");
170return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
171 ]])],
166 [eval "$gt_func_gnugettext_libc=yes"], 172 [eval "$gt_func_gnugettext_libc=yes"],
167 [eval "$gt_func_gnugettext_libc=no"])]) 173 [eval "$gt_func_gnugettext_libc=no"])])
168 174
@@ -183,35 +189,47 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b
183 gt_save_LIBS="$LIBS" 189 gt_save_LIBS="$LIBS"
184 LIBS="$LIBS $LIBINTL" 190 LIBS="$LIBS $LIBINTL"
185 dnl Now see whether libintl exists and does not depend on libiconv. 191 dnl Now see whether libintl exists and does not depend on libiconv.
186 AC_TRY_LINK([#include <libintl.h> 192 AC_LINK_IFELSE(
193 [AC_LANG_PROGRAM(
194 [[
195#include <libintl.h>
187$gt_revision_test_code 196$gt_revision_test_code
188extern int _nl_msg_cat_cntr; 197extern int _nl_msg_cat_cntr;
189extern 198extern
190#ifdef __cplusplus 199#ifdef __cplusplus
191"C" 200"C"
192#endif 201#endif
193const char *_nl_expand_alias (const char *);], 202const char *_nl_expand_alias (const char *);
194 [bindtextdomain ("", ""); 203 ]],
195return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 204 [[
205bindtextdomain ("", "");
206return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
207 ]])],
196 [eval "$gt_func_gnugettext_libintl=yes"], 208 [eval "$gt_func_gnugettext_libintl=yes"],
197 [eval "$gt_func_gnugettext_libintl=no"]) 209 [eval "$gt_func_gnugettext_libintl=no"])
198 dnl Now see whether libintl exists and depends on libiconv. 210 dnl Now see whether libintl exists and depends on libiconv.
199 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then 211 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
200 LIBS="$LIBS $LIBICONV" 212 LIBS="$LIBS $LIBICONV"
201 AC_TRY_LINK([#include <libintl.h> 213 AC_LINK_IFELSE(
214 [AC_LANG_PROGRAM(
215 [[
216#include <libintl.h>
202$gt_revision_test_code 217$gt_revision_test_code
203extern int _nl_msg_cat_cntr; 218extern int _nl_msg_cat_cntr;
204extern 219extern
205#ifdef __cplusplus 220#ifdef __cplusplus
206"C" 221"C"
207#endif 222#endif
208const char *_nl_expand_alias (const char *);], 223const char *_nl_expand_alias (const char *);
209 [bindtextdomain ("", ""); 224 ]],
210return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], 225 [[
211 [LIBINTL="$LIBINTL $LIBICONV" 226bindtextdomain ("", "");
212 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 227return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
213 eval "$gt_func_gnugettext_libintl=yes" 228 ]])],
214 ]) 229 [LIBINTL="$LIBINTL $LIBICONV"
230 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
231 eval "$gt_func_gnugettext_libintl=yes"
232 ])
215 fi 233 fi
216 CPPFLAGS="$gt_save_CPPFLAGS" 234 CPPFLAGS="$gt_save_CPPFLAGS"
217 LIBS="$gt_save_LIBS"]) 235 LIBS="$gt_save_LIBS"])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index e2041b9..41aa44a 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,5 +1,5 @@
1# iconv.m4 serial 11 (gettext-0.18.1) 1# iconv.m4 serial 18 (gettext-0.18.2)
2dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002, 2007-2013 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -29,28 +29,36 @@ AC_DEFUN([AM_ICONV_LINK],
29 29
30 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 30 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
31 dnl because if the user has installed libiconv and not disabled its use 31 dnl because if the user has installed libiconv and not disabled its use
32 dnl via --without-libiconv-prefix, he wants to use it. The first 32 dnl via --without-libiconv-prefix, they want to use it. The first
33 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. 33 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
34 am_save_CPPFLAGS="$CPPFLAGS" 34 am_save_CPPFLAGS="$CPPFLAGS"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
36 36
37 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ 37 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
38 am_cv_func_iconv="no, consider installing GNU libiconv" 38 am_cv_func_iconv="no, consider installing GNU libiconv"
39 am_cv_lib_iconv=no 39 am_cv_lib_iconv=no
40 AC_TRY_LINK([#include <stdlib.h> 40 AC_LINK_IFELSE(
41#include <iconv.h>], 41 [AC_LANG_PROGRAM(
42 [iconv_t cd = iconv_open("",""); 42 [[
43 iconv(cd,NULL,NULL,NULL,NULL); 43#include <stdlib.h>
44 iconv_close(cd);], 44#include <iconv.h>
45 ]],
46 [[iconv_t cd = iconv_open("","");
47 iconv(cd,NULL,NULL,NULL,NULL);
48 iconv_close(cd);]])],
45 [am_cv_func_iconv=yes]) 49 [am_cv_func_iconv=yes])
46 if test "$am_cv_func_iconv" != yes; then 50 if test "$am_cv_func_iconv" != yes; then
47 am_save_LIBS="$LIBS" 51 am_save_LIBS="$LIBS"
48 LIBS="$LIBS $LIBICONV" 52 LIBS="$LIBS $LIBICONV"
49 AC_TRY_LINK([#include <stdlib.h> 53 AC_LINK_IFELSE(
50#include <iconv.h>], 54 [AC_LANG_PROGRAM(
51 [iconv_t cd = iconv_open("",""); 55 [[
52 iconv(cd,NULL,NULL,NULL,NULL); 56#include <stdlib.h>
53 iconv_close(cd);], 57#include <iconv.h>
58 ]],
59 [[iconv_t cd = iconv_open("","");
60 iconv(cd,NULL,NULL,NULL,NULL);
61 iconv_close(cd);]])],
54 [am_cv_lib_iconv=yes] 62 [am_cv_lib_iconv=yes]
55 [am_cv_func_iconv=yes]) 63 [am_cv_func_iconv=yes])
56 LIBS="$am_save_LIBS" 64 LIBS="$am_save_LIBS"
@@ -58,16 +66,19 @@ AC_DEFUN([AM_ICONV_LINK],
58 ]) 66 ])
59 if test "$am_cv_func_iconv" = yes; then 67 if test "$am_cv_func_iconv" = yes; then
60 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ 68 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
61 dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. 69 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
70 dnl Solaris 10.
62 am_save_LIBS="$LIBS" 71 am_save_LIBS="$LIBS"
63 if test $am_cv_lib_iconv = yes; then 72 if test $am_cv_lib_iconv = yes; then
64 LIBS="$LIBS $LIBICONV" 73 LIBS="$LIBS $LIBICONV"
65 fi 74 fi
66 AC_TRY_RUN([ 75 AC_RUN_IFELSE(
76 [AC_LANG_SOURCE([[
67#include <iconv.h> 77#include <iconv.h>
68#include <string.h> 78#include <string.h>
69int main () 79int main ()
70{ 80{
81 int result = 0;
71 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 82 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
72 returns. */ 83 returns. */
73 { 84 {
@@ -84,7 +95,8 @@ int main ()
84 (char **) &inptr, &inbytesleft, 95 (char **) &inptr, &inbytesleft,
85 &outptr, &outbytesleft); 96 &outptr, &outbytesleft);
86 if (res == 0) 97 if (res == 0)
87 return 1; 98 result |= 1;
99 iconv_close (cd_utf8_to_88591);
88 } 100 }
89 } 101 }
90 /* Test against Solaris 10 bug: Failures are not distinguishable from 102 /* Test against Solaris 10 bug: Failures are not distinguishable from
@@ -103,7 +115,27 @@ int main ()
103 (char **) &inptr, &inbytesleft, 115 (char **) &inptr, &inbytesleft,
104 &outptr, &outbytesleft); 116 &outptr, &outbytesleft);
105 if (res == 0) 117 if (res == 0)
106 return 1; 118 result |= 2;
119 iconv_close (cd_ascii_to_88591);
120 }
121 }
122 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
123 {
124 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
125 if (cd_88591_to_utf8 != (iconv_t)(-1))
126 {
127 static const char input[] = "\304";
128 static char buf[2] = { (char)0xDE, (char)0xAD };
129 const char *inptr = input;
130 size_t inbytesleft = 1;
131 char *outptr = buf;
132 size_t outbytesleft = 1;
133 size_t res = iconv (cd_88591_to_utf8,
134 (char **) &inptr, &inbytesleft,
135 &outptr, &outbytesleft);
136 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
137 result |= 4;
138 iconv_close (cd_88591_to_utf8);
107 } 139 }
108 } 140 }
109#if 0 /* This bug could be worked around by the caller. */ 141#if 0 /* This bug could be worked around by the caller. */
@@ -122,7 +154,8 @@ int main ()
122 (char **) &inptr, &inbytesleft, 154 (char **) &inptr, &inbytesleft,
123 &outptr, &outbytesleft); 155 &outptr, &outbytesleft);
124 if ((int)res > 0) 156 if ((int)res > 0)
125 return 1; 157 result |= 8;
158 iconv_close (cd_88591_to_utf8);
126 } 159 }
127 } 160 }
128#endif 161#endif
@@ -136,13 +169,19 @@ int main ()
136 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 169 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
137 /* Try HP-UX names. */ 170 /* Try HP-UX names. */
138 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 171 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
139 return 1; 172 result |= 16;
140 return 0; 173 return result;
141}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], 174}]])],
142 [case "$host_os" in 175 [am_cv_func_iconv_works=yes],
176 [am_cv_func_iconv_works=no],
177 [
178changequote(,)dnl
179 case "$host_os" in
143 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 180 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
144 *) am_cv_func_iconv_works="guessing yes" ;; 181 *) am_cv_func_iconv_works="guessing yes" ;;
145 esac]) 182 esac
183changequote([,])dnl
184 ])
146 LIBS="$am_save_LIBS" 185 LIBS="$am_save_LIBS"
147 ]) 186 ])
148 case "$am_cv_func_iconv_works" in 187 case "$am_cv_func_iconv_works" in
@@ -183,32 +222,47 @@ m4_define([gl_iconv_AC_DEFUN],
183 m4_version_prereq([2.64], 222 m4_version_prereq([2.64],
184 [[AC_DEFUN_ONCE( 223 [[AC_DEFUN_ONCE(
185 [$1], [$2])]], 224 [$1], [$2])]],
186 [[AC_DEFUN( 225 [m4_ifdef([gl_00GNULIB],
187 [$1], [$2])]])) 226 [[AC_DEFUN_ONCE(
227 [$1], [$2])]],
228 [[AC_DEFUN(
229 [$1], [$2])]])]))
188gl_iconv_AC_DEFUN([AM_ICONV], 230gl_iconv_AC_DEFUN([AM_ICONV],
189[ 231[
190 AM_ICONV_LINK 232 AM_ICONV_LINK
191 if test "$am_cv_func_iconv" = yes; then 233 if test "$am_cv_func_iconv" = yes; then
192 AC_MSG_CHECKING([for iconv declaration]) 234 AC_MSG_CHECKING([for iconv declaration])
193 AC_CACHE_VAL([am_cv_proto_iconv], [ 235 AC_CACHE_VAL([am_cv_proto_iconv], [
194 AC_TRY_COMPILE([ 236 AC_COMPILE_IFELSE(
237 [AC_LANG_PROGRAM(
238 [[
195#include <stdlib.h> 239#include <stdlib.h>
196#include <iconv.h> 240#include <iconv.h>
197extern 241extern
198#ifdef __cplusplus 242#ifdef __cplusplus
199"C" 243"C"
200#endif 244#endif
201#if defined(__STDC__) || defined(__cplusplus) 245#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
202size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 246size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
203#else 247#else
204size_t iconv(); 248size_t iconv();
205#endif 249#endif
206], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) 250 ]],
251 [[]])],
252 [am_cv_proto_iconv_arg1=""],
253 [am_cv_proto_iconv_arg1="const"])
207 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 254 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
208 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 255 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
209 AC_MSG_RESULT([ 256 AC_MSG_RESULT([
210 $am_cv_proto_iconv]) 257 $am_cv_proto_iconv])
211 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], 258 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
212 [Define as const if the declaration of iconv() needs const.]) 259 [Define as const if the declaration of iconv() needs const.])
260 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
261 m4_ifdef([gl_ICONV_H_DEFAULTS],
262 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
263 if test -n "$am_cv_proto_iconv_arg1"; then
264 ICONV_CONST="const"
265 fi
266 ])
213 fi 267 fi
214]) 268])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index ebb3052..c145e47 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,50 +1,56 @@
1# lib-ld.m4 serial 4 (gettext-0.18) 1# lib-ld.m4 serial 6
2dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003, 2009-2013 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7dnl Subroutines of libtool.m4, 7dnl Subroutines of libtool.m4,
8dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision 8dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
9dnl with libtool.m4. 9dnl collision with libtool.m4.
10 10
11dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. 11dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
12AC_DEFUN([AC_LIB_PROG_LD_GNU], 12AC_DEFUN([AC_LIB_PROG_LD_GNU],
13[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], 13[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
14[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 14[# I'd rather use --version here, but apparently some GNU lds only accept -v.
15case `$LD -v 2>&1 </dev/null` in 15case `$LD -v 2>&1 </dev/null` in
16*GNU* | *'with BFD'*) 16*GNU* | *'with BFD'*)
17 acl_cv_prog_gnu_ld=yes ;; 17 acl_cv_prog_gnu_ld=yes
18 ;;
18*) 19*)
19 acl_cv_prog_gnu_ld=no ;; 20 acl_cv_prog_gnu_ld=no
21 ;;
20esac]) 22esac])
21with_gnu_ld=$acl_cv_prog_gnu_ld 23with_gnu_ld=$acl_cv_prog_gnu_ld
22]) 24])
23 25
24dnl From libtool-1.4. Sets the variable LD. 26dnl From libtool-2.4. Sets the variable LD.
25AC_DEFUN([AC_LIB_PROG_LD], 27AC_DEFUN([AC_LIB_PROG_LD],
26[AC_ARG_WITH([gnu-ld], 28[AC_REQUIRE([AC_PROG_CC])dnl
27[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
28test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
29AC_REQUIRE([AC_PROG_CC])dnl
30AC_REQUIRE([AC_CANONICAL_HOST])dnl 29AC_REQUIRE([AC_CANONICAL_HOST])dnl
30
31AC_ARG_WITH([gnu-ld],
32 [AS_HELP_STRING([--with-gnu-ld],
33 [assume the C compiler uses GNU ld [default=no]])],
34 [test "$withval" = no || with_gnu_ld=yes],
35 [with_gnu_ld=no])dnl
36
31# Prepare PATH_SEPARATOR. 37# Prepare PATH_SEPARATOR.
32# The user is always right. 38# The user is always right.
33if test "${PATH_SEPARATOR+set}" != set; then 39if test "${PATH_SEPARATOR+set}" != set; then
34 echo "#! /bin/sh" >conf$$.sh 40 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35 echo "exit 0" >>conf$$.sh 41 # contains only /bin. Note that ksh looks also at the FPATH variable,
36 chmod +x conf$$.sh 42 # so we have to set that as well for the test.
37 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 43 PATH_SEPARATOR=:
38 PATH_SEPARATOR=';' 44 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39 else 45 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
40 PATH_SEPARATOR=: 46 || PATH_SEPARATOR=';'
41 fi 47 }
42 rm -f conf$$.sh
43fi 48fi
49
44ac_prog=ld 50ac_prog=ld
45if test "$GCC" = yes; then 51if test "$GCC" = yes; then
46 # Check if gcc -print-prog-name=ld gives a path. 52 # Check if gcc -print-prog-name=ld gives a path.
47 AC_MSG_CHECKING([for ld used by GCC]) 53 AC_MSG_CHECKING([for ld used by $CC])
48 case $host in 54 case $host in
49 *-*-mingw*) 55 *-*-mingw*)
50 # gcc leaves a trailing carriage return which upsets mingw 56 # gcc leaves a trailing carriage return which upsets mingw
@@ -54,11 +60,11 @@ if test "$GCC" = yes; then
54 esac 60 esac
55 case $ac_prog in 61 case $ac_prog in
56 # Accept absolute paths. 62 # Accept absolute paths.
57 [[\\/]* | [A-Za-z]:[\\/]*)] 63 [[\\/]]* | ?:[[\\/]]*)
58 [re_direlt='/[^/][^/]*/\.\./'] 64 re_direlt='/[[^/]][[^/]]*/\.\./'
59 # Canonicalize the path of ld 65 # Canonicalize the pathname of ld
60 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 66 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
61 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 67 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
62 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 68 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
63 done 69 done
64 test -z "$LD" && LD="$ac_prog" 70 test -z "$LD" && LD="$ac_prog"
@@ -79,23 +85,26 @@ else
79fi 85fi
80AC_CACHE_VAL([acl_cv_path_LD], 86AC_CACHE_VAL([acl_cv_path_LD],
81[if test -z "$LD"; then 87[if test -z "$LD"; then
82 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 88 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
83 for ac_dir in $PATH; do 89 for ac_dir in $PATH; do
90 IFS="$acl_save_ifs"
84 test -z "$ac_dir" && ac_dir=. 91 test -z "$ac_dir" && ac_dir=.
85 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 92 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
86 acl_cv_path_LD="$ac_dir/$ac_prog" 93 acl_cv_path_LD="$ac_dir/$ac_prog"
87 # Check to see if the program is GNU ld. I'd rather use --version, 94 # Check to see if the program is GNU ld. I'd rather use --version,
88 # but apparently some GNU ld's only accept -v. 95 # but apparently some variants of GNU ld only accept -v.
89 # Break only if it was the GNU/non-GNU ld that we prefer. 96 # Break only if it was the GNU/non-GNU ld that we prefer.
90 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in 97 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
91 *GNU* | *'with BFD'*) 98 *GNU* | *'with BFD'*)
92 test "$with_gnu_ld" != no && break ;; 99 test "$with_gnu_ld" != no && break
100 ;;
93 *) 101 *)
94 test "$with_gnu_ld" != yes && break ;; 102 test "$with_gnu_ld" != yes && break
103 ;;
95 esac 104 esac
96 fi 105 fi
97 done 106 done
98 IFS="$ac_save_ifs" 107 IFS="$acl_save_ifs"
99else 108else
100 acl_cv_path_LD="$LD" # Let the user override the test with a path. 109 acl_cv_path_LD="$LD" # Let the user override the test with a path.
101fi]) 110fi])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index c73bd8e..d963149 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,5 +1,5 @@
1# lib-link.m4 serial 21 (gettext-0.18) 1# lib-link.m4 serial 26 (gettext-0.18.2)
2dnl Copyright (C) 2001-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2013 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
18[ 18[
19 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 19 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20 AC_REQUIRE([AC_LIB_RPATH]) 20 AC_REQUIRE([AC_LIB_RPATH])
21 pushdef([Name],[translit([$1],[./-], [___])]) 21 pushdef([Name],[m4_translit([$1],[./+-], [____])])
22 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 22 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
23 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 23 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
24 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ 24 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
25 AC_LIB_LINKFLAGS_BODY([$1], [$2]) 25 AC_LIB_LINKFLAGS_BODY([$1], [$2])
26 ac_cv_lib[]Name[]_libs="$LIB[]NAME" 26 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
@@ -58,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
58[ 58[
59 AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) 59 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
60 AC_REQUIRE([AC_LIB_RPATH]) 60 AC_REQUIRE([AC_LIB_RPATH])
61 pushdef([Name],[translit([$1],[./-], [___])]) 61 pushdef([Name],[m4_translit([$1],[./+-], [____])])
62 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 62 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
63 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 63 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
64 64
65 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME 65 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
66 dnl accordingly. 66 dnl accordingly.
@@ -68,7 +68,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
68 68
69 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, 69 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
70 dnl because if the user has installed lib[]Name and not disabled its use 70 dnl because if the user has installed lib[]Name and not disabled its use
71 dnl via --without-lib[]Name-prefix, he wants to use it. 71 dnl via --without-lib[]Name-prefix, they want to use it.
72 ac_save_CPPFLAGS="$CPPFLAGS" 72 ac_save_CPPFLAGS="$CPPFLAGS"
73 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) 73 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
74 74
@@ -85,7 +85,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
85 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; 85 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
86 *) LIBS="$LIB[]NAME $LIBS" ;; 86 *) LIBS="$LIB[]NAME $LIBS" ;;
87 esac 87 esac
88 AC_TRY_LINK([$3], [$4], 88 AC_LINK_IFELSE(
89 [AC_LANG_PROGRAM([[$3]], [[$4]])],
89 [ac_cv_lib[]Name=yes], 90 [ac_cv_lib[]Name=yes],
90 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) 91 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
91 LIBS="$ac_save_LIBS" 92 LIBS="$ac_save_LIBS"
@@ -115,6 +116,8 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
115dnl Determine the platform dependent parameters needed to use rpath: 116dnl Determine the platform dependent parameters needed to use rpath:
116dnl acl_libext, 117dnl acl_libext,
117dnl acl_shlibext, 118dnl acl_shlibext,
119dnl acl_libname_spec,
120dnl acl_library_names_spec,
118dnl acl_hardcode_libdir_flag_spec, 121dnl acl_hardcode_libdir_flag_spec,
119dnl acl_hardcode_libdir_separator, 122dnl acl_hardcode_libdir_separator,
120dnl acl_hardcode_direct, 123dnl acl_hardcode_direct,
@@ -157,15 +160,15 @@ dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
157dnl macro call that searches for libname. 160dnl macro call that searches for libname.
158AC_DEFUN([AC_LIB_FROMPACKAGE], 161AC_DEFUN([AC_LIB_FROMPACKAGE],
159[ 162[
160 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 163 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
161 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 164 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
162 define([acl_frompackage_]NAME, [$2]) 165 define([acl_frompackage_]NAME, [$2])
163 popdef([NAME]) 166 popdef([NAME])
164 pushdef([PACK],[$2]) 167 pushdef([PACK],[$2])
165 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], 168 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
166 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 169 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
167 define([acl_libsinpackage_]PACKUP, 170 define([acl_libsinpackage_]PACKUP,
168 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1]) 171 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
169 popdef([PACKUP]) 172 popdef([PACKUP])
170 popdef([PACK]) 173 popdef([PACK])
171]) 174])
@@ -178,14 +181,14 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
178AC_DEFUN([AC_LIB_LINKFLAGS_BODY], 181AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
179[ 182[
180 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) 183 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
181 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], 184 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
182 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 185 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
183 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) 186 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
184 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-], 187 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
185 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) 188 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
186 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) 189 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
187 dnl Autoconf >= 2.61 supports dots in --with options. 190 dnl Autoconf >= 2.61 supports dots in --with options.
188 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)]) 191 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
189 dnl By default, look in $includedir and $libdir. 192 dnl By default, look in $includedir and $libdir.
190 use_additional=yes 193 use_additional=yes
191 AC_LIB_WITH_FINAL_PREFIX([ 194 AC_LIB_WITH_FINAL_PREFIX([
@@ -242,7 +245,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
242 names_already_handled="$names_already_handled $name" 245 names_already_handled="$names_already_handled $name"
243 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS 246 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
244 dnl or AC_LIB_HAVE_LINKFLAGS call. 247 dnl or AC_LIB_HAVE_LINKFLAGS call.
245 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` 248 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
246 eval value=\"\$HAVE_LIB$uppername\" 249 eval value=\"\$HAVE_LIB$uppername\"
247 if test -n "$value"; then 250 if test -n "$value"; then
248 if test "$value" = yes; then 251 if test "$value" = yes; then
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index 1601cea..855ca93 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
1# lib-prefix.m4 serial 7 (gettext-0.18) 1# lib-prefix.m4 serial 7 (gettext-0.18)
2dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2005, 2008-2013 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +15,7 @@ ifdef([AC_HELP_STRING],
15 15
16dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed 16dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
17dnl to access previously installed libraries. The basic assumption is that 17dnl to access previously installed libraries. The basic assumption is that
18dnl a user will want packages to use other packages he previously installed 18dnl a user will want packages to use other packages they previously installed
19dnl with the same --prefix option. 19dnl with the same --prefix option.
20dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate 20dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
21dnl libraries, but is otherwise very convenient. 21dnl libraries, but is otherwise very convenient.
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index ee80844..c81e669 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4063,7 +4063,8 @@ _LT_EOF
4063 if AC_TRY_EVAL(ac_compile); then 4063 if AC_TRY_EVAL(ac_compile); then
4064 # Now try to grab the symbols. 4064 # Now try to grab the symbols.
4065 nlist=conftest.nm 4065 nlist=conftest.nm
4066 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4066 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4067 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
4067 # Try sorting and uniquifying the output. 4068 # Try sorting and uniquifying the output.
4068 if sort "$nlist" | uniq > "$nlist"T; then 4069 if sort "$nlist" | uniq > "$nlist"T; then
4069 mv -f "$nlist"T "$nlist" 4070 mv -f "$nlist"T "$nlist"
@@ -6438,7 +6439,7 @@ if test yes != "$_lt_caught_CXX_error"; then
6438 # Commands to make compiler produce verbose output that lists 6439 # Commands to make compiler produce verbose output that lists
6439 # what "hidden" libraries, object files and flags are used when 6440 # what "hidden" libraries, object files and flags are used when
6440 # linking a shared library. 6441 # linking a shared library.
6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6442 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
6442 6443
6443 else 6444 else
6444 GXX=no 6445 GXX=no
@@ -6813,7 +6814,7 @@ if test yes != "$_lt_caught_CXX_error"; then
6813 # explicitly linking system object files so we need to strip them 6814 # explicitly linking system object files so we need to strip them
6814 # from the output so that they don't get included in the library 6815 # from the output so that they don't get included in the library
6815 # dependencies. 6816 # dependencies.
6816 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6817 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6817 ;; 6818 ;;
6818 *) 6819 *)
6819 if test yes = "$GXX"; then 6820 if test yes = "$GXX"; then
@@ -6878,7 +6879,7 @@ if test yes != "$_lt_caught_CXX_error"; then
6878 # explicitly linking system object files so we need to strip them 6879 # explicitly linking system object files so we need to strip them
6879 # from the output so that they don't get included in the library 6880 # from the output so that they don't get included in the library
6880 # dependencies. 6881 # dependencies.
6881 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 6882 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6882 ;; 6883 ;;
6883 *) 6884 *)
6884 if test yes = "$GXX"; then 6885 if test yes = "$GXX"; then
@@ -7217,7 +7218,7 @@ if test yes != "$_lt_caught_CXX_error"; then
7217 # Commands to make compiler produce verbose output that lists 7218 # Commands to make compiler produce verbose output that lists
7218 # what "hidden" libraries, object files and flags are used when 7219 # what "hidden" libraries, object files and flags are used when
7219 # linking a shared library. 7220 # linking a shared library.
7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7221 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7221 7222
7222 else 7223 else
7223 # FIXME: insert proper C++ library support 7224 # FIXME: insert proper C++ library support
@@ -7301,7 +7302,7 @@ if test yes != "$_lt_caught_CXX_error"; then
7301 # Commands to make compiler produce verbose output that lists 7302 # Commands to make compiler produce verbose output that lists
7302 # what "hidden" libraries, object files and flags are used when 7303 # what "hidden" libraries, object files and flags are used when
7303 # linking a shared library. 7304 # linking a shared library.
7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7305 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7305 else 7306 else
7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this 7307 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7307 # platform. 7308 # platform.
@@ -7312,7 +7313,7 @@ if test yes != "$_lt_caught_CXX_error"; then
7312 # Commands to make compiler produce verbose output that lists 7313 # Commands to make compiler produce verbose output that lists
7313 # what "hidden" libraries, object files and flags are used when 7314 # what "hidden" libraries, object files and flags are used when
7314 # linking a shared library. 7315 # linking a shared library.
7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7316 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
7316 fi 7317 fi
7317 7318
7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7319 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
diff --git a/m4/nls.m4 b/m4/nls.m4
index 003704c..8f8a147 100644
--- a/m4/nls.m4
+++ b/m4/nls.m4
@@ -1,5 +1,5 @@
1# nls.m4 serial 5 (gettext-0.18) 1# nls.m4 serial 5 (gettext-0.18)
2dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, 2dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 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
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index f2bfc2d..4688002 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -1,57 +1,275 @@
1dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2dnl serial 11 (pkg-config-0.29)
3dnl
4dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
5dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
6dnl
7dnl This program is free software; you can redistribute it and/or modify
8dnl it under the terms of the GNU General Public License as published by
9dnl the Free Software Foundation; either version 2 of the License, or
10dnl (at your option) any later version.
11dnl
12dnl This program is distributed in the hope that it will be useful, but
13dnl WITHOUT ANY WARRANTY; without even the implied warranty of
14dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15dnl General Public License for more details.
16dnl
17dnl You should have received a copy of the GNU General Public License
18dnl along with this program; if not, write to the Free Software
19dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20dnl 02111-1307, USA.
21dnl
22dnl As a special exception to the GNU General Public License, if you
23dnl distribute this file as part of a program that contains a
24dnl configuration script generated by Autoconf, you may include it under
25dnl the same distribution terms that you use for the rest of that
26dnl program.
1 27
2dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) 28dnl PKG_PREREQ(MIN-VERSION)
3dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page 29dnl -----------------------
4dnl also defines GSTUFF_PKG_ERRORS on error 30dnl Since: 0.29
5AC_DEFUN([PKG_CHECK_MODULES], [ 31dnl
6 succeeded=no 32dnl Verify that the version of the pkg-config macros are at least
7 33dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
8 if test -z "$PKG_CONFIG"; then 34dnl installed version of pkg-config, this checks the developer's version
9 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 35dnl of pkg.m4 when generating configure.
10 fi 36dnl
11 37dnl To ensure that this macro is defined, also add:
12 if test "$PKG_CONFIG" = "no" ; then 38dnl m4_ifndef([PKG_PREREQ],
13 echo "*** The pkg-config script could not be found. Make sure it is" 39dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
14 echo "*** in your path, or set the PKG_CONFIG environment variable" 40dnl
15 echo "*** to the full path to pkg-config." 41dnl See the "Since" comment for each macro you use to see what version
16 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." 42dnl of the macros you require.
17 else 43m4_defun([PKG_PREREQ],
18 PKG_CONFIG_MIN_VERSION=0.9.0 44[m4_define([PKG_MACROS_VERSION], [0.29])
19 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then 45m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
20 AC_MSG_CHECKING(for $2) 46 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
21 47])dnl PKG_PREREQ
22 if $PKG_CONFIG --exists "$2" ; then 48
23 AC_MSG_RESULT(yes) 49dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
24 succeeded=yes 50dnl ----------------------------------
25 51dnl Since: 0.16
26 AC_MSG_CHECKING($1_CFLAGS) 52dnl
27 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` 53dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
28 AC_MSG_RESULT($$1_CFLAGS) 54dnl first found in the path. Checks that the version of pkg-config found
29 55dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
30 AC_MSG_CHECKING($1_LIBS) 56dnl used since that's the first version where most current features of
31 $1_LIBS=`$PKG_CONFIG --libs "$2"` 57dnl pkg-config existed.
32 AC_MSG_RESULT($$1_LIBS) 58AC_DEFUN([PKG_PROG_PKG_CONFIG],
33 else 59[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
34 $1_CFLAGS="" 60m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
35 $1_LIBS="" 61m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
36 ## If we have a custom action on failure, don't print errors, but 62AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
37 ## do set a variable so people can do so. 63AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
38 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 64AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
39 ifelse([$4], ,echo $$1_PKG_ERRORS,) 65
66if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
67 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
68fi
69if test -n "$PKG_CONFIG"; then
70 _pkg_min_version=m4_default([$1], [0.9.0])
71 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
72 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
73 AC_MSG_RESULT([yes])
74 else
75 AC_MSG_RESULT([no])
76 PKG_CONFIG=""
77 fi
78fi[]dnl
79])dnl PKG_PROG_PKG_CONFIG
80
81dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
82dnl -------------------------------------------------------------------
83dnl Since: 0.18
84dnl
85dnl Check to see whether a particular set of modules exists. Similar to
86dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
87dnl
88dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
89dnl only at the first occurence in configure.ac, so if the first place
90dnl it's called might be skipped (such as if it is within an "if", you
91dnl have to call PKG_CHECK_EXISTS manually
92AC_DEFUN([PKG_CHECK_EXISTS],
93[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
94if test -n "$PKG_CONFIG" && \
95 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
96 m4_default([$2], [:])
97m4_ifvaln([$3], [else
98 $3])dnl
99fi])
100
101dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
102dnl ---------------------------------------------
103dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
104dnl pkg_failed based on the result.
105m4_define([_PKG_CONFIG],
106[if test -n "$$1"; then
107 pkg_cv_[]$1="$$1"
108 elif test -n "$PKG_CONFIG"; then
109 PKG_CHECK_EXISTS([$3],
110 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
111 test "x$?" != "x0" && pkg_failed=yes ],
112 [pkg_failed=yes])
113 else
114 pkg_failed=untried
115fi[]dnl
116])dnl _PKG_CONFIG
117
118dnl _PKG_SHORT_ERRORS_SUPPORTED
119dnl ---------------------------
120dnl Internal check to see if pkg-config supports short errors.
121AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
122[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
123if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
124 _pkg_short_errors_supported=yes
125else
126 _pkg_short_errors_supported=no
127fi[]dnl
128])dnl _PKG_SHORT_ERRORS_SUPPORTED
129
130
131dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
132dnl [ACTION-IF-NOT-FOUND])
133dnl --------------------------------------------------------------
134dnl Since: 0.4.0
135dnl
136dnl Note that if there is a possibility the first call to
137dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
138dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
139AC_DEFUN([PKG_CHECK_MODULES],
140[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
141AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
142AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
143
144pkg_failed=no
145AC_MSG_CHECKING([for $1])
146
147_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
148_PKG_CONFIG([$1][_LIBS], [libs], [$2])
149
150m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
151and $1[]_LIBS to avoid the need to call pkg-config.
152See the pkg-config man page for more details.])
153
154if test $pkg_failed = yes; then
155 AC_MSG_RESULT([no])
156 _PKG_SHORT_ERRORS_SUPPORTED
157 if test $_pkg_short_errors_supported = yes; then
158 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
159 else
160 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
40 fi 161 fi
162 # Put the nasty error message in config.log where it belongs
163 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
164
165 m4_default([$4], [AC_MSG_ERROR(
166[Package requirements ($2) were not met:
167
168$$1_PKG_ERRORS
169
170Consider adjusting the PKG_CONFIG_PATH environment variable if you
171installed software in a non-standard prefix.
172
173_PKG_TEXT])[]dnl
174 ])
175elif test $pkg_failed = untried; then
176 AC_MSG_RESULT([no])
177 m4_default([$4], [AC_MSG_FAILURE(
178[The pkg-config script could not be found or is too old. Make sure it
179is in your PATH or set the PKG_CONFIG environment variable to the full
180path to pkg-config.
181
182_PKG_TEXT
183
184To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
185 ])
186else
187 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
188 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
189 AC_MSG_RESULT([yes])
190 $3
191fi[]dnl
192])dnl PKG_CHECK_MODULES
193
194
195dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
196dnl [ACTION-IF-NOT-FOUND])
197dnl ---------------------------------------------------------------------
198dnl Since: 0.29
199dnl
200dnl Checks for existence of MODULES and gathers its build flags with
201dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
202dnl and VARIABLE-PREFIX_LIBS from --libs.
203dnl
204dnl Note that if there is a possibility the first call to
205dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
206dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
207dnl configure.ac.
208AC_DEFUN([PKG_CHECK_MODULES_STATIC],
209[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
210_save_PKG_CONFIG=$PKG_CONFIG
211PKG_CONFIG="$PKG_CONFIG --static"
212PKG_CHECK_MODULES($@)
213PKG_CONFIG=$_save_PKG_CONFIG[]dnl
214])dnl PKG_CHECK_MODULES_STATIC
215
216
217dnl PKG_INSTALLDIR([DIRECTORY])
218dnl -------------------------
219dnl Since: 0.27
220dnl
221dnl Substitutes the variable pkgconfigdir as the location where a module
222dnl should install pkg-config .pc files. By default the directory is
223dnl $libdir/pkgconfig, but the default can be changed by passing
224dnl DIRECTORY. The user can override through the --with-pkgconfigdir
225dnl parameter.
226AC_DEFUN([PKG_INSTALLDIR],
227[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
228m4_pushdef([pkg_description],
229 [pkg-config installation directory @<:@]pkg_default[@:>@])
230AC_ARG_WITH([pkgconfigdir],
231 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
232 [with_pkgconfigdir=]pkg_default)
233AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
234m4_popdef([pkg_default])
235m4_popdef([pkg_description])
236])dnl PKG_INSTALLDIR
237
238
239dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
240dnl --------------------------------
241dnl Since: 0.27
242dnl
243dnl Substitutes the variable noarch_pkgconfigdir as the location where a
244dnl module should install arch-independent pkg-config .pc files. By
245dnl default the directory is $datadir/pkgconfig, but the default can be
246dnl changed by passing DIRECTORY. The user can override through the
247dnl --with-noarch-pkgconfigdir parameter.
248AC_DEFUN([PKG_NOARCH_INSTALLDIR],
249[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
250m4_pushdef([pkg_description],
251 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
252AC_ARG_WITH([noarch-pkgconfigdir],
253 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
254 [with_noarch_pkgconfigdir=]pkg_default)
255AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
256m4_popdef([pkg_default])
257m4_popdef([pkg_description])
258])dnl PKG_NOARCH_INSTALLDIR
41 259
42 AC_SUBST($1_CFLAGS)
43 AC_SUBST($1_LIBS)
44 else
45 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
46 echo "*** See http://www.freedesktop.org/software/pkgconfig"
47 fi
48 fi
49 260
50 if test $succeeded = yes; then 261dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
51 ifelse([$3], , :, [$3]) 262dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
52 else 263dnl -------------------------------------------
53 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) 264dnl Since: 0.28
54 fi 265dnl
55]) 266dnl Retrieves the value of the pkg-config variable for the given module.
267AC_DEFUN([PKG_CHECK_VAR],
268[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
269AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
56 270
271_PKG_CONFIG([$1], [variable="][$3]["], [$2])
272AS_VAR_COPY([$1], [pkg_cv_][$1])
57 273
274AS_VAR_IF([$1], [""], [$5], [$4])dnl
275])dnl PKG_CHECK_VAR
diff --git a/m4/po.m4 b/m4/po.m4
index 47f36a4..1c70b6c 100644
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -1,5 +1,5 @@
1# po.m4 serial 17 (gettext-0.18) 1# po.m4 serial 21 (gettext-0.18.3)
2dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2013 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -17,14 +17,15 @@ dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. 17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. 18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19 19
20AC_PREREQ([2.50]) 20AC_PREREQ([2.60])
21 21
22dnl Checks for all prerequisites of the po subdirectory. 22dnl Checks for all prerequisites of the po subdirectory.
23AC_DEFUN([AM_PO_SUBDIRS], 23AC_DEFUN([AM_PO_SUBDIRS],
24[ 24[
25 AC_REQUIRE([AC_PROG_MAKE_SET])dnl 25 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
26 AC_REQUIRE([AC_PROG_INSTALL])dnl 26 AC_REQUIRE([AC_PROG_INSTALL])dnl
27 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake 27 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
28 AC_REQUIRE([AC_PROG_SED])dnl
28 AC_REQUIRE([AM_NLS])dnl 29 AC_REQUIRE([AM_NLS])dnl
29 30
30 dnl Release version of the gettext macros. This is used to ensure that 31 dnl Release version of the gettext macros. This is used to ensure that
@@ -102,7 +103,7 @@ changequote([,])dnl
102 case "$ac_file" in */Makefile.in) 103 case "$ac_file" in */Makefile.in)
103 # Adjust a relative srcdir. 104 # Adjust a relative srcdir.
104 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 105 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
105 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 106 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
106 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 107 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
107 # In autoconf-2.13 it is called $ac_given_srcdir. 108 # In autoconf-2.13 it is called $ac_given_srcdir.
108 # In autoconf-2.50 it is called $srcdir. 109 # In autoconf-2.50 it is called $srcdir.
@@ -118,7 +119,8 @@ changequote([,])dnl
118 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 119 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
119 rm -f "$ac_dir/POTFILES" 120 rm -f "$ac_dir/POTFILES"
120 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 121 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
121 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" 122 gt_tab=`printf '\t'`
123 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
122 POMAKEFILEDEPS="POTFILES.in" 124 POMAKEFILEDEPS="POTFILES.in"
123 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend 125 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
124 # on $ac_dir but don't depend on user-specified configuration 126 # on $ac_dir but don't depend on user-specified configuration
@@ -129,12 +131,12 @@ changequote([,])dnl
129 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 131 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
130 fi 132 fi
131 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 133 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
132 # Hide the ALL_LINGUAS assigment from automake < 1.5. 134 # Hide the ALL_LINGUAS assignment from automake < 1.5.
133 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 135 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
134 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 136 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
135 else 137 else
136 # The set of available languages was given in configure.in. 138 # The set of available languages was given in configure.in.
137 # Hide the ALL_LINGUAS assigment from automake < 1.5. 139 # Hide the ALL_LINGUAS assignment from automake < 1.5.
138 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' 140 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
139 fi 141 fi
140 # Compute POFILES 142 # Compute POFILES
@@ -226,7 +228,7 @@ AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
226changequote(,)dnl 228changequote(,)dnl
227 # Adjust a relative srcdir. 229 # Adjust a relative srcdir.
228 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 230 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
229 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 231 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
230 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 232 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
231 # In autoconf-2.13 it is called $ac_given_srcdir. 233 # In autoconf-2.13 it is called $ac_given_srcdir.
232 # In autoconf-2.50 it is called $srcdir. 234 # In autoconf-2.50 it is called $srcdir.
@@ -254,6 +256,7 @@ EOT
254 fi 256 fi
255 257
256 # A sed script that extracts the value of VARIABLE from a Makefile. 258 # A sed script that extracts the value of VARIABLE from a Makefile.
259 tab=`printf '\t'`
257 sed_x_variable=' 260 sed_x_variable='
258# Test if the hold space is empty. 261# Test if the hold space is empty.
259x 262x
@@ -261,9 +264,9 @@ s/P/P/
261x 264x
262ta 265ta
263# Yes it was empty. Look if we have the expected variable definition. 266# Yes it was empty. Look if we have the expected variable definition.
264/^[ ]*VARIABLE[ ]*=/{ 267/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
265 # Seen the first line of the variable definition. 268 # Seen the first line of the variable definition.
266 s/^[ ]*VARIABLE[ ]*=// 269 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
267 ba 270 ba
268} 271}
269bd 272bd
@@ -315,7 +318,7 @@ changequote([,])dnl
315 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` 318 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
316 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` 319 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
317 fi 320 fi
318 # Hide the ALL_LINGUAS assigment from automake < 1.5. 321 # Hide the ALL_LINGUAS assignment from automake < 1.5.
319 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 322 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
320 # Compute POFILES 323 # Compute POFILES
321 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 324 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
@@ -405,14 +408,15 @@ changequote([,])dnl
405 fi 408 fi
406 409
407 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" 410 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
411 tab=`printf '\t'`
408 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then 412 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
409 # Add dependencies that cannot be formulated as a simple suffix rule. 413 # Add dependencies that cannot be formulated as a simple suffix rule.
410 for lang in $ALL_LINGUAS; do 414 for lang in $ALL_LINGUAS; do
411 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` 415 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
412 cat >> "$ac_file.tmp" <<EOF 416 cat >> "$ac_file.tmp" <<EOF
413$frobbedlang.msg: $lang.po 417$frobbedlang.msg: $lang.po
414 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ 418${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
415 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 419${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
416EOF 420EOF
417 done 421 done
418 fi 422 fi
@@ -422,8 +426,8 @@ EOF
422 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` 426 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
423 cat >> "$ac_file.tmp" <<EOF 427 cat >> "$ac_file.tmp" <<EOF
424$frobbedlang/\$(DOMAIN).resources.dll: $lang.po 428$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
425 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ 429${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
426 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } 430${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
427EOF 431EOF
428 done 432 done
429 fi 433 fi
diff --git a/m4/progtest.m4 b/m4/progtest.m4
index 2d804ac..7b39123 100644
--- a/m4/progtest.m4
+++ b/m4/progtest.m4
@@ -1,5 +1,5 @@
1# progtest.m4 serial 6 (gettext-0.18) 1# progtest.m4 serial 7 (gettext-0.18.2)
2dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003, 2005, 2008-2013 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,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -27,15 +27,14 @@ AC_DEFUN([AM_PATH_PROG_WITH_TEST],
27# Prepare PATH_SEPARATOR. 27# Prepare PATH_SEPARATOR.
28# The user is always right. 28# The user is always right.
29if test "${PATH_SEPARATOR+set}" != set; then 29if test "${PATH_SEPARATOR+set}" != set; then
30 echo "#! /bin/sh" >conf$$.sh 30 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
31 echo "exit 0" >>conf$$.sh 31 # contains only /bin. Note that ksh looks also at the FPATH variable,
32 chmod +x conf$$.sh 32 # so we have to set that as well for the test.
33 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 33 PATH_SEPARATOR=:
34 PATH_SEPARATOR=';' 34 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35 else 35 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36 PATH_SEPARATOR=: 36 || PATH_SEPARATOR=';'
37 fi 37 }
38 rm -f conf$$.sh
39fi 38fi
40 39
41# Find out how to test for executable files. Don't use a zero-byte file, 40# Find out how to test for executable files. Don't use a zero-byte file,