annotate m4/nl_langinfo.m4 @ 40057:b06060465f09

maint: Run 'make update-copyright'
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 01 Jan 2019 00:25:11 +0100
parents a7004c2ef842
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19528
a7004c2ef842 nl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
1 # nl_langinfo.m4 serial 6
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19528
diff changeset
2 dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
12430
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_NL_LANGINFO],
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 [
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 AC_REQUIRE([gl_LANGINFO_H])
12583
462199e08415 nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if.
Paolo Bonzini <bonzini@gnu.org>
parents: 12573
diff changeset
11 AC_CHECK_FUNCS_ONCE([nl_langinfo])
14067
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
12 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
12597
b67fd2fff94a nl_langinfo: Simplify logic.
Bruno Haible <bruno@clisp.org>
parents: 12583
diff changeset
13 if test $ac_cv_func_nl_langinfo = yes; then
14067
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
14 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
15 AC_CACHE_CHECK([whether YESEXPR works],
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
16 [gl_cv_func_nl_langinfo_yesexpr_works],
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
17 [AC_RUN_IFELSE(
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
18 [AC_LANG_PROGRAM([[#include <langinfo.h>
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
19 ]], [[return !*nl_langinfo(YESEXPR);
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
20 ]])],
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
21 [gl_cv_func_nl_langinfo_yesexpr_works=yes],
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
22 [gl_cv_func_nl_langinfo_yesexpr_works=no],
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
23 [
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
24 case "$host_os" in
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
25 # Guess no on irix systems.
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
26 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
27 # Guess yes elsewhere.
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
28 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
29 esac
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
30 ])
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
31 ])
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
32 case $gl_cv_func_nl_langinfo_yesexpr_works in
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
33 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
34 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
35 esac
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
36 AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS],
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
37 [$FUNC_NL_LANGINFO_YESEXPR_WORKS],
10c3545b10f8 nl_langinfo: fix YESEXPR on Irix 6.5
Eric Blake <eblake@redhat.com>
parents: 12597
diff changeset
38 [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.])
19528
a7004c2ef842 nl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
39 if test $HAVE_LANGINFO_CODESET = 1 \
a7004c2ef842 nl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
40 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
a7004c2ef842 nl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
41 && test $HAVE_LANGINFO_ALTMON = 1 \
a7004c2ef842 nl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
42 && test $HAVE_LANGINFO_ERA = 1 \
a7004c2ef842 nl_langinfo: Override the system's nl_langinfo() when needed.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
43 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
12430
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 :
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 else
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 REPLACE_NL_LANGINFO=1
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 AC_DEFINE([REPLACE_NL_LANGINFO], [1],
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 [Define if nl_langinfo exists but is overridden by gnulib.])
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 fi
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 else
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 HAVE_NL_LANGINFO=0
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 fi
235cc0b78f8a New module 'nl_langinfo'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 ])