1dnl aclocal.m4 generated automatically by aclocal 1.4 2 3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. 4dnl This file is free software; the Free Software Foundation 5dnl gives unlimited permission to copy and/or distribute it, 6dnl with or without modifications, as long as this notice is preserved. 7 8dnl This program is distributed in the hope that it will be useful, 9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without 10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11dnl PARTICULAR PURPOSE. 12 13# $Id: aclocal.m4,v 1.1.1.3 2000/02/09 01:23:55 espie Exp $ 14# Source file used by aclocal in generating aclocal.m4. 15 16#serial 3 17 18AC_DEFUN(jm_CHECK_DECLARATION, 19[ 20 AC_REQUIRE([AC_HEADER_STDC])dnl 21 test -z "$ac_cv_header_memory_h" && AC_CHECK_HEADERS(memory.h) 22 test -z "$ac_cv_header_string_h" && AC_CHECK_HEADERS(string.h) 23 test -z "$ac_cv_header_strings_h" && AC_CHECK_HEADERS(strings.h) 24 test -z "$ac_cv_header_stdlib_h" && AC_CHECK_HEADERS(stdlib.h) 25 test -z "$ac_cv_header_unistd_h" && AC_CHECK_HEADERS(unistd.h) 26 AC_MSG_CHECKING([whether $1 is declared]) 27 AC_CACHE_VAL(jm_cv_func_decl_$1, 28 [AC_TRY_COMPILE($2, 29 [ 30#ifndef $1 31char *(*pfn) = (char *(*)) $1 32#endif 33 ], 34 eval "jm_cv_func_decl_$1=yes", 35 eval "jm_cv_func_decl_$1=no")]) 36 37 if eval "test \"`echo '$jm_cv_func_decl_'$1`\" = yes"; then 38 AC_MSG_RESULT(yes) 39 ifelse([$3], , :, [$3]) 40 else 41 AC_MSG_RESULT(no) 42 ifelse([$4], , , [$4 43])dnl 44 fi 45])dnl 46 47dnl jm_CHECK_DECLARATIONS(INCLUDES, FUNCTION... [, ACTION-IF-DECLARED 48dnl [, ACTION-IF-NOT-DECLARED]]) 49AC_DEFUN(jm_CHECK_DECLARATIONS, 50[ 51 for jm_func in $2 52 do 53 jm_CHECK_DECLARATION($jm_func, $1, 54 [ 55 jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` 56 AC_DEFINE_UNQUOTED($jm_tr_func) $3], $4)dnl 57 done 58]) 59 60#serial 1 61# this is check-decl.m4 in sh-utils 1.16k/m4/check-decl.m4 62# with a different function list. 63 64dnl This is just a wrapper function to encapsulate this kludge. 65dnl Putting it in a separate file like this helps share it between 66dnl different packages. 67AC_DEFUN(txi_CHECK_DECLS, 68[ 69 headers=' 70#include <stdio.h> 71#ifdef HAVE_STRING_H 72# if !STDC_HEADERS && HAVE_MEMORY_H 73# include <memory.h> 74# endif 75# include <string.h> 76#else 77# ifdef HAVE_STRINGS_H 78# include <strings.h> 79# endif 80#endif 81#ifdef HAVE_STDLIB_H 82# include <stdlib.h> 83#endif 84#ifdef HAVE_UNISTD_H 85# include <unistd.h> 86#endif 87' 88 89 if test x = y; then 90 dnl This code is deliberately never run via ./configure. 91 dnl FIXME: this is a gross hack to make autoheader put entries 92 dnl for each of these symbols in the config.h.in. 93 dnl Otherwise, I'd have to update acconfig.h every time I change 94 dnl this list of functions. 95 AC_DEFINE(HAVE_DECL_STRERROR, 1, [Define if this function is declared.]) 96 AC_DEFINE(HAVE_DECL_STRCASECMP, 1, [Define if this function is declared.]) 97 AC_DEFINE(HAVE_DECL_STRNCASECMP, 1, [Define if this function is declared.]) 98 AC_DEFINE(HAVE_DECL_STRCOLL, 1, [Define if this function is declared.]) 99 fi 100 101 jm_CHECK_DECLARATIONS($headers, strerror strcasecmp strncasecmp strcoll) 102]) 103 104# Like AC_CONFIG_HEADER, but automatically create stamp file. 105 106AC_DEFUN(AM_CONFIG_HEADER, 107[AC_PREREQ([2.12]) 108AC_CONFIG_HEADER([$1]) 109dnl When config.status generates a header, we must update the stamp-h file. 110dnl This file resides in the same directory as the config header 111dnl that is generated. We must strip everything past the first ":", 112dnl and everything past the last "/". 113AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl 114ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, 115<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, 116<<am_indx=1 117for am_file in <<$1>>; do 118 case " <<$>>CONFIG_HEADERS " in 119 *" <<$>>am_file "*<<)>> 120 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx 121 ;; 122 esac 123 am_indx=`expr "<<$>>am_indx" + 1` 124done<<>>dnl>>) 125changequote([,]))]) 126 127# Do all the work for Automake. This macro actually does too much -- 128# some checks are only needed if your package does certain things. 129# But this isn't really a big deal. 130 131# serial 1 132 133dnl Usage: 134dnl AM_INIT_AUTOMAKE(package,version, [no-define]) 135 136AC_DEFUN(AM_INIT_AUTOMAKE, 137[AC_REQUIRE([AC_PROG_INSTALL]) 138PACKAGE=[$1] 139AC_SUBST(PACKAGE) 140VERSION=[$2] 141AC_SUBST(VERSION) 142dnl test to see if srcdir already configured 143if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then 144 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 145fi 146ifelse([$3],, 147AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 148AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) 149AC_REQUIRE([AM_SANITY_CHECK]) 150AC_REQUIRE([AC_ARG_PROGRAM]) 151dnl FIXME This is truly gross. 152missing_dir=`cd $ac_aux_dir && pwd` 153AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) 154AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) 155AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) 156AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) 157AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) 158AC_REQUIRE([AC_PROG_MAKE_SET])]) 159 160# 161# Check to make sure that the build environment is sane. 162# 163 164AC_DEFUN(AM_SANITY_CHECK, 165[AC_MSG_CHECKING([whether build environment is sane]) 166# Just in case 167sleep 1 168echo timestamp > conftestfile 169# Do `set' in a subshell so we don't clobber the current shell's 170# arguments. Must try -L first in case configure is actually a 171# symlink; some systems play weird games with the mod time of symlinks 172# (eg FreeBSD returns the mod time of the symlink's containing 173# directory). 174if ( 175 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` 176 if test "[$]*" = "X"; then 177 # -L didn't work. 178 set X `ls -t $srcdir/configure conftestfile` 179 fi 180 if test "[$]*" != "X $srcdir/configure conftestfile" \ 181 && test "[$]*" != "X conftestfile $srcdir/configure"; then 182 183 # If neither matched, then we have a broken ls. This can happen 184 # if, for instance, CONFIG_SHELL is bash and it inherits a 185 # broken ls alias from the environment. This has actually 186 # happened. Such a system could not be considered "sane". 187 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 188alias in your environment]) 189 fi 190 191 test "[$]2" = conftestfile 192 ) 193then 194 # Ok. 195 : 196else 197 AC_MSG_ERROR([newly created file is older than distributed files! 198Check your system clock]) 199fi 200rm -f conftest* 201AC_MSG_RESULT(yes)]) 202 203dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) 204dnl The program must properly implement --version. 205AC_DEFUN(AM_MISSING_PROG, 206[AC_MSG_CHECKING(for working $2) 207# Run test in a subshell; some versions of sh will print an error if 208# an executable is not found, even if stderr is redirected. 209# Redirect stdin to placate older versions of autoconf. Sigh. 210if ($2 --version) < /dev/null > /dev/null 2>&1; then 211 $1=$2 212 AC_MSG_RESULT(found) 213else 214 $1="$3/missing $2" 215 AC_MSG_RESULT(missing) 216fi 217AC_SUBST($1)]) 218 219# Define a conditional. 220 221AC_DEFUN(AM_CONDITIONAL, 222[AC_SUBST($1_TRUE) 223AC_SUBST($1_FALSE) 224if $2; then 225 $1_TRUE= 226 $1_FALSE='#' 227else 228 $1_TRUE='#' 229 $1_FALSE= 230fi]) 231 232dnl From Jim Meyering. 233 234# serial 1 235 236AC_DEFUN(AM_SYS_POSIX_TERMIOS, 237[AC_CACHE_CHECK([POSIX termios], am_cv_sys_posix_termios, 238 [AC_TRY_LINK([#include <sys/types.h> 239#include <unistd.h> 240#include <termios.h>], 241 [/* SunOS 4.0.3 has termios.h but not the library calls. */ 242 tcgetattr(0, 0);], 243 am_cv_sys_posix_termios=yes, 244 am_cv_sys_posix_termios=no)]) 245]) 246 247dnl From Jim Meyering. 248 249# serial 1 250 251AC_DEFUN(AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL, 252[AC_REQUIRE([AM_SYS_POSIX_TERMIOS]) 253 AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h], 254 am_cv_sys_tiocgwinsz_needs_sys_ioctl_h, 255 [am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no 256 257 gwinsz_in_termios_h=no 258 if test $am_cv_sys_posix_termios = yes; then 259 AC_EGREP_CPP([yes], 260 [#include <sys/types.h> 261# include <termios.h> 262# ifdef TIOCGWINSZ 263 yes 264# endif 265 ], gwinsz_in_termios_h=yes) 266 fi 267 268 if test $gwinsz_in_termios_h = no; then 269 AC_EGREP_CPP([yes], 270 [#include <sys/types.h> 271# include <sys/ioctl.h> 272# ifdef TIOCGWINSZ 273 yes 274# endif 275 ], am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes) 276 fi 277 ]) 278 if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then 279 AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1, 280 [Define if TIOCGWINSZ requires sys/ioctl.h]) 281 fi 282]) 283 284# Macro to add for using GNU gettext. 285# Ulrich Drepper <drepper@cygnus.com>, 1995. 286# 287# This file can be copied and used freely without restrictions. It can 288# be used in projects which are not available under the GNU Public License 289# but which still want to provide support for the GNU gettext functionality. 290# Please note that the actual code is *not* freely available. 291 292# serial 5 293 294AC_DEFUN(AM_WITH_NLS, 295 [AC_MSG_CHECKING([whether NLS is requested]) 296 dnl Default is enabled NLS 297 AC_ARG_ENABLE(nls, 298 [ --disable-nls do not use Native Language Support], 299 USE_NLS=$enableval, USE_NLS=yes) 300 AC_MSG_RESULT($USE_NLS) 301 AC_SUBST(USE_NLS) 302 303 USE_INCLUDED_LIBINTL=no 304 305 dnl If we use NLS figure out what method 306 if test "$USE_NLS" = "yes"; then 307 AC_DEFINE(ENABLE_NLS) 308 AC_MSG_CHECKING([whether included gettext is requested]) 309 AC_ARG_WITH(included-gettext, 310 [ --with-included-gettext use the GNU gettext library included here], 311 nls_cv_force_use_gnu_gettext=$withval, 312 nls_cv_force_use_gnu_gettext=yes) 313 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) 314 315 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 316 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 317 dnl User does not insist on using GNU NLS library. Figure out what 318 dnl to use. If gettext or catgets are available (in this order) we 319 dnl use this. Else we have to fall back to GNU NLS library. 320 dnl catgets is only used if permitted by option --with-catgets. 321 nls_cv_header_intl= 322 nls_cv_header_libgt= 323 CATOBJEXT=NONE 324 325 AC_CHECK_HEADER(libintl.h, 326 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, 327 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")], 328 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) 329 330 if test "$gt_cv_func_gettext_libc" != "yes"; then 331 AC_CHECK_LIB(intl, bindtextdomain, 332 [AC_CACHE_CHECK([for gettext in libintl], 333 gt_cv_func_gettext_libintl, 334 [AC_CHECK_LIB(intl, gettext, 335 gt_cv_func_gettext_libintl=yes, 336 gt_cv_func_gettext_libintl=no)], 337 gt_cv_func_gettext_libintl=no)]) 338 fi 339 340 if test "$gt_cv_func_gettext_libc" = "yes" \ 341 || test "$gt_cv_func_gettext_libintl" = "yes"; then 342 AC_DEFINE(HAVE_GETTEXT) 343 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 344 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl 345 if test "$MSGFMT" != "no"; then 346 AC_CHECK_FUNCS(dcgettext) 347 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 348 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 349 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 350 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; 351 return _nl_msg_cat_cntr], 352 [CATOBJEXT=.gmo 353 DATADIRNAME=share], 354 [CATOBJEXT=.mo 355 DATADIRNAME=lib]) 356 INSTOBJEXT=.mo 357 fi 358 fi 359 ]) 360 361 if test "$CATOBJEXT" = "NONE"; then 362 AC_MSG_CHECKING([whether catgets can be used]) 363 AC_ARG_WITH(catgets, 364 [ --with-catgets use catgets functions if available], 365 nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) 366 AC_MSG_RESULT($nls_cv_use_catgets) 367 368 if test "$nls_cv_use_catgets" = "yes"; then 369 dnl No gettext in C library. Try catgets next. 370 AC_CHECK_LIB(i, main) 371 AC_CHECK_FUNC(catgets, 372 [AC_DEFINE(HAVE_CATGETS) 373 INTLOBJS="\$(CATOBJS)" 374 AC_PATH_PROG(GENCAT, gencat, no)dnl 375 if test "$GENCAT" != "no"; then 376 AC_PATH_PROG(GMSGFMT, gmsgfmt, no) 377 if test "$GMSGFMT" = "no"; then 378 AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, 379 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) 380 fi 381 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 382 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 383 USE_INCLUDED_LIBINTL=yes 384 CATOBJEXT=.cat 385 INSTOBJEXT=.cat 386 DATADIRNAME=lib 387 INTLDEPS='$(top_builddir)/intl/libintl.a' 388 INTLLIBS=$INTLDEPS 389 LIBS=`echo $LIBS | sed -e 's/-lintl//'` 390 nls_cv_header_intl=intl/libintl.h 391 nls_cv_header_libgt=intl/libgettext.h 392 fi]) 393 fi 394 fi 395 396 if test "$CATOBJEXT" = "NONE"; then 397 dnl Neither gettext nor catgets in included in the C library. 398 dnl Fall back on GNU gettext library. 399 nls_cv_use_gnu_gettext=yes 400 fi 401 fi 402 403 if test "$nls_cv_use_gnu_gettext" = "yes"; then 404 dnl Mark actions used to generate GNU NLS library. 405 INTLOBJS="\$(GETTOBJS)" 406 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 407 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) 408 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 409 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 410 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) 411 AC_SUBST(MSGFMT) 412 USE_INCLUDED_LIBINTL=yes 413 CATOBJEXT=.gmo 414 INSTOBJEXT=.mo 415 DATADIRNAME=share 416 INTLDEPS='$(top_builddir)/intl/libintl.a' 417 INTLLIBS=$INTLDEPS 418 LIBS=`echo $LIBS | sed -e 's/-lintl//'` 419 nls_cv_header_intl=intl/libintl.h 420 nls_cv_header_libgt=intl/libgettext.h 421 fi 422 423 dnl Test whether we really found GNU xgettext. 424 if test "$XGETTEXT" != ":"; then 425 dnl If it is no GNU xgettext we define it as : so that the 426 dnl Makefiles still can work. 427 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then 428 : ; 429 else 430 AC_MSG_RESULT( 431 [found xgettext program is not GNU xgettext; ignore it]) 432 XGETTEXT=":" 433 fi 434 fi 435 436 # We need to process the po/ directory. 437 POSUB=po 438 else 439 DATADIRNAME=share 440 nls_cv_header_intl=intl/libintl.h 441 nls_cv_header_libgt=intl/libgettext.h 442 fi 443 AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) 444 AC_OUTPUT_COMMANDS( 445 [case "$CONFIG_FILES" in *po/Makefile.in*) 446 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile 447 esac]) 448 449 450 # If this is used in GNU gettext we have to set USE_NLS to `yes' 451 # because some of the sources are only built for this goal. 452 if test "$PACKAGE" = gettext; then 453 USE_NLS=yes 454 USE_INCLUDED_LIBINTL=yes 455 fi 456 457 dnl These rules are solely for the distribution goal. While doing this 458 dnl we only have to keep exactly one list of the available catalogs 459 dnl in configure.in. 460 for lang in $ALL_LINGUAS; do 461 GMOFILES="$GMOFILES $lang.gmo" 462 POFILES="$POFILES $lang.po" 463 done 464 465 dnl Make all variables we use known to autoconf. 466 AC_SUBST(USE_INCLUDED_LIBINTL) 467 AC_SUBST(CATALOGS) 468 AC_SUBST(CATOBJEXT) 469 AC_SUBST(DATADIRNAME) 470 AC_SUBST(GMOFILES) 471 AC_SUBST(INSTOBJEXT) 472 AC_SUBST(INTLDEPS) 473 AC_SUBST(INTLLIBS) 474 AC_SUBST(INTLOBJS) 475 AC_SUBST(POFILES) 476 AC_SUBST(POSUB) 477 ]) 478 479AC_DEFUN(AM_GNU_GETTEXT, 480 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl 481 AC_REQUIRE([AC_PROG_CC])dnl 482 AC_REQUIRE([AC_PROG_RANLIB])dnl 483 AC_REQUIRE([AC_ISC_POSIX])dnl 484 AC_REQUIRE([AC_HEADER_STDC])dnl 485 AC_REQUIRE([AC_C_CONST])dnl 486 AC_REQUIRE([AC_C_INLINE])dnl 487 AC_REQUIRE([AC_TYPE_OFF_T])dnl 488 AC_REQUIRE([AC_TYPE_SIZE_T])dnl 489 AC_REQUIRE([AC_FUNC_ALLOCA])dnl 490 AC_REQUIRE([AC_FUNC_MMAP])dnl 491 492 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ 493unistd.h sys/param.h]) 494 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ 495strdup __argz_count __argz_stringify __argz_next]) 496 497 if test "${ac_cv_func_stpcpy+set}" != "set"; then 498 AC_CHECK_FUNCS(stpcpy) 499 fi 500 if test "${ac_cv_func_stpcpy}" = "yes"; then 501 AC_DEFINE(HAVE_STPCPY) 502 fi 503 504 AM_LC_MESSAGES 505 AM_WITH_NLS 506 507 if test "x$CATOBJEXT" != "x"; then 508 if test "x$ALL_LINGUAS" = "x"; then 509 LINGUAS= 510 else 511 AC_MSG_CHECKING(for catalogs to be installed) 512 NEW_LINGUAS= 513 for lang in ${LINGUAS=$ALL_LINGUAS}; do 514 case "$ALL_LINGUAS" in 515 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; 516 esac 517 done 518 LINGUAS=$NEW_LINGUAS 519 AC_MSG_RESULT($LINGUAS) 520 fi 521 522 dnl Construct list of names of catalog files to be constructed. 523 if test -n "$LINGUAS"; then 524 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done 525 fi 526 fi 527 528 dnl The reference to <locale.h> in the installed <libintl.h> file 529 dnl must be resolved because we cannot expect the users of this 530 dnl to define HAVE_LOCALE_H. 531 if test $ac_cv_header_locale_h = yes; then 532 INCLUDE_LOCALE_H="#include <locale.h>" 533 else 534 INCLUDE_LOCALE_H="\ 535/* The system does not provide the header <locale.h>. Take care yourself. */" 536 fi 537 AC_SUBST(INCLUDE_LOCALE_H) 538 539 dnl Determine which catalog format we have (if any is needed) 540 dnl For now we know about two different formats: 541 dnl Linux libc-5 and the normal X/Open format 542 test -d intl || mkdir intl 543 if test "$CATOBJEXT" = ".cat"; then 544 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) 545 546 dnl Transform the SED scripts while copying because some dumb SEDs 547 dnl cannot handle comments. 548 sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed 549 fi 550 dnl po2tbl.sed is always needed. 551 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ 552 $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed 553 554 dnl In the intl/Makefile.in we have a special dependency which makes 555 dnl only sense for gettext. We comment this out for non-gettext 556 dnl packages. 557 if test "$PACKAGE" = "gettext"; then 558 GT_NO="#NO#" 559 GT_YES= 560 else 561 GT_NO= 562 GT_YES="#YES#" 563 fi 564 AC_SUBST(GT_NO) 565 AC_SUBST(GT_YES) 566 567 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 568 dnl find the mkinstalldirs script in another subdir but ($top_srcdir). 569 dnl Try to locate is. 570 MKINSTALLDIRS= 571 if test -n "$ac_aux_dir"; then 572 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" 573 fi 574 if test -z "$MKINSTALLDIRS"; then 575 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 576 fi 577 AC_SUBST(MKINSTALLDIRS) 578 579 dnl *** For now the libtool support in intl/Makefile is not for real. 580 l= 581 AC_SUBST(l) 582 583 dnl Generate list of files to be processed by xgettext which will 584 dnl be included in po/Makefile. 585 test -d po || mkdir po 586 if test "x$srcdir" != "x."; then 587 changequote(, )dnl 588 if test "x`echo $srcdir | sed -e 's@^[A-z]:@@' -e 's@/.*@@'`" = "x"; then 589 posrcprefix="$srcdir/" 590 else 591 posrcprefix="../$srcdir/" 592 fi 593 changequote([, ])dnl 594 else 595 posrcprefix="../" 596 fi 597 rm -f po/POTFILES 598 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ 599 < $srcdir/po/POTFILES.in > po/POTFILES 600 ]) 601 602# Search path for a program which passes the given test. 603# Ulrich Drepper <drepper@cygnus.com>, 1996. 604# 605# This file can be copied and used freely without restrictions. It can 606# be used in projects which are not available under the GNU Public License 607# but which still want to provide support for the GNU gettext functionality. 608# Please note that the actual code is *not* freely available. 609 610# serial 1 611 612dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 613dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 614AC_DEFUN(AM_PATH_PROG_WITH_TEST, 615[# Extract the first word of "$2", so it can be a program name with args. 616set dummy $2; ac_word=[$]2 617AC_MSG_CHECKING([for $ac_word]) 618AC_CACHE_VAL(ac_cv_path_$1, 619[case "[$]$1" in 620 /*) 621 ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 622 ;; 623 *) 624 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 625 for ac_dir in ifelse([$5], , $PATH, [$5]); do 626 test -z "$ac_dir" && ac_dir=. 627 if test -f $ac_dir/$ac_word; then 628 if [$3]; then 629 ac_cv_path_$1="$ac_dir/$ac_word" 630 break 631 fi 632 fi 633 done 634 IFS="$ac_save_ifs" 635dnl If no 4th arg is given, leave the cache variable unset, 636dnl so AC_PATH_PROGS will keep looking. 637ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 638])dnl 639 ;; 640esac])dnl 641$1="$ac_cv_path_$1" 642if test -n "[$]$1"; then 643 AC_MSG_RESULT([$]$1) 644else 645 AC_MSG_RESULT(no) 646fi 647AC_SUBST($1)dnl 648]) 649 650# Check whether LC_MESSAGES is available in <locale.h>. 651# Ulrich Drepper <drepper@cygnus.com>, 1995. 652# 653# This file can be copied and used freely without restrictions. It can 654# be used in projects which are not available under the GNU Public License 655# but which still want to provide support for the GNU gettext functionality. 656# Please note that the actual code is *not* freely available. 657 658# serial 1 659 660AC_DEFUN(AM_LC_MESSAGES, 661 [if test $ac_cv_header_locale_h = yes; then 662 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 663 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], 664 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 665 if test $am_cv_val_LC_MESSAGES = yes; then 666 AC_DEFINE(HAVE_LC_MESSAGES) 667 fi 668 fi]) 669 670