diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-12-02 12:07:26 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-12-02 12:07:26 +0100 |
commit | ba76cc56c02b7ea362136bce5b6ce9e1ce82c4de (patch) | |
tree | f1644f042bbb5408cbed50815aa1b4c2d25c4f48 | |
parent | 48a2376f7e6e9e42d3a5a635531d77afae1fcc35 (diff) | |
download | libextractor-ba76cc56c02b7ea362136bce5b6ce9e1ce82c4de.tar.gz libextractor-ba76cc56c02b7ea362136bce5b6ce9e1ce82c4de.zip |
update M4 macros
-rw-r--r-- | m4/Makefile.am | 2 | ||||
-rw-r--r-- | m4/ac_define_dir.m4 | 70 | ||||
-rw-r--r-- | m4/ax_check_compile_flag.m4 | 74 | ||||
-rw-r--r-- | m4/ax_check_link_flag.m4 | 74 | ||||
-rw-r--r-- | m4/codeset.m4 | 19 | ||||
-rw-r--r-- | m4/gettext.m4 | 163 | ||||
-rw-r--r-- | m4/glib-2.0.m4 | 44 | ||||
-rw-r--r-- | m4/glibc2.m4 | 21 | ||||
-rw-r--r-- | m4/glibc21.m4 | 26 | ||||
-rw-r--r-- | m4/gtk-3.0.m4 | 49 | ||||
-rw-r--r-- | m4/intdiv0.m4 | 57 | ||||
-rw-r--r-- | m4/intl.m4 | 191 | ||||
-rw-r--r-- | m4/intldir.m4 | 10 | ||||
-rw-r--r-- | m4/intmax.m4 | 21 | ||||
-rw-r--r-- | m4/inttypes-pri.m4 | 20 | ||||
-rw-r--r-- | m4/inttypes_h.m4 | 23 | ||||
-rw-r--r-- | m4/lcmessage.m4 | 21 | ||||
-rw-r--r-- | m4/lib-ld.m4 | 87 | ||||
-rw-r--r-- | m4/lib-link.m4 | 311 | ||||
-rw-r--r-- | m4/lib-prefix.m4 | 91 | ||||
-rw-r--r-- | m4/lock.m4 | 323 | ||||
-rw-r--r-- | m4/longlong.m4 | 119 | ||||
-rw-r--r-- | m4/nls.m4 | 17 | ||||
-rw-r--r-- | m4/pkg.m4 | 281 | ||||
-rw-r--r-- | m4/po.m4 | 42 | ||||
-rw-r--r-- | m4/printf-posix.m4 | 26 | ||||
-rw-r--r-- | m4/progtest.m4 | 35 | ||||
-rw-r--r-- | m4/size_max.m4 | 47 | ||||
-rw-r--r-- | m4/stdint_h.m4 | 21 | ||||
-rw-r--r-- | m4/uintmax_t.m4 | 14 | ||||
-rw-r--r-- | m4/visibility.m4 | 49 | ||||
-rw-r--r-- | m4/wchar_t.m4 | 18 | ||||
-rw-r--r-- | m4/wint_t.m4 | 26 | ||||
-rw-r--r-- | m4/xsize.m4 | 7 |
34 files changed, 1398 insertions, 1001 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am index 1b6e008..11b8c27 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am | |||
@@ -3,6 +3,8 @@ EXTRA_DIST = glibc2.m4 intl.m4 intldir.m4 lock.m4 visibility.m4 \ | |||
3 | ac_python_devel.m4 \ | 3 | ac_python_devel.m4 \ |
4 | abi-gsf.m4 \ | 4 | abi-gsf.m4 \ |
5 | ax_create_pkgconfig_info.m4 \ | 5 | ax_create_pkgconfig_info.m4 \ |
6 | ax_check_compile_flag.m4 \ | ||
7 | ax_check_link_flag.m4 \ | ||
6 | python.m4 \ | 8 | python.m4 \ |
7 | codeset.m4 \ | 9 | codeset.m4 \ |
8 | gettext.m4 \ | 10 | gettext.m4 \ |
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 @@ | |||
1 | dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) | 1 | dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) |
2 | dnl | 2 | dnl |
3 | dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR | 3 | dnl This macro _AC_DEFINEs VARNAME to the expansion of the DIR |
4 | dnl variable, taking care of fixing up ${prefix} and such. | 4 | dnl variable, taking care of fixing up ${prefix} and such. |
5 | dnl | 5 | dnl |
6 | dnl VARNAME is offered as both a C preprocessor symbol, and an output | 6 | dnl VARNAME is offered as both a C preprocessor symbol, and an output |
7 | dnl variable. | 7 | dnl variable. |
8 | dnl | 8 | dnl |
9 | dnl Note that the 3 argument form is only supported with autoconf 2.13 | 9 | dnl Note that the 3 argument form is only supported with autoconf 2.13 |
10 | dnl and later (i.e. only where _AC_DEFINE supports 3 arguments). | 10 | dnl and later (i.e. only where _AC_DEFINE supports 3 arguments). |
11 | dnl | 11 | dnl |
12 | dnl Examples: | 12 | dnl Examples: |
13 | dnl | 13 | dnl |
14 | dnl AC_DEFINE_DIR(DATADIR, datadir) | 14 | dnl AC_DEFINE_DIR(DATADIR, datadir) |
15 | dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries]) | 15 | dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries]) |
16 | dnl | 16 | dnl |
17 | dnl @category Misc | 17 | dnl @category Misc |
18 | dnl @author Stepan Kasal <kasal@ucw.cz> | 18 | dnl @author Stepan Kasal <kasal@ucw.cz> |
19 | dnl @author Andreas Schwab <schwab@suse.de> | 19 | dnl @author Andreas Schwab <schwab@suse.de> |
20 | dnl @author Guido Draheim <guidod@gmx.de> | 20 | dnl @author Guido Draheim <guidod@gmx.de> |
21 | dnl @author Alexandre Oliva | 21 | dnl @author Alexandre Oliva |
22 | dnl @version 2005-01-17 | 22 | dnl @version 2005-01-17 |
23 | dnl @license AllPermissive | 23 | dnl @license AllPermissive |
24 | 24 | ||
25 | AC_DEFUN([AC_DEFINE_DIR], [ | 25 | AC_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/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 new file mode 100644 index 0000000..dcabb92 --- /dev/null +++ b/m4/ax_check_compile_flag.m4 | |||
@@ -0,0 +1,74 @@ | |||
1 | # =========================================================================== | ||
2 | # https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html | ||
3 | # =========================================================================== | ||
4 | # | ||
5 | # SYNOPSIS | ||
6 | # | ||
7 | # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) | ||
8 | # | ||
9 | # DESCRIPTION | ||
10 | # | ||
11 | # Check whether the given FLAG works with the current language's compiler | ||
12 | # or gives an error. (Warnings, however, are ignored) | ||
13 | # | ||
14 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on | ||
15 | # success/failure. | ||
16 | # | ||
17 | # If EXTRA-FLAGS is defined, it is added to the current language's default | ||
18 | # flags (e.g. CFLAGS) when the check is done. The check is thus made with | ||
19 | # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to | ||
20 | # force the compiler to issue an error when a bad flag is given. | ||
21 | # | ||
22 | # INPUT gives an alternative input source to AC_COMPILE_IFELSE. | ||
23 | # | ||
24 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this | ||
25 | # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. | ||
26 | # | ||
27 | # LICENSE | ||
28 | # | ||
29 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | ||
30 | # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | ||
31 | # | ||
32 | # This program is free software: you can redistribute it and/or modify it | ||
33 | # under the terms of the GNU General Public License as published by the | ||
34 | # Free Software Foundation, either version 3 of the License, or (at your | ||
35 | # option) any later version. | ||
36 | # | ||
37 | # This program is distributed in the hope that it will be useful, but | ||
38 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
39 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
40 | # Public License for more details. | ||
41 | # | ||
42 | # You should have received a copy of the GNU General Public License along | ||
43 | # with this program. If not, see <https://www.gnu.org/licenses/>. | ||
44 | # | ||
45 | # As a special exception, the respective Autoconf Macro's copyright owner | ||
46 | # gives unlimited permission to copy, distribute and modify the configure | ||
47 | # scripts that are the output of Autoconf when processing the Macro. You | ||
48 | # need not follow the terms of the GNU General Public License when using | ||
49 | # or distributing such scripts, even though portions of the text of the | ||
50 | # Macro appear in them. The GNU General Public License (GPL) does govern | ||
51 | # all other use of the material that constitutes the Autoconf Macro. | ||
52 | # | ||
53 | # This special exception to the GPL applies to versions of the Autoconf | ||
54 | # Macro released by the Autoconf Archive. When you make and distribute a | ||
55 | # modified version of the Autoconf Macro, you may extend this special | ||
56 | # exception to the GPL to apply to your modified version as well. | ||
57 | |||
58 | #serial 5 | ||
59 | |||
60 | AC_DEFUN([AX_CHECK_COMPILE_FLAG], | ||
61 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF | ||
62 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl | ||
63 | AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ | ||
64 | ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS | ||
65 | _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" | ||
66 | AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], | ||
67 | [AS_VAR_SET(CACHEVAR,[yes])], | ||
68 | [AS_VAR_SET(CACHEVAR,[no])]) | ||
69 | _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) | ||
70 | AS_VAR_IF(CACHEVAR,yes, | ||
71 | [m4_default([$2], :)], | ||
72 | [m4_default([$3], :)]) | ||
73 | AS_VAR_POPDEF([CACHEVAR])dnl | ||
74 | ])dnl AX_CHECK_COMPILE_FLAGS | ||
diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 new file mode 100644 index 0000000..819409a --- /dev/null +++ b/m4/ax_check_link_flag.m4 | |||
@@ -0,0 +1,74 @@ | |||
1 | # =========================================================================== | ||
2 | # https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html | ||
3 | # =========================================================================== | ||
4 | # | ||
5 | # SYNOPSIS | ||
6 | # | ||
7 | # AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) | ||
8 | # | ||
9 | # DESCRIPTION | ||
10 | # | ||
11 | # Check whether the given FLAG works with the linker or gives an error. | ||
12 | # (Warnings, however, are ignored) | ||
13 | # | ||
14 | # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on | ||
15 | # success/failure. | ||
16 | # | ||
17 | # If EXTRA-FLAGS is defined, it is added to the linker's default flags | ||
18 | # when the check is done. The check is thus made with the flags: "LDFLAGS | ||
19 | # EXTRA-FLAGS FLAG". This can for example be used to force the linker to | ||
20 | # issue an error when a bad flag is given. | ||
21 | # | ||
22 | # INPUT gives an alternative input source to AC_LINK_IFELSE. | ||
23 | # | ||
24 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this | ||
25 | # macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. | ||
26 | # | ||
27 | # LICENSE | ||
28 | # | ||
29 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> | ||
30 | # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> | ||
31 | # | ||
32 | # This program is free software: you can redistribute it and/or modify it | ||
33 | # under the terms of the GNU General Public License as published by the | ||
34 | # Free Software Foundation, either version 3 of the License, or (at your | ||
35 | # option) any later version. | ||
36 | # | ||
37 | # This program is distributed in the hope that it will be useful, but | ||
38 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
39 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
40 | # Public License for more details. | ||
41 | # | ||
42 | # You should have received a copy of the GNU General Public License along | ||
43 | # with this program. If not, see <https://www.gnu.org/licenses/>. | ||
44 | # | ||
45 | # As a special exception, the respective Autoconf Macro's copyright owner | ||
46 | # gives unlimited permission to copy, distribute and modify the configure | ||
47 | # scripts that are the output of Autoconf when processing the Macro. You | ||
48 | # need not follow the terms of the GNU General Public License when using | ||
49 | # or distributing such scripts, even though portions of the text of the | ||
50 | # Macro appear in them. The GNU General Public License (GPL) does govern | ||
51 | # all other use of the material that constitutes the Autoconf Macro. | ||
52 | # | ||
53 | # This special exception to the GPL applies to versions of the Autoconf | ||
54 | # Macro released by the Autoconf Archive. When you make and distribute a | ||
55 | # modified version of the Autoconf Macro, you may extend this special | ||
56 | # exception to the GPL to apply to your modified version as well. | ||
57 | |||
58 | #serial 5 | ||
59 | |||
60 | AC_DEFUN([AX_CHECK_LINK_FLAG], | ||
61 | [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF | ||
62 | AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl | ||
63 | AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ | ||
64 | ax_check_save_flags=$LDFLAGS | ||
65 | LDFLAGS="$LDFLAGS $4 $1" | ||
66 | AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], | ||
67 | [AS_VAR_SET(CACHEVAR,[yes])], | ||
68 | [AS_VAR_SET(CACHEVAR,[no])]) | ||
69 | LDFLAGS=$ax_check_save_flags]) | ||
70 | AS_VAR_IF(CACHEVAR,yes, | ||
71 | [m4_default([$2], :)], | ||
72 | [m4_default([$3], :)]) | ||
73 | AS_VAR_POPDEF([CACHEVAR])dnl | ||
74 | ])dnl AX_CHECK_LINK_FLAGS | ||
diff --git a/m4/codeset.m4 b/m4/codeset.m4 index 223955b..bc98201 100644 --- a/m4/codeset.m4 +++ b/m4/codeset.m4 | |||
@@ -1,5 +1,6 @@ | |||
1 | # codeset.m4 serial 2 (gettext-0.16) | 1 | # codeset.m4 serial 5 (gettext-0.18.2) |
2 | dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation, |
3 | dnl Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
@@ -8,14 +9,16 @@ dnl From Bruno Haible. | |||
8 | 9 | ||
9 | AC_DEFUN([AM_LANGINFO_CODESET], | 10 | AC_DEFUN([AM_LANGINFO_CODESET], |
10 | [ | 11 | [ |
11 | AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, | 12 | AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], |
12 | [AC_TRY_LINK([#include <langinfo.h>], | 13 | [AC_LINK_IFELSE( |
13 | [char* cs = nl_langinfo(CODESET); return !cs;], | 14 | [AC_LANG_PROGRAM( |
14 | am_cv_langinfo_codeset=yes, | 15 | [[#include <langinfo.h>]], |
15 | am_cv_langinfo_codeset=no) | 16 | [[char* cs = nl_langinfo(CODESET); return !cs;]])], |
17 | [am_cv_langinfo_codeset=yes], | ||
18 | [am_cv_langinfo_codeset=no]) | ||
16 | ]) | 19 | ]) |
17 | if test $am_cv_langinfo_codeset = yes; then | 20 | if test $am_cv_langinfo_codeset = yes; then |
18 | AC_DEFINE(HAVE_LANGINFO_CODESET, 1, | 21 | AC_DEFINE([HAVE_LANGINFO_CODESET], [1], |
19 | [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | 22 | [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) |
20 | fi | 23 | fi |
21 | ]) | 24 | ]) |
diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 91c345e..eef5073 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 | |||
@@ -1,21 +1,21 @@ | |||
1 | # gettext.m4 serial 59 (gettext-0.16.1) | 1 | # gettext.m4 serial 68 (gettext-0.19.8) |
2 | dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-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, |
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. |
6 | dnl | 6 | dnl |
7 | dnl This file can can be used in projects which are not available under | 7 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Library General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 9 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 10 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 11 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 12 | dnl by the GNU Library General Public License, and the rest of the GNU |
13 | dnl gettext package package is covered by the GNU General Public License. | 13 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 14 | dnl They are *not* in the public domain. |
15 | 15 | ||
16 | dnl Authors: | 16 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. |
19 | 19 | ||
20 | dnl Macro to add for using GNU gettext. | 20 | dnl Macro to add for using GNU gettext. |
21 | 21 | ||
@@ -35,7 +35,7 @@ dnl will be ignored. If NEEDSYMBOL is specified and is | |||
35 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't | 35 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't |
36 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. | 36 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. |
37 | dnl INTLDIR is used to find the intl libraries. If empty, | 37 | dnl INTLDIR is used to find the intl libraries. If empty, |
38 | dnl the value `$(top_builddir)/intl/' is used. | 38 | dnl the value '$(top_builddir)/intl/' is used. |
39 | dnl | 39 | dnl |
40 | dnl The result of the configuration is one of three cases: | 40 | dnl The result of the configuration is one of three cases: |
41 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled | 41 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled |
@@ -60,6 +60,8 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , | 60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , |
61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT | 61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT |
62 | ])])])])]) | 62 | ])])])])]) |
63 | ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], | ||
64 | [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) | ||
63 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | 65 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
64 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | 66 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
65 | ])])])]) | 67 | ])])])]) |
@@ -95,7 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
95 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | 97 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
96 | ]) | 98 | ]) |
97 | 99 | ||
98 | dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. | 100 | dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. |
99 | gt_INTL_MACOSX | 101 | gt_INTL_MACOSX |
100 | 102 | ||
101 | dnl Set USE_NLS. | 103 | dnl Set USE_NLS. |
@@ -123,11 +125,11 @@ AC_DEFUN([AM_GNU_GETTEXT], | |||
123 | gt_use_preinstalled_gnugettext=no | 125 | gt_use_preinstalled_gnugettext=no |
124 | ifelse(gt_included_intl, yes, [ | 126 | ifelse(gt_included_intl, yes, [ |
125 | AC_MSG_CHECKING([whether included gettext is requested]) | 127 | AC_MSG_CHECKING([whether included gettext is requested]) |
126 | AC_ARG_WITH(included-gettext, | 128 | AC_ARG_WITH([included-gettext], |
127 | [ --with-included-gettext use the GNU gettext library included here], | 129 | [ --with-included-gettext use the GNU gettext library included here], |
128 | nls_cv_force_use_gnu_gettext=$withval, | 130 | nls_cv_force_use_gnu_gettext=$withval, |
129 | nls_cv_force_use_gnu_gettext=no) | 131 | nls_cv_force_use_gnu_gettext=no) |
130 | AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) | 132 | AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) |
131 | 133 | ||
132 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | 134 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
133 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | 135 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
@@ -155,12 +157,23 @@ changequote([,])dnl | |||
155 | fi | 157 | fi |
156 | 158 | ||
157 | 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], |
158 | [AC_TRY_LINK([#include <libintl.h> | 160 | [AC_LINK_IFELSE( |
159 | $gt_revision_test_code | 161 | [AC_LANG_PROGRAM( |
162 | [[ | ||
163 | #include <libintl.h> | ||
164 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
160 | extern int _nl_msg_cat_cntr; | 165 | extern int _nl_msg_cat_cntr; |
161 | extern int *_nl_domain_bindings;], | 166 | extern int *_nl_domain_bindings; |
162 | [bindtextdomain ("", ""); | 167 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) |
163 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], | 168 | #else |
169 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | ||
170 | #endif | ||
171 | $gt_revision_test_code | ||
172 | ]], | ||
173 | [[ | ||
174 | bindtextdomain ("", ""); | ||
175 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | ||
176 | ]])], | ||
164 | [eval "$gt_func_gnugettext_libc=yes"], | 177 | [eval "$gt_func_gnugettext_libc=yes"], |
165 | [eval "$gt_func_gnugettext_libc=no"])]) | 178 | [eval "$gt_func_gnugettext_libc=no"])]) |
166 | 179 | ||
@@ -181,35 +194,57 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b | |||
181 | gt_save_LIBS="$LIBS" | 194 | gt_save_LIBS="$LIBS" |
182 | LIBS="$LIBS $LIBINTL" | 195 | LIBS="$LIBS $LIBINTL" |
183 | dnl Now see whether libintl exists and does not depend on libiconv. | 196 | dnl Now see whether libintl exists and does not depend on libiconv. |
184 | AC_TRY_LINK([#include <libintl.h> | 197 | AC_LINK_IFELSE( |
185 | $gt_revision_test_code | 198 | [AC_LANG_PROGRAM( |
199 | [[ | ||
200 | #include <libintl.h> | ||
201 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
186 | extern int _nl_msg_cat_cntr; | 202 | extern int _nl_msg_cat_cntr; |
187 | extern | 203 | extern |
188 | #ifdef __cplusplus | 204 | #ifdef __cplusplus |
189 | "C" | 205 | "C" |
190 | #endif | 206 | #endif |
191 | const char *_nl_expand_alias (const char *);], | 207 | const char *_nl_expand_alias (const char *); |
192 | [bindtextdomain ("", ""); | 208 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) |
193 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | 209 | #else |
210 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | ||
211 | #endif | ||
212 | $gt_revision_test_code | ||
213 | ]], | ||
214 | [[ | ||
215 | bindtextdomain ("", ""); | ||
216 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | ||
217 | ]])], | ||
194 | [eval "$gt_func_gnugettext_libintl=yes"], | 218 | [eval "$gt_func_gnugettext_libintl=yes"], |
195 | [eval "$gt_func_gnugettext_libintl=no"]) | 219 | [eval "$gt_func_gnugettext_libintl=no"]) |
196 | dnl Now see whether libintl exists and depends on libiconv. | 220 | dnl Now see whether libintl exists and depends on libiconv. |
197 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then | 221 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then |
198 | LIBS="$LIBS $LIBICONV" | 222 | LIBS="$LIBS $LIBICONV" |
199 | AC_TRY_LINK([#include <libintl.h> | 223 | AC_LINK_IFELSE( |
200 | $gt_revision_test_code | 224 | [AC_LANG_PROGRAM( |
225 | [[ | ||
226 | #include <libintl.h> | ||
227 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
201 | extern int _nl_msg_cat_cntr; | 228 | extern int _nl_msg_cat_cntr; |
202 | extern | 229 | extern |
203 | #ifdef __cplusplus | 230 | #ifdef __cplusplus |
204 | "C" | 231 | "C" |
205 | #endif | 232 | #endif |
206 | const char *_nl_expand_alias (const char *);], | 233 | const char *_nl_expand_alias (const char *); |
207 | [bindtextdomain ("", ""); | 234 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) |
208 | return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], | 235 | #else |
209 | [LIBINTL="$LIBINTL $LIBICONV" | 236 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 |
210 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | 237 | #endif |
211 | eval "$gt_func_gnugettext_libintl=yes" | 238 | $gt_revision_test_code |
212 | ]) | 239 | ]], |
240 | [[ | ||
241 | bindtextdomain ("", ""); | ||
242 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | ||
243 | ]])], | ||
244 | [LIBINTL="$LIBINTL $LIBICONV" | ||
245 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | ||
246 | eval "$gt_func_gnugettext_libintl=yes" | ||
247 | ]) | ||
213 | fi | 248 | fi |
214 | CPPFLAGS="$gt_save_CPPFLAGS" | 249 | CPPFLAGS="$gt_save_CPPFLAGS" |
215 | LIBS="$gt_save_LIBS"]) | 250 | LIBS="$gt_save_LIBS"]) |
@@ -267,7 +302,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
267 | 302 | ||
268 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | 303 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
269 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | 304 | || test "$nls_cv_use_gnu_gettext" = "yes"; then |
270 | AC_DEFINE(ENABLE_NLS, 1, | 305 | AC_DEFINE([ENABLE_NLS], [1], |
271 | [Define to 1 if translation of program messages to the user's native language | 306 | [Define to 1 if translation of program messages to the user's native language |
272 | is requested.]) | 307 | is requested.]) |
273 | else | 308 | else |
@@ -301,9 +336,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
301 | fi | 336 | fi |
302 | 337 | ||
303 | dnl For backward compatibility. Some packages may be using this. | 338 | dnl For backward compatibility. Some packages may be using this. |
304 | AC_DEFINE(HAVE_GETTEXT, 1, | 339 | AC_DEFINE([HAVE_GETTEXT], [1], |
305 | [Define if the GNU gettext() function is already present or preinstalled.]) | 340 | [Define if the GNU gettext() function is already present or preinstalled.]) |
306 | AC_DEFINE(HAVE_DCGETTEXT, 1, | 341 | AC_DEFINE([HAVE_DCGETTEXT], [1], |
307 | [Define if the GNU dcgettext() function is already present or preinstalled.]) | 342 | [Define if the GNU dcgettext() function is already present or preinstalled.]) |
308 | fi | 343 | fi |
309 | 344 | ||
@@ -319,9 +354,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
319 | fi | 354 | fi |
320 | 355 | ||
321 | dnl Make all variables we use known to autoconf. | 356 | dnl Make all variables we use known to autoconf. |
322 | AC_SUBST(BUILD_INCLUDED_LIBINTL) | 357 | AC_SUBST([BUILD_INCLUDED_LIBINTL]) |
323 | AC_SUBST(USE_INCLUDED_LIBINTL) | 358 | AC_SUBST([USE_INCLUDED_LIBINTL]) |
324 | AC_SUBST(CATOBJEXT) | 359 | AC_SUBST([CATOBJEXT]) |
325 | 360 | ||
326 | dnl For backward compatibility. Some configure.ins may be using this. | 361 | dnl For backward compatibility. Some configure.ins may be using this. |
327 | nls_cv_header_intl= | 362 | nls_cv_header_intl= |
@@ -329,74 +364,36 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a | |||
329 | 364 | ||
330 | dnl For backward compatibility. Some Makefiles may be using this. | 365 | dnl For backward compatibility. Some Makefiles may be using this. |
331 | DATADIRNAME=share | 366 | DATADIRNAME=share |
332 | AC_SUBST(DATADIRNAME) | 367 | AC_SUBST([DATADIRNAME]) |
333 | 368 | ||
334 | dnl For backward compatibility. Some Makefiles may be using this. | 369 | dnl For backward compatibility. Some Makefiles may be using this. |
335 | INSTOBJEXT=.mo | 370 | INSTOBJEXT=.mo |
336 | AC_SUBST(INSTOBJEXT) | 371 | AC_SUBST([INSTOBJEXT]) |
337 | 372 | ||
338 | dnl For backward compatibility. Some Makefiles may be using this. | 373 | dnl For backward compatibility. Some Makefiles may be using this. |
339 | GENCAT=gencat | 374 | GENCAT=gencat |
340 | AC_SUBST(GENCAT) | 375 | AC_SUBST([GENCAT]) |
341 | 376 | ||
342 | dnl For backward compatibility. Some Makefiles may be using this. | 377 | dnl For backward compatibility. Some Makefiles may be using this. |
343 | INTLOBJS= | 378 | INTLOBJS= |
344 | if test "$USE_INCLUDED_LIBINTL" = yes; then | 379 | if test "$USE_INCLUDED_LIBINTL" = yes; then |
345 | INTLOBJS="\$(GETTOBJS)" | 380 | INTLOBJS="\$(GETTOBJS)" |
346 | fi | 381 | fi |
347 | AC_SUBST(INTLOBJS) | 382 | AC_SUBST([INTLOBJS]) |
348 | 383 | ||
349 | dnl Enable libtool support if the surrounding package wishes it. | 384 | dnl Enable libtool support if the surrounding package wishes it. |
350 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | 385 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix |
351 | AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) | 386 | AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) |
352 | ]) | 387 | ]) |
353 | 388 | ||
354 | dnl For backward compatibility. Some Makefiles may be using this. | 389 | dnl For backward compatibility. Some Makefiles may be using this. |
355 | INTLLIBS="$LIBINTL" | 390 | INTLLIBS="$LIBINTL" |
356 | AC_SUBST(INTLLIBS) | 391 | AC_SUBST([INTLLIBS]) |
357 | 392 | ||
358 | dnl Make all documented variables known to autoconf. | 393 | dnl Make all documented variables known to autoconf. |
359 | AC_SUBST(LIBINTL) | 394 | AC_SUBST([LIBINTL]) |
360 | AC_SUBST(LTLIBINTL) | 395 | AC_SUBST([LTLIBINTL]) |
361 | AC_SUBST(POSUB) | 396 | AC_SUBST([POSUB]) |
362 | ]) | ||
363 | |||
364 | |||
365 | dnl Checks for special options needed on MacOS X. | ||
366 | dnl Defines INTL_MACOSX_LIBS. | ||
367 | AC_DEFUN([gt_INTL_MACOSX], | ||
368 | [ | ||
369 | dnl Check for API introduced in MacOS X 10.2. | ||
370 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], | ||
371 | gt_cv_func_CFPreferencesCopyAppValue, | ||
372 | [gt_save_LIBS="$LIBS" | ||
373 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | ||
374 | AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], | ||
375 | [CFPreferencesCopyAppValue(NULL, NULL)], | ||
376 | [gt_cv_func_CFPreferencesCopyAppValue=yes], | ||
377 | [gt_cv_func_CFPreferencesCopyAppValue=no]) | ||
378 | LIBS="$gt_save_LIBS"]) | ||
379 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then | ||
380 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, | ||
381 | [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) | ||
382 | fi | ||
383 | dnl Check for API introduced in MacOS X 10.3. | ||
384 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, | ||
385 | [gt_save_LIBS="$LIBS" | ||
386 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | ||
387 | AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], | ||
388 | [gt_cv_func_CFLocaleCopyCurrent=yes], | ||
389 | [gt_cv_func_CFLocaleCopyCurrent=no]) | ||
390 | LIBS="$gt_save_LIBS"]) | ||
391 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
392 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, | ||
393 | [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) | ||
394 | fi | ||
395 | INTL_MACOSX_LIBS= | ||
396 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
397 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" | ||
398 | fi | ||
399 | AC_SUBST([INTL_MACOSX_LIBS]) | ||
400 | ]) | 397 | ]) |
401 | 398 | ||
402 | 399 | ||
@@ -417,3 +414,7 @@ AC_DEFUN([AM_GNU_GETTEXT_NEED], | |||
417 | 414 | ||
418 | dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) | 415 | dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) |
419 | AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) | 416 | AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) |
417 | |||
418 | |||
419 | dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) | ||
420 | AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) | ||
diff --git a/m4/glib-2.0.m4 b/m4/glib-2.0.m4 index 13a3ce6..4b19019 100644 --- a/m4/glib-2.0.m4 +++ b/m4/glib-2.0.m4 | |||
@@ -1,9 +1,12 @@ | |||
1 | # Configure paths for GLIB | 1 | # Configure paths for GLIB |
2 | # Owen Taylor 1997-2001 | 2 | # Owen Taylor 1997-2001 |
3 | 3 | ||
4 | # Increment this whenever this file is changed. | ||
5 | #serial 1 | ||
6 | |||
4 | dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | 7 | dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
5 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or | 8 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject, |
6 | dnl gthread is specified in MODULES, pass to pkg-config | 9 | dnl gthread, or gio is specified in MODULES, pass to pkg-config |
7 | dnl | 10 | dnl |
8 | AC_DEFUN([AM_PATH_GLIB_2_0], | 11 | AC_DEFUN([AM_PATH_GLIB_2_0], |
9 | [dnl | 12 | [dnl |
@@ -19,29 +22,28 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run | |||
19 | gmodule) | 22 | gmodule) |
20 | pkg_config_args="$pkg_config_args gmodule-2.0" | 23 | pkg_config_args="$pkg_config_args gmodule-2.0" |
21 | ;; | 24 | ;; |
25 | gmodule-no-export) | ||
26 | pkg_config_args="$pkg_config_args gmodule-no-export-2.0" | ||
27 | ;; | ||
22 | gobject) | 28 | gobject) |
23 | pkg_config_args="$pkg_config_args gobject-2.0" | 29 | pkg_config_args="$pkg_config_args gobject-2.0" |
24 | ;; | 30 | ;; |
25 | gthread) | 31 | gthread) |
26 | pkg_config_args="$pkg_config_args gthread-2.0" | 32 | pkg_config_args="$pkg_config_args gthread-2.0" |
27 | ;; | 33 | ;; |
34 | gio*) | ||
35 | pkg_config_args="$pkg_config_args $module-2.0" | ||
36 | ;; | ||
28 | esac | 37 | esac |
29 | done | 38 | done |
30 | 39 | ||
31 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | 40 | PKG_PROG_PKG_CONFIG([0.16]) |
32 | 41 | ||
33 | no_glib="" | 42 | no_glib="" |
34 | 43 | ||
35 | if test x$PKG_CONFIG != xno ; then | 44 | if test "x$PKG_CONFIG" = x ; then |
36 | if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then | ||
37 | : | ||
38 | else | ||
39 | echo *** pkg-config too old; version 0.7 or better required. | ||
40 | no_glib=yes | ||
41 | PKG_CONFIG=no | ||
42 | fi | ||
43 | else | ||
44 | no_glib=yes | 45 | no_glib=yes |
46 | PKG_CONFIG=no | ||
45 | fi | 47 | fi |
46 | 48 | ||
47 | min_glib_version=ifelse([$1], ,2.0.0,$1) | 49 | min_glib_version=ifelse([$1], ,2.0.0,$1) |
@@ -65,6 +67,7 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run | |||
65 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` | 67 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` |
66 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` | 68 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` |
67 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` | 69 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` |
70 | GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0` | ||
68 | 71 | ||
69 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` | 72 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` |
70 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` | 73 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` |
@@ -90,16 +93,13 @@ dnl | |||
90 | #include <stdlib.h> | 93 | #include <stdlib.h> |
91 | 94 | ||
92 | int | 95 | int |
93 | main () | 96 | main (void) |
94 | { | 97 | { |
95 | int major, minor, micro; | 98 | unsigned int major, minor, micro; |
96 | char *tmp_version; | ||
97 | 99 | ||
98 | system ("touch conf.glibtest"); | 100 | fclose (fopen ("conf.glibtest", "w")); |
99 | 101 | ||
100 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | 102 | if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) { |
101 | tmp_version = g_strdup("$min_glib_version"); | ||
102 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | ||
103 | printf("%s, bad version string\n", "$min_glib_version"); | 103 | printf("%s, bad version string\n", "$min_glib_version"); |
104 | exit(1); | 104 | exit(1); |
105 | } | 105 | } |
@@ -138,9 +138,9 @@ main () | |||
138 | } | 138 | } |
139 | else | 139 | else |
140 | { | 140 | { |
141 | printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", | 141 | printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", |
142 | glib_major_version, glib_minor_version, glib_micro_version); | 142 | glib_major_version, glib_minor_version, glib_micro_version); |
143 | printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", | 143 | printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", |
144 | major, minor, micro); | 144 | major, minor, micro); |
145 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); | 145 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); |
146 | printf("***\n"); | 146 | printf("***\n"); |
@@ -201,6 +201,7 @@ main () | |||
201 | GLIB_GENMARSHAL="" | 201 | GLIB_GENMARSHAL="" |
202 | GOBJECT_QUERY="" | 202 | GOBJECT_QUERY="" |
203 | GLIB_MKENUMS="" | 203 | GLIB_MKENUMS="" |
204 | GLIB_COMPILE_RESOURCES="" | ||
204 | ifelse([$3], , :, [$3]) | 205 | ifelse([$3], , :, [$3]) |
205 | fi | 206 | fi |
206 | AC_SUBST(GLIB_CFLAGS) | 207 | AC_SUBST(GLIB_CFLAGS) |
@@ -208,5 +209,6 @@ main () | |||
208 | AC_SUBST(GLIB_GENMARSHAL) | 209 | AC_SUBST(GLIB_GENMARSHAL) |
209 | AC_SUBST(GOBJECT_QUERY) | 210 | AC_SUBST(GOBJECT_QUERY) |
210 | AC_SUBST(GLIB_MKENUMS) | 211 | AC_SUBST(GLIB_MKENUMS) |
212 | AC_SUBST(GLIB_COMPILE_RESOURCES) | ||
211 | rm -f conf.glibtest | 213 | rm -f conf.glibtest |
212 | ]) | 214 | ]) |
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4 index e8f5bfe..785bba0 100644 --- a/m4/glibc2.m4 +++ b/m4/glibc2.m4 | |||
@@ -1,5 +1,6 @@ | |||
1 | # glibc2.m4 serial 1 | 1 | # glibc2.m4 serial 3 |
2 | dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation, |
3 | dnl Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
@@ -9,22 +10,22 @@ dnl with or without modifications, as long as this notice is preserved. | |||
9 | 10 | ||
10 | AC_DEFUN([gt_GLIBC2], | 11 | AC_DEFUN([gt_GLIBC2], |
11 | [ | 12 | [ |
12 | AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, | 13 | AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], |
13 | ac_cv_gnu_library_2, | 14 | [ac_cv_gnu_library_2], |
14 | [AC_EGREP_CPP([Lucky GNU user], | 15 | [AC_EGREP_CPP([Lucky GNU user], |
15 | [ | 16 | [ |
16 | #include <features.h> | 17 | #include <features.h> |
17 | #ifdef __GNU_LIBRARY__ | 18 | #ifdef __GNU_LIBRARY__ |
18 | #if (__GLIBC__ >= 2) | 19 | #if (__GLIBC__ >= 2) && !defined __UCLIBC__ |
19 | Lucky GNU user | 20 | Lucky GNU user |
20 | #endif | 21 | #endif |
21 | #endif | 22 | #endif |
22 | ], | 23 | ], |
23 | ac_cv_gnu_library_2=yes, | 24 | [ac_cv_gnu_library_2=yes], |
24 | ac_cv_gnu_library_2=no) | 25 | [ac_cv_gnu_library_2=no]) |
25 | ] | 26 | ] |
26 | ) | 27 | ) |
27 | AC_SUBST(GLIBC2) | 28 | AC_SUBST([GLIBC2]) |
28 | GLIBC2="$ac_cv_gnu_library_2" | 29 | GLIBC2="$ac_cv_gnu_library_2" |
29 | ] | 30 | ] |
30 | ) | 31 | ) |
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 index d95fd98..dafebf5 100644 --- a/m4/glibc21.m4 +++ b/m4/glibc21.m4 | |||
@@ -1,30 +1,34 @@ | |||
1 | # glibc21.m4 serial 3 | 1 | # glibc21.m4 serial 5 |
2 | dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation, |
3 | dnl Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
6 | 7 | ||
7 | # Test for the GNU C Library, version 2.1 or newer. | 8 | # Test for the GNU C Library, version 2.1 or newer, or uClibc. |
8 | # From Bruno Haible. | 9 | # From Bruno Haible. |
9 | 10 | ||
10 | AC_DEFUN([gl_GLIBC21], | 11 | AC_DEFUN([gl_GLIBC21], |
11 | [ | 12 | [ |
12 | AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, | 13 | AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], |
13 | ac_cv_gnu_library_2_1, | 14 | [ac_cv_gnu_library_2_1], |
14 | [AC_EGREP_CPP([Lucky GNU user], | 15 | [AC_EGREP_CPP([Lucky], |
15 | [ | 16 | [ |
16 | #include <features.h> | 17 | #include <features.h> |
17 | #ifdef __GNU_LIBRARY__ | 18 | #ifdef __GNU_LIBRARY__ |
18 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | 19 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) |
19 | Lucky GNU user | 20 | Lucky GNU user |
20 | #endif | 21 | #endif |
21 | #endif | 22 | #endif |
22 | ], | 23 | #ifdef __UCLIBC__ |
23 | ac_cv_gnu_library_2_1=yes, | 24 | Lucky user |
24 | ac_cv_gnu_library_2_1=no) | 25 | #endif |
26 | ], | ||
27 | [ac_cv_gnu_library_2_1=yes], | ||
28 | [ac_cv_gnu_library_2_1=no]) | ||
25 | ] | 29 | ] |
26 | ) | 30 | ) |
27 | AC_SUBST(GLIBC21) | 31 | AC_SUBST([GLIBC21]) |
28 | GLIBC21="$ac_cv_gnu_library_2_1" | 32 | GLIBC21="$ac_cv_gnu_library_2_1" |
29 | ] | 33 | ] |
30 | ) | 34 | ) |
diff --git a/m4/gtk-3.0.m4 b/m4/gtk-3.0.m4 index 5238b43..983913a 100644 --- a/m4/gtk-3.0.m4 +++ b/m4/gtk-3.0.m4 | |||
@@ -1,18 +1,23 @@ | |||
1 | # Configure paths for GTK+ | 1 | # Configure paths for GTK+ |
2 | # Owen Taylor 1997-2001 | 2 | # Owen Taylor 1997-2001 |
3 | 3 | ||
4 | # Version number used by aclocal, see `info automake Serials`. | ||
5 | # Increment on every change. | ||
6 | #serial 1 | ||
7 | |||
4 | dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | 8 | dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
5 | dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, | 9 | dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, |
6 | dnl pass to pkg-config | 10 | dnl pass to pkg-config |
7 | dnl | 11 | dnl |
8 | AC_DEFUN([AM_PATH_GTK_3_0], | 12 | AC_DEFUN([AM_PATH_GTK_3_0], |
9 | [dnl | 13 | [m4_warn([obsolete], [AM_PATH_GTK_3_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk+-3.0]) instead]) |
10 | dnl Get the cflags and libraries from pkg-config | 14 | dnl Get the cflags and libraries from pkg-config |
11 | dnl | 15 | dnl |
12 | AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], | 16 | AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], |
13 | , enable_gtktest=yes) | 17 | , enable_gtktest=yes) |
18 | min_gtk_version=ifelse([$1], [], [3.0.0], [$1]) | ||
14 | 19 | ||
15 | pkg_config_args=gtk+-3.0 | 20 | pkg_config_args="gtk+-3.0 >= $min_gtk_version" |
16 | for module in . $4 | 21 | for module in . $4 |
17 | do | 22 | do |
18 | case "$module" in | 23 | case "$module" in |
@@ -24,31 +29,22 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run | |||
24 | 29 | ||
25 | no_gtk="" | 30 | no_gtk="" |
26 | 31 | ||
27 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | 32 | PKG_PROG_PKG_CONFIG([0.16]) |
28 | 33 | ||
29 | if test x$PKG_CONFIG != xno ; then | 34 | if test -z "$PKG_CONFIG"; then |
30 | if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then | ||
31 | : | ||
32 | else | ||
33 | echo "*** pkg-config too old; version 0.7 or better required." | ||
34 | no_gtk=yes | ||
35 | PKG_CONFIG=no | ||
36 | fi | ||
37 | else | ||
38 | no_gtk=yes | 35 | no_gtk=yes |
39 | fi | 36 | fi |
40 | 37 | ||
41 | min_gtk_version=ifelse([$1], ,3.0.0,$1) | ||
42 | AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) | 38 | AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) |
43 | 39 | ||
44 | if test x$PKG_CONFIG != xno ; then | 40 | if test -n "$PKG_CONFIG"; then |
45 | ## don't try to run the test against uninstalled libtool libs | 41 | ## don't try to run the test against uninstalled libtool libs |
46 | if $PKG_CONFIG --uninstalled $pkg_config_args; then | 42 | if $PKG_CONFIG --uninstalled $pkg_config_args; then |
47 | echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" | 43 | echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" |
48 | enable_gtktest=no | 44 | enable_gtktest=no |
49 | fi | 45 | fi |
50 | 46 | ||
51 | if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then | 47 | if $PKG_CONFIG $pkg_config_args; then |
52 | : | 48 | : |
53 | else | 49 | else |
54 | no_gtk=yes | 50 | no_gtk=yes |
@@ -82,14 +78,11 @@ dnl | |||
82 | int | 78 | int |
83 | main () | 79 | main () |
84 | { | 80 | { |
85 | int major, minor, micro; | 81 | unsigned int major, minor, micro; |
86 | char *tmp_version; | ||
87 | 82 | ||
88 | fclose (fopen ("conf.gtktest", "w")); | 83 | fclose (fopen ("conf.gtktest", "w")); |
89 | 84 | ||
90 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | 85 | if (sscanf("$min_gtk_version", "%u.%u.%u", &major, &minor, µ) != 3) { |
91 | tmp_version = g_strdup("$min_gtk_version"); | ||
92 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | ||
93 | printf("%s, bad version string\n", "$min_gtk_version"); | 86 | printf("%s, bad version string\n", "$min_gtk_version"); |
94 | exit(1); | 87 | exit(1); |
95 | } | 88 | } |
@@ -128,9 +121,9 @@ main () | |||
128 | } | 121 | } |
129 | else | 122 | else |
130 | { | 123 | { |
131 | printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", | 124 | printf("\n*** An old version of GTK+ (%u.%u.%u) was found.\n", |
132 | gtk_major_version, gtk_minor_version, gtk_micro_version); | 125 | gtk_major_version, gtk_minor_version, gtk_micro_version); |
133 | printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", | 126 | printf("*** You need a version of GTK+ newer than %u.%u.%u. The latest version of\n", |
134 | major, minor, micro); | 127 | major, minor, micro); |
135 | printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); | 128 | printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); |
136 | printf("***\n"); | 129 | printf("***\n"); |
@@ -155,7 +148,7 @@ main () | |||
155 | ifelse([$2], , :, [$2]) | 148 | ifelse([$2], , :, [$2]) |
156 | else | 149 | else |
157 | AC_MSG_RESULT(no) | 150 | AC_MSG_RESULT(no) |
158 | if test "$PKG_CONFIG" = "no" ; then | 151 | if test -z "$PKG_CONFIG"; then |
159 | echo "*** A new enough version of pkg-config was not found." | 152 | echo "*** A new enough version of pkg-config was not found." |
160 | echo "*** See http://pkgconfig.sourceforge.net" | 153 | echo "*** See http://pkgconfig.sourceforge.net" |
161 | else | 154 | else |
@@ -181,7 +174,7 @@ main () | |||
181 | echo "*** If you have an old version installed, it is best to remove it, although" | 174 | echo "*** If you have an old version installed, it is best to remove it, although" |
182 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], | 175 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], |
183 | [ echo "*** The test program failed to compile or link. See the file config.log for the" | 176 | [ echo "*** The test program failed to compile or link. See the file config.log for the" |
184 | echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) | 177 | echo "*** exact error that occurred. This usually means GTK+ is incorrectly installed."]) |
185 | CFLAGS="$ac_save_CFLAGS" | 178 | CFLAGS="$ac_save_CFLAGS" |
186 | LIBS="$ac_save_LIBS" | 179 | LIBS="$ac_save_LIBS" |
187 | fi | 180 | fi |
@@ -199,13 +192,15 @@ dnl GTK_CHECK_BACKEND(BACKEND-NAME [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTI | |||
199 | dnl Tests for BACKEND-NAME in the GTK targets list | 192 | dnl Tests for BACKEND-NAME in the GTK targets list |
200 | dnl | 193 | dnl |
201 | AC_DEFUN([GTK_CHECK_BACKEND], | 194 | AC_DEFUN([GTK_CHECK_BACKEND], |
202 | [ | 195 | [m4_warn([obsolete], [GTK_CHECK_BACKEND is deprecated, use PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-3.0]) or similar instead]) |
203 | pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0) | 196 | pkg_config_args=ifelse([$1],,gtk+-3.0, gtk+-$1-3.0) |
204 | min_gtk_version=ifelse([$2],,3.0.0,$2) | 197 | min_gtk_version=ifelse([$2],,3.0.0,$2) |
198 | pkg_config_args="$pkg_config_args >= $min_gtk_version" | ||
205 | 199 | ||
206 | AC_PATH_PROG(PKG_CONFIG, [pkg-config], [AC_MSG_ERROR([No pkg-config found])]) | 200 | PKG_PROG_PKG_CONFIG([0.16]) |
201 | AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([No pkg-config found])]) | ||
207 | 202 | ||
208 | if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args ; then | 203 | if $PKG_CONFIG $pkg_config_args ; then |
209 | target_found=yes | 204 | target_found=yes |
210 | else | 205 | else |
211 | target_found=no | 206 | target_found=no |
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4 index b8d7817..744b99e 100644 --- a/m4/intdiv0.m4 +++ b/m4/intdiv0.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # intdiv0.m4 serial 1 (gettext-0.11.3) | 1 | # intdiv0.m4 serial 6 (gettext-0.18.2) |
2 | dnl Copyright (C) 2002 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002, 2007-2008, 2010-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. |
@@ -14,19 +14,31 @@ AC_DEFUN([gt_INTDIV0], | |||
14 | AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], | 14 | AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], |
15 | gt_cv_int_divbyzero_sigfpe, | 15 | gt_cv_int_divbyzero_sigfpe, |
16 | [ | 16 | [ |
17 | AC_TRY_RUN([ | 17 | gt_cv_int_divbyzero_sigfpe= |
18 | changequote(,)dnl | ||
19 | case "$host_os" in | ||
20 | macos* | darwin[6-9]* | darwin[1-9][0-9]*) | ||
21 | # On Mac OS X 10.2 or newer, just assume the same as when cross- | ||
22 | # compiling. If we were to perform the real test, 1 Crash Report | ||
23 | # dialog window would pop up. | ||
24 | case "$host_cpu" in | ||
25 | i[34567]86 | x86_64) | ||
26 | gt_cv_int_divbyzero_sigfpe="guessing yes" ;; | ||
27 | esac | ||
28 | ;; | ||
29 | esac | ||
30 | changequote([,])dnl | ||
31 | if test -z "$gt_cv_int_divbyzero_sigfpe"; then | ||
32 | AC_RUN_IFELSE( | ||
33 | [AC_LANG_SOURCE([[ | ||
18 | #include <stdlib.h> | 34 | #include <stdlib.h> |
19 | #include <signal.h> | 35 | #include <signal.h> |
20 | 36 | ||
21 | static void | 37 | static void |
22 | #ifdef __cplusplus | ||
23 | sigfpe_handler (int sig) | 38 | sigfpe_handler (int sig) |
24 | #else | ||
25 | sigfpe_handler (sig) int sig; | ||
26 | #endif | ||
27 | { | 39 | { |
28 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ | 40 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ |
29 | exit (sig != SIGFPE); | 41 | _exit (sig != SIGFPE); |
30 | } | 42 | } |
31 | 43 | ||
32 | int x = 1; | 44 | int x = 1; |
@@ -48,23 +60,28 @@ int main () | |||
48 | 60 | ||
49 | z = x / y; | 61 | z = x / y; |
50 | nan = y / y; | 62 | nan = y / y; |
51 | exit (1); | 63 | exit (2); |
52 | } | 64 | } |
53 | ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, | 65 | ]])], |
54 | [ | 66 | [gt_cv_int_divbyzero_sigfpe=yes], |
55 | # Guess based on the CPU. | 67 | [gt_cv_int_divbyzero_sigfpe=no], |
56 | case "$host_cpu" in | 68 | [ |
57 | alpha* | i[34567]86 | m68k | s390*) | 69 | # Guess based on the CPU. |
58 | gt_cv_int_divbyzero_sigfpe="guessing yes";; | 70 | changequote(,)dnl |
59 | *) | 71 | case "$host_cpu" in |
60 | gt_cv_int_divbyzero_sigfpe="guessing no";; | 72 | alpha* | i[34567]86 | x86_64 | m68k | s390*) |
61 | esac | 73 | gt_cv_int_divbyzero_sigfpe="guessing yes";; |
62 | ]) | 74 | *) |
75 | gt_cv_int_divbyzero_sigfpe="guessing no";; | ||
76 | esac | ||
77 | changequote([,])dnl | ||
78 | ]) | ||
79 | fi | ||
63 | ]) | 80 | ]) |
64 | case "$gt_cv_int_divbyzero_sigfpe" in | 81 | case "$gt_cv_int_divbyzero_sigfpe" in |
65 | *yes) value=1;; | 82 | *yes) value=1;; |
66 | *) value=0;; | 83 | *) value=0;; |
67 | esac | 84 | esac |
68 | AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, | 85 | AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], |
69 | [Define if integer division by zero raises signal SIGFPE.]) | 86 | [Define if integer division by zero raises signal SIGFPE.]) |
70 | ]) | 87 | ]) |
@@ -1,23 +1,23 @@ | |||
1 | # intl.m4 serial 3 (gettext-0.16) | 1 | # intl.m4 serial 29 (gettext-0.19) |
2 | dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-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, |
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. |
6 | dnl | 6 | dnl |
7 | dnl This file can can be used in projects which are not available under | 7 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Library General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 9 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 10 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 11 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 12 | dnl by the GNU Library General Public License, and the rest of the GNU |
13 | dnl gettext package package is covered by the GNU General Public License. | 13 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 14 | dnl They are *not* in the public domain. |
15 | 15 | ||
16 | dnl Authors: | 16 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. |
19 | 19 | ||
20 | AC_PREREQ(2.52) | 20 | AC_PREREQ([2.60]) |
21 | 21 | ||
22 | dnl Checks for all prerequisites of the intl subdirectory, | 22 | dnl Checks for all prerequisites of the intl subdirectory, |
23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | 23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, |
@@ -25,7 +25,7 @@ dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | |||
25 | AC_DEFUN([AM_INTL_SUBDIR], | 25 | AC_DEFUN([AM_INTL_SUBDIR], |
26 | [ | 26 | [ |
27 | AC_REQUIRE([AC_PROG_INSTALL])dnl | 27 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
28 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake | 28 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
29 | AC_REQUIRE([AC_PROG_CC])dnl | 29 | AC_REQUIRE([AC_PROG_CC])dnl |
30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | 30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
31 | AC_REQUIRE([gt_GLIBC2])dnl | 31 | AC_REQUIRE([gt_GLIBC2])dnl |
@@ -33,7 +33,6 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
33 | AC_REQUIRE([gl_VISIBILITY])dnl | 33 | AC_REQUIRE([gl_VISIBILITY])dnl |
34 | AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl | 34 | AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl |
35 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl | 35 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl |
36 | AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl | ||
37 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl | 36 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl |
38 | AC_REQUIRE([gt_TYPE_WINT_T])dnl | 37 | AC_REQUIRE([gt_TYPE_WINT_T])dnl |
39 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | 38 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) |
@@ -41,26 +40,36 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
41 | AC_REQUIRE([gt_PRINTF_POSIX]) | 40 | AC_REQUIRE([gt_PRINTF_POSIX]) |
42 | AC_REQUIRE([gl_GLIBC21])dnl | 41 | AC_REQUIRE([gl_GLIBC21])dnl |
43 | AC_REQUIRE([gl_XSIZE])dnl | 42 | AC_REQUIRE([gl_XSIZE])dnl |
43 | AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl | ||
44 | AC_REQUIRE([gt_INTL_MACOSX])dnl | 44 | AC_REQUIRE([gt_INTL_MACOSX])dnl |
45 | AC_REQUIRE([gl_EXTERN_INLINE])dnl | ||
46 | AC_REQUIRE([gt_GL_ATTRIBUTE])dnl | ||
47 | |||
48 | dnl Support for automake's --enable-silent-rules. | ||
49 | case "$enable_silent_rules" in | ||
50 | yes) INTL_DEFAULT_VERBOSITY=0;; | ||
51 | no) INTL_DEFAULT_VERBOSITY=1;; | ||
52 | *) INTL_DEFAULT_VERBOSITY=1;; | ||
53 | esac | ||
54 | AC_SUBST([INTL_DEFAULT_VERBOSITY]) | ||
45 | 55 | ||
46 | AC_CHECK_TYPE([ptrdiff_t], , | 56 | AC_CHECK_TYPE([ptrdiff_t], , |
47 | [AC_DEFINE([ptrdiff_t], [long], | 57 | [AC_DEFINE([ptrdiff_t], [long], |
48 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) | 58 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) |
49 | ]) | 59 | ]) |
50 | AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) | 60 | AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h]) |
51 | AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) | 61 | AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ |
62 | snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) | ||
52 | 63 | ||
53 | dnl Use the _snprintf function only if it is declared (because on NetBSD it | 64 | dnl Use the _snprintf function only if it is declared (because on NetBSD it |
54 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). | 65 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). |
55 | gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) | 66 | AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include <stdio.h>]) |
56 | gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) | ||
57 | 67 | ||
58 | dnl Use the *_unlocked functions only if they are declared. | 68 | dnl Use the *_unlocked functions only if they are declared. |
59 | dnl (because some of them were defined without being declared in Solaris | 69 | dnl (because some of them were defined without being declared in Solaris |
60 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | 70 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
61 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | 71 | dnl on Solaris 2.5.1 to run on Solaris 2.6). |
62 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | 72 | AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>]) |
63 | gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) | ||
64 | 73 | ||
65 | case $gt_cv_func_printf_posix in | 74 | case $gt_cv_func_printf_posix in |
66 | *yes) HAVE_POSIX_PRINTF=1 ;; | 75 | *yes) HAVE_POSIX_PRINTF=1 ;; |
@@ -79,6 +88,12 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
79 | HAVE_SNPRINTF=0 | 88 | HAVE_SNPRINTF=0 |
80 | fi | 89 | fi |
81 | AC_SUBST([HAVE_SNPRINTF]) | 90 | AC_SUBST([HAVE_SNPRINTF]) |
91 | if test "$ac_cv_func_newlocale" = yes; then | ||
92 | HAVE_NEWLOCALE=1 | ||
93 | else | ||
94 | HAVE_NEWLOCALE=0 | ||
95 | fi | ||
96 | AC_SUBST([HAVE_NEWLOCALE]) | ||
82 | if test "$ac_cv_func_wprintf" = yes; then | 97 | if test "$ac_cv_func_wprintf" = yes; then |
83 | HAVE_WPRINTF=1 | 98 | HAVE_WPRINTF=1 |
84 | else | 99 | else |
@@ -98,7 +113,7 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
98 | dnl exported variables _also_ in the static library. | 113 | dnl exported variables _also_ in the static library. |
99 | if test "$enable_shared" = yes; then | 114 | if test "$enable_shared" = yes; then |
100 | case "$host_os" in | 115 | case "$host_os" in |
101 | cygwin*) is_woe32dll=yes ;; | 116 | mingw* | cygwin*) is_woe32dll=yes ;; |
102 | *) is_woe32dll=no ;; | 117 | *) is_woe32dll=no ;; |
103 | esac | 118 | esac |
104 | else | 119 | else |
@@ -107,6 +122,31 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
107 | WOE32DLL=$is_woe32dll | 122 | WOE32DLL=$is_woe32dll |
108 | AC_SUBST([WOE32DLL]) | 123 | AC_SUBST([WOE32DLL]) |
109 | 124 | ||
125 | dnl On mingw and Cygwin, we can activate special Makefile rules which add | ||
126 | dnl version information to the shared libraries and executables. | ||
127 | case "$host_os" in | ||
128 | mingw* | cygwin*) is_woe32=yes ;; | ||
129 | *) is_woe32=no ;; | ||
130 | esac | ||
131 | WOE32=$is_woe32 | ||
132 | AC_SUBST([WOE32]) | ||
133 | if test $WOE32 = yes; then | ||
134 | dnl Check for a program that compiles Windows resource files. | ||
135 | AC_CHECK_TOOL([WINDRES], [windres]) | ||
136 | fi | ||
137 | |||
138 | dnl Determine whether when creating a library, "-lc" should be passed to | ||
139 | dnl libtool or not. On many platforms, it is required for the libtool option | ||
140 | dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool | ||
141 | dnl in the *.la files - makes it impossible to create multithreaded programs, | ||
142 | dnl because libtool also reorders the -lc to come before the -pthread, and | ||
143 | dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>. | ||
144 | case "$host_os" in | ||
145 | hpux*) LTLIBC="" ;; | ||
146 | *) LTLIBC="-lc" ;; | ||
147 | esac | ||
148 | AC_SUBST([LTLIBC]) | ||
149 | |||
110 | dnl Rename some macros and functions used for locking. | 150 | dnl Rename some macros and functions used for locking. |
111 | AH_BOTTOM([ | 151 | AH_BOTTOM([ |
112 | #define __libc_lock_t gl_lock_t | 152 | #define __libc_lock_t gl_lock_t |
@@ -122,22 +162,31 @@ AC_DEFUN([AM_INTL_SUBDIR], | |||
122 | #define __libc_lock_lock_recursive gl_recursive_lock_lock | 162 | #define __libc_lock_lock_recursive gl_recursive_lock_lock |
123 | #define __libc_lock_unlock_recursive gl_recursive_lock_unlock | 163 | #define __libc_lock_unlock_recursive gl_recursive_lock_unlock |
124 | #define glthread_in_use libintl_thread_in_use | 164 | #define glthread_in_use libintl_thread_in_use |
125 | #define glthread_lock_init libintl_lock_init | 165 | #define glthread_lock_init_func libintl_lock_init_func |
126 | #define glthread_lock_lock libintl_lock_lock | 166 | #define glthread_lock_lock_func libintl_lock_lock_func |
127 | #define glthread_lock_unlock libintl_lock_unlock | 167 | #define glthread_lock_unlock_func libintl_lock_unlock_func |
128 | #define glthread_lock_destroy libintl_lock_destroy | 168 | #define glthread_lock_destroy_func libintl_lock_destroy_func |
129 | #define glthread_rwlock_init libintl_rwlock_init | 169 | #define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded |
130 | #define glthread_rwlock_rdlock libintl_rwlock_rdlock | 170 | #define glthread_rwlock_init_func libintl_rwlock_init_func |
131 | #define glthread_rwlock_wrlock libintl_rwlock_wrlock | 171 | #define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded |
132 | #define glthread_rwlock_unlock libintl_rwlock_unlock | 172 | #define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func |
133 | #define glthread_rwlock_destroy libintl_rwlock_destroy | 173 | #define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded |
134 | #define glthread_recursive_lock_init libintl_recursive_lock_init | 174 | #define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func |
135 | #define glthread_recursive_lock_lock libintl_recursive_lock_lock | 175 | #define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded |
136 | #define glthread_recursive_lock_unlock libintl_recursive_lock_unlock | 176 | #define glthread_rwlock_unlock_func libintl_rwlock_unlock_func |
137 | #define glthread_recursive_lock_destroy libintl_recursive_lock_destroy | 177 | #define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded |
138 | #define glthread_once libintl_once | 178 | #define glthread_rwlock_destroy_func libintl_rwlock_destroy_func |
139 | #define glthread_once_call libintl_once_call | 179 | #define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded |
180 | #define glthread_recursive_lock_init_func libintl_recursive_lock_init_func | ||
181 | #define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded | ||
182 | #define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func | ||
183 | #define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded | ||
184 | #define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func | ||
185 | #define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded | ||
186 | #define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func | ||
187 | #define glthread_once_func libintl_once_func | ||
140 | #define glthread_once_singlethreaded libintl_once_singlethreaded | 188 | #define glthread_once_singlethreaded libintl_once_singlethreaded |
189 | #define glthread_once_multithreaded libintl_once_multithreaded | ||
141 | ]) | 190 | ]) |
142 | ]) | 191 | ]) |
143 | 192 | ||
@@ -171,45 +220,35 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE], | |||
171 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | 220 | AC_REQUIRE([gt_INTTYPES_PRI])dnl |
172 | AC_REQUIRE([gl_LOCK])dnl | 221 | AC_REQUIRE([gl_LOCK])dnl |
173 | 222 | ||
174 | AC_TRY_LINK( | 223 | AC_LINK_IFELSE( |
175 | [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], | 224 | [AC_LANG_PROGRAM( |
176 | [], | 225 | [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], |
177 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, | 226 | [[]])], |
227 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], | ||
178 | [Define to 1 if the compiler understands __builtin_expect.])]) | 228 | [Define to 1 if the compiler understands __builtin_expect.])]) |
179 | 229 | ||
180 | AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) | 230 | AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) |
181 | AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ | 231 | AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ |
182 | stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ | 232 | stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ |
183 | argz_next __fsetlocking]) | 233 | argz_stringify argz_next __fsetlocking]) |
234 | |||
235 | dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have | ||
236 | dnl it nor the equivalent. | ||
237 | if test $ac_cv_func_uselocale = yes; then | ||
238 | AC_CHECK_FUNCS([getlocalename_l]) | ||
239 | fi | ||
184 | 240 | ||
185 | dnl Use the *_unlocked functions only if they are declared. | 241 | dnl Use the *_unlocked functions only if they are declared. |
186 | dnl (because some of them were defined without being declared in Solaris | 242 | dnl (because some of them were defined without being declared in Solaris |
187 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | 243 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
188 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | 244 | dnl on Solaris 2.5.1 to run on Solaris 2.6). |
189 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | 245 | AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include <stdio.h>]) |
190 | gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) | ||
191 | gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) | ||
192 | 246 | ||
193 | AM_ICONV | 247 | AM_ICONV |
194 | 248 | ||
195 | dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, | ||
196 | dnl and a _NL_LOCALE_NAME macro always. | ||
197 | AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, | ||
198 | [AC_TRY_LINK([#include <langinfo.h> | ||
199 | #include <locale.h>], | ||
200 | [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));], | ||
201 | gt_cv_nl_locale_name=yes, | ||
202 | gt_cv_nl_locale_name=no) | ||
203 | ]) | ||
204 | if test $gt_cv_nl_locale_name = yes; then | ||
205 | AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, | ||
206 | [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) | ||
207 | fi | ||
208 | |||
209 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, | 249 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, |
210 | dnl because plural.y uses bison specific features. It requires at least | 250 | dnl because plural.y uses bison specific features. It requires at least |
211 | dnl bison-1.26 because earlier versions generate a plural.c that doesn't | 251 | dnl bison-2.7 for %define api.pure. |
212 | dnl compile. | ||
213 | dnl bison is only needed for the maintainer (who touches plural.y). But in | 252 | dnl bison is only needed for the maintainer (who touches plural.y). But in |
214 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put | 253 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put |
215 | dnl the rule in general Makefile. Now, some people carelessly touch the | 254 | dnl the rule in general Makefile. Now, some people carelessly touch the |
@@ -226,7 +265,7 @@ changequote(<<,>>)dnl | |||
226 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | 265 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
227 | case $ac_prog_version in | 266 | case $ac_prog_version in |
228 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | 267 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; |
229 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | 268 | 2.[7-9]* | [3-9].*) |
230 | changequote([,])dnl | 269 | changequote([,])dnl |
231 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | 270 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; |
232 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | 271 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; |
@@ -238,22 +277,28 @@ changequote([,])dnl | |||
238 | fi | 277 | fi |
239 | ]) | 278 | ]) |
240 | 279 | ||
280 | dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from | ||
281 | dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib. | ||
282 | AC_DEFUN([gt_GL_ATTRIBUTE], [ | ||
283 | m4_ifndef([gl_[]COMMON], | ||
284 | AH_VERBATIM([gt_gl_attribute], | ||
285 | [/* Define as a marker that can be attached to declarations that might not | ||
286 | be used. This helps to reduce warnings, such as from | ||
287 | GCC -Wunused-parameter. */ | ||
288 | #ifndef _GL_UNUSED | ||
289 | # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) | ||
290 | # define _GL_UNUSED __attribute__ ((__unused__)) | ||
291 | # else | ||
292 | # define _GL_UNUSED | ||
293 | # endif | ||
294 | #endif | ||
241 | 295 | ||
242 | dnl gt_CHECK_DECL(FUNC, INCLUDES) | 296 | /* The __pure__ attribute was added in gcc 2.96. */ |
243 | dnl Check whether a function is declared. | 297 | #ifndef _GL_ATTRIBUTE_PURE |
244 | AC_DEFUN([gt_CHECK_DECL], | 298 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) |
245 | [ | 299 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
246 | AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, | 300 | # else |
247 | [AC_TRY_COMPILE([$2], [ | 301 | # define _GL_ATTRIBUTE_PURE /* empty */ |
248 | #ifndef $1 | 302 | # endif |
249 | char *p = (char *) $1; | ||
250 | #endif | 303 | #endif |
251 | ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) | 304 | ]))]) |
252 | if test $ac_cv_have_decl_$1 = yes; then | ||
253 | gt_value=1 | ||
254 | else | ||
255 | gt_value=0 | ||
256 | fi | ||
257 | AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], | ||
258 | [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) | ||
259 | ]) | ||
diff --git a/m4/intldir.m4 b/m4/intldir.m4 index 7a28843..c688f46 100644 --- a/m4/intldir.m4 +++ b/m4/intldir.m4 | |||
@@ -1,19 +1,19 @@ | |||
1 | # intldir.m4 serial 1 (gettext-0.16) | 1 | # intldir.m4 serial 2 (gettext-0.18) |
2 | dnl Copyright (C) 2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006, 2009-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, |
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. |
6 | dnl | 6 | dnl |
7 | dnl This file can can be used in projects which are not available under | 7 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Library General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 9 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 10 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 11 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 12 | dnl by the GNU Library General Public License, and the rest of the GNU |
13 | dnl gettext package package is covered by the GNU General Public License. | 13 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 14 | dnl They are *not* in the public domain. |
15 | 15 | ||
16 | AC_PREREQ(2.52) | 16 | AC_PREREQ([2.52]) |
17 | 17 | ||
18 | dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. | 18 | dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. |
19 | AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) | 19 | AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) |
diff --git a/m4/intmax.m4 b/m4/intmax.m4 index ce7a8a4..1a47107 100644 --- a/m4/intmax.m4 +++ b/m4/intmax.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # intmax.m4 serial 3 (gettext-0.16) | 1 | # intmax.m4 serial 6 (gettext-0.18.2) |
2 | dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002-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. |
@@ -12,8 +12,10 @@ AC_DEFUN([gt_TYPE_INTMAX_T], | |||
12 | [ | 12 | [ |
13 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | 13 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) |
14 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | 14 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) |
15 | AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, | 15 | AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], |
16 | [AC_TRY_COMPILE([ | 16 | [AC_COMPILE_IFELSE( |
17 | [AC_LANG_PROGRAM( | ||
18 | [[ | ||
17 | #include <stddef.h> | 19 | #include <stddef.h> |
18 | #include <stdlib.h> | 20 | #include <stdlib.h> |
19 | #if HAVE_STDINT_H_WITH_UINTMAX | 21 | #if HAVE_STDINT_H_WITH_UINTMAX |
@@ -22,12 +24,13 @@ AC_DEFUN([gt_TYPE_INTMAX_T], | |||
22 | #if HAVE_INTTYPES_H_WITH_UINTMAX | 24 | #if HAVE_INTTYPES_H_WITH_UINTMAX |
23 | #include <inttypes.h> | 25 | #include <inttypes.h> |
24 | #endif | 26 | #endif |
25 | ], [intmax_t x = -1; | 27 | ]], |
26 | return !x;], | 28 | [[intmax_t x = -1; |
27 | gt_cv_c_intmax_t=yes, | 29 | return !x;]])], |
28 | gt_cv_c_intmax_t=no)]) | 30 | [gt_cv_c_intmax_t=yes], |
31 | [gt_cv_c_intmax_t=no])]) | ||
29 | if test $gt_cv_c_intmax_t = yes; then | 32 | if test $gt_cv_c_intmax_t = yes; then |
30 | AC_DEFINE(HAVE_INTMAX_T, 1, | 33 | AC_DEFINE([HAVE_INTMAX_T], [1], |
31 | [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) | 34 | [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) |
32 | fi | 35 | fi |
33 | ]) | 36 | ]) |
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 index 7c7f894..ae20183 100644 --- a/m4/inttypes-pri.m4 +++ b/m4/inttypes-pri.m4 | |||
@@ -1,12 +1,12 @@ | |||
1 | # inttypes-pri.m4 serial 4 (gettext-0.16) | 1 | # inttypes-pri.m4 serial 7 (gettext-0.18.2) |
2 | dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1997-2002, 2006, 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. |
6 | 6 | ||
7 | dnl From Bruno Haible. | 7 | dnl From Bruno Haible. |
8 | 8 | ||
9 | AC_PREREQ(2.52) | 9 | AC_PREREQ([2.53]) |
10 | 10 | ||
11 | # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* | 11 | # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* |
12 | # macros to non-string values. This is the case on AIX 4.3.3. | 12 | # macros to non-string values. This is the case on AIX 4.3.3. |
@@ -16,17 +16,23 @@ AC_DEFUN([gt_INTTYPES_PRI], | |||
16 | AC_CHECK_HEADERS([inttypes.h]) | 16 | AC_CHECK_HEADERS([inttypes.h]) |
17 | if test $ac_cv_header_inttypes_h = yes; then | 17 | if test $ac_cv_header_inttypes_h = yes; then |
18 | AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], | 18 | AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], |
19 | gt_cv_inttypes_pri_broken, | 19 | [gt_cv_inttypes_pri_broken], |
20 | [ | 20 | [ |
21 | AC_TRY_COMPILE([#include <inttypes.h> | 21 | AC_COMPILE_IFELSE( |
22 | [AC_LANG_PROGRAM( | ||
23 | [[ | ||
24 | #include <inttypes.h> | ||
22 | #ifdef PRId32 | 25 | #ifdef PRId32 |
23 | char *p = PRId32; | 26 | char *p = PRId32; |
24 | #endif | 27 | #endif |
25 | ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) | 28 | ]], |
29 | [[]])], | ||
30 | [gt_cv_inttypes_pri_broken=no], | ||
31 | [gt_cv_inttypes_pri_broken=yes]) | ||
26 | ]) | 32 | ]) |
27 | fi | 33 | fi |
28 | if test "$gt_cv_inttypes_pri_broken" = yes; then | 34 | if test "$gt_cv_inttypes_pri_broken" = yes; then |
29 | AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, | 35 | AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], |
30 | [Define if <inttypes.h> exists and defines unusable PRI* macros.]) | 36 | [Define if <inttypes.h> exists and defines unusable PRI* macros.]) |
31 | PRI_MACROS_BROKEN=1 | 37 | PRI_MACROS_BROKEN=1 |
32 | else | 38 | else |
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 index edc8ecb..7657119 100644 --- a/m4/inttypes_h.m4 +++ b/m4/inttypes_h.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # inttypes_h.m4 serial 7 | 1 | # inttypes_h.m4 serial 10 |
2 | dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1997-2004, 2006, 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. |
@@ -11,15 +11,18 @@ dnl From Paul Eggert. | |||
11 | 11 | ||
12 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], | 12 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], |
13 | [ | 13 | [ |
14 | AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, | 14 | AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], |
15 | [AC_TRY_COMPILE( | 15 | [AC_COMPILE_IFELSE( |
16 | [#include <sys/types.h> | 16 | [AC_LANG_PROGRAM( |
17 | #include <inttypes.h>], | 17 | [[ |
18 | [uintmax_t i = (uintmax_t) -1; return !i;], | 18 | #include <sys/types.h> |
19 | gl_cv_header_inttypes_h=yes, | 19 | #include <inttypes.h> |
20 | gl_cv_header_inttypes_h=no)]) | 20 | ]], |
21 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], | ||
22 | [gl_cv_header_inttypes_h=yes], | ||
23 | [gl_cv_header_inttypes_h=no])]) | ||
21 | if test $gl_cv_header_inttypes_h = yes; then | 24 | if test $gl_cv_header_inttypes_h = yes; then |
22 | AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, | 25 | AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], |
23 | [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, | 26 | [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, |
24 | and declares uintmax_t. ]) | 27 | and declares uintmax_t. ]) |
25 | fi | 28 | fi |
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4 index 19aa77e..1c24d6d 100644 --- a/m4/lcmessage.m4 +++ b/m4/lcmessage.m4 | |||
@@ -1,16 +1,17 @@ | |||
1 | # lcmessage.m4 serial 4 (gettext-0.14.2) | 1 | # lcmessage.m4 serial 7 (gettext-0.18.2) |
2 | dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software |
3 | dnl Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
6 | dnl | 7 | dnl |
7 | dnl This file can can be used in projects which are not available under | 8 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 9 | dnl the GNU General Public License or the GNU Library General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 10 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 11 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 12 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 13 | dnl by the GNU Library General Public License, and the rest of the GNU |
13 | dnl gettext package package is covered by the GNU General Public License. | 14 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 15 | dnl They are *not* in the public domain. |
15 | 16 | ||
16 | dnl Authors: | 17 | dnl Authors: |
@@ -20,11 +21,15 @@ dnl Ulrich Drepper <drepper@cygnus.com>, 1995. | |||
20 | 21 | ||
21 | AC_DEFUN([gt_LC_MESSAGES], | 22 | AC_DEFUN([gt_LC_MESSAGES], |
22 | [ | 23 | [ |
23 | AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, | 24 | AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], |
24 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], | 25 | [AC_LINK_IFELSE( |
25 | gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) | 26 | [AC_LANG_PROGRAM( |
27 | [[#include <locale.h>]], | ||
28 | [[return LC_MESSAGES]])], | ||
29 | [gt_cv_val_LC_MESSAGES=yes], | ||
30 | [gt_cv_val_LC_MESSAGES=no])]) | ||
26 | if test $gt_cv_val_LC_MESSAGES = yes; then | 31 | if test $gt_cv_val_LC_MESSAGES = yes; then |
27 | AC_DEFINE(HAVE_LC_MESSAGES, 1, | 32 | AC_DEFINE([HAVE_LC_MESSAGES], [1], |
28 | [Define if your <locale.h> file defines LC_MESSAGES.]) | 33 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
29 | fi | 34 | fi |
30 | ]) | 35 | ]) |
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index 96c4e2c..6209de6 100644 --- a/m4/lib-ld.m4 +++ b/m4/lib-ld.m4 | |||
@@ -1,50 +1,56 @@ | |||
1 | # lib-ld.m4 serial 3 (gettext-0.13) | 1 | # lib-ld.m4 serial 6 |
2 | dnl Copyright (C) 1996-2003 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. |
6 | 6 | ||
7 | dnl Subroutines of libtool.m4, | 7 | dnl Subroutines of libtool.m4, |
8 | dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision | 8 | dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid |
9 | dnl with libtool.m4. | 9 | dnl collision with libtool.m4. |
10 | 10 | ||
11 | dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. | 11 | dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. |
12 | AC_DEFUN([AC_LIB_PROG_LD_GNU], | 12 | AC_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. |
15 | case `$LD -v 2>&1 </dev/null` in | 15 | case `$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 | ;; | ||
20 | esac]) | 22 | esac]) |
21 | with_gnu_ld=$acl_cv_prog_gnu_ld | 23 | with_gnu_ld=$acl_cv_prog_gnu_ld |
22 | ]) | 24 | ]) |
23 | 25 | ||
24 | dnl From libtool-1.4. Sets the variable LD. | 26 | dnl From libtool-2.4. Sets the variable LD. |
25 | AC_DEFUN([AC_LIB_PROG_LD], | 27 | AC_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]], | ||
28 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | ||
29 | AC_REQUIRE([AC_PROG_CC])dnl | ||
30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | 29 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
30 | |||
31 | AC_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. |
33 | if test "${PATH_SEPARATOR+set}" != set; then | 39 | if 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 | ||
43 | fi | 48 | fi |
49 | |||
44 | ac_prog=ld | 50 | ac_prog=ld |
45 | if test "$GCC" = yes; then | 51 | if 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,12 +60,12 @@ 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" |
65 | ;; | 71 | ;; |
@@ -77,33 +83,36 @@ elif test "$with_gnu_ld" = yes; then | |||
77 | else | 83 | else |
78 | AC_MSG_CHECKING([for non-GNU ld]) | 84 | AC_MSG_CHECKING([for non-GNU ld]) |
79 | fi | 85 | fi |
80 | AC_CACHE_VAL(acl_cv_path_LD, | 86 | AC_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" |
99 | else | 108 | else |
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. |
101 | fi]) | 110 | fi]) |
102 | LD="$acl_cv_path_LD" | 111 | LD="$acl_cv_path_LD" |
103 | if test -n "$LD"; then | 112 | if test -n "$LD"; then |
104 | AC_MSG_RESULT($LD) | 113 | AC_MSG_RESULT([$LD]) |
105 | else | 114 | else |
106 | AC_MSG_RESULT(no) | 115 | AC_MSG_RESULT([no]) |
107 | fi | 116 | fi |
108 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | 117 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
109 | AC_LIB_PROG_LD_GNU | 118 | AC_LIB_PROG_LD_GNU |
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 index f95b7ba..2f51855 100644 --- a/m4/lib-link.m4 +++ b/m4/lib-link.m4 | |||
@@ -1,58 +1,66 @@ | |||
1 | # lib-link.m4 serial 9 (gettext-0.16) | 1 | # lib-link.m4 serial 26 (gettext-0.18.2) |
2 | dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2001-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. |
6 | 6 | ||
7 | dnl From Bruno Haible. | 7 | dnl From Bruno Haible. |
8 | 8 | ||
9 | AC_PREREQ(2.50) | 9 | AC_PREREQ([2.54]) |
10 | 10 | ||
11 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | 11 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and |
12 | dnl the libraries corresponding to explicit and implicit dependencies. | 12 | dnl the libraries corresponding to explicit and implicit dependencies. |
13 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and | 13 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and |
14 | dnl augments the CPPFLAGS variable. | 14 | dnl augments the CPPFLAGS variable. |
15 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | ||
16 | dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
15 | AC_DEFUN([AC_LIB_LINKFLAGS], | 17 | AC_DEFUN([AC_LIB_LINKFLAGS], |
16 | [ | 18 | [ |
17 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | 19 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
18 | AC_REQUIRE([AC_LIB_RPATH]) | 20 | AC_REQUIRE([AC_LIB_RPATH]) |
19 | define([Name],[translit([$1],[./-], [___])]) | 21 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) |
20 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | 22 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
21 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | 23 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
22 | 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], [ |
23 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | 25 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) |
24 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" | 26 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" |
25 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" | 27 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" |
26 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" | 28 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" |
29 | ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" | ||
27 | ]) | 30 | ]) |
28 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" | 31 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" |
29 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" | 32 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" |
30 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" | 33 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" |
34 | LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" | ||
31 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | 35 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) |
32 | AC_SUBST([LIB]NAME) | 36 | AC_SUBST([LIB]NAME) |
33 | AC_SUBST([LTLIB]NAME) | 37 | AC_SUBST([LTLIB]NAME) |
38 | AC_SUBST([LIB]NAME[_PREFIX]) | ||
34 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | 39 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the |
35 | dnl results of this search when this library appears as a dependency. | 40 | dnl results of this search when this library appears as a dependency. |
36 | HAVE_LIB[]NAME=yes | 41 | HAVE_LIB[]NAME=yes |
37 | undefine([Name]) | 42 | popdef([NAME]) |
38 | undefine([NAME]) | 43 | popdef([Name]) |
39 | ]) | 44 | ]) |
40 | 45 | ||
41 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) | 46 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) |
42 | dnl searches for libname and the libraries corresponding to explicit and | 47 | dnl searches for libname and the libraries corresponding to explicit and |
43 | dnl implicit dependencies, together with the specified include files and | 48 | dnl implicit dependencies, together with the specified include files and |
44 | dnl the ability to compile and link the specified testcode. If found, it | 49 | dnl the ability to compile and link the specified testcode. The missing-message |
45 | dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and | 50 | dnl defaults to 'no' and may contain additional hints for the user. |
46 | dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and | 51 | dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} |
52 | dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and | ||
47 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | 53 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs |
48 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | 54 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. |
55 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | ||
56 | dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
49 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | 57 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], |
50 | [ | 58 | [ |
51 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | 59 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
52 | AC_REQUIRE([AC_LIB_RPATH]) | 60 | AC_REQUIRE([AC_LIB_RPATH]) |
53 | define([Name],[translit([$1],[./-], [___])]) | 61 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) |
54 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | 62 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
55 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | 63 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
56 | 64 | ||
57 | 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 |
58 | dnl accordingly. | 66 | dnl accordingly. |
@@ -66,13 +74,26 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | |||
66 | 74 | ||
67 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | 75 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ |
68 | ac_save_LIBS="$LIBS" | 76 | ac_save_LIBS="$LIBS" |
69 | LIBS="$LIBS $LIB[]NAME" | 77 | dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, |
70 | AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) | 78 | dnl because these -l options might require -L options that are present in |
79 | dnl LIBS. -l options benefit only from the -L options listed before it. | ||
80 | dnl Otherwise, add it to the front of LIBS, because it may be a static | ||
81 | dnl library that depends on another static library that is present in LIBS. | ||
82 | dnl Static libraries benefit only from the static libraries listed after | ||
83 | dnl it. | ||
84 | case " $LIB[]NAME" in | ||
85 | *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; | ||
86 | *) LIBS="$LIB[]NAME $LIBS" ;; | ||
87 | esac | ||
88 | AC_LINK_IFELSE( | ||
89 | [AC_LANG_PROGRAM([[$3]], [[$4]])], | ||
90 | [ac_cv_lib[]Name=yes], | ||
91 | [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) | ||
71 | LIBS="$ac_save_LIBS" | 92 | LIBS="$ac_save_LIBS" |
72 | ]) | 93 | ]) |
73 | if test "$ac_cv_lib[]Name" = yes; then | 94 | if test "$ac_cv_lib[]Name" = yes; then |
74 | HAVE_LIB[]NAME=yes | 95 | HAVE_LIB[]NAME=yes |
75 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) | 96 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) |
76 | AC_MSG_CHECKING([how to link with lib[]$1]) | 97 | AC_MSG_CHECKING([how to link with lib[]$1]) |
77 | AC_MSG_RESULT([$LIB[]NAME]) | 98 | AC_MSG_RESULT([$LIB[]NAME]) |
78 | else | 99 | else |
@@ -82,17 +103,25 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | |||
82 | CPPFLAGS="$ac_save_CPPFLAGS" | 103 | CPPFLAGS="$ac_save_CPPFLAGS" |
83 | LIB[]NAME= | 104 | LIB[]NAME= |
84 | LTLIB[]NAME= | 105 | LTLIB[]NAME= |
106 | LIB[]NAME[]_PREFIX= | ||
85 | fi | 107 | fi |
86 | AC_SUBST([HAVE_LIB]NAME) | 108 | AC_SUBST([HAVE_LIB]NAME) |
87 | AC_SUBST([LIB]NAME) | 109 | AC_SUBST([LIB]NAME) |
88 | AC_SUBST([LTLIB]NAME) | 110 | AC_SUBST([LTLIB]NAME) |
89 | undefine([Name]) | 111 | AC_SUBST([LIB]NAME[_PREFIX]) |
90 | undefine([NAME]) | 112 | popdef([NAME]) |
113 | popdef([Name]) | ||
91 | ]) | 114 | ]) |
92 | 115 | ||
93 | dnl Determine the platform dependent parameters needed to use rpath: | 116 | dnl Determine the platform dependent parameters needed to use rpath: |
94 | dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, | 117 | dnl acl_libext, |
95 | dnl hardcode_direct, hardcode_minus_L. | 118 | dnl acl_shlibext, |
119 | dnl acl_libname_spec, | ||
120 | dnl acl_library_names_spec, | ||
121 | dnl acl_hardcode_libdir_flag_spec, | ||
122 | dnl acl_hardcode_libdir_separator, | ||
123 | dnl acl_hardcode_direct, | ||
124 | dnl acl_hardcode_minus_L. | ||
96 | AC_DEFUN([AC_LIB_RPATH], | 125 | AC_DEFUN([AC_LIB_RPATH], |
97 | [ | 126 | [ |
98 | dnl Tell automake >= 1.10 to complain if config.rpath is missing. | 127 | dnl Tell automake >= 1.10 to complain if config.rpath is missing. |
@@ -101,7 +130,7 @@ AC_DEFUN([AC_LIB_RPATH], | |||
101 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld | 130 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld |
102 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host | 131 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host |
103 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir | 132 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir |
104 | AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ | 133 | AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ |
105 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | 134 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
106 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | 135 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
107 | . ./conftest.sh | 136 | . ./conftest.sh |
@@ -109,35 +138,66 @@ AC_DEFUN([AC_LIB_RPATH], | |||
109 | acl_cv_rpath=done | 138 | acl_cv_rpath=done |
110 | ]) | 139 | ]) |
111 | wl="$acl_cv_wl" | 140 | wl="$acl_cv_wl" |
112 | libext="$acl_cv_libext" | 141 | acl_libext="$acl_cv_libext" |
113 | shlibext="$acl_cv_shlibext" | 142 | acl_shlibext="$acl_cv_shlibext" |
114 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | 143 | acl_libname_spec="$acl_cv_libname_spec" |
115 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | 144 | acl_library_names_spec="$acl_cv_library_names_spec" |
116 | hardcode_direct="$acl_cv_hardcode_direct" | 145 | acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
117 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | 146 | acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
147 | acl_hardcode_direct="$acl_cv_hardcode_direct" | ||
148 | acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" | ||
118 | dnl Determine whether the user wants rpath handling at all. | 149 | dnl Determine whether the user wants rpath handling at all. |
119 | AC_ARG_ENABLE(rpath, | 150 | AC_ARG_ENABLE([rpath], |
120 | [ --disable-rpath do not hardcode runtime library paths], | 151 | [ --disable-rpath do not hardcode runtime library paths], |
121 | :, enable_rpath=yes) | 152 | :, enable_rpath=yes) |
122 | ]) | 153 | ]) |
123 | 154 | ||
155 | dnl AC_LIB_FROMPACKAGE(name, package) | ||
156 | dnl declares that libname comes from the given package. The configure file | ||
157 | dnl will then not have a --with-libname-prefix option but a | ||
158 | dnl --with-package-prefix option. Several libraries can come from the same | ||
159 | dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar | ||
160 | dnl macro call that searches for libname. | ||
161 | AC_DEFUN([AC_LIB_FROMPACKAGE], | ||
162 | [ | ||
163 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
164 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
165 | define([acl_frompackage_]NAME, [$2]) | ||
166 | popdef([NAME]) | ||
167 | pushdef([PACK],[$2]) | ||
168 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
169 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
170 | define([acl_libsinpackage_]PACKUP, | ||
171 | m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) | ||
172 | popdef([PACKUP]) | ||
173 | popdef([PACK]) | ||
174 | ]) | ||
175 | |||
124 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | 176 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and |
125 | dnl the libraries corresponding to explicit and implicit dependencies. | 177 | dnl the libraries corresponding to explicit and implicit dependencies. |
126 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | 178 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. |
179 | dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found | ||
180 | dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
127 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | 181 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], |
128 | [ | 182 | [ |
129 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | 183 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
130 | define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | 184 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], |
131 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | 185 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) |
186 | pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) | ||
187 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
188 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
189 | pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) | ||
190 | dnl Autoconf >= 2.61 supports dots in --with options. | ||
191 | pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) | ||
132 | dnl By default, look in $includedir and $libdir. | 192 | dnl By default, look in $includedir and $libdir. |
133 | use_additional=yes | 193 | use_additional=yes |
134 | AC_LIB_WITH_FINAL_PREFIX([ | 194 | AC_LIB_WITH_FINAL_PREFIX([ |
135 | eval additional_includedir=\"$includedir\" | 195 | eval additional_includedir=\"$includedir\" |
136 | eval additional_libdir=\"$libdir\" | 196 | eval additional_libdir=\"$libdir\" |
137 | ]) | 197 | ]) |
138 | AC_LIB_ARG_WITH([lib$1-prefix], | 198 | AC_ARG_WITH(P_A_C_K[-prefix], |
139 | [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib | 199 | [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib |
140 | --without-lib$1-prefix don't search for lib$1 in includedir and libdir], | 200 | --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], |
141 | [ | 201 | [ |
142 | if test "X$withval" = "Xno"; then | 202 | if test "X$withval" = "Xno"; then |
143 | use_additional=no | 203 | use_additional=no |
@@ -150,6 +210,10 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
150 | else | 210 | else |
151 | additional_includedir="$withval/include" | 211 | additional_includedir="$withval/include" |
152 | additional_libdir="$withval/$acl_libdirstem" | 212 | additional_libdir="$withval/$acl_libdirstem" |
213 | if test "$acl_libdirstem2" != "$acl_libdirstem" \ | ||
214 | && ! test -d "$withval/$acl_libdirstem"; then | ||
215 | additional_libdir="$withval/$acl_libdirstem2" | ||
216 | fi | ||
153 | fi | 217 | fi |
154 | fi | 218 | fi |
155 | ]) | 219 | ]) |
@@ -158,6 +222,10 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
158 | LIB[]NAME= | 222 | LIB[]NAME= |
159 | LTLIB[]NAME= | 223 | LTLIB[]NAME= |
160 | INC[]NAME= | 224 | INC[]NAME= |
225 | LIB[]NAME[]_PREFIX= | ||
226 | dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been | ||
227 | dnl computed. So it has to be reset here. | ||
228 | HAVE_LIB[]NAME= | ||
161 | rpathdirs= | 229 | rpathdirs= |
162 | ltrpathdirs= | 230 | ltrpathdirs= |
163 | names_already_handled= | 231 | names_already_handled= |
@@ -177,7 +245,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
177 | names_already_handled="$names_already_handled $name" | 245 | names_already_handled="$names_already_handled $name" |
178 | 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 |
179 | dnl or AC_LIB_HAVE_LINKFLAGS call. | 247 | dnl or AC_LIB_HAVE_LINKFLAGS call. |
180 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | 248 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` |
181 | eval value=\"\$HAVE_LIB$uppername\" | 249 | eval value=\"\$HAVE_LIB$uppername\" |
182 | if test -n "$value"; then | 250 | if test -n "$value"; then |
183 | if test "$value" = yes; then | 251 | if test "$value" = yes; then |
@@ -197,27 +265,53 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
197 | found_la= | 265 | found_la= |
198 | found_so= | 266 | found_so= |
199 | found_a= | 267 | found_a= |
268 | eval libname=\"$acl_libname_spec\" # typically: libname=lib$name | ||
269 | if test -n "$acl_shlibext"; then | ||
270 | shrext=".$acl_shlibext" # typically: shrext=.so | ||
271 | else | ||
272 | shrext= | ||
273 | fi | ||
200 | if test $use_additional = yes; then | 274 | if test $use_additional = yes; then |
201 | if test -n "$shlibext" \ | 275 | dir="$additional_libdir" |
202 | && { test -f "$additional_libdir/lib$name.$shlibext" \ | 276 | dnl The same code as in the loop below: |
203 | || { test "$shlibext" = dll \ | 277 | dnl First look for a shared library. |
204 | && test -f "$additional_libdir/lib$name.dll.a"; }; }; then | 278 | if test -n "$acl_shlibext"; then |
205 | found_dir="$additional_libdir" | 279 | if test -f "$dir/$libname$shrext"; then |
206 | if test -f "$additional_libdir/lib$name.$shlibext"; then | 280 | found_dir="$dir" |
207 | found_so="$additional_libdir/lib$name.$shlibext" | 281 | found_so="$dir/$libname$shrext" |
208 | else | 282 | else |
209 | found_so="$additional_libdir/lib$name.dll.a" | 283 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then |
284 | ver=`(cd "$dir" && \ | ||
285 | for f in "$libname$shrext".*; do echo "$f"; done \ | ||
286 | | sed -e "s,^$libname$shrext\\\\.,," \ | ||
287 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | ||
288 | | sed 1q ) 2>/dev/null` | ||
289 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | ||
290 | found_dir="$dir" | ||
291 | found_so="$dir/$libname$shrext.$ver" | ||
292 | fi | ||
293 | else | ||
294 | eval library_names=\"$acl_library_names_spec\" | ||
295 | for f in $library_names; do | ||
296 | if test -f "$dir/$f"; then | ||
297 | found_dir="$dir" | ||
298 | found_so="$dir/$f" | ||
299 | break | ||
300 | fi | ||
301 | done | ||
302 | fi | ||
210 | fi | 303 | fi |
211 | if test -f "$additional_libdir/lib$name.la"; then | 304 | fi |
212 | found_la="$additional_libdir/lib$name.la" | 305 | dnl Then look for a static library. |
306 | if test "X$found_dir" = "X"; then | ||
307 | if test -f "$dir/$libname.$acl_libext"; then | ||
308 | found_dir="$dir" | ||
309 | found_a="$dir/$libname.$acl_libext" | ||
213 | fi | 310 | fi |
214 | else | 311 | fi |
215 | if test -f "$additional_libdir/lib$name.$libext"; then | 312 | if test "X$found_dir" != "X"; then |
216 | found_dir="$additional_libdir" | 313 | if test -f "$dir/$libname.la"; then |
217 | found_a="$additional_libdir/lib$name.$libext" | 314 | found_la="$dir/$libname.la" |
218 | if test -f "$additional_libdir/lib$name.la"; then | ||
219 | found_la="$additional_libdir/lib$name.la" | ||
220 | fi | ||
221 | fi | 315 | fi |
222 | fi | 316 | fi |
223 | fi | 317 | fi |
@@ -227,26 +321,44 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
227 | case "$x" in | 321 | case "$x" in |
228 | -L*) | 322 | -L*) |
229 | dir=`echo "X$x" | sed -e 's/^X-L//'` | 323 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
230 | if test -n "$shlibext" \ | 324 | dnl First look for a shared library. |
231 | && { test -f "$dir/lib$name.$shlibext" \ | 325 | if test -n "$acl_shlibext"; then |
232 | || { test "$shlibext" = dll \ | 326 | if test -f "$dir/$libname$shrext"; then |
233 | && test -f "$dir/lib$name.dll.a"; }; }; then | 327 | found_dir="$dir" |
234 | found_dir="$dir" | 328 | found_so="$dir/$libname$shrext" |
235 | if test -f "$dir/lib$name.$shlibext"; then | ||
236 | found_so="$dir/lib$name.$shlibext" | ||
237 | else | 329 | else |
238 | found_so="$dir/lib$name.dll.a" | 330 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then |
239 | fi | 331 | ver=`(cd "$dir" && \ |
240 | if test -f "$dir/lib$name.la"; then | 332 | for f in "$libname$shrext".*; do echo "$f"; done \ |
241 | found_la="$dir/lib$name.la" | 333 | | sed -e "s,^$libname$shrext\\\\.,," \ |
334 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | ||
335 | | sed 1q ) 2>/dev/null` | ||
336 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | ||
337 | found_dir="$dir" | ||
338 | found_so="$dir/$libname$shrext.$ver" | ||
339 | fi | ||
340 | else | ||
341 | eval library_names=\"$acl_library_names_spec\" | ||
342 | for f in $library_names; do | ||
343 | if test -f "$dir/$f"; then | ||
344 | found_dir="$dir" | ||
345 | found_so="$dir/$f" | ||
346 | break | ||
347 | fi | ||
348 | done | ||
349 | fi | ||
242 | fi | 350 | fi |
243 | else | 351 | fi |
244 | if test -f "$dir/lib$name.$libext"; then | 352 | dnl Then look for a static library. |
353 | if test "X$found_dir" = "X"; then | ||
354 | if test -f "$dir/$libname.$acl_libext"; then | ||
245 | found_dir="$dir" | 355 | found_dir="$dir" |
246 | found_a="$dir/lib$name.$libext" | 356 | found_a="$dir/$libname.$acl_libext" |
247 | if test -f "$dir/lib$name.la"; then | 357 | fi |
248 | found_la="$dir/lib$name.la" | 358 | fi |
249 | fi | 359 | if test "X$found_dir" != "X"; then |
360 | if test -f "$dir/$libname.la"; then | ||
361 | found_la="$dir/$libname.la" | ||
250 | fi | 362 | fi |
251 | fi | 363 | fi |
252 | ;; | 364 | ;; |
@@ -263,7 +375,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
263 | dnl Linking with a shared library. We attempt to hardcode its | 375 | dnl Linking with a shared library. We attempt to hardcode its |
264 | dnl directory into the executable's runpath, unless it's the | 376 | dnl directory into the executable's runpath, unless it's the |
265 | dnl standard /usr/lib. | 377 | dnl standard /usr/lib. |
266 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then | 378 | if test "$enable_rpath" = no \ |
379 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ | ||
380 | || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then | ||
267 | dnl No hardcoding is needed. | 381 | dnl No hardcoding is needed. |
268 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | 382 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
269 | else | 383 | else |
@@ -282,12 +396,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
282 | ltrpathdirs="$ltrpathdirs $found_dir" | 396 | ltrpathdirs="$ltrpathdirs $found_dir" |
283 | fi | 397 | fi |
284 | dnl The hardcoding into $LIBNAME is system dependent. | 398 | dnl The hardcoding into $LIBNAME is system dependent. |
285 | if test "$hardcode_direct" = yes; then | 399 | if test "$acl_hardcode_direct" = yes; then |
286 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the | 400 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the |
287 | dnl resulting binary. | 401 | dnl resulting binary. |
288 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | 402 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
289 | else | 403 | else |
290 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | 404 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then |
291 | dnl Use an explicit option to hardcode DIR into the resulting | 405 | dnl Use an explicit option to hardcode DIR into the resulting |
292 | dnl binary. | 406 | dnl binary. |
293 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | 407 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
@@ -318,13 +432,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
318 | if test -z "$haveit"; then | 432 | if test -z "$haveit"; then |
319 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" | 433 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" |
320 | fi | 434 | fi |
321 | if test "$hardcode_minus_L" != no; then | 435 | if test "$acl_hardcode_minus_L" != no; then |
322 | dnl FIXME: Not sure whether we should use | 436 | dnl FIXME: Not sure whether we should use |
323 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | 437 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" |
324 | dnl here. | 438 | dnl here. |
325 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | 439 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" |
326 | else | 440 | else |
327 | dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH | 441 | dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH |
328 | dnl here, because this doesn't fit in flags passed to the | 442 | dnl here, because this doesn't fit in flags passed to the |
329 | dnl compiler. So give up. No hardcoding. This affects only | 443 | dnl compiler. So give up. No hardcoding. This affects only |
330 | dnl very old systems. | 444 | dnl very old systems. |
@@ -351,6 +465,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
351 | case "$found_dir" in | 465 | case "$found_dir" in |
352 | */$acl_libdirstem | */$acl_libdirstem/) | 466 | */$acl_libdirstem | */$acl_libdirstem/) |
353 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | 467 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` |
468 | if test "$name" = '$1'; then | ||
469 | LIB[]NAME[]_PREFIX="$basedir" | ||
470 | fi | ||
471 | additional_includedir="$basedir/include" | ||
472 | ;; | ||
473 | */$acl_libdirstem2 | */$acl_libdirstem2/) | ||
474 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` | ||
475 | if test "$name" = '$1'; then | ||
476 | LIB[]NAME[]_PREFIX="$basedir" | ||
477 | fi | ||
354 | additional_includedir="$basedir/include" | 478 | additional_includedir="$basedir/include" |
355 | ;; | 479 | ;; |
356 | esac | 480 | esac |
@@ -411,9 +535,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
411 | dnl 3. if it's already present in $LDFLAGS or the already | 535 | dnl 3. if it's already present in $LDFLAGS or the already |
412 | dnl constructed $LIBNAME, | 536 | dnl constructed $LIBNAME, |
413 | dnl 4. if it doesn't exist as a directory. | 537 | dnl 4. if it doesn't exist as a directory. |
414 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | 538 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ |
539 | && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then | ||
415 | haveit= | 540 | haveit= |
416 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | 541 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ |
542 | || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then | ||
417 | if test -n "$GCC"; then | 543 | if test -n "$GCC"; then |
418 | case $host_os in | 544 | case $host_os in |
419 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | 545 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; |
@@ -512,18 +638,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
512 | done | 638 | done |
513 | done | 639 | done |
514 | if test "X$rpathdirs" != "X"; then | 640 | if test "X$rpathdirs" != "X"; then |
515 | if test -n "$hardcode_libdir_separator"; then | 641 | if test -n "$acl_hardcode_libdir_separator"; then |
516 | dnl Weird platform: only the last -rpath option counts, the user must | 642 | dnl Weird platform: only the last -rpath option counts, the user must |
517 | dnl pass all path elements in one option. We can arrange that for a | 643 | dnl pass all path elements in one option. We can arrange that for a |
518 | dnl single library, but not when more than one $LIBNAMEs are used. | 644 | dnl single library, but not when more than one $LIBNAMEs are used. |
519 | alldirs= | 645 | alldirs= |
520 | for found_dir in $rpathdirs; do | 646 | for found_dir in $rpathdirs; do |
521 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | 647 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" |
522 | done | 648 | done |
523 | dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. | 649 | dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. |
524 | acl_save_libdir="$libdir" | 650 | acl_save_libdir="$libdir" |
525 | libdir="$alldirs" | 651 | libdir="$alldirs" |
526 | eval flag=\"$hardcode_libdir_flag_spec\" | 652 | eval flag=\"$acl_hardcode_libdir_flag_spec\" |
527 | libdir="$acl_save_libdir" | 653 | libdir="$acl_save_libdir" |
528 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | 654 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
529 | else | 655 | else |
@@ -531,7 +657,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
531 | for found_dir in $rpathdirs; do | 657 | for found_dir in $rpathdirs; do |
532 | acl_save_libdir="$libdir" | 658 | acl_save_libdir="$libdir" |
533 | libdir="$found_dir" | 659 | libdir="$found_dir" |
534 | eval flag=\"$hardcode_libdir_flag_spec\" | 660 | eval flag=\"$acl_hardcode_libdir_flag_spec\" |
535 | libdir="$acl_save_libdir" | 661 | libdir="$acl_save_libdir" |
536 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | 662 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" |
537 | done | 663 | done |
@@ -544,6 +670,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | |||
544 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" | 670 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" |
545 | done | 671 | done |
546 | fi | 672 | fi |
673 | popdef([P_A_C_K]) | ||
674 | popdef([PACKLIBS]) | ||
675 | popdef([PACKUP]) | ||
676 | popdef([PACK]) | ||
677 | popdef([NAME]) | ||
547 | ]) | 678 | ]) |
548 | 679 | ||
549 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, | 680 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, |
@@ -580,7 +711,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |||
580 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | 711 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) |
581 | $1= | 712 | $1= |
582 | if test "$enable_rpath" != no; then | 713 | if test "$enable_rpath" != no; then |
583 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | 714 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then |
584 | dnl Use an explicit option to hardcode directories into the resulting | 715 | dnl Use an explicit option to hardcode directories into the resulting |
585 | dnl binary. | 716 | dnl binary. |
586 | rpathdirs= | 717 | rpathdirs= |
@@ -589,7 +720,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |||
589 | if test -n "$next"; then | 720 | if test -n "$next"; then |
590 | dir="$next" | 721 | dir="$next" |
591 | dnl No need to hardcode the standard /usr/lib. | 722 | dnl No need to hardcode the standard /usr/lib. |
592 | if test "X$dir" != "X/usr/$acl_libdirstem"; then | 723 | if test "X$dir" != "X/usr/$acl_libdirstem" \ |
724 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
593 | rpathdirs="$rpathdirs $dir" | 725 | rpathdirs="$rpathdirs $dir" |
594 | fi | 726 | fi |
595 | next= | 727 | next= |
@@ -598,7 +730,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |||
598 | -L) next=yes ;; | 730 | -L) next=yes ;; |
599 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` | 731 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` |
600 | dnl No need to hardcode the standard /usr/lib. | 732 | dnl No need to hardcode the standard /usr/lib. |
601 | if test "X$dir" != "X/usr/$acl_libdirstem"; then | 733 | if test "X$dir" != "X/usr/$acl_libdirstem" \ |
734 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
602 | rpathdirs="$rpathdirs $dir" | 735 | rpathdirs="$rpathdirs $dir" |
603 | fi | 736 | fi |
604 | next= ;; | 737 | next= ;; |
@@ -614,16 +747,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |||
614 | done | 747 | done |
615 | else | 748 | else |
616 | dnl The linker is used for linking directly. | 749 | dnl The linker is used for linking directly. |
617 | if test -n "$hardcode_libdir_separator"; then | 750 | if test -n "$acl_hardcode_libdir_separator"; then |
618 | dnl Weird platform: only the last -rpath option counts, the user | 751 | dnl Weird platform: only the last -rpath option counts, the user |
619 | dnl must pass all path elements in one option. | 752 | dnl must pass all path elements in one option. |
620 | alldirs= | 753 | alldirs= |
621 | for dir in $rpathdirs; do | 754 | for dir in $rpathdirs; do |
622 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" | 755 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" |
623 | done | 756 | done |
624 | acl_save_libdir="$libdir" | 757 | acl_save_libdir="$libdir" |
625 | libdir="$alldirs" | 758 | libdir="$alldirs" |
626 | eval flag=\"$hardcode_libdir_flag_spec\" | 759 | eval flag=\"$acl_hardcode_libdir_flag_spec\" |
627 | libdir="$acl_save_libdir" | 760 | libdir="$acl_save_libdir" |
628 | $1="$flag" | 761 | $1="$flag" |
629 | else | 762 | else |
@@ -631,7 +764,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | |||
631 | for dir in $rpathdirs; do | 764 | for dir in $rpathdirs; do |
632 | acl_save_libdir="$libdir" | 765 | acl_save_libdir="$libdir" |
633 | libdir="$dir" | 766 | libdir="$dir" |
634 | eval flag=\"$hardcode_libdir_flag_spec\" | 767 | eval flag=\"$acl_hardcode_libdir_flag_spec\" |
635 | libdir="$acl_save_libdir" | 768 | libdir="$acl_save_libdir" |
636 | $1="${$1}${$1:+ }$flag" | 769 | $1="${$1}${$1:+ }$flag" |
637 | done | 770 | done |
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index a8684e1..6851031 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # lib-prefix.m4 serial 5 (gettext-0.15) | 1 | # lib-prefix.m4 serial 7 (gettext-0.18) |
2 | dnl Copyright (C) 2001-2005 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. |
@@ -153,33 +153,72 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], | |||
153 | prefix="$acl_save_prefix" | 153 | prefix="$acl_save_prefix" |
154 | ]) | 154 | ]) |
155 | 155 | ||
156 | dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing | 156 | dnl AC_LIB_PREPARE_MULTILIB creates |
157 | dnl the basename of the libdir, either "lib" or "lib64". | 157 | dnl - a variable acl_libdirstem, containing the basename of the libdir, either |
158 | dnl "lib" or "lib64" or "lib/64", | ||
159 | dnl - a variable acl_libdirstem2, as a secondary possible value for | ||
160 | dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or | ||
161 | dnl "lib/amd64". | ||
158 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | 162 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], |
159 | [ | 163 | [ |
160 | dnl There is no formal standard regarding lib and lib64. The current | 164 | dnl There is no formal standard regarding lib and lib64. |
161 | dnl practice is that on a system supporting 32-bit and 64-bit instruction | 165 | dnl On glibc systems, the current practice is that on a system supporting |
162 | dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit | 166 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under |
163 | dnl libraries go under $prefix/lib. We determine the compiler's default | 167 | dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine |
164 | dnl mode by looking at the compiler's library search path. If at least | 168 | dnl the compiler's default mode by looking at the compiler's library search |
165 | dnl of its elements ends in /lib64 or points to a directory whose absolute | 169 | dnl path. If at least one of its elements ends in /lib64 or points to a |
166 | dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the | 170 | dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. |
167 | dnl default, namely "lib". | 171 | dnl Otherwise we use the default, namely "lib". |
172 | dnl On Solaris systems, the current practice is that on a system supporting | ||
173 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under | ||
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. | ||
176 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
168 | acl_libdirstem=lib | 177 | acl_libdirstem=lib |
169 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | 178 | acl_libdirstem2= |
170 | if test -n "$searchpath"; then | 179 | case "$host_os" in |
171 | acl_save_IFS="${IFS= }"; IFS=":" | 180 | solaris*) |
172 | for searchdir in $searchpath; do | 181 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment |
173 | if test -d "$searchdir"; then | 182 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. |
174 | case "$searchdir" in | 183 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." |
175 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | 184 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the |
176 | *) searchdir=`cd "$searchdir" && pwd` | 185 | dnl symlink is missing, so we set acl_libdirstem2 too. |
177 | case "$searchdir" in | 186 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], |
178 | */lib64 ) acl_libdirstem=lib64 ;; | 187 | [AC_EGREP_CPP([sixtyfour bits], [ |
179 | esac ;; | 188 | #ifdef _LP64 |
189 | sixtyfour bits | ||
190 | #endif | ||
191 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) | ||
192 | ]) | ||
193 | if test $gl_cv_solaris_64bit = yes; then | ||
194 | acl_libdirstem=lib/64 | ||
195 | case "$host_cpu" in | ||
196 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | ||
197 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | ||
180 | esac | 198 | esac |
181 | fi | 199 | fi |
182 | done | 200 | ;; |
183 | IFS="$acl_save_IFS" | 201 | *) |
184 | fi | 202 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
203 | if test -n "$searchpath"; then | ||
204 | acl_save_IFS="${IFS= }"; IFS=":" | ||
205 | for searchdir in $searchpath; do | ||
206 | if test -d "$searchdir"; then | ||
207 | case "$searchdir" in | ||
208 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | ||
209 | */../ | */.. ) | ||
210 | # Better ignore directories of this form. They are misleading. | ||
211 | ;; | ||
212 | *) searchdir=`cd "$searchdir" && pwd` | ||
213 | case "$searchdir" in | ||
214 | */lib64 ) acl_libdirstem=lib64 ;; | ||
215 | esac ;; | ||
216 | esac | ||
217 | fi | ||
218 | done | ||
219 | IFS="$acl_save_IFS" | ||
220 | fi | ||
221 | ;; | ||
222 | esac | ||
223 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | ||
185 | ]) | 224 | ]) |
@@ -1,311 +1,42 @@ | |||
1 | # lock.m4 serial 6 (gettext-0.16) | 1 | # lock.m4 serial 13 (gettext-0.18.2) |
2 | dnl Copyright (C) 2005-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2005-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. |
6 | 6 | ||
7 | dnl From Bruno Haible. | 7 | dnl From Bruno Haible. |
8 | 8 | ||
9 | dnl Tests for a multithreading library to be used. | 9 | AC_DEFUN([gl_LOCK], |
10 | dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, | ||
11 | dnl USE_PTH_THREADS, USE_WIN32_THREADS | ||
12 | dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use | ||
13 | dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with | ||
14 | dnl libtool). | ||
15 | dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for | ||
16 | dnl programs that really need multithread functionality. The difference | ||
17 | dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak | ||
18 | dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". | ||
19 | dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for | ||
20 | dnl multithread-safe programs. | ||
21 | |||
22 | AC_DEFUN([gl_LOCK_EARLY], | ||
23 | [ | ||
24 | AC_REQUIRE([gl_LOCK_EARLY_BODY]) | ||
25 | ]) | ||
26 | |||
27 | dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once. | ||
28 | |||
29 | AC_DEFUN([gl_LOCK_EARLY_BODY], | ||
30 | [ | ||
31 | dnl Ordering constraints: This macro modifies CPPFLAGS in a way that | ||
32 | dnl influences the result of the autoconf tests that test for *_unlocked | ||
33 | dnl declarations, on AIX 5 at least. Therefore it must come early. | ||
34 | AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl | ||
35 | AC_BEFORE([$0], [gl_ARGP])dnl | ||
36 | |||
37 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
38 | AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems | ||
39 | dnl Check for multithreading. | ||
40 | AC_ARG_ENABLE(threads, | ||
41 | AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) | ||
42 | AC_HELP_STRING([--disable-threads], [build without multithread safety]), | ||
43 | [gl_use_threads=$enableval], | ||
44 | [case "$host_os" in | ||
45 | dnl Disable multithreading by default on OSF/1, because it interferes | ||
46 | dnl with fork()/exec(): When msgexec is linked with -lpthread, its child | ||
47 | dnl process gets an endless segmentation fault inside execvp(). | ||
48 | osf*) gl_use_threads=no ;; | ||
49 | *) gl_use_threads=yes ;; | ||
50 | esac | ||
51 | ]) | ||
52 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | ||
53 | # For using <pthread.h>: | ||
54 | case "$host_os" in | ||
55 | osf*) | ||
56 | # On OSF/1, the compiler needs the flag -D_REENTRANT so that it | ||
57 | # groks <pthread.h>. cc also understands the flag -pthread, but | ||
58 | # we don't use it because 1. gcc-2.95 doesn't understand -pthread, | ||
59 | # 2. putting a flag into CPPFLAGS that has an effect on the linker | ||
60 | # causes the AC_TRY_LINK test below to succeed unexpectedly, | ||
61 | # leading to wrong values of LIBTHREAD and LTLIBTHREAD. | ||
62 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | ||
63 | ;; | ||
64 | esac | ||
65 | # Some systems optimize for single-threaded programs by default, and | ||
66 | # need special flags to disable these optimizations. For example, the | ||
67 | # definition of 'errno' in <errno.h>. | ||
68 | case "$host_os" in | ||
69 | aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; | ||
70 | solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; | ||
71 | esac | ||
72 | fi | ||
73 | ]) | ||
74 | |||
75 | dnl The guts of gl_LOCK. Needs to be expanded only once. | ||
76 | |||
77 | AC_DEFUN([gl_LOCK_BODY], | ||
78 | [ | 10 | [ |
79 | AC_REQUIRE([gl_LOCK_EARLY_BODY]) | 11 | AC_REQUIRE([gl_THREADLIB]) |
80 | gl_threads_api=none | 12 | if test "$gl_threads_api" = posix; then |
81 | LIBTHREAD= | 13 | # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the |
82 | LTLIBTHREAD= | 14 | # pthread_rwlock_* functions. |
83 | LIBMULTITHREAD= | 15 | AC_CHECK_TYPE([pthread_rwlock_t], |
84 | LTLIBMULTITHREAD= | 16 | [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], |
85 | if test "$gl_use_threads" != no; then | 17 | [Define if the POSIX multithreading library has read/write locks.])], |
86 | dnl Check whether the compiler and linker support weak declarations. | 18 | [], |
87 | AC_MSG_CHECKING([whether imported symbols can be declared weak]) | 19 | [#include <pthread.h>]) |
88 | gl_have_weak=no | 20 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. |
89 | AC_TRY_LINK([extern void xyzzy (); | 21 | AC_COMPILE_IFELSE([ |
90 | #pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes]) | 22 | AC_LANG_PROGRAM( |
91 | AC_MSG_RESULT([$gl_have_weak]) | 23 | [[#include <pthread.h>]], |
92 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | 24 | [[ |
93 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | 25 | #if __FreeBSD__ == 4 |
94 | # it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY. | ||
95 | AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no) | ||
96 | if test "$gl_have_pthread_h" = yes; then | ||
97 | # Other possible tests: | ||
98 | # -lpthreads (FSU threads, PCthreads) | ||
99 | # -lgthreads | ||
100 | gl_have_pthread= | ||
101 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | ||
102 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | ||
103 | # the second one only in libpthread, and lock.c needs it. | ||
104 | AC_TRY_LINK([#include <pthread.h>], | ||
105 | [pthread_mutex_lock((pthread_mutex_t*)0); | ||
106 | pthread_mutexattr_init((pthread_mutexattr_t*)0);], | ||
107 | [gl_have_pthread=yes]) | ||
108 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | ||
109 | # since it is defined as a macro on OSF/1.) | ||
110 | if test -n "$gl_have_pthread"; then | ||
111 | # The program links fine without libpthread. But it may actually | ||
112 | # need to link with libpthread in order to create multiple threads. | ||
113 | AC_CHECK_LIB(pthread, pthread_kill, | ||
114 | [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread | ||
115 | # On Solaris and HP-UX, most pthread functions exist also in libc. | ||
116 | # Therefore pthread_in_use() needs to actually try to create a | ||
117 | # thread: pthread_create from libc will fail, whereas | ||
118 | # pthread_create will actually create a thread. | ||
119 | case "$host_os" in | ||
120 | solaris* | hpux*) | ||
121 | AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1, | ||
122 | [Define if the pthread_in_use() detection is hard.]) | ||
123 | esac | ||
124 | ]) | ||
125 | else | ||
126 | # Some library is needed. Try libpthread and libc_r. | ||
127 | AC_CHECK_LIB(pthread, pthread_kill, | ||
128 | [gl_have_pthread=yes | ||
129 | LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread | ||
130 | LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) | ||
131 | if test -z "$gl_have_pthread"; then | ||
132 | # For FreeBSD 4. | ||
133 | AC_CHECK_LIB(c_r, pthread_kill, | ||
134 | [gl_have_pthread=yes | ||
135 | LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r | ||
136 | LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) | ||
137 | fi | ||
138 | fi | ||
139 | if test -n "$gl_have_pthread"; then | ||
140 | gl_threads_api=posix | ||
141 | AC_DEFINE([USE_POSIX_THREADS], 1, | ||
142 | [Define if the POSIX multithreading library can be used.]) | ||
143 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | ||
144 | if test $gl_have_weak = yes; then | ||
145 | AC_DEFINE([USE_POSIX_THREADS_WEAK], 1, | ||
146 | [Define if references to the POSIX multithreading library should be made weak.]) | ||
147 | LIBTHREAD= | ||
148 | LTLIBTHREAD= | ||
149 | fi | ||
150 | fi | ||
151 | # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the | ||
152 | # pthread_rwlock_* functions. | ||
153 | AC_CHECK_TYPE([pthread_rwlock_t], | ||
154 | [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1, | ||
155 | [Define if the POSIX multithreading library has read/write locks.])], | ||
156 | [], | ||
157 | [#include <pthread.h>]) | ||
158 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. | ||
159 | AC_TRY_COMPILE([#include <pthread.h>], | ||
160 | [#if __FreeBSD__ == 4 | ||
161 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." | 26 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." |
27 | #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ | ||
28 | && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) | ||
29 | error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." | ||
162 | #else | 30 | #else |
163 | int x = (int)PTHREAD_MUTEX_RECURSIVE; | 31 | int x = (int)PTHREAD_MUTEX_RECURSIVE; |
164 | return !x; | 32 | return !x; |
165 | #endif], | 33 | #endif |
166 | [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1, | 34 | ]])], |
167 | [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) | 35 | [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], |
168 | fi | 36 | [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) |
169 | fi | ||
170 | fi | ||
171 | if test -z "$gl_have_pthread"; then | ||
172 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then | ||
173 | gl_have_solaristhread= | ||
174 | gl_save_LIBS="$LIBS" | ||
175 | LIBS="$LIBS -lthread" | ||
176 | AC_TRY_LINK([#include <thread.h> | ||
177 | #include <synch.h>], | ||
178 | [thr_self();], | ||
179 | [gl_have_solaristhread=yes]) | ||
180 | LIBS="$gl_save_LIBS" | ||
181 | if test -n "$gl_have_solaristhread"; then | ||
182 | gl_threads_api=solaris | ||
183 | LIBTHREAD=-lthread | ||
184 | LTLIBTHREAD=-lthread | ||
185 | LIBMULTITHREAD="$LIBTHREAD" | ||
186 | LTLIBMULTITHREAD="$LTLIBTHREAD" | ||
187 | AC_DEFINE([USE_SOLARIS_THREADS], 1, | ||
188 | [Define if the old Solaris multithreading library can be used.]) | ||
189 | if test $gl_have_weak = yes; then | ||
190 | AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1, | ||
191 | [Define if references to the old Solaris multithreading library should be made weak.]) | ||
192 | LIBTHREAD= | ||
193 | LTLIBTHREAD= | ||
194 | fi | ||
195 | fi | ||
196 | fi | ||
197 | fi | ||
198 | if test "$gl_use_threads" = pth; then | ||
199 | gl_save_CPPFLAGS="$CPPFLAGS" | ||
200 | AC_LIB_LINKFLAGS(pth) | ||
201 | gl_have_pth= | ||
202 | gl_save_LIBS="$LIBS" | ||
203 | LIBS="$LIBS -lpth" | ||
204 | AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes) | ||
205 | LIBS="$gl_save_LIBS" | ||
206 | if test -n "$gl_have_pth"; then | ||
207 | gl_threads_api=pth | ||
208 | LIBTHREAD="$LIBPTH" | ||
209 | LTLIBTHREAD="$LTLIBPTH" | ||
210 | LIBMULTITHREAD="$LIBTHREAD" | ||
211 | LTLIBMULTITHREAD="$LTLIBTHREAD" | ||
212 | AC_DEFINE([USE_PTH_THREADS], 1, | ||
213 | [Define if the GNU Pth multithreading library can be used.]) | ||
214 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | ||
215 | if test $gl_have_weak = yes; then | ||
216 | AC_DEFINE([USE_PTH_THREADS_WEAK], 1, | ||
217 | [Define if references to the GNU Pth multithreading library should be made weak.]) | ||
218 | LIBTHREAD= | ||
219 | LTLIBTHREAD= | ||
220 | fi | ||
221 | fi | ||
222 | else | ||
223 | CPPFLAGS="$gl_save_CPPFLAGS" | ||
224 | fi | ||
225 | fi | ||
226 | if test -z "$gl_have_pthread"; then | ||
227 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then | ||
228 | if { case "$host_os" in | ||
229 | mingw*) true;; | ||
230 | *) false;; | ||
231 | esac | ||
232 | }; then | ||
233 | gl_threads_api=win32 | ||
234 | AC_DEFINE([USE_WIN32_THREADS], 1, | ||
235 | [Define if the Win32 multithreading API can be used.]) | ||
236 | fi | ||
237 | fi | ||
238 | fi | ||
239 | fi | 37 | fi |
240 | AC_MSG_CHECKING([for multithread API to use]) | ||
241 | AC_MSG_RESULT([$gl_threads_api]) | ||
242 | AC_SUBST(LIBTHREAD) | ||
243 | AC_SUBST(LTLIBTHREAD) | ||
244 | AC_SUBST(LIBMULTITHREAD) | ||
245 | AC_SUBST(LTLIBMULTITHREAD) | ||
246 | ]) | ||
247 | |||
248 | AC_DEFUN([gl_LOCK], | ||
249 | [ | ||
250 | AC_REQUIRE([gl_LOCK_EARLY]) | ||
251 | AC_REQUIRE([gl_LOCK_BODY]) | ||
252 | gl_PREREQ_LOCK | 38 | gl_PREREQ_LOCK |
253 | ]) | 39 | ]) |
254 | 40 | ||
255 | # Prerequisites of lib/lock.c. | 41 | # Prerequisites of lib/glthread/lock.c. |
256 | AC_DEFUN([gl_PREREQ_LOCK], [ | 42 | AC_DEFUN([gl_PREREQ_LOCK], [:]) |
257 | AC_REQUIRE([AC_C_INLINE]) | ||
258 | ]) | ||
259 | |||
260 | dnl Survey of platforms: | ||
261 | dnl | ||
262 | dnl Platform Available Compiler Supports test-lock | ||
263 | dnl flavours option weak result | ||
264 | dnl --------------- --------- --------- -------- --------- | ||
265 | dnl Linux 2.4/glibc posix -lpthread Y OK | ||
266 | dnl | ||
267 | dnl GNU Hurd/glibc posix | ||
268 | dnl | ||
269 | dnl FreeBSD 5.3 posix -lc_r Y | ||
270 | dnl posix -lkse ? Y | ||
271 | dnl posix -lpthread ? Y | ||
272 | dnl posix -lthr Y | ||
273 | dnl | ||
274 | dnl FreeBSD 5.2 posix -lc_r Y | ||
275 | dnl posix -lkse Y | ||
276 | dnl posix -lthr Y | ||
277 | dnl | ||
278 | dnl FreeBSD 4.0,4.10 posix -lc_r Y OK | ||
279 | dnl | ||
280 | dnl NetBSD 1.6 -- | ||
281 | dnl | ||
282 | dnl OpenBSD 3.4 posix -lpthread Y OK | ||
283 | dnl | ||
284 | dnl MacOS X 10.[123] posix -lpthread Y OK | ||
285 | dnl | ||
286 | dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK | ||
287 | dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK | ||
288 | dnl | ||
289 | dnl HP-UX 11 posix -lpthread N (cc) OK | ||
290 | dnl Y (gcc) | ||
291 | dnl | ||
292 | dnl IRIX 6.5 posix -lpthread Y 0.5 | ||
293 | dnl | ||
294 | dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK | ||
295 | dnl | ||
296 | dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK | ||
297 | dnl -lpthread (gcc) Y | ||
298 | dnl | ||
299 | dnl Cygwin posix -lpthread Y OK | ||
300 | dnl | ||
301 | dnl Any of the above pth -lpth 0.0 | ||
302 | dnl | ||
303 | dnl Mingw win32 N OK | ||
304 | dnl | ||
305 | dnl BeOS 5 -- | ||
306 | dnl | ||
307 | dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is | ||
308 | dnl turned off: | ||
309 | dnl OK if all three tests terminate OK, | ||
310 | dnl 0.5 if the first test terminates OK but the second one loops endlessly, | ||
311 | dnl 0.0 if the first test already loops endlessly. | ||
diff --git a/m4/longlong.m4 b/m4/longlong.m4 index 3716c09..36d8b12 100644 --- a/m4/longlong.m4 +++ b/m4/longlong.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # longlong.m4 serial 8 | 1 | # longlong.m4 serial 17 |
2 | dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1999-2007, 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. |
@@ -7,42 +7,107 @@ dnl with or without modifications, as long as this notice is preserved. | |||
7 | dnl From Paul Eggert. | 7 | dnl From Paul Eggert. |
8 | 8 | ||
9 | # Define HAVE_LONG_LONG_INT if 'long long int' works. | 9 | # Define HAVE_LONG_LONG_INT if 'long long int' works. |
10 | # This fixes a bug in Autoconf 2.60, but can be removed once we | 10 | # This fixes a bug in Autoconf 2.61, and can be faster |
11 | # assume 2.61 everywhere. | 11 | # than what's in Autoconf 2.62 through 2.68. |
12 | 12 | ||
13 | # Note: If the type 'long long int' exists but is only 32 bits large | 13 | # Note: If the type 'long long int' exists but is only 32 bits large |
14 | # (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be | 14 | # (as on some very old compilers), HAVE_LONG_LONG_INT will not be |
15 | # defined. In this case you can treat 'long long int' like 'long int'. | 15 | # defined. In this case you can treat 'long long int' like 'long int'. |
16 | 16 | ||
17 | AC_DEFUN([AC_TYPE_LONG_LONG_INT], | 17 | AC_DEFUN([AC_TYPE_LONG_LONG_INT], |
18 | [ | 18 | [ |
19 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) | ||
19 | AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], | 20 | AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], |
20 | [AC_LINK_IFELSE( | 21 | [ac_cv_type_long_long_int=yes |
21 | [AC_LANG_PROGRAM( | 22 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then |
22 | [[long long int ll = 9223372036854775807ll; | 23 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int |
23 | long long int nll = -9223372036854775807LL; | 24 | if test $ac_cv_type_long_long_int = yes; then |
24 | typedef int a[((-9223372036854775807LL < 0 | 25 | dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. |
25 | && 0 < 9223372036854775807ll) | 26 | dnl If cross compiling, assume the bug is not important, since |
26 | ? 1 : -1)]; | 27 | dnl nobody cross compiles for this platform as far as we know. |
27 | int i = 63;]], | 28 | AC_RUN_IFELSE( |
28 | [[long long int llmax = 9223372036854775807ll; | 29 | [AC_LANG_PROGRAM( |
29 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | 30 | [[@%:@include <limits.h> |
30 | | (llmax / ll) | (llmax % ll));]])], | 31 | @%:@ifndef LLONG_MAX |
31 | [ac_cv_type_long_long_int=yes], | 32 | @%:@ define HALF \ |
32 | [ac_cv_type_long_long_int=no])]) | 33 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) |
34 | @%:@ define LLONG_MAX (HALF - 1 + HALF) | ||
35 | @%:@endif]], | ||
36 | [[long long int n = 1; | ||
37 | int i; | ||
38 | for (i = 0; ; i++) | ||
39 | { | ||
40 | long long int m = n << i; | ||
41 | if (m >> i != n) | ||
42 | return 1; | ||
43 | if (LLONG_MAX / 2 < m) | ||
44 | break; | ||
45 | } | ||
46 | return 0;]])], | ||
47 | [], | ||
48 | [ac_cv_type_long_long_int=no], | ||
49 | [:]) | ||
50 | fi | ||
51 | fi]) | ||
33 | if test $ac_cv_type_long_long_int = yes; then | 52 | if test $ac_cv_type_long_long_int = yes; then |
34 | AC_DEFINE([HAVE_LONG_LONG_INT], 1, | 53 | AC_DEFINE([HAVE_LONG_LONG_INT], [1], |
35 | [Define to 1 if the system has the type `long long int'.]) | 54 | [Define to 1 if the system has the type 'long long int'.]) |
36 | fi | 55 | fi |
37 | ]) | 56 | ]) |
38 | 57 | ||
39 | # This macro is obsolescent and should go away soon. | 58 | # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. |
40 | AC_DEFUN([gl_AC_TYPE_LONG_LONG], | 59 | # This fixes a bug in Autoconf 2.61, and can be faster |
60 | # than what's in Autoconf 2.62 through 2.68. | ||
61 | |||
62 | # Note: If the type 'unsigned long long int' exists but is only 32 bits | ||
63 | # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT | ||
64 | # will not be defined. In this case you can treat 'unsigned long long int' | ||
65 | # like 'unsigned long int'. | ||
66 | |||
67 | AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], | ||
41 | [ | 68 | [ |
42 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | 69 | AC_CACHE_CHECK([for unsigned long long int], |
43 | ac_cv_type_long_long=$ac_cv_type_long_long_int | 70 | [ac_cv_type_unsigned_long_long_int], |
44 | if test $ac_cv_type_long_long = yes; then | 71 | [ac_cv_type_unsigned_long_long_int=yes |
45 | AC_DEFINE(HAVE_LONG_LONG, 1, | 72 | if test "x${ac_cv_prog_cc_c99-no}" = xno; then |
46 | [Define if you have the 'long long' type.]) | 73 | AC_LINK_IFELSE( |
74 | [_AC_TYPE_LONG_LONG_SNIPPET], | ||
75 | [], | ||
76 | [ac_cv_type_unsigned_long_long_int=no]) | ||
77 | fi]) | ||
78 | if test $ac_cv_type_unsigned_long_long_int = yes; then | ||
79 | AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], | ||
80 | [Define to 1 if the system has the type 'unsigned long long int'.]) | ||
47 | fi | 81 | fi |
48 | ]) | 82 | ]) |
83 | |||
84 | # Expands to a C program that can be used to test for simultaneous support | ||
85 | # of 'long long' and 'unsigned long long'. We don't want to say that | ||
86 | # 'long long' is available if 'unsigned long long' is not, or vice versa, | ||
87 | # because too many programs rely on the symmetry between signed and unsigned | ||
88 | # integer types (excluding 'bool'). | ||
89 | AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], | ||
90 | [ | ||
91 | AC_LANG_PROGRAM( | ||
92 | [[/* For now, do not test the preprocessor; as of 2007 there are too many | ||
93 | implementations with broken preprocessors. Perhaps this can | ||
94 | be revisited in 2012. In the meantime, code should not expect | ||
95 | #if to work with literals wider than 32 bits. */ | ||
96 | /* Test literals. */ | ||
97 | long long int ll = 9223372036854775807ll; | ||
98 | long long int nll = -9223372036854775807LL; | ||
99 | unsigned long long int ull = 18446744073709551615ULL; | ||
100 | /* Test constant expressions. */ | ||
101 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | ||
102 | ? 1 : -1)]; | ||
103 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | ||
104 | ? 1 : -1)]; | ||
105 | int i = 63;]], | ||
106 | [[/* Test availability of runtime routines for shift and division. */ | ||
107 | long long int llmax = 9223372036854775807ll; | ||
108 | unsigned long long int ullmax = 18446744073709551615ull; | ||
109 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | ||
110 | | (llmax / ll) | (llmax % ll) | ||
111 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | ||
112 | | (ullmax / ull) | (ullmax % ull));]]) | ||
113 | ]) | ||
@@ -1,31 +1,32 @@ | |||
1 | # nls.m4 serial 3 (gettext-0.15) | 1 | # nls.m4 serial 5 (gettext-0.18) |
2 | dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software |
3 | dnl Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
6 | dnl | 7 | dnl |
7 | dnl This file can can be used in projects which are not available under | 8 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 9 | dnl the GNU General Public License or the GNU Library General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 10 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 11 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 12 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 13 | dnl by the GNU Library General Public License, and the rest of the GNU |
13 | dnl gettext package package is covered by the GNU General Public License. | 14 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 15 | dnl They are *not* in the public domain. |
15 | 16 | ||
16 | dnl Authors: | 17 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 18 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | 19 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
19 | 20 | ||
20 | AC_PREREQ(2.50) | 21 | AC_PREREQ([2.50]) |
21 | 22 | ||
22 | AC_DEFUN([AM_NLS], | 23 | AC_DEFUN([AM_NLS], |
23 | [ | 24 | [ |
24 | AC_MSG_CHECKING([whether NLS is requested]) | 25 | AC_MSG_CHECKING([whether NLS is requested]) |
25 | dnl Default is enabled NLS | 26 | dnl Default is enabled NLS |
26 | AC_ARG_ENABLE(nls, | 27 | AC_ARG_ENABLE([nls], |
27 | [ --disable-nls do not use Native Language Support], | 28 | [ --disable-nls do not use Native Language Support], |
28 | USE_NLS=$enableval, USE_NLS=yes) | 29 | USE_NLS=$enableval, USE_NLS=yes) |
29 | AC_MSG_RESULT($USE_NLS) | 30 | AC_MSG_RESULT([$USE_NLS]) |
30 | AC_SUBST(USE_NLS) | 31 | AC_SUBST([USE_NLS]) |
31 | ]) | 32 | ]) |
@@ -1,32 +1,68 @@ | |||
1 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | 1 | dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
2 | # | 2 | dnl serial 11 (pkg-config-0.29) |
3 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | 3 | dnl |
4 | # | 4 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
5 | # This program is free software; you can redistribute it and/or modify | 5 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> |
6 | # it under the terms of the GNU General Public License as published by | 6 | dnl |
7 | # the Free Software Foundation; either version 2 of the License, or | 7 | dnl This program is free software; you can redistribute it and/or modify |
8 | # (at your option) any later version. | 8 | dnl it under the terms of the GNU General Public License as published by |
9 | # | 9 | dnl the Free Software Foundation; either version 2 of the License, or |
10 | # This program is distributed in the hope that it will be useful, but | 10 | dnl (at your option) any later version. |
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | dnl |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | dnl This program is distributed in the hope that it will be useful, but |
13 | # General Public License for more details. | 13 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # | 14 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | # You should have received a copy of the GNU General Public License | 15 | dnl General Public License for more details. |
16 | # along with this program; if not, write to the Free Software | 16 | dnl |
17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 17 | dnl You should have received a copy of the GNU General Public License |
18 | # | 18 | dnl along with this program; if not, write to the Free Software |
19 | # As a special exception to the GNU General Public License, if you | 19 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
20 | # distribute this file as part of a program that contains a | 20 | dnl 02111-1307, USA. |
21 | # configuration script generated by Autoconf, you may include it under | 21 | dnl |
22 | # the same distribution terms that you use for the rest of that program. | 22 | dnl As a special exception to the GNU General Public License, if you |
23 | 23 | dnl distribute this file as part of a program that contains a | |
24 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | 24 | dnl configuration script generated by Autoconf, you may include it under |
25 | # ---------------------------------- | 25 | dnl the same distribution terms that you use for the rest of that |
26 | dnl program. | ||
27 | |||
28 | dnl PKG_PREREQ(MIN-VERSION) | ||
29 | dnl ----------------------- | ||
30 | dnl Since: 0.29 | ||
31 | dnl | ||
32 | dnl Verify that the version of the pkg-config macros are at least | ||
33 | dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's | ||
34 | dnl installed version of pkg-config, this checks the developer's version | ||
35 | dnl of pkg.m4 when generating configure. | ||
36 | dnl | ||
37 | dnl To ensure that this macro is defined, also add: | ||
38 | dnl m4_ifndef([PKG_PREREQ], | ||
39 | dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) | ||
40 | dnl | ||
41 | dnl See the "Since" comment for each macro you use to see what version | ||
42 | dnl of the macros you require. | ||
43 | m4_defun([PKG_PREREQ], | ||
44 | [m4_define([PKG_MACROS_VERSION], [0.29]) | ||
45 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, | ||
46 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) | ||
47 | ])dnl PKG_PREREQ | ||
48 | |||
49 | dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) | ||
50 | dnl ---------------------------------- | ||
51 | dnl Since: 0.16 | ||
52 | dnl | ||
53 | dnl Search for the pkg-config tool and set the PKG_CONFIG variable to | ||
54 | dnl first found in the path. Checks that the version of pkg-config found | ||
55 | dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is | ||
56 | dnl used since that's the first version where most current features of | ||
57 | dnl pkg-config existed. | ||
26 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | 58 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
27 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | 59 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
28 | m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) | 60 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) |
29 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl | 61 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) |
62 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | ||
63 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | ||
64 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | ||
65 | |||
30 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | 66 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
31 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | 67 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
32 | fi | 68 | fi |
@@ -39,48 +75,49 @@ if test -n "$PKG_CONFIG"; then | |||
39 | AC_MSG_RESULT([no]) | 75 | AC_MSG_RESULT([no]) |
40 | PKG_CONFIG="" | 76 | PKG_CONFIG="" |
41 | fi | 77 | fi |
42 | |||
43 | fi[]dnl | 78 | fi[]dnl |
44 | ])# PKG_PROG_PKG_CONFIG | 79 | ])dnl PKG_PROG_PKG_CONFIG |
45 | 80 | ||
46 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | 81 | dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
47 | # | 82 | dnl ------------------------------------------------------------------- |
48 | # Check to see whether a particular set of modules exists. Similar | 83 | dnl Since: 0.18 |
49 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. | 84 | dnl |
50 | # | 85 | dnl Check to see whether a particular set of modules exists. Similar to |
51 | # | 86 | dnl PKG_CHECK_MODULES(), but does not set variables or print errors. |
52 | # Similar to PKG_CHECK_MODULES, make sure that the first instance of | 87 | dnl |
53 | # this or PKG_CHECK_MODULES is called, or make sure to call | 88 | dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
54 | # PKG_CHECK_EXISTS manually | 89 | dnl only at the first occurence in configure.ac, so if the first place |
55 | # -------------------------------------------------------------- | 90 | dnl it's called might be skipped (such as if it is within an "if", you |
91 | dnl have to call PKG_CHECK_EXISTS manually | ||
56 | AC_DEFUN([PKG_CHECK_EXISTS], | 92 | AC_DEFUN([PKG_CHECK_EXISTS], |
57 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | 93 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
58 | if test -n "$PKG_CONFIG" && \ | 94 | if test -n "$PKG_CONFIG" && \ |
59 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | 95 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
60 | m4_ifval([$2], [$2], [:]) | 96 | m4_default([$2], [:]) |
61 | m4_ifvaln([$3], [else | 97 | m4_ifvaln([$3], [else |
62 | $3])dnl | 98 | $3])dnl |
63 | fi]) | 99 | fi]) |
64 | 100 | ||
65 | 101 | dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | |
66 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | 102 | dnl --------------------------------------------- |
67 | # --------------------------------------------- | 103 | dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting |
104 | dnl pkg_failed based on the result. | ||
68 | m4_define([_PKG_CONFIG], | 105 | m4_define([_PKG_CONFIG], |
69 | [if test -n "$PKG_CONFIG"; then | 106 | [if test -n "$$1"; then |
70 | if test -n "$$1"; then | 107 | pkg_cv_[]$1="$$1" |
71 | pkg_cv_[]$1="$$1" | 108 | elif test -n "$PKG_CONFIG"; then |
72 | else | 109 | PKG_CHECK_EXISTS([$3], |
73 | PKG_CHECK_EXISTS([$3], | 110 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` |
74 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], | 111 | test "x$?" != "x0" && pkg_failed=yes ], |
75 | [pkg_failed=yes]) | 112 | [pkg_failed=yes]) |
76 | fi | 113 | else |
77 | else | 114 | pkg_failed=untried |
78 | pkg_failed=untried | ||
79 | fi[]dnl | 115 | fi[]dnl |
80 | ])# _PKG_CONFIG | 116 | ])dnl _PKG_CONFIG |
81 | 117 | ||
82 | # _PKG_SHORT_ERRORS_SUPPORTED | 118 | dnl _PKG_SHORT_ERRORS_SUPPORTED |
83 | # ----------------------------- | 119 | dnl --------------------------- |
120 | dnl Internal check to see if pkg-config supports short errors. | ||
84 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | 121 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
85 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | 122 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
86 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | 123 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
@@ -88,19 +125,17 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |||
88 | else | 125 | else |
89 | _pkg_short_errors_supported=no | 126 | _pkg_short_errors_supported=no |
90 | fi[]dnl | 127 | fi[]dnl |
91 | ])# _PKG_SHORT_ERRORS_SUPPORTED | 128 | ])dnl _PKG_SHORT_ERRORS_SUPPORTED |
92 | 129 | ||
93 | 130 | ||
94 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | 131 | dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
95 | # [ACTION-IF-NOT-FOUND]) | 132 | dnl [ACTION-IF-NOT-FOUND]) |
96 | # | 133 | dnl -------------------------------------------------------------- |
97 | # | 134 | dnl Since: 0.4.0 |
98 | # Note that if there is a possibility the first call to | 135 | dnl |
99 | # PKG_CHECK_MODULES might not happen, you should be sure to include an | 136 | dnl Note that if there is a possibility the first call to |
100 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | 137 | dnl PKG_CHECK_MODULES might not happen, you should be sure to include an |
101 | # | 138 | dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
102 | # | ||
103 | # -------------------------------------------------------------- | ||
104 | AC_DEFUN([PKG_CHECK_MODULES], | 139 | AC_DEFUN([PKG_CHECK_MODULES], |
105 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | 140 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
106 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | 141 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
@@ -117,16 +152,17 @@ and $1[]_LIBS to avoid the need to call pkg-config. | |||
117 | See the pkg-config man page for more details.]) | 152 | See the pkg-config man page for more details.]) |
118 | 153 | ||
119 | if test $pkg_failed = yes; then | 154 | if test $pkg_failed = yes; then |
155 | AC_MSG_RESULT([no]) | ||
120 | _PKG_SHORT_ERRORS_SUPPORTED | 156 | _PKG_SHORT_ERRORS_SUPPORTED |
121 | if test $_pkg_short_errors_supported = yes; then | 157 | if test $_pkg_short_errors_supported = yes; then |
122 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` | 158 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
123 | else | 159 | else |
124 | $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | 160 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
125 | fi | 161 | fi |
126 | # Put the nasty error message in config.log where it belongs | 162 | # Put the nasty error message in config.log where it belongs |
127 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | 163 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
128 | 164 | ||
129 | ifelse([$4], , [AC_MSG_ERROR(dnl | 165 | m4_default([$4], [AC_MSG_ERROR( |
130 | [Package requirements ($2) were not met: | 166 | [Package requirements ($2) were not met: |
131 | 167 | ||
132 | $$1_PKG_ERRORS | 168 | $$1_PKG_ERRORS |
@@ -134,23 +170,106 @@ $$1_PKG_ERRORS | |||
134 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | 170 | Consider adjusting the PKG_CONFIG_PATH environment variable if you |
135 | installed software in a non-standard prefix. | 171 | installed software in a non-standard prefix. |
136 | 172 | ||
137 | _PKG_TEXT | 173 | _PKG_TEXT])[]dnl |
138 | ])], | 174 | ]) |
139 | [$4]) | ||
140 | elif test $pkg_failed = untried; then | 175 | elif test $pkg_failed = untried; then |
141 | ifelse([$4], , [AC_MSG_FAILURE(dnl | 176 | AC_MSG_RESULT([no]) |
177 | m4_default([$4], [AC_MSG_FAILURE( | ||
142 | [The pkg-config script could not be found or is too old. Make sure it | 178 | [The pkg-config script could not be found or is too old. Make sure it |
143 | is in your PATH or set the PKG_CONFIG environment variable to the full | 179 | is in your PATH or set the PKG_CONFIG environment variable to the full |
144 | path to pkg-config. | 180 | path to pkg-config. |
145 | 181 | ||
146 | _PKG_TEXT | 182 | _PKG_TEXT |
147 | 183 | ||
148 | To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], | 184 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
149 | [$4]) | 185 | ]) |
150 | else | 186 | else |
151 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | 187 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
152 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | 188 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
153 | AC_MSG_RESULT([yes]) | 189 | AC_MSG_RESULT([yes]) |
154 | ifelse([$3], , :, [$3]) | 190 | $3 |
155 | fi[]dnl | 191 | fi[]dnl |
156 | ])# PKG_CHECK_MODULES | 192 | ])dnl PKG_CHECK_MODULES |
193 | |||
194 | |||
195 | dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | ||
196 | dnl [ACTION-IF-NOT-FOUND]) | ||
197 | dnl --------------------------------------------------------------------- | ||
198 | dnl Since: 0.29 | ||
199 | dnl | ||
200 | dnl Checks for existence of MODULES and gathers its build flags with | ||
201 | dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags | ||
202 | dnl and VARIABLE-PREFIX_LIBS from --libs. | ||
203 | dnl | ||
204 | dnl Note that if there is a possibility the first call to | ||
205 | dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to | ||
206 | dnl include an explicit call to PKG_PROG_PKG_CONFIG in your | ||
207 | dnl configure.ac. | ||
208 | AC_DEFUN([PKG_CHECK_MODULES_STATIC], | ||
209 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
210 | _save_PKG_CONFIG=$PKG_CONFIG | ||
211 | PKG_CONFIG="$PKG_CONFIG --static" | ||
212 | PKG_CHECK_MODULES($@) | ||
213 | PKG_CONFIG=$_save_PKG_CONFIG[]dnl | ||
214 | ])dnl PKG_CHECK_MODULES_STATIC | ||
215 | |||
216 | |||
217 | dnl PKG_INSTALLDIR([DIRECTORY]) | ||
218 | dnl ------------------------- | ||
219 | dnl Since: 0.27 | ||
220 | dnl | ||
221 | dnl Substitutes the variable pkgconfigdir as the location where a module | ||
222 | dnl should install pkg-config .pc files. By default the directory is | ||
223 | dnl $libdir/pkgconfig, but the default can be changed by passing | ||
224 | dnl DIRECTORY. The user can override through the --with-pkgconfigdir | ||
225 | dnl parameter. | ||
226 | AC_DEFUN([PKG_INSTALLDIR], | ||
227 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) | ||
228 | m4_pushdef([pkg_description], | ||
229 | [pkg-config installation directory @<:@]pkg_default[@:>@]) | ||
230 | AC_ARG_WITH([pkgconfigdir], | ||
231 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, | ||
232 | [with_pkgconfigdir=]pkg_default) | ||
233 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) | ||
234 | m4_popdef([pkg_default]) | ||
235 | m4_popdef([pkg_description]) | ||
236 | ])dnl PKG_INSTALLDIR | ||
237 | |||
238 | |||
239 | dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) | ||
240 | dnl -------------------------------- | ||
241 | dnl Since: 0.27 | ||
242 | dnl | ||
243 | dnl Substitutes the variable noarch_pkgconfigdir as the location where a | ||
244 | dnl module should install arch-independent pkg-config .pc files. By | ||
245 | dnl default the directory is $datadir/pkgconfig, but the default can be | ||
246 | dnl changed by passing DIRECTORY. The user can override through the | ||
247 | dnl --with-noarch-pkgconfigdir parameter. | ||
248 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], | ||
249 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) | ||
250 | m4_pushdef([pkg_description], | ||
251 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) | ||
252 | AC_ARG_WITH([noarch-pkgconfigdir], | ||
253 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, | ||
254 | [with_noarch_pkgconfigdir=]pkg_default) | ||
255 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) | ||
256 | m4_popdef([pkg_default]) | ||
257 | m4_popdef([pkg_description]) | ||
258 | ])dnl PKG_NOARCH_INSTALLDIR | ||
259 | |||
260 | |||
261 | dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, | ||
262 | dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
263 | dnl ------------------------------------------- | ||
264 | dnl Since: 0.28 | ||
265 | dnl | ||
266 | dnl Retrieves the value of the pkg-config variable for the given module. | ||
267 | AC_DEFUN([PKG_CHECK_VAR], | ||
268 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
269 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | ||
270 | |||
271 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) | ||
272 | AS_VAR_COPY([$1], [pkg_cv_][$1]) | ||
273 | |||
274 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | ||
275 | ])dnl PKG_CHECK_VAR | ||
@@ -1,35 +1,36 @@ | |||
1 | # po.m4 serial 17 (gettext-0.18) | 1 | # po.m4 serial 24 (gettext-0.19) |
2 | dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1995-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, |
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. |
6 | dnl | 6 | dnl |
7 | dnl This file can can be used in projects which are not available under | 7 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Library General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 9 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 10 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 11 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 12 | dnl by the GNU Library General Public License, and the rest of the GNU |
13 | dnl gettext package package is covered by the GNU General Public License. | 13 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 14 | dnl They are *not* in the public domain. |
15 | 15 | ||
16 | dnl Authors: | 16 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | 18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. |
19 | 19 | ||
20 | AC_PREREQ([2.50]) | 20 | AC_PREREQ([2.60]) |
21 | 21 | ||
22 | dnl Checks for all prerequisites of the po subdirectory. | 22 | dnl Checks for all prerequisites of the po subdirectory. |
23 | AC_DEFUN([AM_PO_SUBDIRS], | 23 | AC_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 |
31 | dnl the gettext macros and po/Makefile.in.in are in sync. | 32 | dnl the gettext macros and po/Makefile.in.in are in sync. |
32 | AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) | 33 | AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) |
33 | 34 | ||
34 | dnl Perform the following tests also if --disable-nls has been given, | 35 | dnl Perform the following tests also if --disable-nls has been given, |
35 | dnl because they are needed for "make dist" to work. | 36 | dnl because they are needed for "make dist" to work. |
@@ -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], | |||
226 | changequote(,)dnl | 228 | changequote(,)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. |
259 | x | 262 | x |
@@ -261,9 +264,9 @@ s/P/P/ | |||
261 | x | 264 | x |
262 | ta | 265 | ta |
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 | } |
269 | bd | 272 | bd |
@@ -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; } |
416 | EOF | 420 | EOF |
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; } |
427 | EOF | 431 | EOF |
428 | done | 432 | done |
429 | fi | 433 | fi |
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4 index af10170..f9088c0 100644 --- a/m4/printf-posix.m4 +++ b/m4/printf-posix.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # printf-posix.m4 serial 2 (gettext-0.13.1) | 1 | # printf-posix.m4 serial 6 (gettext-0.18.2) |
2 | dnl Copyright (C) 2003 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2003, 2007, 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. |
@@ -14,7 +14,8 @@ AC_DEFUN([gt_PRINTF_POSIX], | |||
14 | AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], | 14 | AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], |
15 | gt_cv_func_printf_posix, | 15 | gt_cv_func_printf_posix, |
16 | [ | 16 | [ |
17 | AC_TRY_RUN([ | 17 | AC_RUN_IFELSE( |
18 | [AC_LANG_SOURCE([[ | ||
18 | #include <stdio.h> | 19 | #include <stdio.h> |
19 | #include <string.h> | 20 | #include <string.h> |
20 | /* The string "%2$d %1$d", with dollar characters protected from the shell's | 21 | /* The string "%2$d %1$d", with dollar characters protected from the shell's |
@@ -25,19 +26,22 @@ int main () | |||
25 | { | 26 | { |
26 | sprintf (buf, format, 33, 55); | 27 | sprintf (buf, format, 33, 55); |
27 | return (strcmp (buf, "55 33") != 0); | 28 | return (strcmp (buf, "55 33") != 0); |
28 | }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, | 29 | }]])], |
29 | [ | 30 | [gt_cv_func_printf_posix=yes], |
30 | AC_EGREP_CPP(notposix, [ | 31 | [gt_cv_func_printf_posix=no], |
31 | #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ | 32 | [ |
33 | AC_EGREP_CPP([notposix], [ | ||
34 | #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ | ||
32 | notposix | 35 | notposix |
33 | #endif | 36 | #endif |
34 | ], gt_cv_func_printf_posix="guessing no", | 37 | ], |
35 | gt_cv_func_printf_posix="guessing yes") | 38 | [gt_cv_func_printf_posix="guessing no"], |
36 | ]) | 39 | [gt_cv_func_printf_posix="guessing yes"]) |
40 | ]) | ||
37 | ]) | 41 | ]) |
38 | case $gt_cv_func_printf_posix in | 42 | case $gt_cv_func_printf_posix in |
39 | *yes) | 43 | *yes) |
40 | AC_DEFINE(HAVE_POSIX_PRINTF, 1, | 44 | AC_DEFINE([HAVE_POSIX_PRINTF], [1], |
41 | [Define if your printf() function supports format strings with positions.]) | 45 | [Define if your printf() function supports format strings with positions.]) |
42 | ;; | 46 | ;; |
43 | esac | 47 | esac |
diff --git a/m4/progtest.m4 b/m4/progtest.m4 index a56365c..9ace7c3 100644 --- a/m4/progtest.m4 +++ b/m4/progtest.m4 | |||
@@ -1,22 +1,22 @@ | |||
1 | # progtest.m4 serial 4 (gettext-0.14.2) | 1 | # progtest.m4 serial 7 (gettext-0.18.2) |
2 | dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1996-2003, 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. |
6 | dnl | 6 | dnl |
7 | dnl This file can can be used in projects which are not available under | 7 | dnl This file can be used in projects which are not available under |
8 | dnl the GNU General Public License or the GNU Library General Public | 8 | dnl the GNU General Public License or the GNU Library General Public |
9 | dnl License but which still want to provide support for the GNU gettext | 9 | dnl License but which still want to provide support for the GNU gettext |
10 | dnl functionality. | 10 | dnl functionality. |
11 | dnl Please note that the actual code of the GNU gettext library is covered | 11 | dnl Please note that the actual code of the GNU gettext library is covered |
12 | dnl by the GNU Library General Public License, and the rest of the GNU | 12 | dnl by the GNU Library General Public License, and the rest of the GNU |
13 | dnl gettext package package is covered by the GNU General Public License. | 13 | dnl gettext package is covered by the GNU General Public License. |
14 | dnl They are *not* in the public domain. | 14 | dnl They are *not* in the public domain. |
15 | 15 | ||
16 | dnl Authors: | 16 | dnl Authors: |
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. | 17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. |
18 | 18 | ||
19 | AC_PREREQ(2.50) | 19 | AC_PREREQ([2.50]) |
20 | 20 | ||
21 | # Search path for a program which passes the given test. | 21 | # Search path for a program which passes the given test. |
22 | 22 | ||
@@ -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. |
29 | if test "${PATH_SEPARATOR+set}" != set; then | 29 | if 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 | ||
39 | fi | 38 | fi |
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, |
@@ -55,7 +54,7 @@ rm -f conf$$.file | |||
55 | # Extract the first word of "$2", so it can be a program name with args. | 54 | # Extract the first word of "$2", so it can be a program name with args. |
56 | set dummy $2; ac_word=[$]2 | 55 | set dummy $2; ac_word=[$]2 |
57 | AC_MSG_CHECKING([for $ac_word]) | 56 | AC_MSG_CHECKING([for $ac_word]) |
58 | AC_CACHE_VAL(ac_cv_path_$1, | 57 | AC_CACHE_VAL([ac_cv_path_$1], |
59 | [case "[$]$1" in | 58 | [case "[$]$1" in |
60 | [[\\/]]* | ?:[[\\/]]*) | 59 | [[\\/]]* | ?:[[\\/]]*) |
61 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | 60 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
@@ -84,9 +83,9 @@ ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | |||
84 | esac])dnl | 83 | esac])dnl |
85 | $1="$ac_cv_path_$1" | 84 | $1="$ac_cv_path_$1" |
86 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | 85 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
87 | AC_MSG_RESULT([$]$1) | 86 | AC_MSG_RESULT([$][$1]) |
88 | else | 87 | else |
89 | AC_MSG_RESULT(no) | 88 | AC_MSG_RESULT([no]) |
90 | fi | 89 | fi |
91 | AC_SUBST($1)dnl | 90 | AC_SUBST([$1])dnl |
92 | ]) | 91 | ]) |
diff --git a/m4/size_max.m4 b/m4/size_max.m4 index bfba811..de69025 100644 --- a/m4/size_max.m4 +++ b/m4/size_max.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # size_max.m4 serial 5 | 1 | # size_max.m4 serial 10 |
2 | dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2003, 2005-2006, 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. |
@@ -8,10 +8,9 @@ dnl From Bruno Haible. | |||
8 | 8 | ||
9 | AC_DEFUN([gl_SIZE_MAX], | 9 | AC_DEFUN([gl_SIZE_MAX], |
10 | [ | 10 | [ |
11 | AC_CHECK_HEADERS(stdint.h) | 11 | AC_CHECK_HEADERS([stdint.h]) |
12 | dnl First test whether the system already has SIZE_MAX. | 12 | dnl First test whether the system already has SIZE_MAX. |
13 | AC_MSG_CHECKING([for SIZE_MAX]) | 13 | AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ |
14 | AC_CACHE_VAL([gl_cv_size_max], [ | ||
15 | gl_cv_size_max= | 14 | gl_cv_size_max= |
16 | AC_EGREP_CPP([Found it], [ | 15 | AC_EGREP_CPP([Found it], [ |
17 | #include <limits.h> | 16 | #include <limits.h> |
@@ -21,24 +20,28 @@ AC_DEFUN([gl_SIZE_MAX], | |||
21 | #ifdef SIZE_MAX | 20 | #ifdef SIZE_MAX |
22 | Found it | 21 | Found it |
23 | #endif | 22 | #endif |
24 | ], gl_cv_size_max=yes) | 23 | ], [gl_cv_size_max=yes]) |
25 | if test -z "$gl_cv_size_max"; then | 24 | if test -z "$gl_cv_size_max"; then |
26 | dnl Define it ourselves. Here we assume that the type 'size_t' is not wider | 25 | dnl Define it ourselves. Here we assume that the type 'size_t' is not wider |
27 | dnl than the type 'unsigned long'. Try hard to find a definition that can | 26 | dnl than the type 'unsigned long'. Try hard to find a definition that can |
28 | dnl be used in a preprocessor #if, i.e. doesn't contain a cast. | 27 | dnl be used in a preprocessor #if, i.e. doesn't contain a cast. |
29 | _AC_COMPUTE_INT([sizeof (size_t) * CHAR_BIT - 1], size_t_bits_minus_1, | 28 | AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], |
30 | [#include <stddef.h> | 29 | [#include <stddef.h> |
31 | #include <limits.h>], size_t_bits_minus_1=) | 30 | #include <limits.h>], [size_t_bits_minus_1=]) |
32 | _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint, | 31 | AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], |
33 | [#include <stddef.h>], fits_in_uint=) | 32 | [#include <stddef.h>], [fits_in_uint=]) |
34 | if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then | 33 | if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then |
35 | if test $fits_in_uint = 1; then | 34 | if test $fits_in_uint = 1; then |
36 | dnl Even though SIZE_MAX fits in an unsigned int, it must be of type | 35 | dnl Even though SIZE_MAX fits in an unsigned int, it must be of type |
37 | dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. | 36 | dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. |
38 | AC_TRY_COMPILE([#include <stddef.h> | 37 | AC_COMPILE_IFELSE( |
39 | extern size_t foo; | 38 | [AC_LANG_PROGRAM( |
40 | extern unsigned long foo; | 39 | [[#include <stddef.h> |
41 | ], [], fits_in_uint=0) | 40 | extern size_t foo; |
41 | extern unsigned long foo; | ||
42 | ]], | ||
43 | [[]])], | ||
44 | [fits_in_uint=0]) | ||
42 | fi | 45 | fi |
43 | dnl We cannot use 'expr' to simplify this expression, because 'expr' | 46 | dnl We cannot use 'expr' to simplify this expression, because 'expr' |
44 | dnl works only with 'long' integers in the host environment, while we | 47 | dnl works only with 'long' integers in the host environment, while we |
@@ -54,9 +57,23 @@ Found it | |||
54 | fi | 57 | fi |
55 | fi | 58 | fi |
56 | ]) | 59 | ]) |
57 | AC_MSG_RESULT([$gl_cv_size_max]) | ||
58 | if test "$gl_cv_size_max" != yes; then | 60 | if test "$gl_cv_size_max" != yes; then |
59 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], | 61 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], |
60 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) | 62 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) |
61 | fi | 63 | fi |
64 | dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after | ||
65 | dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with | ||
66 | dnl #define by AC_DEFINE_UNQUOTED. | ||
67 | AH_VERBATIM([SIZE_MAX], | ||
68 | [/* Define as the maximum value of type 'size_t', if the system doesn't define | ||
69 | it. */ | ||
70 | #ifndef SIZE_MAX | ||
71 | # undef SIZE_MAX | ||
72 | #endif]) | ||
73 | ]) | ||
74 | |||
75 | dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. | ||
76 | dnl Remove this when we can assume autoconf >= 2.61. | ||
77 | m4_ifdef([AC_COMPUTE_INT], [], [ | ||
78 | AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) | ||
62 | ]) | 79 | ]) |
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 index db9a8ac..f823b94 100644 --- a/m4/stdint_h.m4 +++ b/m4/stdint_h.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # stdint_h.m4 serial 6 | 1 | # stdint_h.m4 serial 9 |
2 | dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1997-2004, 2006, 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. |
@@ -11,15 +11,16 @@ dnl From Paul Eggert. | |||
11 | 11 | ||
12 | AC_DEFUN([gl_AC_HEADER_STDINT_H], | 12 | AC_DEFUN([gl_AC_HEADER_STDINT_H], |
13 | [ | 13 | [ |
14 | AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, | 14 | AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], |
15 | [AC_TRY_COMPILE( | 15 | [AC_COMPILE_IFELSE( |
16 | [#include <sys/types.h> | 16 | [AC_LANG_PROGRAM( |
17 | #include <stdint.h>], | 17 | [[#include <sys/types.h> |
18 | [uintmax_t i = (uintmax_t) -1; return !i;], | 18 | #include <stdint.h>]], |
19 | gl_cv_header_stdint_h=yes, | 19 | [[uintmax_t i = (uintmax_t) -1; return !i;]])], |
20 | gl_cv_header_stdint_h=no)]) | 20 | [gl_cv_header_stdint_h=yes], |
21 | [gl_cv_header_stdint_h=no])]) | ||
21 | if test $gl_cv_header_stdint_h = yes; then | 22 | if test $gl_cv_header_stdint_h = yes; then |
22 | AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, | 23 | AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], |
23 | [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, | 24 | [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, |
24 | and declares uintmax_t. ]) | 25 | and declares uintmax_t. ]) |
25 | fi | 26 | fi |
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 index bf83ed7..30f4dd5 100644 --- a/m4/uintmax_t.m4 +++ b/m4/uintmax_t.m4 | |||
@@ -1,12 +1,12 @@ | |||
1 | # uintmax_t.m4 serial 9 | 1 | # uintmax_t.m4 serial 12 |
2 | dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1997-2004, 2007-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. |
6 | 6 | ||
7 | dnl From Paul Eggert. | 7 | dnl From Paul Eggert. |
8 | 8 | ||
9 | AC_PREREQ(2.13) | 9 | AC_PREREQ([2.13]) |
10 | 10 | ||
11 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' | 11 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' |
12 | # if it is not already defined in <stdint.h> or <inttypes.h>. | 12 | # if it is not already defined in <stdint.h> or <inttypes.h>. |
@@ -16,15 +16,15 @@ AC_DEFUN([gl_AC_TYPE_UINTMAX_T], | |||
16 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | 16 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) |
17 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | 17 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) |
18 | if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then | 18 | if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then |
19 | AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) | 19 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) |
20 | test $ac_cv_type_unsigned_long_long = yes \ | 20 | test $ac_cv_type_unsigned_long_long_int = yes \ |
21 | && ac_type='unsigned long long' \ | 21 | && ac_type='unsigned long long' \ |
22 | || ac_type='unsigned long' | 22 | || ac_type='unsigned long' |
23 | AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, | 23 | AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], |
24 | [Define to unsigned long or unsigned long long | 24 | [Define to unsigned long or unsigned long long |
25 | if <stdint.h> and <inttypes.h> don't define.]) | 25 | if <stdint.h> and <inttypes.h> don't define.]) |
26 | else | 26 | else |
27 | AC_DEFINE(HAVE_UINTMAX_T, 1, | 27 | AC_DEFINE([HAVE_UINTMAX_T], [1], |
28 | [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) | 28 | [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) |
29 | fi | 29 | fi |
30 | ]) | 30 | ]) |
diff --git a/m4/visibility.m4 b/m4/visibility.m4 index 2ff6330..e99e3fb 100644 --- a/m4/visibility.m4 +++ b/m4/visibility.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # visibility.m4 serial 1 (gettext-0.15) | 1 | # visibility.m4 serial 5 (gettext-0.18.2) |
2 | dnl Copyright (C) 2005 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2005, 2008, 2010-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. |
@@ -12,7 +12,7 @@ dnl __attribute__((__visibility__("hidden"))) and | |||
12 | dnl __attribute__((__visibility__("default"))). | 12 | dnl __attribute__((__visibility__("default"))). |
13 | dnl Does *not* test for __visibility__("protected") - which has tricky | 13 | dnl Does *not* test for __visibility__("protected") - which has tricky |
14 | dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on | 14 | dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on |
15 | dnl MacOS X. | 15 | dnl Mac OS X. |
16 | dnl Does *not* test for __visibility__("internal") - which has processor | 16 | dnl Does *not* test for __visibility__("internal") - which has processor |
17 | dnl dependent semantics. | 17 | dnl dependent semantics. |
18 | dnl Does *not* test for #pragma GCC visibility push(hidden) - which is | 18 | dnl Does *not* test for #pragma GCC visibility push(hidden) - which is |
@@ -26,18 +26,43 @@ AC_DEFUN([gl_VISIBILITY], | |||
26 | CFLAG_VISIBILITY= | 26 | CFLAG_VISIBILITY= |
27 | HAVE_VISIBILITY=0 | 27 | HAVE_VISIBILITY=0 |
28 | if test -n "$GCC"; then | 28 | if test -n "$GCC"; then |
29 | dnl First, check whether -Werror can be added to the command line, or | ||
30 | dnl whether it leads to an error because of some other option that the | ||
31 | dnl user has put into $CC $CFLAGS $CPPFLAGS. | ||
32 | AC_MSG_CHECKING([whether the -Werror option is usable]) | ||
33 | AC_CACHE_VAL([gl_cv_cc_vis_werror], [ | ||
34 | gl_save_CFLAGS="$CFLAGS" | ||
35 | CFLAGS="$CFLAGS -Werror" | ||
36 | AC_COMPILE_IFELSE( | ||
37 | [AC_LANG_PROGRAM([[]], [[]])], | ||
38 | [gl_cv_cc_vis_werror=yes], | ||
39 | [gl_cv_cc_vis_werror=no]) | ||
40 | CFLAGS="$gl_save_CFLAGS"]) | ||
41 | AC_MSG_RESULT([$gl_cv_cc_vis_werror]) | ||
42 | dnl Now check whether visibility declarations are supported. | ||
29 | AC_MSG_CHECKING([for simple visibility declarations]) | 43 | AC_MSG_CHECKING([for simple visibility declarations]) |
30 | AC_CACHE_VAL(gl_cv_cc_visibility, [ | 44 | AC_CACHE_VAL([gl_cv_cc_visibility], [ |
31 | gl_save_CFLAGS="$CFLAGS" | 45 | gl_save_CFLAGS="$CFLAGS" |
32 | CFLAGS="$CFLAGS -fvisibility=hidden" | 46 | CFLAGS="$CFLAGS -fvisibility=hidden" |
33 | AC_TRY_COMPILE( | 47 | dnl We use the option -Werror and a function dummyfunc, because on some |
34 | [extern __attribute__((__visibility__("hidden"))) int hiddenvar; | 48 | dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning |
35 | extern __attribute__((__visibility__("default"))) int exportedvar; | 49 | dnl "visibility attribute not supported in this configuration; ignored" |
36 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | 50 | dnl at the first function definition in every compilation unit, and we |
37 | extern __attribute__((__visibility__("default"))) int exportedfunc (void);], | 51 | dnl don't want to use the option in this case. |
38 | [], | 52 | if test $gl_cv_cc_vis_werror = yes; then |
39 | gl_cv_cc_visibility=yes, | 53 | CFLAGS="$CFLAGS -Werror" |
40 | gl_cv_cc_visibility=no) | 54 | fi |
55 | AC_COMPILE_IFELSE( | ||
56 | [AC_LANG_PROGRAM( | ||
57 | [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; | ||
58 | extern __attribute__((__visibility__("default"))) int exportedvar; | ||
59 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | ||
60 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | ||
61 | void dummyfunc (void) {} | ||
62 | ]], | ||
63 | [[]])], | ||
64 | [gl_cv_cc_visibility=yes], | ||
65 | [gl_cv_cc_visibility=no]) | ||
41 | CFLAGS="$gl_save_CFLAGS"]) | 66 | CFLAGS="$gl_save_CFLAGS"]) |
42 | AC_MSG_RESULT([$gl_cv_cc_visibility]) | 67 | AC_MSG_RESULT([$gl_cv_cc_visibility]) |
43 | if test $gl_cv_cc_visibility = yes; then | 68 | if test $gl_cv_cc_visibility = yes; then |
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 index cde2129..2db8c3f 100644 --- a/m4/wchar_t.m4 +++ b/m4/wchar_t.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # wchar_t.m4 serial 1 (gettext-0.12) | 1 | # wchar_t.m4 serial 4 (gettext-0.18.2) |
2 | dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002-2003, 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. |
@@ -10,11 +10,15 @@ dnl Prerequisite: AC_PROG_CC | |||
10 | 10 | ||
11 | AC_DEFUN([gt_TYPE_WCHAR_T], | 11 | AC_DEFUN([gt_TYPE_WCHAR_T], |
12 | [ | 12 | [ |
13 | AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, | 13 | AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], |
14 | [AC_TRY_COMPILE([#include <stddef.h> | 14 | [AC_COMPILE_IFELSE( |
15 | wchar_t foo = (wchar_t)'\0';], , | 15 | [AC_LANG_PROGRAM( |
16 | gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) | 16 | [[#include <stddef.h> |
17 | wchar_t foo = (wchar_t)'\0';]], | ||
18 | [[]])], | ||
19 | [gt_cv_c_wchar_t=yes], | ||
20 | [gt_cv_c_wchar_t=no])]) | ||
17 | if test $gt_cv_c_wchar_t = yes; then | 21 | if test $gt_cv_c_wchar_t = yes; then |
18 | AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) | 22 | AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) |
19 | fi | 23 | fi |
20 | ]) | 24 | ]) |
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 index b8fff9c..8ff2a5b 100644 --- a/m4/wint_t.m4 +++ b/m4/wint_t.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # wint_t.m4 serial 1 (gettext-0.12) | 1 | # wint_t.m4 serial 5 (gettext-0.18.2) |
2 | dnl Copyright (C) 2003 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2003, 2007-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. |
@@ -10,11 +10,23 @@ dnl Prerequisite: AC_PROG_CC | |||
10 | 10 | ||
11 | AC_DEFUN([gt_TYPE_WINT_T], | 11 | AC_DEFUN([gt_TYPE_WINT_T], |
12 | [ | 12 | [ |
13 | AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, | 13 | AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], |
14 | [AC_TRY_COMPILE([#include <wchar.h> | 14 | [AC_COMPILE_IFELSE( |
15 | wint_t foo = (wchar_t)'\0';], , | 15 | [AC_LANG_PROGRAM( |
16 | gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) | 16 | [[ |
17 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | ||
18 | <wchar.h>. | ||
19 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | ||
20 | before <wchar.h>. */ | ||
21 | #include <stddef.h> | ||
22 | #include <stdio.h> | ||
23 | #include <time.h> | ||
24 | #include <wchar.h> | ||
25 | wint_t foo = (wchar_t)'\0';]], | ||
26 | [[]])], | ||
27 | [gt_cv_c_wint_t=yes], | ||
28 | [gt_cv_c_wint_t=no])]) | ||
17 | if test $gt_cv_c_wint_t = yes; then | 29 | if test $gt_cv_c_wint_t = yes; then |
18 | AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) | 30 | AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) |
19 | fi | 31 | fi |
20 | ]) | 32 | ]) |
diff --git a/m4/xsize.m4 b/m4/xsize.m4 index 85bb721..16764e8 100644 --- a/m4/xsize.m4 +++ b/m4/xsize.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # xsize.m4 serial 3 | 1 | # xsize.m4 serial 5 |
2 | dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2003-2004, 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. |
@@ -8,6 +8,5 @@ AC_DEFUN([gl_XSIZE], | |||
8 | [ | 8 | [ |
9 | dnl Prerequisites of lib/xsize.h. | 9 | dnl Prerequisites of lib/xsize.h. |
10 | AC_REQUIRE([gl_SIZE_MAX]) | 10 | AC_REQUIRE([gl_SIZE_MAX]) |
11 | AC_REQUIRE([AC_C_INLINE]) | 11 | AC_CHECK_HEADERS([stdint.h]) |
12 | AC_CHECK_HEADERS(stdint.h) | ||
13 | ]) | 12 | ]) |