~ubuntu-branches/ubuntu/edgy/e2fsprogs/edgy-updates

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Tollef Fog Heen
  • Date: 2005-08-23 10:42:10 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050823104210-t15igvmgrkzea0dq
Tags: 1.38-2ubuntu1
* Merge with Debian.  (Ubuntu #13757)
* Remove tests/f_bad_disconnected_inode/image.gz to be able to build the
  package.  This will (hopefully) be in the next upstream version and is
  just used for testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
22
22
  fi
23
23
])
24
 
# gettext.m4 serial 17 (gettext-0.11.5)
25
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
24
# gettext.m4 serial 28 (gettext-0.13)
 
25
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
26
26
dnl This file is free software, distributed under the terms of the GNU
27
27
dnl General Public License.  As a special exception to the GNU General
28
28
dnl Public License, this file may be distributed as part of a program
40
40
 
41
41
dnl Authors:
42
42
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
43
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2002.
 
43
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
44
44
 
45
45
dnl Macro to add for using GNU gettext.
46
46
 
115
115
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
116
116
  ])
117
117
 
118
 
  AC_MSG_CHECKING([whether NLS is requested])
119
 
  dnl Default is enabled NLS
120
 
  AC_ARG_ENABLE(nls,
121
 
    [  --disable-nls           do not use Native Language Support],
122
 
    USE_NLS=$enableval, USE_NLS=yes)
123
 
  AC_MSG_RESULT($USE_NLS)
124
 
  AC_SUBST(USE_NLS)
 
118
  dnl Set USE_NLS.
 
119
  AM_NLS
125
120
 
126
121
  ifelse(gt_included_intl, yes, [
127
122
    BUILD_INCLUDED_LIBINTL=no
239
234
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
240
235
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
241
236
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
242
 
                && test "$PACKAGE" != gettext; }; then
 
237
                && test "$PACKAGE" != gettext-runtime \
 
238
                && test "$PACKAGE" != gettext-tools; }; then
243
239
          gt_use_preinstalled_gnugettext=yes
244
240
        else
245
241
          dnl Reset the values set by searching for libintl.
258
254
 
259
255
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
260
256
        dnl Mark actions used to generate GNU NLS library.
261
 
        INTLOBJS="\$(GETTOBJS)"
262
257
        BUILD_INCLUDED_LIBINTL=yes
263
258
        USE_INCLUDED_LIBINTL=yes
264
259
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
283
278
    fi
284
279
  fi
285
280
 
 
281
  AC_MSG_CHECKING([whether to use NLS])
 
282
  AC_MSG_RESULT([$USE_NLS])
 
283
  if test "$USE_NLS" = "yes"; then
 
284
    AC_MSG_CHECKING([where the gettext function comes from])
 
285
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
286
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
287
        gt_source="external libintl"
 
288
      else
 
289
        gt_source="libc"
 
290
      fi
 
291
    else
 
292
      gt_source="included intl directory"
 
293
    fi
 
294
    AC_MSG_RESULT([$gt_source])
 
295
  fi
 
296
 
286
297
  if test "$USE_NLS" = "yes"; then
287
298
 
288
299
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
306
317
  ifelse(gt_included_intl, yes, [
307
318
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
308
319
    dnl to 'yes' because some of the testsuite requires it.
309
 
    if test "$PACKAGE" = gettext; then
 
320
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
310
321
      BUILD_INCLUDED_LIBINTL=yes
311
322
    fi
312
323
 
314
325
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
315
326
    AC_SUBST(USE_INCLUDED_LIBINTL)
316
327
    AC_SUBST(CATOBJEXT)
317
 
    AC_SUBST(INTLOBJS)
318
328
 
319
329
    dnl For backward compatibility. Some configure.ins may be using this.
320
330
    nls_cv_header_intl=
332
342
    GENCAT=gencat
333
343
    AC_SUBST(GENCAT)
334
344
 
 
345
    dnl For backward compatibility. Some Makefiles may be using this.
 
346
    if test "$USE_INCLUDED_LIBINTL" = yes; then
 
347
      INTLOBJS="\$(GETTOBJS)"
 
348
    fi
 
349
    AC_SUBST(INTLOBJS)
 
350
 
335
351
    dnl Enable libtool support if the surrounding package wishes it.
336
352
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
337
353
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
348
364
])
349
365
 
350
366
 
351
 
dnl Checks for all prerequisites of the po subdirectory,
352
 
dnl except for USE_NLS.
353
 
AC_DEFUN([AM_PO_SUBDIRS],
354
 
[
355
 
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
356
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
357
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
358
 
 
359
 
  dnl Perform the following tests also if --disable-nls has been given,
360
 
  dnl because they are needed for "make dist" to work.
361
 
 
362
 
  dnl Search for GNU msgfmt in the PATH.
363
 
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
364
 
  dnl The second test excludes FreeBSD msgfmt.
365
 
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
366
 
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
367
 
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
368
 
    :)
369
 
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
370
 
 
371
 
  dnl Search for GNU xgettext 0.11 or newer in the PATH.
372
 
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
373
 
  dnl The second test excludes FreeBSD xgettext.
374
 
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
375
 
    [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
376
 
     (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
377
 
    :)
378
 
  dnl Remove leftover from FreeBSD xgettext call.
379
 
  rm -f messages.po
380
 
 
381
 
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
382
 
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
383
 
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
384
 
 
385
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
386
 
  dnl Test whether we really found GNU msgfmt.
387
 
  if test "$GMSGFMT" != ":"; then
388
 
    dnl If it is no GNU msgfmt we define it as : so that the
389
 
    dnl Makefiles still can work.
390
 
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
391
 
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
392
 
      : ;
393
 
    else
394
 
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
395
 
      AC_MSG_RESULT(
396
 
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
397
 
      GMSGFMT=":"
398
 
    fi
399
 
  fi
400
 
 
401
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
402
 
  dnl Test whether we really found GNU xgettext.
403
 
  if test "$XGETTEXT" != ":"; then
404
 
    dnl If it is no GNU xgettext we define it as : so that the
405
 
    dnl Makefiles still can work.
406
 
    if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
407
 
       (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
408
 
      : ;
409
 
    else
410
 
      AC_MSG_RESULT(
411
 
        [found xgettext program is not GNU xgettext; ignore it])
412
 
      XGETTEXT=":"
413
 
    fi
414
 
    dnl Remove leftover from FreeBSD xgettext call.
415
 
    rm -f messages.po
416
 
  fi
417
 
 
418
 
  AC_OUTPUT_COMMANDS([
419
 
    for ac_file in $CONFIG_FILES; do
420
 
      # Support "outfile[:infile[:infile...]]"
421
 
      case "$ac_file" in
422
 
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
423
 
      esac
424
 
      # PO directories have a Makefile.in generated from Makefile.in.in.
425
 
      case "$ac_file" in */Makefile.in)
426
 
        # Adjust a relative srcdir.
427
 
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
428
 
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
429
 
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
430
 
        # In autoconf-2.13 it is called $ac_given_srcdir.
431
 
        # In autoconf-2.50 it is called $srcdir.
432
 
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
433
 
        case "$ac_given_srcdir" in
434
 
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
435
 
          /*) top_srcdir="$ac_given_srcdir" ;;
436
 
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
437
 
        esac
438
 
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
439
 
          rm -f "$ac_dir/POTFILES"
440
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
441
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
442
 
          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
443
 
          # on $ac_dir but don't depend on user-specified configuration
444
 
          # parameters.
445
 
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
446
 
            # The LINGUAS file contains the set of available languages.
447
 
            if test -n "$ALL_LINGUAS"; then
448
 
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
449
 
            fi
450
 
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
451
 
            # Hide the ALL_LINGUAS assigment from automake.
452
 
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
453
 
          fi
454
 
          case "$ac_given_srcdir" in
455
 
            .) srcdirpre= ;;
456
 
            *) srcdirpre='$(srcdir)/' ;;
457
 
          esac
458
 
          POFILES=
459
 
          GMOFILES=
460
 
          UPDATEPOFILES=
461
 
          DUMMYPOFILES=
462
 
          for lang in $ALL_LINGUAS; do
463
 
            POFILES="$POFILES $srcdirpre$lang.po"
464
 
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
465
 
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
466
 
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
467
 
          done
468
 
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
469
 
          # environment variable.
470
 
          INST_LINGUAS=
471
 
          if test -n "$ALL_LINGUAS"; then
472
 
            for presentlang in $ALL_LINGUAS; do
473
 
              useit=no
474
 
              if test "%UNSET%" != "$LINGUAS"; then
475
 
                desiredlanguages="$LINGUAS"
476
 
              else
477
 
                desiredlanguages="$ALL_LINGUAS"
478
 
              fi
479
 
              for desiredlang in $desiredlanguages; do
480
 
                # Use the presentlang catalog if desiredlang is
481
 
                #   a. equal to presentlang, or
482
 
                #   b. a variant of presentlang (because in this case,
483
 
                #      presentlang can be used as a fallback for messages
484
 
                #      which are not translated in the desiredlang catalog).
485
 
                case "$desiredlang" in
486
 
                  "$presentlang"*) useit=yes;;
487
 
                esac
488
 
              done
489
 
              if test $useit = yes; then
490
 
                INST_LINGUAS="$INST_LINGUAS $presentlang"
491
 
              fi
492
 
            done
493
 
          fi
494
 
          CATALOGS=
495
 
          if test -n "$INST_LINGUAS"; then
496
 
            for lang in $INST_LINGUAS; do
497
 
              CATALOGS="$CATALOGS $lang.gmo"
498
 
            done
499
 
          fi
500
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
501
 
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
502
 
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
503
 
            if test -f "$f"; then
504
 
              case "$f" in
505
 
                *.orig | *.bak | *~) ;;
506
 
                *) cat "$f" >> "$ac_dir/Makefile" ;;
507
 
              esac
508
 
            fi
509
 
          done
510
 
        fi
511
 
        ;;
512
 
      esac
513
 
    done],
514
 
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
515
 
    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
516
 
    # from automake.
517
 
    eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
518
 
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
519
 
    LINGUAS="${LINGUAS-%UNSET%}"
520
 
   ])
521
 
])
522
 
 
523
 
 
524
367
dnl Checks for all prerequisites of the intl subdirectory,
525
368
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
526
369
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
534
377
  AC_REQUIRE([AC_ISC_POSIX])dnl
535
378
  AC_REQUIRE([AC_HEADER_STDC])dnl
536
379
  AC_REQUIRE([AC_C_CONST])dnl
 
380
  AC_REQUIRE([bh_C_SIGNED])dnl
537
381
  AC_REQUIRE([AC_C_INLINE])dnl
538
382
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
539
383
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
384
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
 
385
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
 
386
  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
 
387
  AC_REQUIRE([gt_TYPE_WINT_T])dnl
 
388
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
389
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
390
  AC_REQUIRE([gt_TYPE_INTMAX_T])
 
391
  AC_REQUIRE([gt_PRINTF_POSIX])
540
392
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
541
393
  AC_REQUIRE([AC_FUNC_MMAP])dnl
542
394
  AC_REQUIRE([jm_GLIBC21])dnl
544
396
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
545
397
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
546
398
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
 
399
  AC_REQUIRE([gl_XSIZE])dnl
547
400
 
 
401
  AC_CHECK_TYPE([ptrdiff_t], ,
 
402
    [AC_DEFINE([ptrdiff_t], [long],
 
403
       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
 
404
    ])
548
405
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
549
406
stdlib.h string.h unistd.h sys/param.h])
550
 
  AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
551
 
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
552
 
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
 
407
  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
 
408
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
 
409
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
 
410
__fsetlocking])
 
411
 
 
412
  dnl Use the _snprintf function only if it is declared (because on NetBSD it
 
413
  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
 
414
  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
 
415
  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
 
416
 
 
417
  dnl Use the *_unlocked functions only if they are declared.
 
418
  dnl (because some of them were defined without being declared in Solaris
 
419
  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
 
420
  dnl on Solaris 2.5.1 to run on Solaris 2.6).
 
421
  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
 
422
  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
 
423
  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
 
424
  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
 
425
 
 
426
  case $gt_cv_func_printf_posix in
 
427
    *yes) HAVE_POSIX_PRINTF=1 ;;
 
428
    *) HAVE_POSIX_PRINTF=0 ;;
 
429
  esac
 
430
  AC_SUBST([HAVE_POSIX_PRINTF])
 
431
  if test "$ac_cv_func_asprintf" = yes; then
 
432
    HAVE_ASPRINTF=1
 
433
  else
 
434
    HAVE_ASPRINTF=0
 
435
  fi
 
436
  AC_SUBST([HAVE_ASPRINTF])
 
437
  if test "$ac_cv_func_snprintf" = yes; then
 
438
    HAVE_SNPRINTF=1
 
439
  else
 
440
    HAVE_SNPRINTF=0
 
441
  fi
 
442
  AC_SUBST([HAVE_SNPRINTF])
 
443
  if test "$ac_cv_func_wprintf" = yes; then
 
444
    HAVE_WPRINTF=1
 
445
  else
 
446
    HAVE_WPRINTF=0
 
447
  fi
 
448
  AC_SUBST([HAVE_WPRINTF])
553
449
 
554
450
  AM_ICONV
555
451
  AM_LANGINFO_CODESET
590
486
])
591
487
 
592
488
 
593
 
AC_DEFUN([AM_MKINSTALLDIRS],
 
489
dnl gt_CHECK_DECL(FUNC, INCLUDES)
 
490
dnl Check whether a function is declared.
 
491
AC_DEFUN([gt_CHECK_DECL],
594
492
[
595
 
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
596
 
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
597
 
  dnl Try to locate is.
598
 
  MKINSTALLDIRS=
599
 
  if test -n "$ac_aux_dir"; then
600
 
    MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
601
 
  fi
602
 
  if test -z "$MKINSTALLDIRS"; then
603
 
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
604
 
  fi
605
 
  AC_SUBST(MKINSTALLDIRS)
 
493
  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
 
494
    [AC_TRY_COMPILE([$2], [
 
495
#ifndef $1
 
496
  char *p = (char *) $1;
 
497
#endif
 
498
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
 
499
  if test $ac_cv_have_decl_$1 = yes; then
 
500
    gt_value=1
 
501
  else
 
502
    gt_value=0
 
503
  fi
 
504
  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
 
505
    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
606
506
])
607
507
 
608
508
 
815
715
  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
816
716
    [Define if integer division by zero raises signal SIGFPE.])
817
717
])
 
718
# intmax.m4 serial 1 (gettext-0.12)
 
719
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
720
dnl This file is free software, distributed under the terms of the GNU
 
721
dnl General Public License.  As a special exception to the GNU General
 
722
dnl Public License, this file may be distributed as part of a program
 
723
dnl that contains a configuration script generated by Autoconf, under
 
724
dnl the same distribution terms as the rest of that program.
 
725
 
 
726
dnl From Bruno Haible.
 
727
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
 
728
dnl find a replacement if it is lacking.
 
729
 
 
730
AC_DEFUN([gt_TYPE_INTMAX_T],
 
731
[
 
732
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
733
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
734
  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
 
735
    [AC_TRY_COMPILE([
 
736
#include <stddef.h> 
 
737
#include <stdlib.h>
 
738
#if HAVE_STDINT_H_WITH_UINTMAX
 
739
#include <stdint.h>
 
740
#endif
 
741
#if HAVE_INTTYPES_H_WITH_UINTMAX
 
742
#include <inttypes.h>
 
743
#endif
 
744
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
 
745
  if test $gt_cv_c_intmax_t = yes; then
 
746
    AC_DEFINE(HAVE_INTMAX_T, 1,
 
747
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
 
748
  fi
 
749
])
818
750
# inttypes.m4 serial 1 (gettext-0.11.4)
819
751
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
820
752
dnl This file is free software, distributed under the terms of the GNU
842
774
      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
843
775
  fi
844
776
])
845
 
# inttypes_h.m4 serial 4 (gettext-0.11.4)
846
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
777
# inttypes_h.m4 serial 5 (gettext-0.12)
 
778
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
847
779
dnl This file is free software, distributed under the terms of the GNU
848
780
dnl General Public License.  As a special exception to the GNU General
849
781
dnl Public License, this file may be distributed as part of a program
866
798
    jm_ac_cv_header_inttypes_h=no)])
867
799
  if test $jm_ac_cv_header_inttypes_h = yes; then
868
800
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
869
 
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
870
 
   and declares uintmax_t. ])
 
801
      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
 
802
       and declares uintmax_t. ])
871
803
  fi
872
804
])
873
805
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
960
892
      [Define if your <locale.h> file defines LC_MESSAGES.])
961
893
  fi
962
894
])
963
 
# lib-ld.m4 serial 1 (gettext-0.11)
964
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
 
895
# lib-ld.m4 serial 3 (gettext-0.13)
 
896
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
965
897
dnl This file is free software, distributed under the terms of the GNU
966
898
dnl General Public License.  As a special exception to the GNU General
967
899
dnl Public License, this file may be distributed as part of a program
976
908
AC_DEFUN([AC_LIB_PROG_LD_GNU],
977
909
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
978
910
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
979
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
980
 
  acl_cv_prog_gnu_ld=yes
981
 
else
982
 
  acl_cv_prog_gnu_ld=no
983
 
fi])
 
911
case `$LD -v 2>&1 </dev/null` in
 
912
*GNU* | *'with BFD'*)
 
913
  acl_cv_prog_gnu_ld=yes ;;
 
914
*)
 
915
  acl_cv_prog_gnu_ld=no ;;
 
916
esac])
984
917
with_gnu_ld=$acl_cv_prog_gnu_ld
985
918
])
986
919
 
991
924
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
992
925
AC_REQUIRE([AC_PROG_CC])dnl
993
926
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
927
# Prepare PATH_SEPARATOR.
 
928
# The user is always right.
 
929
if test "${PATH_SEPARATOR+set}" != set; then
 
930
  echo "#! /bin/sh" >conf$$.sh
 
931
  echo  "exit 0"   >>conf$$.sh
 
932
  chmod +x conf$$.sh
 
933
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
934
    PATH_SEPARATOR=';'
 
935
  else
 
936
    PATH_SEPARATOR=:
 
937
  fi
 
938
  rm -f conf$$.sh
 
939
fi
994
940
ac_prog=ld
995
941
if test "$GCC" = yes; then
996
942
  # Check if gcc -print-prog-name=ld gives a path.
1037
983
      # Check to see if the program is GNU ld.  I'd rather use --version,
1038
984
      # but apparently some GNU ld's only accept -v.
1039
985
      # Break only if it was the GNU/non-GNU ld that we prefer.
1040
 
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1041
 
        test "$with_gnu_ld" != no && break
1042
 
      else
1043
 
        test "$with_gnu_ld" != yes && break
1044
 
      fi
 
986
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 
987
      *GNU* | *'with BFD'*)
 
988
        test "$with_gnu_ld" != no && break ;;
 
989
      *)
 
990
        test "$with_gnu_ld" != yes && break ;;
 
991
      esac
1045
992
    fi
1046
993
  done
1047
994
  IFS="$ac_save_ifs"
1057
1004
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1058
1005
AC_LIB_PROG_LD_GNU
1059
1006
])
1060
 
# lib-link.m4 serial 3 (gettext-0.11.3)
1061
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
1007
# lib-link.m4 serial 4 (gettext-0.12)
 
1008
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1062
1009
dnl This file is free software, distributed under the terms of the GNU
1063
1010
dnl General Public License.  As a special exception to the GNU General
1064
1011
dnl Public License, this file may be distributed as part of a program
1151
1098
 
1152
1099
dnl Determine the platform dependent parameters needed to use rpath:
1153
1100
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1154
 
dnl hardcode_direct, hardcode_minus_L,
1155
 
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
 
1101
dnl hardcode_direct, hardcode_minus_L.
1156
1102
AC_DEFUN([AC_LIB_RPATH],
1157
1103
[
1158
1104
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1173
1119
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1174
1120
  hardcode_direct="$acl_cv_hardcode_direct"
1175
1121
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
1176
 
  sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1177
 
  sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1178
1122
  dnl Determine whether the user wants rpath handling at all.
1179
1123
  AC_ARG_ENABLE(rpath,
1180
1124
    [  --disable-rpath         do not hardcode runtime library paths],
1194
1138
    eval additional_includedir=\"$includedir\"
1195
1139
    eval additional_libdir=\"$libdir\"
1196
1140
  ])
1197
 
  AC_ARG_WITH([lib$1-prefix],
 
1141
  AC_LIB_ARG_WITH([lib$1-prefix],
1198
1142
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
1199
1143
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
1200
1144
[
1611
1555
    fi
1612
1556
  done
1613
1557
])
1614
 
# lib-prefix.m4 serial 1 (gettext-0.11)
1615
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
1558
# lib-prefix.m4 serial 3 (gettext-0.13)
 
1559
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1616
1560
dnl This file is free software, distributed under the terms of the GNU
1617
1561
dnl General Public License.  As a special exception to the GNU General
1618
1562
dnl Public License, this file may be distributed as part of a program
1621
1565
 
1622
1566
dnl From Bruno Haible.
1623
1567
 
 
1568
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 
1569
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 
1570
dnl require excessive bracketing.
 
1571
ifdef([AC_HELP_STRING],
 
1572
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 
1573
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
1574
 
1624
1575
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1625
1576
dnl to access previously installed libraries. The basic assumption is that
1626
1577
dnl a user will want packages to use other packages he previously installed
1639
1590
    eval additional_includedir=\"$includedir\"
1640
1591
    eval additional_libdir=\"$libdir\"
1641
1592
  ])
1642
 
  AC_ARG_WITH([lib-prefix],
 
1593
  AC_LIB_ARG_WITH([lib-prefix],
1643
1594
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1644
1595
  --without-lib-prefix    don't search for libraries in includedir and libdir],
1645
1596
[
1759
1710
  exec_prefix="$acl_save_exec_prefix"
1760
1711
  prefix="$acl_save_prefix"
1761
1712
])
1762
 
# progtest.m4 serial 2 (gettext-0.10.40)
1763
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
 
1713
# longdouble.m4 serial 1 (gettext-0.12)
 
1714
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
1715
dnl This file is free software, distributed under the terms of the GNU
 
1716
dnl General Public License.  As a special exception to the GNU General
 
1717
dnl Public License, this file may be distributed as part of a program
 
1718
dnl that contains a configuration script generated by Autoconf, under
 
1719
dnl the same distribution terms as the rest of that program.
 
1720
 
 
1721
dnl From Bruno Haible.
 
1722
dnl Test whether the compiler supports the 'long double' type.
 
1723
dnl Prerequisite: AC_PROG_CC
 
1724
 
 
1725
AC_DEFUN([gt_TYPE_LONGDOUBLE],
 
1726
[
 
1727
  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
 
1728
    [if test "$GCC" = yes; then
 
1729
       gt_cv_c_long_double=yes
 
1730
     else
 
1731
       AC_TRY_COMPILE([
 
1732
         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
 
1733
         long double foo = 0.0;
 
1734
         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
 
1735
         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
 
1736
         ], ,
 
1737
         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
 
1738
     fi])
 
1739
  if test $gt_cv_c_long_double = yes; then
 
1740
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
 
1741
  fi
 
1742
])
 
1743
# longlong.m4 serial 4
 
1744
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
 
1745
dnl This file is free software, distributed under the terms of the GNU
 
1746
dnl General Public License.  As a special exception to the GNU General
 
1747
dnl Public License, this file may be distributed as part of a program
 
1748
dnl that contains a configuration script generated by Autoconf, under
 
1749
dnl the same distribution terms as the rest of that program.
 
1750
 
 
1751
dnl From Paul Eggert.
 
1752
 
 
1753
# Define HAVE_LONG_LONG if 'long long' works.
 
1754
 
 
1755
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
 
1756
[
 
1757
  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
 
1758
  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
 
1759
    [long long llmax = (long long) -1;
 
1760
     return ll << i | ll >> i | llmax / ll | llmax % ll;],
 
1761
    ac_cv_type_long_long=yes,
 
1762
    ac_cv_type_long_long=no)])
 
1763
  if test $ac_cv_type_long_long = yes; then
 
1764
    AC_DEFINE(HAVE_LONG_LONG, 1,
 
1765
      [Define if you have the 'long long' type.])
 
1766
  fi
 
1767
])
 
1768
# nls.m4 serial 1 (gettext-0.12)
 
1769
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
1770
dnl This file is free software, distributed under the terms of the GNU
 
1771
dnl General Public License.  As a special exception to the GNU General
 
1772
dnl Public License, this file may be distributed as part of a program
 
1773
dnl that contains a configuration script generated by Autoconf, under
 
1774
dnl the same distribution terms as the rest of that program.
 
1775
dnl
 
1776
dnl This file can can be used in projects which are not available under
 
1777
dnl the GNU General Public License or the GNU Library General Public
 
1778
dnl License but which still want to provide support for the GNU gettext
 
1779
dnl functionality.
 
1780
dnl Please note that the actual code of the GNU gettext library is covered
 
1781
dnl by the GNU Library General Public License, and the rest of the GNU
 
1782
dnl gettext package package is covered by the GNU General Public License.
 
1783
dnl They are *not* in the public domain.
 
1784
 
 
1785
dnl Authors:
 
1786
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
1787
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
1788
 
 
1789
AC_DEFUN([AM_NLS],
 
1790
[
 
1791
  AC_MSG_CHECKING([whether NLS is requested])
 
1792
  dnl Default is enabled NLS
 
1793
  AC_ARG_ENABLE(nls,
 
1794
    [  --disable-nls           do not use Native Language Support],
 
1795
    USE_NLS=$enableval, USE_NLS=yes)
 
1796
  AC_MSG_RESULT($USE_NLS)
 
1797
  AC_SUBST(USE_NLS)
 
1798
])
 
1799
 
 
1800
AC_DEFUN([AM_MKINSTALLDIRS],
 
1801
[
 
1802
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
1803
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
 
1804
  dnl Try to locate it.
 
1805
  MKINSTALLDIRS=
 
1806
  if test -n "$ac_aux_dir"; then
 
1807
    case "$ac_aux_dir" in
 
1808
      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
 
1809
      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
 
1810
    esac
 
1811
  fi
 
1812
  if test -z "$MKINSTALLDIRS"; then
 
1813
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
1814
  fi
 
1815
  AC_SUBST(MKINSTALLDIRS)
 
1816
])
 
1817
# po.m4 serial 3 (gettext-0.14)
 
1818
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
1819
dnl This file is free software, distributed under the terms of the GNU
 
1820
dnl General Public License.  As a special exception to the GNU General
 
1821
dnl Public License, this file may be distributed as part of a program
 
1822
dnl that contains a configuration script generated by Autoconf, under
 
1823
dnl the same distribution terms as the rest of that program.
 
1824
dnl
 
1825
dnl This file can can be used in projects which are not available under
 
1826
dnl the GNU General Public License or the GNU Library General Public
 
1827
dnl License but which still want to provide support for the GNU gettext
 
1828
dnl functionality.
 
1829
dnl Please note that the actual code of the GNU gettext library is covered
 
1830
dnl by the GNU Library General Public License, and the rest of the GNU
 
1831
dnl gettext package package is covered by the GNU General Public License.
 
1832
dnl They are *not* in the public domain.
 
1833
 
 
1834
dnl Authors:
 
1835
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
1836
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
1837
 
 
1838
dnl Checks for all prerequisites of the po subdirectory.
 
1839
AC_DEFUN([AM_PO_SUBDIRS],
 
1840
[
 
1841
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1842
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1843
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
1844
  AC_REQUIRE([AM_NLS])dnl
 
1845
 
 
1846
  dnl Perform the following tests also if --disable-nls has been given,
 
1847
  dnl because they are needed for "make dist" to work.
 
1848
 
 
1849
  dnl Search for GNU msgfmt in the PATH.
 
1850
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
 
1851
  dnl The second test excludes FreeBSD msgfmt.
 
1852
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
1853
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
 
1854
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
1855
    :)
 
1856
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1857
 
 
1858
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
 
1859
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
 
1860
  dnl The second test excludes FreeBSD xgettext.
 
1861
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
1862
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
1863
     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
1864
    :)
 
1865
  dnl Remove leftover from FreeBSD xgettext call.
 
1866
  rm -f messages.po
 
1867
 
 
1868
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
 
1869
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
 
1870
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
 
1871
 
 
1872
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
1873
  dnl Test whether we really found GNU msgfmt.
 
1874
  if test "$GMSGFMT" != ":"; then
 
1875
    dnl If it is no GNU msgfmt we define it as : so that the
 
1876
    dnl Makefiles still can work.
 
1877
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
 
1878
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
1879
      : ;
 
1880
    else
 
1881
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
 
1882
      AC_MSG_RESULT(
 
1883
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
 
1884
      GMSGFMT=":"
 
1885
    fi
 
1886
  fi
 
1887
 
 
1888
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
1889
  dnl Test whether we really found GNU xgettext.
 
1890
  if test "$XGETTEXT" != ":"; then
 
1891
    dnl If it is no GNU xgettext we define it as : so that the
 
1892
    dnl Makefiles still can work.
 
1893
    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
1894
       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
1895
      : ;
 
1896
    else
 
1897
      AC_MSG_RESULT(
 
1898
        [found xgettext program is not GNU xgettext; ignore it])
 
1899
      XGETTEXT=":"
 
1900
    fi
 
1901
    dnl Remove leftover from FreeBSD xgettext call.
 
1902
    rm -f messages.po
 
1903
  fi
 
1904
 
 
1905
  AC_OUTPUT_COMMANDS([
 
1906
    for ac_file in $CONFIG_FILES; do
 
1907
      # Support "outfile[:infile[:infile...]]"
 
1908
      case "$ac_file" in
 
1909
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
1910
      esac
 
1911
      # PO directories have a Makefile.in generated from Makefile.in.in.
 
1912
      case "$ac_file" in */Makefile.in)
 
1913
        # Adjust a relative srcdir.
 
1914
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
1915
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
1916
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
1917
        # In autoconf-2.13 it is called $ac_given_srcdir.
 
1918
        # In autoconf-2.50 it is called $srcdir.
 
1919
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
1920
        case "$ac_given_srcdir" in
 
1921
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
1922
          /*) top_srcdir="$ac_given_srcdir" ;;
 
1923
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
1924
        esac
 
1925
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
 
1926
          rm -f "$ac_dir/POTFILES"
 
1927
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
 
1928
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
1929
          POMAKEFILEDEPS="POTFILES.in"
 
1930
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
 
1931
          # on $ac_dir but don't depend on user-specified configuration
 
1932
          # parameters.
 
1933
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
1934
            # The LINGUAS file contains the set of available languages.
 
1935
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
1936
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
1937
            fi
 
1938
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
1939
            # Hide the ALL_LINGUAS assigment from automake.
 
1940
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
1941
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
1942
          else
 
1943
            # The set of available languages was given in configure.in.
 
1944
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
 
1945
          fi
 
1946
          # Compute POFILES
 
1947
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
1948
          # Compute UPDATEPOFILES
 
1949
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
1950
          # Compute DUMMYPOFILES
 
1951
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
1952
          # Compute GMOFILES
 
1953
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
1954
          case "$ac_given_srcdir" in
 
1955
            .) srcdirpre= ;;
 
1956
            *) srcdirpre='$(srcdir)/' ;;
 
1957
          esac
 
1958
          POFILES=
 
1959
          UPDATEPOFILES=
 
1960
          DUMMYPOFILES=
 
1961
          GMOFILES=
 
1962
          for lang in $ALL_LINGUAS; do
 
1963
            POFILES="$POFILES $srcdirpre$lang.po"
 
1964
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
1965
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
1966
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
1967
          done
 
1968
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
1969
          # environment variable.
 
1970
          INST_LINGUAS=
 
1971
          if test -n "$ALL_LINGUAS"; then
 
1972
            for presentlang in $ALL_LINGUAS; do
 
1973
              useit=no
 
1974
              if test "%UNSET%" != "$LINGUAS"; then
 
1975
                desiredlanguages="$LINGUAS"
 
1976
              else
 
1977
                desiredlanguages="$ALL_LINGUAS"
 
1978
              fi
 
1979
              for desiredlang in $desiredlanguages; do
 
1980
                # Use the presentlang catalog if desiredlang is
 
1981
                #   a. equal to presentlang, or
 
1982
                #   b. a variant of presentlang (because in this case,
 
1983
                #      presentlang can be used as a fallback for messages
 
1984
                #      which are not translated in the desiredlang catalog).
 
1985
                case "$desiredlang" in
 
1986
                  "$presentlang"*) useit=yes;;
 
1987
                esac
 
1988
              done
 
1989
              if test $useit = yes; then
 
1990
                INST_LINGUAS="$INST_LINGUAS $presentlang"
 
1991
              fi
 
1992
            done
 
1993
          fi
 
1994
          CATALOGS=
 
1995
          if test -n "$INST_LINGUAS"; then
 
1996
            for lang in $INST_LINGUAS; do
 
1997
              CATALOGS="$CATALOGS $lang.gmo"
 
1998
            done
 
1999
          fi
 
2000
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
 
2001
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
 
2002
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
 
2003
            if test -f "$f"; then
 
2004
              case "$f" in
 
2005
                *.orig | *.bak | *~) ;;
 
2006
                *) cat "$f" >> "$ac_dir/Makefile" ;;
 
2007
              esac
 
2008
            fi
 
2009
          done
 
2010
        fi
 
2011
        ;;
 
2012
      esac
 
2013
    done],
 
2014
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
 
2015
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
 
2016
    # from automake.
 
2017
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
 
2018
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
 
2019
    LINGUAS="${LINGUAS-%UNSET%}"
 
2020
   ])
 
2021
])
 
2022
 
 
2023
dnl Postprocesses a Makefile in a directory containing PO files.
 
2024
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
 
2025
[
 
2026
  # When this code is run, in config.status, two variables have already been
 
2027
  # set:
 
2028
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
 
2029
  # - LINGUAS is the value of the environment variable LINGUAS at configure
 
2030
  #   time.
 
2031
 
 
2032
changequote(,)dnl
 
2033
  # Adjust a relative srcdir.
 
2034
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
2035
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
2036
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
2037
  # In autoconf-2.13 it is called $ac_given_srcdir.
 
2038
  # In autoconf-2.50 it is called $srcdir.
 
2039
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
2040
  case "$ac_given_srcdir" in
 
2041
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
2042
    /*) top_srcdir="$ac_given_srcdir" ;;
 
2043
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
2044
  esac
 
2045
 
 
2046
  # Find a way to echo strings without interpreting backslash.
 
2047
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
 
2048
    gt_echo='echo'
 
2049
  else
 
2050
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
 
2051
      gt_echo='printf %s\n'
 
2052
    else
 
2053
      echo_func () {
 
2054
        cat <<EOT
 
2055
$*
 
2056
EOT
 
2057
      }
 
2058
      gt_echo='echo_func'
 
2059
    fi
 
2060
  fi
 
2061
 
 
2062
  # A sed script that extracts the value of VARIABLE from a Makefile.
 
2063
  sed_x_variable='
 
2064
# Test if the hold space is empty.
 
2065
x
 
2066
s/P/P/
 
2067
x
 
2068
ta
 
2069
# Yes it was empty. Look if we have the expected variable definition.
 
2070
/^[      ]*VARIABLE[     ]*=/{
 
2071
  # Seen the first line of the variable definition.
 
2072
  s/^[   ]*VARIABLE[     ]*=//
 
2073
  ba
 
2074
}
 
2075
bd
 
2076
:a
 
2077
# Here we are processing a line from the variable definition.
 
2078
# Remove comment, more precisely replace it with a space.
 
2079
s/#.*$/ /
 
2080
# See if the line ends in a backslash.
 
2081
tb
 
2082
:b
 
2083
s/\\$//
 
2084
# Print the line, without the trailing backslash.
 
2085
p
 
2086
tc
 
2087
# There was no trailing backslash. The end of the variable definition is
 
2088
# reached. Clear the hold space.
 
2089
s/^.*$//
 
2090
x
 
2091
bd
 
2092
:c
 
2093
# A trailing backslash means that the variable definition continues in the
 
2094
# next line. Put a nonempty string into the hold space to indicate this.
 
2095
s/^.*$/P/
 
2096
x
 
2097
:d
 
2098
'
 
2099
changequote([,])dnl
 
2100
 
 
2101
  # Set POTFILES to the value of the Makefile variable POTFILES.
 
2102
  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
 
2103
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
 
2104
  # Compute POTFILES_DEPS as
 
2105
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
 
2106
  POTFILES_DEPS=
 
2107
  for file in $POTFILES; do
 
2108
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
 
2109
  done
 
2110
  POMAKEFILEDEPS=""
 
2111
 
 
2112
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
2113
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
2114
  fi
 
2115
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
2116
    # The LINGUAS file contains the set of available languages.
 
2117
    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
2118
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
2119
  else
 
2120
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
 
2121
    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
 
2122
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
 
2123
  fi
 
2124
  # Hide the ALL_LINGUAS assigment from automake.
 
2125
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
2126
  # Compute POFILES
 
2127
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
2128
  # Compute UPDATEPOFILES
 
2129
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
2130
  # Compute DUMMYPOFILES
 
2131
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
2132
  # Compute GMOFILES
 
2133
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
2134
  # Compute PROPERTIESFILES
 
2135
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
 
2136
  # Compute CLASSFILES
 
2137
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
 
2138
  # Compute QMFILES
 
2139
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
 
2140
  # Compute MSGFILES
 
2141
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
 
2142
  # Compute RESOURCESDLLFILES
 
2143
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
 
2144
  case "$ac_given_srcdir" in
 
2145
    .) srcdirpre= ;;
 
2146
    *) srcdirpre='$(srcdir)/' ;;
 
2147
  esac
 
2148
  POFILES=
 
2149
  UPDATEPOFILES=
 
2150
  DUMMYPOFILES=
 
2151
  GMOFILES=
 
2152
  PROPERTIESFILES=
 
2153
  CLASSFILES=
 
2154
  QMFILES=
 
2155
  MSGFILES=
 
2156
  RESOURCESDLLFILES=
 
2157
  for lang in $ALL_LINGUAS; do
 
2158
    POFILES="$POFILES $srcdirpre$lang.po"
 
2159
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
2160
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
2161
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
2162
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
 
2163
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
 
2164
    QMFILES="$QMFILES $srcdirpre$lang.qm"
 
2165
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
2166
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
 
2167
    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
2168
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
 
2169
  done
 
2170
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
2171
  # environment variable.
 
2172
  INST_LINGUAS=
 
2173
  if test -n "$ALL_LINGUAS"; then
 
2174
    for presentlang in $ALL_LINGUAS; do
 
2175
      useit=no
 
2176
      if test "%UNSET%" != "$LINGUAS"; then
 
2177
        desiredlanguages="$LINGUAS"
 
2178
      else
 
2179
        desiredlanguages="$ALL_LINGUAS"
 
2180
      fi
 
2181
      for desiredlang in $desiredlanguages; do
 
2182
        # Use the presentlang catalog if desiredlang is
 
2183
        #   a. equal to presentlang, or
 
2184
        #   b. a variant of presentlang (because in this case,
 
2185
        #      presentlang can be used as a fallback for messages
 
2186
        #      which are not translated in the desiredlang catalog).
 
2187
        case "$desiredlang" in
 
2188
          "$presentlang"*) useit=yes;;
 
2189
        esac
 
2190
      done
 
2191
      if test $useit = yes; then
 
2192
        INST_LINGUAS="$INST_LINGUAS $presentlang"
 
2193
      fi
 
2194
    done
 
2195
  fi
 
2196
  CATALOGS=
 
2197
  JAVACATALOGS=
 
2198
  QTCATALOGS=
 
2199
  TCLCATALOGS=
 
2200
  CSHARPCATALOGS=
 
2201
  if test -n "$INST_LINGUAS"; then
 
2202
    for lang in $INST_LINGUAS; do
 
2203
      CATALOGS="$CATALOGS $lang.gmo"
 
2204
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
 
2205
      QTCATALOGS="$QTCATALOGS $lang.qm"
 
2206
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
2207
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
 
2208
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
2209
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
 
2210
    done
 
2211
  fi
 
2212
 
 
2213
  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
 
2214
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
 
2215
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
2216
    for lang in $ALL_LINGUAS; do
 
2217
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
2218
      cat >> "$ac_file.tmp" <<EOF
 
2219
$frobbedlang.msg: $lang.po
 
2220
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 
2221
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
2222
EOF
 
2223
    done
 
2224
  fi
 
2225
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
 
2226
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
2227
    for lang in $ALL_LINGUAS; do
 
2228
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
2229
      cat >> "$ac_file.tmp" <<EOF
 
2230
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
 
2231
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 
2232
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
2233
EOF
 
2234
    done
 
2235
  fi
 
2236
  if test -n "$POMAKEFILEDEPS"; then
 
2237
    cat >> "$ac_file.tmp" <<EOF
 
2238
Makefile: $POMAKEFILEDEPS
 
2239
EOF
 
2240
  fi
 
2241
  mv "$ac_file.tmp" "$ac_file"
 
2242
])
 
2243
# printf-posix.m4 serial 2 (gettext-0.13.1)
 
2244
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2245
dnl This file is free software, distributed under the terms of the GNU
 
2246
dnl General Public License.  As a special exception to the GNU General
 
2247
dnl Public License, this file may be distributed as part of a program
 
2248
dnl that contains a configuration script generated by Autoconf, under
 
2249
dnl the same distribution terms as the rest of that program.
 
2250
 
 
2251
dnl From Bruno Haible.
 
2252
dnl Test whether the printf() function supports POSIX/XSI format strings with
 
2253
dnl positions.
 
2254
 
 
2255
AC_DEFUN([gt_PRINTF_POSIX],
 
2256
[
 
2257
  AC_REQUIRE([AC_PROG_CC])
 
2258
  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
 
2259
    gt_cv_func_printf_posix,
 
2260
    [
 
2261
      AC_TRY_RUN([
 
2262
#include <stdio.h>
 
2263
#include <string.h>
 
2264
/* The string "%2$d %1$d", with dollar characters protected from the shell's
 
2265
   dollar expansion (possibly an autoconf bug).  */
 
2266
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
 
2267
static char buf[100];
 
2268
int main ()
 
2269
{
 
2270
  sprintf (buf, format, 33, 55);
 
2271
  return (strcmp (buf, "55 33") != 0);
 
2272
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
 
2273
      [
 
2274
        AC_EGREP_CPP(notposix, [
 
2275
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
 
2276
  notposix
 
2277
#endif
 
2278
        ], gt_cv_func_printf_posix="guessing no",
 
2279
           gt_cv_func_printf_posix="guessing yes")
 
2280
      ])
 
2281
    ])
 
2282
  case $gt_cv_func_printf_posix in
 
2283
    *yes)
 
2284
      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
 
2285
        [Define if your printf() function supports format strings with positions.])
 
2286
      ;;
 
2287
  esac
 
2288
])
 
2289
# progtest.m4 serial 3 (gettext-0.12)
 
2290
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1764
2291
dnl This file is free software, distributed under the terms of the GNU
1765
2292
dnl General Public License.  As a special exception to the GNU General
1766
2293
dnl Public License, this file may be distributed as part of a program
1784
2311
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1785
2312
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1786
2313
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
1787
 
[# Extract the first word of "$2", so it can be a program name with args.
 
2314
[
 
2315
# Prepare PATH_SEPARATOR.
 
2316
# The user is always right.
 
2317
if test "${PATH_SEPARATOR+set}" != set; then
 
2318
  echo "#! /bin/sh" >conf$$.sh
 
2319
  echo  "exit 0"   >>conf$$.sh
 
2320
  chmod +x conf$$.sh
 
2321
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
2322
    PATH_SEPARATOR=';'
 
2323
  else
 
2324
    PATH_SEPARATOR=:
 
2325
  fi
 
2326
  rm -f conf$$.sh
 
2327
fi
 
2328
 
 
2329
# Find out how to test for executable files. Don't use a zero-byte file,
 
2330
# as systems may use methods other than mode bits to determine executability.
 
2331
cat >conf$$.file <<_ASEOF
 
2332
#! /bin/sh
 
2333
exit 0
 
2334
_ASEOF
 
2335
chmod +x conf$$.file
 
2336
if test -x conf$$.file >/dev/null 2>&1; then
 
2337
  ac_executable_p="test -x"
 
2338
else
 
2339
  ac_executable_p="test -f"
 
2340
fi
 
2341
rm -f conf$$.file
 
2342
 
 
2343
# Extract the first word of "$2", so it can be a program name with args.
1788
2344
set dummy $2; ac_word=[$]2
1789
2345
AC_MSG_CHECKING([for $ac_word])
1790
2346
AC_CACHE_VAL(ac_cv_path_$1,
1791
2347
[case "[$]$1" in
1792
 
  /*)
1793
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1794
 
  ;;
 
2348
  [[\\/]]* | ?:[[\\/]]*)
 
2349
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
2350
    ;;
1795
2351
  *)
1796
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1797
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1798
 
    test -z "$ac_dir" && ac_dir=.
1799
 
    if test -f $ac_dir/$ac_word; then
1800
 
      if [$3]; then
1801
 
        ac_cv_path_$1="$ac_dir/$ac_word"
1802
 
        break
1803
 
      fi
1804
 
    fi
1805
 
  done
1806
 
  IFS="$ac_save_ifs"
 
2352
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
 
2353
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
2354
      IFS="$ac_save_IFS"
 
2355
      test -z "$ac_dir" && ac_dir=.
 
2356
      for ac_exec_ext in '' $ac_executable_extensions; do
 
2357
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
 
2358
          if [$3]; then
 
2359
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
 
2360
            break 2
 
2361
          fi
 
2362
        fi
 
2363
      done
 
2364
    done
 
2365
    IFS="$ac_save_IFS"
1807
2366
dnl If no 4th arg is given, leave the cache variable unset,
1808
2367
dnl so AC_PATH_PROGS will keep looking.
1809
2368
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1810
2369
])dnl
1811
 
  ;;
 
2370
    ;;
1812
2371
esac])dnl
1813
2372
$1="$ac_cv_path_$1"
1814
2373
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1818
2377
fi
1819
2378
AC_SUBST($1)dnl
1820
2379
])
1821
 
# stdint_h.m4 serial 2 (gettext-0.11.4)
1822
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
2380
# signed.m4 serial 1 (gettext-0.10.40)
 
2381
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
2382
dnl This file is free software, distributed under the terms of the GNU
 
2383
dnl General Public License.  As a special exception to the GNU General
 
2384
dnl Public License, this file may be distributed as part of a program
 
2385
dnl that contains a configuration script generated by Autoconf, under
 
2386
dnl the same distribution terms as the rest of that program.
 
2387
 
 
2388
dnl From Bruno Haible.
 
2389
 
 
2390
AC_DEFUN([bh_C_SIGNED],
 
2391
[
 
2392
  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
 
2393
   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
 
2394
  if test $bh_cv_c_signed = no; then
 
2395
    AC_DEFINE(signed, ,
 
2396
              [Define to empty if the C compiler doesn't support this keyword.])
 
2397
  fi
 
2398
])
 
2399
# size_max.m4 serial 2
 
2400
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2401
dnl This file is free software, distributed under the terms of the GNU
 
2402
dnl General Public License.  As a special exception to the GNU General
 
2403
dnl Public License, this file may be distributed as part of a program
 
2404
dnl that contains a configuration script generated by Autoconf, under
 
2405
dnl the same distribution terms as the rest of that program.
 
2406
 
 
2407
dnl From Bruno Haible.
 
2408
 
 
2409
AC_DEFUN([gl_SIZE_MAX],
 
2410
[
 
2411
  AC_CHECK_HEADERS(stdint.h)
 
2412
  dnl First test whether the system already has SIZE_MAX.
 
2413
  AC_MSG_CHECKING([for SIZE_MAX])
 
2414
  result=
 
2415
  AC_EGREP_CPP([Found it], [
 
2416
#include <limits.h>
 
2417
#if HAVE_STDINT_H
 
2418
#include <stdint.h>
 
2419
#endif
 
2420
#ifdef SIZE_MAX
 
2421
Found it
 
2422
#endif
 
2423
], result=yes)
 
2424
  if test -z "$result"; then
 
2425
    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
 
2426
    dnl than the type 'unsigned long'.
 
2427
    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
 
2428
    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
 
2429
    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
 
2430
      [#include <stddef.h>], result=?)
 
2431
    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
 
2432
      [#include <stddef.h>], result=?)
 
2433
    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
 
2434
      [#include <stddef.h>], result=?)
 
2435
    if test "$fits_in_uint" = 1; then
 
2436
      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
 
2437
      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
 
2438
      AC_TRY_COMPILE([#include <stddef.h>
 
2439
        extern size_t foo;
 
2440
        extern unsigned long foo;
 
2441
        ], [], fits_in_uint=0)
 
2442
    fi
 
2443
    if test -z "$result"; then
 
2444
      if test "$fits_in_uint" = 1; then
 
2445
        result="$res_hi$res_lo"U
 
2446
      else
 
2447
        result="$res_hi$res_lo"UL
 
2448
      fi
 
2449
    else
 
2450
      dnl Shouldn't happen, but who knows...
 
2451
      result='~(size_t)0'
 
2452
    fi
 
2453
  fi
 
2454
  AC_MSG_RESULT([$result])
 
2455
  if test "$result" != yes; then
 
2456
    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
 
2457
      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
 
2458
  fi
 
2459
])
 
2460
# stdint_h.m4 serial 3 (gettext-0.12)
 
2461
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1823
2462
dnl This file is free software, distributed under the terms of the GNU
1824
2463
dnl General Public License.  As a special exception to the GNU General
1825
2464
dnl Public License, this file may be distributed as part of a program
1842
2481
    jm_ac_cv_header_stdint_h=no)])
1843
2482
  if test $jm_ac_cv_header_stdint_h = yes; then
1844
2483
    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
1845
 
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
1846
 
   and declares uintmax_t. ])
 
2484
      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
 
2485
       and declares uintmax_t. ])
1847
2486
  fi
1848
2487
])
1849
 
# uintmax_t.m4 serial 6 (gettext-0.11)
1850
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
2488
# uintmax_t.m4 serial 7 (gettext-0.12)
 
2489
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
1851
2490
dnl This file is free software, distributed under the terms of the GNU
1852
2491
dnl General Public License.  As a special exception to the GNU General
1853
2492
dnl Public License, this file may be distributed as part of a program
1858
2497
 
1859
2498
AC_PREREQ(2.13)
1860
2499
 
1861
 
# Define uintmax_t to `unsigned long' or `unsigned long long'
1862
 
# if <inttypes.h> does not exist.
 
2500
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
 
2501
# if it is not already defined in <stdint.h> or <inttypes.h>.
1863
2502
 
1864
2503
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
1865
2504
[
1871
2510
      && ac_type='unsigned long long' \
1872
2511
      || ac_type='unsigned long'
1873
2512
    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
1874
 
  [Define to unsigned long or unsigned long long
1875
 
   if <inttypes.h> and <stdint.h> don't define.])
 
2513
      [Define to unsigned long or unsigned long long
 
2514
       if <stdint.h> and <inttypes.h> don't define.])
 
2515
  else
 
2516
    AC_DEFINE(HAVE_UINTMAX_T, 1,
 
2517
      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
1876
2518
  fi
1877
2519
])
1878
 
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
1879
 
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
 
2520
# ulonglong.m4 serial 3
 
2521
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
1880
2522
dnl This file is free software, distributed under the terms of the GNU
1881
2523
dnl General Public License.  As a special exception to the GNU General
1882
2524
dnl Public License, this file may be distributed as part of a program
1885
2527
 
1886
2528
dnl From Paul Eggert.
1887
2529
 
 
2530
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
 
2531
 
1888
2532
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
1889
2533
[
1890
2534
  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
1891
 
  [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
 
2535
  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
1892
2536
    [unsigned long long ullmax = (unsigned long long) -1;
1893
2537
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
1894
2538
    ac_cv_type_unsigned_long_long=yes,
1895
2539
    ac_cv_type_unsigned_long_long=no)])
1896
2540
  if test $ac_cv_type_unsigned_long_long = yes; then
1897
2541
    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
1898
 
      [Define if you have the unsigned long long type.])
1899
 
  fi
 
2542
      [Define if you have the 'unsigned long long' type.])
 
2543
  fi
 
2544
])
 
2545
# wchar_t.m4 serial 1 (gettext-0.12)
 
2546
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
2547
dnl This file is free software, distributed under the terms of the GNU
 
2548
dnl General Public License.  As a special exception to the GNU General
 
2549
dnl Public License, this file may be distributed as part of a program
 
2550
dnl that contains a configuration script generated by Autoconf, under
 
2551
dnl the same distribution terms as the rest of that program.
 
2552
 
 
2553
dnl From Bruno Haible.
 
2554
dnl Test whether <stddef.h> has the 'wchar_t' type.
 
2555
dnl Prerequisite: AC_PROG_CC
 
2556
 
 
2557
AC_DEFUN([gt_TYPE_WCHAR_T],
 
2558
[
 
2559
  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
 
2560
    [AC_TRY_COMPILE([#include <stddef.h>
 
2561
       wchar_t foo = (wchar_t)'\0';], ,
 
2562
       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
 
2563
  if test $gt_cv_c_wchar_t = yes; then
 
2564
    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
 
2565
  fi
 
2566
])
 
2567
# wint_t.m4 serial 1 (gettext-0.12)
 
2568
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2569
dnl This file is free software, distributed under the terms of the GNU
 
2570
dnl General Public License.  As a special exception to the GNU General
 
2571
dnl Public License, this file may be distributed as part of a program
 
2572
dnl that contains a configuration script generated by Autoconf, under
 
2573
dnl the same distribution terms as the rest of that program.
 
2574
 
 
2575
dnl From Bruno Haible.
 
2576
dnl Test whether <wchar.h> has the 'wint_t' type.
 
2577
dnl Prerequisite: AC_PROG_CC
 
2578
 
 
2579
AC_DEFUN([gt_TYPE_WINT_T],
 
2580
[
 
2581
  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
 
2582
    [AC_TRY_COMPILE([#include <wchar.h>
 
2583
       wint_t foo = (wchar_t)'\0';], ,
 
2584
       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
 
2585
  if test $gt_cv_c_wint_t = yes; then
 
2586
    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
 
2587
  fi
 
2588
])
 
2589
# xsize.m4 serial 2
 
2590
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2591
dnl This file is free software, distributed under the terms of the GNU
 
2592
dnl General Public License.  As a special exception to the GNU General
 
2593
dnl Public License, this file may be distributed as part of a program
 
2594
dnl that contains a configuration script generated by Autoconf, under
 
2595
dnl the same distribution terms as the rest of that program.
 
2596
 
 
2597
AC_DEFUN([gl_XSIZE],
 
2598
[
 
2599
  dnl Prerequisites of lib/xsize.h.
 
2600
  AC_REQUIRE([gl_SIZE_MAX])
 
2601
  AC_CHECK_HEADERS(stdint.h)
1900
2602
])