File: evo_check_langinfo.m4

package info (click to toggle)
evolution-data-server 3.22.7-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 62,116 kB
  • ctags: 41,630
  • sloc: ansic: 302,318; makefile: 4,890; sh: 4,182; cpp: 472; xml: 462; perl: 368; python: 71
file content (25 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
dnl EVO_CHECK_LANGINFO(detail)
dnl Checks if the given langinfo detail is supported
AC_DEFUN([EVO_CHECK_LANGINFO],[
	AS_VAR_PUSHDEF([ac_cv_langinfo_detail],
	               [ac_cv_langinfo_]m4_tolower($1))

	AC_MSG_CHECKING([for nl_langinfo ($1)])

	AC_LANG_PUSH(C)

	AC_COMPILE_IFELSE(
		[AC_LANG_PROGRAM(
			[[#include <langinfo.h>]],
			[[char *detail = nl_langinfo ($1);]])],
		[ac_cv_langinfo_detail=yes],
		[ac_cv_langinfo_detail=no])

	AC_LANG_POP(C)

	AS_VAR_IF([ac_cv_langinfo_detail], [yes],
	          [AC_DEFINE([HAVE_]m4_toupper($1), 1, [Have nl_langinfo ($1)])])

	AC_MSG_RESULT([$ac_cv_langinfo_detail])
	AS_VAR_POPDEF([ac_cv_langinfo_detail])
])