source: trunk/third/gettext/m4/setlocale.m4 @ 16931

Revision 16931, 867 bytes checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16930, which included commits to RCS files with non-trunk default branches.
Line 
1#serial 2
2
3# Check for setlocale declaration.
4
5AC_DEFUN([gt_SETLOCALE],[
6AC_CHECK_HEADERS([locale.h])
7AC_MSG_CHECKING([for setlocale declaration])
8AC_CACHE_VAL(gt_cv_proto_setlocale, [
9AC_TRY_COMPILE([
10#include <stdlib.h>
11#include <locale.h>
12extern
13#ifdef __cplusplus
14"C"
15#endif
16#if defined(__STDC__) || defined(__cplusplus)
17char *setlocale (int category, char *locale);
18#else
19char *setlocale();
20#endif
21], [], gt_cv_proto_setlocale_arg1="", gt_cv_proto_setlocale_arg1="const")
22gt_cv_proto_setlocale="extern char *setlocale (int category, $gt_cv_proto_setlocale_arg1 char *locale);"])
23gt_cv_proto_setlocale=`echo "[$]gt_cv_proto_setlocale" | tr -s ' ' | sed -e 's/( /(/'`
24AC_MSG_RESULT([$]{ac_t:-
25         }[$]gt_cv_proto_setlocale)
26AC_DEFINE_UNQUOTED(SETLOCALE_CONST,$gt_cv_proto_setlocale_arg1,
27  [Define as const if the declaration of setlocale() needs const.])
28])
Note: See TracBrowser for help on using the repository browser.