| 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 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
AC_DEFUN([AM_GNU_GETTEXT], |
|---|
| 58 |
[ |
|---|
| 59 |
|
|---|
| 60 |
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , |
|---|
| 61 |
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT |
|---|
| 62 |
])])])])]) |
|---|
| 63 |
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , |
|---|
| 64 |
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT |
|---|
| 65 |
])])])]) |
|---|
| 66 |
define([gt_included_intl], ifelse([$1], [external], [no], [yes])) |
|---|
| 67 |
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) |
|---|
| 68 |
|
|---|
| 69 |
AC_REQUIRE([AM_PO_SUBDIRS]) |
|---|
| 70 |
ifelse(gt_included_intl, yes, [ |
|---|
| 71 |
AC_REQUIRE([AM_INTL_SUBDIR]) |
|---|
| 72 |
]) |
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 |
AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) |
|---|
| 76 |
AC_REQUIRE([AC_LIB_RPATH]) |
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
ifelse(gt_included_intl, yes, , [ |
|---|
| 90 |
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) |
|---|
| 91 |
]) |
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
gt_INTL_MACOSX |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
AM_NLS |
|---|
| 98 |
|
|---|
| 99 |
ifelse(gt_included_intl, yes, [ |
|---|
| 100 |
BUILD_INCLUDED_LIBINTL=no |
|---|
| 101 |
USE_INCLUDED_LIBINTL=no |
|---|
| 102 |
]) |
|---|
| 103 |
LIBINTL= |
|---|
| 104 |
LTLIBINTL= |
|---|
| 105 |
POSUB= |
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
if test "$USE_NLS" = "yes"; then |
|---|
| 109 |
gt_use_preinstalled_gnugettext=no |
|---|
| 110 |
ifelse(gt_included_intl, yes, [ |
|---|
| 111 |
AC_MSG_CHECKING([whether included gettext is requested]) |
|---|
| 112 |
AC_ARG_WITH(included-gettext, |
|---|
| 113 |
[ --with-included-gettext use the GNU gettext library included here], |
|---|
| 114 |
nls_cv_force_use_gnu_gettext=$withval, |
|---|
| 115 |
nls_cv_force_use_gnu_gettext=no) |
|---|
| 116 |
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) |
|---|
| 117 |
|
|---|
| 118 |
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
|---|
| 119 |
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
|---|
| 120 |
]) |
|---|
| 121 |
|
|---|
| 122 |
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) |
|---|
| 127 |
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) |
|---|
| 128 |
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) |
|---|
| 129 |
|
|---|
| 130 |
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, |
|---|
| 131 |
[AC_TRY_LINK([ |
|---|
| 132 |
]ifelse([$2], [need-formatstring-macros], |
|---|
| 133 |
[ |
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 |
changequote(,) |
|---|
| 137 |
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
|---|
| 138 |
changequote([,]) |
|---|
| 139 |
], [])[extern int _nl_msg_cat_cntr; |
|---|
| 140 |
extern int *_nl_domain_bindings;], |
|---|
| 141 |
[bindtextdomain ("", ""); |
|---|
| 142 |
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], |
|---|
| 143 |
gt_cv_func_gnugettext_libc=yes, |
|---|
| 144 |
gt_cv_func_gnugettext_libc=no)]) |
|---|
| 145 |
|
|---|
| 146 |
if test "$gt_cv_func_gnugettext_libc" != "yes"; then |
|---|
| 147 |
|
|---|
| 148 |
ifelse(gt_included_intl, yes, , [ |
|---|
| 149 |
AM_ICONV_LINK |
|---|
| 150 |
]) |
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
AC_LIB_LINKFLAGS_BODY([intl]) |
|---|
| 156 |
AC_CACHE_CHECK([for GNU gettext in libintl], |
|---|
| 157 |
gt_cv_func_gnugettext_libintl, |
|---|
| 158 |
[gt_save_CPPFLAGS="$CPPFLAGS" |
|---|
| 159 |
CPPFLAGS="$CPPFLAGS $INCINTL" |
|---|
| 160 |
gt_save_LIBS="$LIBS" |
|---|
| 161 |
LIBS="$LIBS $LIBINTL" |
|---|
| 162 |
|
|---|
| 163 |
AC_TRY_LINK([ |
|---|
| 164 |
]ifelse([$2], [need-formatstring-macros], |
|---|
| 165 |
[ |
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 |
changequote(,) |
|---|
| 169 |
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
|---|
| 170 |
changequote([,]) |
|---|
| 171 |
], [])[extern int _nl_msg_cat_cntr; |
|---|
| 172 |
extern |
|---|
| 173 |
|
|---|
| 174 |
"C" |
|---|
| 175 |
|
|---|
| 176 |
const char *_nl_expand_alias (const char *);], |
|---|
| 177 |
[bindtextdomain ("", ""); |
|---|
| 178 |
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], |
|---|
| 179 |
gt_cv_func_gnugettext_libintl=yes, |
|---|
| 180 |
gt_cv_func_gnugettext_libintl=no) |
|---|
| 181 |
|
|---|
| 182 |
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then |
|---|
| 183 |
LIBS="$LIBS $LIBICONV" |
|---|
| 184 |
AC_TRY_LINK([ |
|---|
| 185 |
]ifelse([$2], [need-formatstring-macros], |
|---|
| 186 |
[ |
|---|
| 187 |
|
|---|
| 188 |
|
|---|
| 189 |
changequote(,) |
|---|
| 190 |
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; |
|---|
| 191 |
changequote([,]) |
|---|
| 192 |
], [])[extern int _nl_msg_cat_cntr; |
|---|
| 193 |
extern |
|---|
| 194 |
|
|---|
| 195 |
"C" |
|---|
| 196 |
|
|---|
| 197 |
const char *_nl_expand_alias (const char *);], |
|---|
| 198 |
[bindtextdomain ("", ""); |
|---|
| 199 |
return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], |
|---|
| 200 |
[LIBINTL="$LIBINTL $LIBICONV" |
|---|
| 201 |
LTLIBINTL="$LTLIBINTL $LTLIBICONV" |
|---|
| 202 |
gt_cv_func_gnugettext_libintl=yes |
|---|
| 203 |
]) |
|---|
| 204 |
fi |
|---|
| 205 |
CPPFLAGS="$gt_save_CPPFLAGS" |
|---|
| 206 |
LIBS="$gt_save_LIBS"]) |
|---|
| 207 |
fi |
|---|
| 208 |
|
|---|
| 209 |
|
|---|
| 210 |
|
|---|
| 211 |
|
|---|
| 212 |
|
|---|
| 213 |
if test "$gt_cv_func_gnugettext_libc" = "yes" \ |
|---|
| 214 |
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \ |
|---|
| 215 |
&& test "$PACKAGE" != gettext-runtime \ |
|---|
| 216 |
&& test "$PACKAGE" != gettext-tools; }; then |
|---|
| 217 |
gt_use_preinstalled_gnugettext=yes |
|---|
| 218 |
else |
|---|
| 219 |
|
|---|
| 220 |
LIBINTL= |
|---|
| 221 |
LTLIBINTL= |
|---|
| 222 |
INCINTL= |
|---|
| 223 |
fi |
|---|
| 224 |
|
|---|
| 225 |
ifelse(gt_included_intl, yes, [ |
|---|
| 226 |
if test "$gt_use_preinstalled_gnugettext" != "yes"; then |
|---|
| 227 |
|
|---|
| 228 |
|
|---|
| 229 |
nls_cv_use_gnu_gettext=yes |
|---|
| 230 |
fi |
|---|
| 231 |
fi |
|---|
| 232 |
|
|---|
| 233 |
if test "$nls_cv_use_gnu_gettext" = "yes"; then |
|---|
| 234 |
|
|---|
| 235 |
BUILD_INCLUDED_LIBINTL=yes |
|---|
| 236 |
USE_INCLUDED_LIBINTL=yes |
|---|
| 237 |
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" |
|---|
| 238 |
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" |
|---|
| 239 |
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
|---|
| 240 |
fi |
|---|
| 241 |
|
|---|
| 242 |
CATOBJEXT= |
|---|
| 243 |
if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
|---|
| 244 |
|| test "$nls_cv_use_gnu_gettext" = "yes"; then |
|---|
| 245 |
|
|---|
| 246 |
CATOBJEXT=.gmo |
|---|
| 247 |
fi |
|---|
| 248 |
]) |
|---|
| 249 |
|
|---|
| 250 |
if test -n "$INTL_MACOSX_LIBS"; then |
|---|
| 251 |
if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
|---|
| 252 |
|| test "$nls_cv_use_gnu_gettext" = "yes"; then |
|---|
| 253 |
|
|---|
| 254 |
LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" |
|---|
| 255 |
LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" |
|---|
| 256 |
fi |
|---|
| 257 |
fi |
|---|
| 258 |
|
|---|
| 259 |
if test "$gt_use_preinstalled_gnugettext" = "yes" \ |
|---|
| 260 |
|| test "$nls_cv_use_gnu_gettext" = "yes"; then |
|---|
| 261 |
AC_DEFINE(ENABLE_NLS, 1, |
|---|
| 262 |
[Define to 1 if translation of program messages to the user's native language |
|---|
| 263 |
is requested.]) |
|---|
| 264 |
else |
|---|
| 265 |
USE_NLS=no |
|---|
| 266 |
fi |
|---|
| 267 |
fi |
|---|
| 268 |
|
|---|
| 269 |
AC_MSG_CHECKING([whether to use NLS]) |
|---|
| 270 |
AC_MSG_RESULT([$USE_NLS]) |
|---|
| 271 |
if test "$USE_NLS" = "yes"; then |
|---|
| 272 |
AC_MSG_CHECKING([where the gettext function comes from]) |
|---|
| 273 |
if test "$gt_use_preinstalled_gnugettext" = "yes"; then |
|---|
| 274 |
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then |
|---|
| 275 |
gt_source="external libintl" |
|---|
| 276 |
else |
|---|
| 277 |
gt_source="libc" |
|---|
| 278 |
fi |
|---|
| 279 |
else |
|---|
| 280 |
gt_source="included intl directory" |
|---|
| 281 |
fi |
|---|
| 282 |
AC_MSG_RESULT([$gt_source]) |
|---|
| 283 |
fi |
|---|
| 284 |
|
|---|
| 285 |
if test "$USE_NLS" = "yes"; then |
|---|
| 286 |
|
|---|
| 287 |
if test "$gt_use_preinstalled_gnugettext" = "yes"; then |
|---|
| 288 |
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then |
|---|
| 289 |
AC_MSG_CHECKING([how to link with libintl]) |
|---|
| 290 |
AC_MSG_RESULT([$LIBINTL]) |
|---|
| 291 |
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) |
|---|
| 292 |
fi |
|---|
| 293 |
|
|---|
| 294 |
|
|---|
| 295 |
AC_DEFINE(HAVE_GETTEXT, 1, |
|---|
| 296 |
[Define if the GNU gettext() function is already present or preinstalled.]) |
|---|
| 297 |
AC_DEFINE(HAVE_DCGETTEXT, 1, |
|---|
| 298 |
[Define if the GNU dcgettext() function is already present or preinstalled.]) |
|---|
| 299 |
fi |
|---|
| 300 |
|
|---|
| 301 |
|
|---|
| 302 |
POSUB=po |
|---|
| 303 |
fi |
|---|
| 304 |
|
|---|
| 305 |
ifelse(gt_included_intl, yes, [ |
|---|
| 306 |
|
|---|
| 307 |
|
|---|
| 308 |
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then |
|---|
| 309 |
BUILD_INCLUDED_LIBINTL=yes |
|---|
| 310 |
fi |
|---|
| 311 |
|
|---|
| 312 |
|
|---|
| 313 |
AC_SUBST(BUILD_INCLUDED_LIBINTL) |
|---|
| 314 |
AC_SUBST(USE_INCLUDED_LIBINTL) |
|---|
| 315 |
AC_SUBST(CATOBJEXT) |
|---|
| 316 |
|
|---|
| 317 |
|
|---|
| 318 |
nls_cv_header_intl= |
|---|
| 319 |
nls_cv_header_libgt= |
|---|
| 320 |
|
|---|
| 321 |
|
|---|
| 322 |
DATADIRNAME=share |
|---|
| 323 |
AC_SUBST(DATADIRNAME) |
|---|
| 324 |
|
|---|
| 325 |
|
|---|
| 326 |
INSTOBJEXT=.mo |
|---|
| 327 |
AC_SUBST(INSTOBJEXT) |
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 |
GENCAT=gencat |
|---|
| 331 |
AC_SUBST(GENCAT) |
|---|
| 332 |
|
|---|
| 333 |
|
|---|
| 334 |
INTLOBJS= |
|---|
| 335 |
if test "$USE_INCLUDED_LIBINTL" = yes; then |
|---|
| 336 |
INTLOBJS="\$(GETTOBJS)" |
|---|
| 337 |
fi |
|---|
| 338 |
AC_SUBST(INTLOBJS) |
|---|
| 339 |
|
|---|
| 340 |
|
|---|
| 341 |
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix |
|---|
| 342 |
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) |
|---|
| 343 |
]) |
|---|
| 344 |
|
|---|
| 345 |
|
|---|
| 346 |
INTLLIBS="$LIBINTL" |
|---|
| 347 |
AC_SUBST(INTLLIBS) |
|---|
| 348 |
|
|---|
| 349 |
|
|---|
| 350 |
AC_SUBST(LIBINTL) |
|---|
| 351 |
AC_SUBST(LTLIBINTL) |
|---|
| 352 |
AC_SUBST(POSUB) |
|---|
| 353 |
]) |
|---|
| 354 |
|
|---|
| 355 |
|
|---|
| 356 |
|
|---|
| 357 |
|
|---|
| 358 |
|
|---|
| 359 |
AC_DEFUN([AM_INTL_SUBDIR], |
|---|
| 360 |
[ |
|---|
| 361 |
AC_REQUIRE([AC_PROG_INSTALL]) |
|---|
| 362 |
AC_REQUIRE([AM_MKINSTALLDIRS]) |
|---|
| 363 |
AC_REQUIRE([AC_PROG_CC]) |
|---|
| 364 |
AC_REQUIRE([AC_CANONICAL_HOST]) |
|---|
| 365 |
AC_REQUIRE([gt_GLIBC2]) |
|---|
| 366 |
AC_REQUIRE([AC_PROG_RANLIB]) |
|---|
| 367 |
AC_REQUIRE([AC_ISC_POSIX]) |
|---|
| 368 |
AC_REQUIRE([AC_HEADER_STDC]) |
|---|
| 369 |
AC_REQUIRE([AC_C_CONST]) |
|---|
| 370 |
AC_REQUIRE([bh_C_SIGNED]) |
|---|
| 371 |
AC_REQUIRE([AC_C_INLINE]) |
|---|
| 372 |
AC_REQUIRE([AC_TYPE_OFF_T]) |
|---|
| 373 |
AC_REQUIRE([AC_TYPE_SIZE_T]) |
|---|
| 374 |
AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) |
|---|
| 375 |
AC_REQUIRE([gt_TYPE_LONGDOUBLE]) |
|---|
| 376 |
AC_REQUIRE([gt_TYPE_WCHAR_T]) |
|---|
| 377 |
AC_REQUIRE([gt_TYPE_WINT_T]) |
|---|
| 378 |
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) |
|---|
| 379 |
AC_REQUIRE([gl_AC_HEADER_STDINT_H]) |
|---|
| 380 |
AC_REQUIRE([gt_TYPE_INTMAX_T]) |
|---|
| 381 |
AC_REQUIRE([gt_PRINTF_POSIX]) |
|---|
| 382 |
AC_REQUIRE([AC_FUNC_ALLOCA]) |
|---|
| 383 |
AC_REQUIRE([AC_FUNC_MMAP]) |
|---|
| 384 |
AC_REQUIRE([gl_GLIBC21]) |
|---|
| 385 |
AC_REQUIRE([gt_INTDIV0]) |
|---|
| 386 |
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) |
|---|
| 387 |
AC_REQUIRE([gt_HEADER_INTTYPES_H]) |
|---|
| 388 |
AC_REQUIRE([gt_INTTYPES_PRI]) |
|---|
| 389 |
AC_REQUIRE([gl_XSIZE]) |
|---|
| 390 |
AC_REQUIRE([gt_INTL_MACOSX]) |
|---|
| 391 |
|
|---|
| 392 |
AC_CHECK_TYPE([ptrdiff_t], , |
|---|
| 393 |
[AC_DEFINE([ptrdiff_t], [long], |
|---|
| 394 |
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) |
|---|
| 395 |
]) |
|---|
| 396 |
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ |
|---|
| 397 |
stdlib.h string.h unistd.h sys/param.h]) |
|---|
| 398 |
AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ |
|---|
| 399 |
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ |
|---|
| 400 |
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ |
|---|
| 401 |
__fsetlocking]) |
|---|
| 402 |
|
|---|
| 403 |
|
|---|
| 404 |
|
|---|
| 405 |
gt_CHECK_DECL(_snprintf, [ |
|---|
| 406 |
gt_CHECK_DECL(_snwprintf, [ |
|---|
| 407 |
|
|---|
| 408 |
|
|---|
| 409 |
|
|---|
| 410 |
|
|---|
| 411 |
|
|---|
| 412 |
|
|---|
| 413 |
gt_CHECK_DECL(feof_unlocked, [ |
|---|
| 414 |
gt_CHECK_DECL(fgets_unlocked, [ |
|---|
| 415 |
gt_CHECK_DECL(getc_unlocked, [ |
|---|
| 416 |
|
|---|
| 417 |
case $gt_cv_func_printf_posix in |
|---|
| 418 |
*yes) HAVE_POSIX_PRINTF=1 ;; |
|---|
| 419 |
*) HAVE_POSIX_PRINTF=0 ;; |
|---|
| 420 |
esac |
|---|
| 421 |
AC_SUBST([HAVE_POSIX_PRINTF]) |
|---|
| 422 |
if test "$ac_cv_func_asprintf" = yes; then |
|---|
| 423 |
HAVE_ASPRINTF=1 |
|---|
| 424 |
else |
|---|
| 425 |
HAVE_ASPRINTF=0 |
|---|
| 426 |
fi |
|---|
| 427 |
AC_SUBST([HAVE_ASPRINTF]) |
|---|
| 428 |
if test "$ac_cv_func_snprintf" = yes; then |
|---|
| 429 |
HAVE_SNPRINTF=1 |
|---|
| 430 |
else |
|---|
| 431 |
HAVE_SNPRINTF=0 |
|---|
| 432 |
fi |
|---|
| 433 |
AC_SUBST([HAVE_SNPRINTF]) |
|---|
| 434 |
if test "$ac_cv_func_wprintf" = yes; then |
|---|
| 435 |
HAVE_WPRINTF=1 |
|---|
| 436 |
else |
|---|
| 437 |
HAVE_WPRINTF=0 |
|---|
| 438 |
fi |
|---|
| 439 |
AC_SUBST([HAVE_WPRINTF]) |
|---|
| 440 |
|
|---|
| 441 |
AM_ICONV |
|---|
| 442 |
AM_LANGINFO_CODESET |
|---|
| 443 |
if test $ac_cv_header_locale_h = yes; then |
|---|
| 444 |
gt_LC_MESSAGES |
|---|
| 445 |
fi |
|---|
| 446 |
|
|---|
| 447 |
if test -n "$INTL_MACOSX_LIBS"; then |
|---|
| 448 |
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" |
|---|
| 449 |
fi |
|---|
| 450 |
|
|---|
| 451 |
|
|---|
| 452 |
|
|---|
| 453 |
|
|---|
| 454 |
|
|---|
| 455 |
|
|---|
| 456 |
|
|---|
| 457 |
|
|---|
| 458 |
|
|---|
| 459 |
|
|---|
| 460 |
|
|---|
| 461 |
AC_CHECK_PROGS([INTLBISON], [bison]) |
|---|
| 462 |
if test -z "$INTLBISON"; then |
|---|
| 463 |
ac_verc_fail=yes |
|---|
| 464 |
else |
|---|
| 465 |
|
|---|
| 466 |
AC_MSG_CHECKING([version of bison]) |
|---|
| 467 |
changequote(<<,>>) |
|---|
| 468 |
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
|---|
| 469 |
case $ac_prog_version in |
|---|
| 470 |
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; |
|---|
| 471 |
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) |
|---|
| 472 |
changequote([,]) |
|---|
| 473 |
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; |
|---|
| 474 |
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; |
|---|
| 475 |
esac |
|---|
| 476 |
AC_MSG_RESULT([$ac_prog_version]) |
|---|
| 477 |
fi |
|---|
| 478 |
if test $ac_verc_fail = yes; then |
|---|
| 479 |
INTLBISON=: |
|---|
| 480 |
fi |
|---|
| 481 |
]) |
|---|
| 482 |
|
|---|
| 483 |
|
|---|
| 484 |
|
|---|
| 485 |
|
|---|
| 486 |
AC_DEFUN([gt_INTL_MACOSX], |
|---|
| 487 |
[ |
|---|
| 488 |
|
|---|
| 489 |
AC_CACHE_CHECK([for CFPreferencesCopyAppValue], |
|---|
| 490 |
gt_cv_func_CFPreferencesCopyAppValue, |
|---|
| 491 |
[gt_save_CPPFLAGS="$CPPFLAGS" |
|---|
| 492 |
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" |
|---|
| 493 |
gt_save_LIBS="$LIBS" |
|---|
| 494 |
LIBS="$LIBS -framework CoreFoundation" |
|---|
| 495 |
AC_TRY_LINK([ |
|---|
| 496 |
[CFPreferencesCopyAppValue(NULL, NULL)], |
|---|
| 497 |
[gt_cv_func_CFPreferencesCopyAppValue=yes], |
|---|
| 498 |
[gt_cv_func_CFPreferencesCopyAppValue=no]) |
|---|
| 499 |
CPPFLAGS="$gt_save_CPPFLAGS" |
|---|
| 500 |
LIBS="$gt_save_LIBS"]) |
|---|
| 501 |
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then |
|---|
| 502 |
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, |
|---|
| 503 |
[Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) |
|---|
| 504 |
fi |
|---|
| 505 |
|
|---|
| 506 |
AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, |
|---|
| 507 |
[gt_save_CPPFLAGS="$CPPFLAGS" |
|---|
| 508 |
CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers" |
|---|
| 509 |
gt_save_LIBS="$LIBS" |
|---|
| 510 |
LIBS="$LIBS -framework CoreFoundation" |
|---|
| 511 |
AC_TRY_LINK([ |
|---|
| 512 |
[gt_cv_func_CFLocaleCopyCurrent=yes], |
|---|
| 513 |
[gt_cv_func_CFLocaleCopyCurrent=no]) |
|---|
| 514 |
CPPFLAGS="$gt_save_CPPFLAGS" |
|---|
| 515 |
LIBS="$gt_save_LIBS"]) |
|---|
| 516 |
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then |
|---|
| 517 |
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, |
|---|
| 518 |
[Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) |
|---|
| 519 |
fi |
|---|
| 520 |
INTL_MACOSX_LIBS= |
|---|
| 521 |
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then |
|---|
| 522 |
INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" |
|---|
| 523 |
fi |
|---|
| 524 |
AC_SUBST([INTL_MACOSX_LIBS]) |
|---|
| 525 |
]) |
|---|
| 526 |
|
|---|
| 527 |
|
|---|
| 528 |
dnl gt_CHECK_DECL(FUNC, INCLUDES) |
|---|
| 529 |
dnl Check whether a function is declared. |
|---|
| 530 |
AC_DEFUN([gt_CHECK_DECL], |
|---|
| 531 |
[ |
|---|
| 532 |
AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, |
|---|
| 533 |
[AC_TRY_COMPILE([$2], [ |
|---|
| 534 |
#ifndef $1 |
|---|
| 535 |
char *p = (char *) $1; |
|---|
| 536 |
#endif |
|---|
| 537 |
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) |
|---|
| 538 |
if test $ac_cv_have_decl_$1 = yes; then |
|---|
| 539 |
gt_value=1 |
|---|
| 540 |
else |
|---|
| 541 |
gt_value=0 |
|---|
| 542 |
fi |
|---|
| 543 |
AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], |
|---|
| 544 |
[Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) |
|---|
| 545 |
]) |
|---|
| 546 |
|
|---|
| 547 |
|
|---|
| 548 |
|
|---|
| 549 |
AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) |
|---|