setlocale.m4 revision 1.1.1.1
1# setlocale.m4 serial 3 (gettext-0.15) 2dnl Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc. 3dnl This file is free software; the Free Software Foundation 4dnl gives unlimited permission to copy and/or distribute it, 5dnl with or without modifications, as long as this notice is preserved. 6 7# Check for setlocale declaration. 8 9AC_DEFUN([gt_SETLOCALE],[ 10AC_MSG_CHECKING([for setlocale declaration]) 11AC_CACHE_VAL(gt_cv_proto_setlocale, [ 12AC_TRY_COMPILE([ 13#include <stdlib.h> 14#include <locale.h> 15extern 16#ifdef __cplusplus 17"C" 18#endif 19#if defined(__STDC__) || defined(__cplusplus) 20char *setlocale (int category, char *locale); 21#else 22char *setlocale(); 23#endif 24], [], gt_cv_proto_setlocale_arg1="", gt_cv_proto_setlocale_arg1="const") 25gt_cv_proto_setlocale="extern char *setlocale (int category, $gt_cv_proto_setlocale_arg1 char *locale);"]) 26gt_cv_proto_setlocale=`echo "[$]gt_cv_proto_setlocale" | tr -s ' ' | sed -e 's/( /(/'` 27AC_MSG_RESULT([$]{ac_t:- 28 }[$]gt_cv_proto_setlocale) 29AC_DEFINE_UNQUOTED(SETLOCALE_CONST,$gt_cv_proto_setlocale_arg1, 30 [Define as const if the declaration of setlocale() needs const.]) 31]) 32