~ubuntu-branches/ubuntu/trusty/gettext/trusty

« back to all changes in this revision

Viewing changes to m4/setlocale.m4

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2002-04-10 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20020410131742-npf89tsaygdolprj
Tags: upstream-0.10.40
ImportĀ upstreamĀ versionĀ 0.10.40

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#serial 2
 
2
 
 
3
# Check for setlocale declaration.
 
4
 
 
5
AC_DEFUN([gt_SETLOCALE],[
 
6
AC_CHECK_HEADERS([locale.h])
 
7
AC_MSG_CHECKING([for setlocale declaration])
 
8
AC_CACHE_VAL(gt_cv_proto_setlocale, [
 
9
AC_TRY_COMPILE([
 
10
#include <stdlib.h>
 
11
#include <locale.h>
 
12
extern
 
13
#ifdef __cplusplus
 
14
"C"
 
15
#endif
 
16
#if defined(__STDC__) || defined(__cplusplus)
 
17
char *setlocale (int category, char *locale);
 
18
#else
 
19
char *setlocale();
 
20
#endif
 
21
], [], gt_cv_proto_setlocale_arg1="", gt_cv_proto_setlocale_arg1="const")
 
22
gt_cv_proto_setlocale="extern char *setlocale (int category, $gt_cv_proto_setlocale_arg1 char *locale);"])
 
23
gt_cv_proto_setlocale=`echo "[$]gt_cv_proto_setlocale" | tr -s ' ' | sed -e 's/( /(/'`
 
24
AC_MSG_RESULT([$]{ac_t:-
 
25
         }[$]gt_cv_proto_setlocale)
 
26
AC_DEFINE_UNQUOTED(SETLOCALE_CONST,$gt_cv_proto_setlocale_arg1,
 
27
  [Define as const if the declaration of setlocale() needs const.])
 
28
])