~jr/ubuntu/oneiric/apt/bzr-get-rename

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2005-03-07 20:08:33 UTC
  • Revision ID: james.westby@ubuntu.com-20050307200833-0lxdgg2cb4oculdv
Tags: 0.6.35
* Merge apt--mvo--0 (incorporates 0.6.34ubuntu1):
  - Implement MaxSize and MaxAge in apt.cron.daily, to prevent the cache
    from growing too large (Ubuntu #6761)
  - some comments about the pkgAcqMetaSig::Custom600Headers() added
  - use gpg --with-colons
  - commented the ftp no_proxy unseting in methods/ftp.cc
  - added support for "Acquire::gpgv::options" in methods/gpgv.cc
* Merge bubulle@debian.org--2005/apt--main--0
  - Make capitalization more consistent
  - Un-fuzzy translations resulting from capitalization changes
  - Italian translation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl aclocal.m4 generated automatically by aclocal 1.4-p4
2
 
 
3
 
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4
 
dnl This file is free software; the Free Software Foundation
5
 
dnl gives unlimited permission to copy and/or distribute it,
6
 
dnl with or without modifications, as long as this notice is preserved.
7
 
 
8
 
dnl This program is distributed in the hope that it will be useful,
9
 
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
 
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
 
dnl PARTICULAR PURPOSE.
 
1
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
4
# Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
# isc-posix.m4 serial 2 (gettext-0.11.2)
 
15
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
16
dnl This file is free software, distributed under the terms of the GNU
 
17
dnl General Public License.  As a special exception to the GNU General
 
18
dnl Public License, this file may be distributed as part of a program
 
19
dnl that contains a configuration script generated by Autoconf, under
 
20
dnl the same distribution terms as the rest of that program.
 
21
 
 
22
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
 
23
 
 
24
# This test replaces the one in autoconf.
 
25
# Currently this macro should have the same name as the autoconf macro
 
26
# because gettext's gettext.m4 (distributed in the automake package)
 
27
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
 
28
# give these diagnostics:
 
29
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
 
30
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
 
31
 
 
32
undefine([AC_ISC_POSIX])
 
33
 
 
34
AC_DEFUN([AC_ISC_POSIX],
 
35
  [
 
36
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
 
37
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
 
38
  ]
 
39
)
12
40
 
13
41
AC_DEFUN(ah_HAVE_GETCONF,
14
42
        [AC_ARG_WITH(getconf,
103
131
 
104
132
AC_DEFUN(rc_GLIBC_VER,
105
133
        [AC_MSG_CHECKING([glibc version])
 
134
        AC_CACHE_VAL(ac_cv_glibc_ver,
106
135
        dummy=if$$
107
136
        cat <<_GLIBC_>$dummy.c
108
137
#include <features.h>
114
143
        if test "$?" = 0; then
115
144
                GLIBC_VER=`./$dummy`
116
145
                AC_MSG_RESULT([$GLIBC_VER])
117
 
                GLIBC_VER="-$GLIBC_VER"
 
146
                ac_cv_glibc_ver=$GLIBC_VER
118
147
        else
119
148
                AC_MSG_WARN([cannot determine GNU C library minor version number])
120
149
        fi
121
150
        rm -f $dummy $dummy.c
 
151
        )
 
152
        GLIBC_VER="-$ac_cv_glibc_ver"
122
153
        AC_SUBST(GLIBC_VER)
123
154
])
124
155
 
168
199
        AC_SUBST(GCC3DEP)
169
200
])
170
201
 
 
202
# gettext.m4 serial 28 (gettext-0.13)
 
203
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
204
dnl This file is free software, distributed under the terms of the GNU
 
205
dnl General Public License.  As a special exception to the GNU General
 
206
dnl Public License, this file may be distributed as part of a program
 
207
dnl that contains a configuration script generated by Autoconf, under
 
208
dnl the same distribution terms as the rest of that program.
 
209
dnl
 
210
dnl This file can can be used in projects which are not available under
 
211
dnl the GNU General Public License or the GNU Library General Public
 
212
dnl License but which still want to provide support for the GNU gettext
 
213
dnl functionality.
 
214
dnl Please note that the actual code of the GNU gettext library is covered
 
215
dnl by the GNU Library General Public License, and the rest of the GNU
 
216
dnl gettext package package is covered by the GNU General Public License.
 
217
dnl They are *not* in the public domain.
 
218
 
 
219
dnl Authors:
 
220
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
221
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
222
 
 
223
dnl Macro to add for using GNU gettext.
 
224
 
 
225
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
 
226
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
 
227
dnl    default (if it is not specified or empty) is 'no-libtool'.
 
228
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
 
229
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
 
230
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
 
231
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
 
232
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
 
233
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
 
234
dnl    $(top_builddir)/intl/libintl.a will be created.
 
235
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
 
236
dnl    implementations (in libc or libintl) without the ngettext() function
 
237
dnl    will be ignored.  If NEEDSYMBOL is specified and is
 
238
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
 
239
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
 
240
dnl INTLDIR is used to find the intl libraries.  If empty,
 
241
dnl    the value `$(top_builddir)/intl/' is used.
 
242
dnl
 
243
dnl The result of the configuration is one of three cases:
 
244
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
 
245
dnl    and used.
 
246
dnl    Catalog format: GNU --> install in $(datadir)
 
247
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
248
dnl 2) GNU gettext has been found in the system's C library.
 
249
dnl    Catalog format: GNU --> install in $(datadir)
 
250
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
251
dnl 3) No internationalization, always use English msgid.
 
252
dnl    Catalog format: none
 
253
dnl    Catalog extension: none
 
254
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
 
255
dnl The use of .gmo is historical (it was needed to avoid overwriting the
 
256
dnl GNU format catalogs when building on a platform with an X/Open gettext),
 
257
dnl but we keep it in order not to force irrelevant filename changes on the
 
258
dnl maintainers.
 
259
dnl
 
260
AC_DEFUN([AM_GNU_GETTEXT],
 
261
[
 
262
  dnl Argument checking.
 
263
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
 
264
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
 
265
])])])])])
 
266
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
 
267
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
 
268
])])])])
 
269
  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
 
270
  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
 
271
 
 
272
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
 
273
  ifelse(gt_included_intl, yes, [
 
274
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
 
275
  ])
 
276
 
 
277
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
278
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
279
  AC_REQUIRE([AC_LIB_RPATH])
 
280
 
 
281
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
282
  dnl Ideally we would do this search only after the
 
283
  dnl      if test "$USE_NLS" = "yes"; then
 
284
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
285
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
 
286
  dnl the configure script would need to contain the same shell code
 
287
  dnl again, outside any 'if'. There are two solutions:
 
288
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
 
289
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
 
290
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
 
291
  dnl documented, we avoid it.
 
292
  ifelse(gt_included_intl, yes, , [
 
293
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
294
  ])
 
295
 
 
296
  dnl Set USE_NLS.
 
297
  AM_NLS
 
298
 
 
299
  ifelse(gt_included_intl, yes, [
 
300
    BUILD_INCLUDED_LIBINTL=no
 
301
    USE_INCLUDED_LIBINTL=no
 
302
  ])
 
303
  LIBINTL=
 
304
  LTLIBINTL=
 
305
  POSUB=
 
306
 
 
307
  dnl If we use NLS figure out what method
 
308
  if test "$USE_NLS" = "yes"; then
 
309
    gt_use_preinstalled_gnugettext=no
 
310
    ifelse(gt_included_intl, yes, [
 
311
      AC_MSG_CHECKING([whether included gettext is requested])
 
312
      AC_ARG_WITH(included-gettext,
 
313
        [  --with-included-gettext use the GNU gettext library included here],
 
314
        nls_cv_force_use_gnu_gettext=$withval,
 
315
        nls_cv_force_use_gnu_gettext=no)
 
316
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
 
317
 
 
318
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
 
319
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
 
320
    ])
 
321
        dnl User does not insist on using GNU NLS library.  Figure out what
 
322
        dnl to use.  If GNU gettext is available we use this.  Else we have
 
323
        dnl to fall back to GNU NLS library.
 
324
 
 
325
        dnl Add a version number to the cache macros.
 
326
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
 
327
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
 
328
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
 
329
 
 
330
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
 
331
         [AC_TRY_LINK([#include <libintl.h>
 
332
]ifelse([$2], [need-formatstring-macros],
 
333
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
334
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
335
#endif
 
336
changequote(,)dnl
 
337
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
338
changequote([,])dnl
 
339
], [])[extern int _nl_msg_cat_cntr;
 
340
extern int *_nl_domain_bindings;],
 
341
            [bindtextdomain ("", "");
 
342
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
 
343
            gt_cv_func_gnugettext_libc=yes,
 
344
            gt_cv_func_gnugettext_libc=no)])
 
345
 
 
346
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
347
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
348
          ifelse(gt_included_intl, yes, , [
 
349
            AM_ICONV_LINK
 
350
          ])
 
351
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
 
352
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
 
353
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
 
354
          dnl even if libiconv doesn't exist.
 
355
          AC_LIB_LINKFLAGS_BODY([intl])
 
356
          AC_CACHE_CHECK([for GNU gettext in libintl],
 
357
            gt_cv_func_gnugettext_libintl,
 
358
           [gt_save_CPPFLAGS="$CPPFLAGS"
 
359
            CPPFLAGS="$CPPFLAGS $INCINTL"
 
360
            gt_save_LIBS="$LIBS"
 
361
            LIBS="$LIBS $LIBINTL"
 
362
            dnl Now see whether libintl exists and does not depend on libiconv.
 
363
            AC_TRY_LINK([#include <libintl.h>
 
364
]ifelse([$2], [need-formatstring-macros],
 
365
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
366
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
367
#endif
 
368
changequote(,)dnl
 
369
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
370
changequote([,])dnl
 
371
], [])[extern int _nl_msg_cat_cntr;
 
372
extern
 
373
#ifdef __cplusplus
 
374
"C"
 
375
#endif
 
376
const char *_nl_expand_alias ();],
 
377
              [bindtextdomain ("", "");
 
378
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
 
379
              gt_cv_func_gnugettext_libintl=yes,
 
380
              gt_cv_func_gnugettext_libintl=no)
 
381
            dnl Now see whether libintl exists and depends on libiconv.
 
382
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
 
383
              LIBS="$LIBS $LIBICONV"
 
384
              AC_TRY_LINK([#include <libintl.h>
 
385
]ifelse([$2], [need-formatstring-macros],
 
386
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 
387
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
 
388
#endif
 
389
changequote(,)dnl
 
390
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
 
391
changequote([,])dnl
 
392
], [])[extern int _nl_msg_cat_cntr;
 
393
extern
 
394
#ifdef __cplusplus
 
395
"C"
 
396
#endif
 
397
const char *_nl_expand_alias ();],
 
398
                [bindtextdomain ("", "");
 
399
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
 
400
               [LIBINTL="$LIBINTL $LIBICONV"
 
401
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
 
402
                gt_cv_func_gnugettext_libintl=yes
 
403
               ])
 
404
            fi
 
405
            CPPFLAGS="$gt_save_CPPFLAGS"
 
406
            LIBS="$gt_save_LIBS"])
 
407
        fi
 
408
 
 
409
        dnl If an already present or preinstalled GNU gettext() is found,
 
410
        dnl use it.  But if this macro is used in GNU gettext, and GNU
 
411
        dnl gettext is already preinstalled in libintl, we update this
 
412
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
 
413
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
 
414
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
 
415
                && test "$PACKAGE" != gettext-runtime \
 
416
                && test "$PACKAGE" != gettext-tools; }; then
 
417
          gt_use_preinstalled_gnugettext=yes
 
418
        else
 
419
          dnl Reset the values set by searching for libintl.
 
420
          LIBINTL=
 
421
          LTLIBINTL=
 
422
          INCINTL=
 
423
        fi
 
424
 
 
425
    ifelse(gt_included_intl, yes, [
 
426
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
 
427
          dnl GNU gettext is not found in the C library.
 
428
          dnl Fall back on included GNU gettext library.
 
429
          nls_cv_use_gnu_gettext=yes
 
430
        fi
 
431
      fi
 
432
 
 
433
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
 
434
        dnl Mark actions used to generate GNU NLS library.
 
435
        BUILD_INCLUDED_LIBINTL=yes
 
436
        USE_INCLUDED_LIBINTL=yes
 
437
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
 
438
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
 
439
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
 
440
      fi
 
441
 
 
442
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
443
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
444
        dnl Mark actions to use GNU gettext tools.
 
445
        CATOBJEXT=.gmo
 
446
      fi
 
447
    ])
 
448
 
 
449
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
450
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
451
      AC_DEFINE(ENABLE_NLS, 1,
 
452
        [Define to 1 if translation of program messages to the user's native language
 
453
   is requested.])
 
454
    else
 
455
      USE_NLS=no
 
456
    fi
 
457
  fi
 
458
 
 
459
  AC_MSG_CHECKING([whether to use NLS])
 
460
  AC_MSG_RESULT([$USE_NLS])
 
461
  if test "$USE_NLS" = "yes"; then
 
462
    AC_MSG_CHECKING([where the gettext function comes from])
 
463
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
464
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
465
        gt_source="external libintl"
 
466
      else
 
467
        gt_source="libc"
 
468
      fi
 
469
    else
 
470
      gt_source="included intl directory"
 
471
    fi
 
472
    AC_MSG_RESULT([$gt_source])
 
473
  fi
 
474
 
 
475
  if test "$USE_NLS" = "yes"; then
 
476
 
 
477
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
478
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
479
        AC_MSG_CHECKING([how to link with libintl])
 
480
        AC_MSG_RESULT([$LIBINTL])
 
481
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
 
482
      fi
 
483
 
 
484
      dnl For backward compatibility. Some packages may be using this.
 
485
      AC_DEFINE(HAVE_GETTEXT, 1,
 
486
       [Define if the GNU gettext() function is already present or preinstalled.])
 
487
      AC_DEFINE(HAVE_DCGETTEXT, 1,
 
488
       [Define if the GNU dcgettext() function is already present or preinstalled.])
 
489
    fi
 
490
 
 
491
    dnl We need to process the po/ directory.
 
492
    POSUB=po
 
493
  fi
 
494
 
 
495
  ifelse(gt_included_intl, yes, [
 
496
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
 
497
    dnl to 'yes' because some of the testsuite requires it.
 
498
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
 
499
      BUILD_INCLUDED_LIBINTL=yes
 
500
    fi
 
501
 
 
502
    dnl Make all variables we use known to autoconf.
 
503
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
 
504
    AC_SUBST(USE_INCLUDED_LIBINTL)
 
505
    AC_SUBST(CATOBJEXT)
 
506
 
 
507
    dnl For backward compatibility. Some configure.ins may be using this.
 
508
    nls_cv_header_intl=
 
509
    nls_cv_header_libgt=
 
510
 
 
511
    dnl For backward compatibility. Some Makefiles may be using this.
 
512
    DATADIRNAME=share
 
513
    AC_SUBST(DATADIRNAME)
 
514
 
 
515
    dnl For backward compatibility. Some Makefiles may be using this.
 
516
    INSTOBJEXT=.mo
 
517
    AC_SUBST(INSTOBJEXT)
 
518
 
 
519
    dnl For backward compatibility. Some Makefiles may be using this.
 
520
    GENCAT=gencat
 
521
    AC_SUBST(GENCAT)
 
522
 
 
523
    dnl For backward compatibility. Some Makefiles may be using this.
 
524
    if test "$USE_INCLUDED_LIBINTL" = yes; then
 
525
      INTLOBJS="\$(GETTOBJS)"
 
526
    fi
 
527
    AC_SUBST(INTLOBJS)
 
528
 
 
529
    dnl Enable libtool support if the surrounding package wishes it.
 
530
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
 
531
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
 
532
  ])
 
533
 
 
534
  dnl For backward compatibility. Some Makefiles may be using this.
 
535
  INTLLIBS="$LIBINTL"
 
536
  AC_SUBST(INTLLIBS)
 
537
 
 
538
  dnl Make all documented variables known to autoconf.
 
539
  AC_SUBST(LIBINTL)
 
540
  AC_SUBST(LTLIBINTL)
 
541
  AC_SUBST(POSUB)
 
542
])
 
543
 
 
544
 
 
545
dnl Checks for all prerequisites of the intl subdirectory,
 
546
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
 
547
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
 
548
AC_DEFUN([AM_INTL_SUBDIR],
 
549
[
 
550
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
551
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
552
  AC_REQUIRE([AC_PROG_CC])dnl
 
553
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
554
  AC_REQUIRE([AC_PROG_RANLIB])dnl
 
555
  AC_REQUIRE([AC_ISC_POSIX])dnl
 
556
  AC_REQUIRE([AC_HEADER_STDC])dnl
 
557
  AC_REQUIRE([AC_C_CONST])dnl
 
558
  AC_REQUIRE([bh_C_SIGNED])dnl
 
559
  AC_REQUIRE([AC_C_INLINE])dnl
 
560
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
561
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
562
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
 
563
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
 
564
  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
 
565
  AC_REQUIRE([gt_TYPE_WINT_T])dnl
 
566
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
567
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
568
  AC_REQUIRE([gt_TYPE_INTMAX_T])
 
569
  AC_REQUIRE([gt_PRINTF_POSIX])
 
570
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
571
  AC_REQUIRE([AC_FUNC_MMAP])dnl
 
572
  AC_REQUIRE([jm_GLIBC21])dnl
 
573
  AC_REQUIRE([gt_INTDIV0])dnl
 
574
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
 
575
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
 
576
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
 
577
  AC_REQUIRE([gl_XSIZE])dnl
 
578
 
 
579
  AC_CHECK_TYPE([ptrdiff_t], ,
 
580
    [AC_DEFINE([ptrdiff_t], [long],
 
581
       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
 
582
    ])
 
583
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
 
584
stdlib.h string.h unistd.h sys/param.h])
 
585
  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
 
586
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
 
587
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
 
588
__fsetlocking])
 
589
 
 
590
  dnl Use the _snprintf function only if it is declared (because on NetBSD it
 
591
  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
 
592
  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
 
593
  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
 
594
 
 
595
  dnl Use the *_unlocked functions only if they are declared.
 
596
  dnl (because some of them were defined without being declared in Solaris
 
597
  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
 
598
  dnl on Solaris 2.5.1 to run on Solaris 2.6).
 
599
  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
 
600
  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
 
601
  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
 
602
  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
 
603
 
 
604
  case $gt_cv_func_printf_posix in
 
605
    *yes) HAVE_POSIX_PRINTF=1 ;;
 
606
    *) HAVE_POSIX_PRINTF=0 ;;
 
607
  esac
 
608
  AC_SUBST([HAVE_POSIX_PRINTF])
 
609
  if test "$ac_cv_func_asprintf" = yes; then
 
610
    HAVE_ASPRINTF=1
 
611
  else
 
612
    HAVE_ASPRINTF=0
 
613
  fi
 
614
  AC_SUBST([HAVE_ASPRINTF])
 
615
  if test "$ac_cv_func_snprintf" = yes; then
 
616
    HAVE_SNPRINTF=1
 
617
  else
 
618
    HAVE_SNPRINTF=0
 
619
  fi
 
620
  AC_SUBST([HAVE_SNPRINTF])
 
621
  if test "$ac_cv_func_wprintf" = yes; then
 
622
    HAVE_WPRINTF=1
 
623
  else
 
624
    HAVE_WPRINTF=0
 
625
  fi
 
626
  AC_SUBST([HAVE_WPRINTF])
 
627
 
 
628
  AM_ICONV
 
629
  AM_LANGINFO_CODESET
 
630
  if test $ac_cv_header_locale_h = yes; then
 
631
    AM_LC_MESSAGES
 
632
  fi
 
633
 
 
634
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
 
635
  dnl because plural.y uses bison specific features. It requires at least
 
636
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
 
637
  dnl compile.
 
638
  dnl bison is only needed for the maintainer (who touches plural.y). But in
 
639
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
 
640
  dnl the rule in general Makefile. Now, some people carelessly touch the
 
641
  dnl files or have a broken "make" program, hence the plural.c rule will
 
642
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
 
643
  dnl present or too old.
 
644
  AC_CHECK_PROGS([INTLBISON], [bison])
 
645
  if test -z "$INTLBISON"; then
 
646
    ac_verc_fail=yes
 
647
  else
 
648
    dnl Found it, now check the version.
 
649
    AC_MSG_CHECKING([version of bison])
 
650
changequote(<<,>>)dnl
 
651
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
 
652
    case $ac_prog_version in
 
653
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
 
654
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
 
655
changequote([,])dnl
 
656
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
 
657
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
658
    esac
 
659
    AC_MSG_RESULT([$ac_prog_version])
 
660
  fi
 
661
  if test $ac_verc_fail = yes; then
 
662
    INTLBISON=:
 
663
  fi
 
664
])
 
665
 
 
666
 
 
667
dnl gt_CHECK_DECL(FUNC, INCLUDES)
 
668
dnl Check whether a function is declared.
 
669
AC_DEFUN([gt_CHECK_DECL],
 
670
[
 
671
  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
 
672
    [AC_TRY_COMPILE([$2], [
 
673
#ifndef $1
 
674
  char *p = (char *) $1;
 
675
#endif
 
676
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
 
677
  if test $ac_cv_have_decl_$1 = yes; then
 
678
    gt_value=1
 
679
  else
 
680
    gt_value=0
 
681
  fi
 
682
  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
 
683
    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
 
684
])
 
685
 
 
686
 
 
687
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
 
688
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
 
689
 
 
690
# po.m4 serial 3 (gettext-0.14)
 
691
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
692
dnl This file is free software, distributed under the terms of the GNU
 
693
dnl General Public License.  As a special exception to the GNU General
 
694
dnl Public License, this file may be distributed as part of a program
 
695
dnl that contains a configuration script generated by Autoconf, under
 
696
dnl the same distribution terms as the rest of that program.
 
697
dnl
 
698
dnl This file can can be used in projects which are not available under
 
699
dnl the GNU General Public License or the GNU Library General Public
 
700
dnl License but which still want to provide support for the GNU gettext
 
701
dnl functionality.
 
702
dnl Please note that the actual code of the GNU gettext library is covered
 
703
dnl by the GNU Library General Public License, and the rest of the GNU
 
704
dnl gettext package package is covered by the GNU General Public License.
 
705
dnl They are *not* in the public domain.
 
706
 
 
707
dnl Authors:
 
708
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
709
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
710
 
 
711
dnl Checks for all prerequisites of the po subdirectory.
 
712
AC_DEFUN([AM_PO_SUBDIRS],
 
713
[
 
714
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
715
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
716
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
717
  AC_REQUIRE([AM_NLS])dnl
 
718
 
 
719
  dnl Perform the following tests also if --disable-nls has been given,
 
720
  dnl because they are needed for "make dist" to work.
 
721
 
 
722
  dnl Search for GNU msgfmt in the PATH.
 
723
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
 
724
  dnl The second test excludes FreeBSD msgfmt.
 
725
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
726
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
 
727
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
728
    :)
 
729
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
730
 
 
731
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
 
732
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
 
733
  dnl The second test excludes FreeBSD xgettext.
 
734
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
735
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
736
     (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)],
 
737
    :)
 
738
  dnl Remove leftover from FreeBSD xgettext call.
 
739
  rm -f messages.po
 
740
 
 
741
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
 
742
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
 
743
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
 
744
 
 
745
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
746
  dnl Test whether we really found GNU msgfmt.
 
747
  if test "$GMSGFMT" != ":"; then
 
748
    dnl If it is no GNU msgfmt we define it as : so that the
 
749
    dnl Makefiles still can work.
 
750
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
 
751
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
752
      : ;
 
753
    else
 
754
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
 
755
      AC_MSG_RESULT(
 
756
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
 
757
      GMSGFMT=":"
 
758
    fi
 
759
  fi
 
760
 
 
761
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
762
  dnl Test whether we really found GNU xgettext.
 
763
  if test "$XGETTEXT" != ":"; then
 
764
    dnl If it is no GNU xgettext we define it as : so that the
 
765
    dnl Makefiles still can work.
 
766
    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
 
767
       (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
 
768
      : ;
 
769
    else
 
770
      AC_MSG_RESULT(
 
771
        [found xgettext program is not GNU xgettext; ignore it])
 
772
      XGETTEXT=":"
 
773
    fi
 
774
    dnl Remove leftover from FreeBSD xgettext call.
 
775
    rm -f messages.po
 
776
  fi
 
777
 
 
778
  AC_OUTPUT_COMMANDS([
 
779
    for ac_file in $CONFIG_FILES; do
 
780
      # Support "outfile[:infile[:infile...]]"
 
781
      case "$ac_file" in
 
782
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
783
      esac
 
784
      # PO directories have a Makefile.in generated from Makefile.in.in.
 
785
      case "$ac_file" in */Makefile.in)
 
786
        # Adjust a relative srcdir.
 
787
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
788
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
789
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
790
        # In autoconf-2.13 it is called $ac_given_srcdir.
 
791
        # In autoconf-2.50 it is called $srcdir.
 
792
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
793
        case "$ac_given_srcdir" in
 
794
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
795
          /*) top_srcdir="$ac_given_srcdir" ;;
 
796
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
797
        esac
 
798
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
 
799
          rm -f "$ac_dir/POTFILES"
 
800
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
 
801
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
802
          POMAKEFILEDEPS="POTFILES.in"
 
803
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
 
804
          # on $ac_dir but don't depend on user-specified configuration
 
805
          # parameters.
 
806
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
807
            # The LINGUAS file contains the set of available languages.
 
808
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
809
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
810
            fi
 
811
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
812
            # Hide the ALL_LINGUAS assigment from automake.
 
813
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
814
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
815
          else
 
816
            # The set of available languages was given in configure.in.
 
817
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
 
818
          fi
 
819
          # Compute POFILES
 
820
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
821
          # Compute UPDATEPOFILES
 
822
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
823
          # Compute DUMMYPOFILES
 
824
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
825
          # Compute GMOFILES
 
826
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
827
          case "$ac_given_srcdir" in
 
828
            .) srcdirpre= ;;
 
829
            *) srcdirpre='$(srcdir)/' ;;
 
830
          esac
 
831
          POFILES=
 
832
          UPDATEPOFILES=
 
833
          DUMMYPOFILES=
 
834
          GMOFILES=
 
835
          for lang in $ALL_LINGUAS; do
 
836
            POFILES="$POFILES $srcdirpre$lang.po"
 
837
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
838
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
839
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
840
          done
 
841
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
842
          # environment variable.
 
843
          INST_LINGUAS=
 
844
          if test -n "$ALL_LINGUAS"; then
 
845
            for presentlang in $ALL_LINGUAS; do
 
846
              useit=no
 
847
              if test "%UNSET%" != "$LINGUAS"; then
 
848
                desiredlanguages="$LINGUAS"
 
849
              else
 
850
                desiredlanguages="$ALL_LINGUAS"
 
851
              fi
 
852
              for desiredlang in $desiredlanguages; do
 
853
                # Use the presentlang catalog if desiredlang is
 
854
                #   a. equal to presentlang, or
 
855
                #   b. a variant of presentlang (because in this case,
 
856
                #      presentlang can be used as a fallback for messages
 
857
                #      which are not translated in the desiredlang catalog).
 
858
                case "$desiredlang" in
 
859
                  "$presentlang"*) useit=yes;;
 
860
                esac
 
861
              done
 
862
              if test $useit = yes; then
 
863
                INST_LINGUAS="$INST_LINGUAS $presentlang"
 
864
              fi
 
865
            done
 
866
          fi
 
867
          CATALOGS=
 
868
          if test -n "$INST_LINGUAS"; then
 
869
            for lang in $INST_LINGUAS; do
 
870
              CATALOGS="$CATALOGS $lang.gmo"
 
871
            done
 
872
          fi
 
873
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
 
874
          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"
 
875
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
 
876
            if test -f "$f"; then
 
877
              case "$f" in
 
878
                *.orig | *.bak | *~) ;;
 
879
                *) cat "$f" >> "$ac_dir/Makefile" ;;
 
880
              esac
 
881
            fi
 
882
          done
 
883
        fi
 
884
        ;;
 
885
      esac
 
886
    done],
 
887
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
 
888
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
 
889
    # from automake.
 
890
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
 
891
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
 
892
    LINGUAS="${LINGUAS-%UNSET%}"
 
893
   ])
 
894
])
 
895
 
 
896
dnl Postprocesses a Makefile in a directory containing PO files.
 
897
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
 
898
[
 
899
  # When this code is run, in config.status, two variables have already been
 
900
  # set:
 
901
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
 
902
  # - LINGUAS is the value of the environment variable LINGUAS at configure
 
903
  #   time.
 
904
 
 
905
changequote(,)dnl
 
906
  # Adjust a relative srcdir.
 
907
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
908
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
909
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
910
  # In autoconf-2.13 it is called $ac_given_srcdir.
 
911
  # In autoconf-2.50 it is called $srcdir.
 
912
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
913
  case "$ac_given_srcdir" in
 
914
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
915
    /*) top_srcdir="$ac_given_srcdir" ;;
 
916
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
917
  esac
 
918
 
 
919
  # Find a way to echo strings without interpreting backslash.
 
920
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
 
921
    gt_echo='echo'
 
922
  else
 
923
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
 
924
      gt_echo='printf %s\n'
 
925
    else
 
926
      echo_func () {
 
927
        cat <<EOT
 
928
$*
 
929
EOT
 
930
      }
 
931
      gt_echo='echo_func'
 
932
    fi
 
933
  fi
 
934
 
 
935
  # A sed script that extracts the value of VARIABLE from a Makefile.
 
936
  sed_x_variable='
 
937
# Test if the hold space is empty.
 
938
x
 
939
s/P/P/
 
940
x
 
941
ta
 
942
# Yes it was empty. Look if we have the expected variable definition.
 
943
/^[      ]*VARIABLE[     ]*=/{
 
944
  # Seen the first line of the variable definition.
 
945
  s/^[   ]*VARIABLE[     ]*=//
 
946
  ba
 
947
}
 
948
bd
 
949
:a
 
950
# Here we are processing a line from the variable definition.
 
951
# Remove comment, more precisely replace it with a space.
 
952
s/#.*$/ /
 
953
# See if the line ends in a backslash.
 
954
tb
 
955
:b
 
956
s/\\$//
 
957
# Print the line, without the trailing backslash.
 
958
p
 
959
tc
 
960
# There was no trailing backslash. The end of the variable definition is
 
961
# reached. Clear the hold space.
 
962
s/^.*$//
 
963
x
 
964
bd
 
965
:c
 
966
# A trailing backslash means that the variable definition continues in the
 
967
# next line. Put a nonempty string into the hold space to indicate this.
 
968
s/^.*$/P/
 
969
x
 
970
:d
 
971
'
 
972
changequote([,])dnl
 
973
 
 
974
  # Set POTFILES to the value of the Makefile variable POTFILES.
 
975
  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
 
976
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
 
977
  # Compute POTFILES_DEPS as
 
978
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
 
979
  POTFILES_DEPS=
 
980
  for file in $POTFILES; do
 
981
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
 
982
  done
 
983
  POMAKEFILEDEPS=""
 
984
 
 
985
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
 
986
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
987
  fi
 
988
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
989
    # The LINGUAS file contains the set of available languages.
 
990
    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
991
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
 
992
  else
 
993
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
 
994
    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
 
995
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
 
996
  fi
 
997
  # Hide the ALL_LINGUAS assigment from automake.
 
998
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
999
  # Compute POFILES
 
1000
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
 
1001
  # Compute UPDATEPOFILES
 
1002
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
 
1003
  # Compute DUMMYPOFILES
 
1004
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
 
1005
  # Compute GMOFILES
 
1006
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
 
1007
  # Compute PROPERTIESFILES
 
1008
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
 
1009
  # Compute CLASSFILES
 
1010
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
 
1011
  # Compute QMFILES
 
1012
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
 
1013
  # Compute MSGFILES
 
1014
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
 
1015
  # Compute RESOURCESDLLFILES
 
1016
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
 
1017
  case "$ac_given_srcdir" in
 
1018
    .) srcdirpre= ;;
 
1019
    *) srcdirpre='$(srcdir)/' ;;
 
1020
  esac
 
1021
  POFILES=
 
1022
  UPDATEPOFILES=
 
1023
  DUMMYPOFILES=
 
1024
  GMOFILES=
 
1025
  PROPERTIESFILES=
 
1026
  CLASSFILES=
 
1027
  QMFILES=
 
1028
  MSGFILES=
 
1029
  RESOURCESDLLFILES=
 
1030
  for lang in $ALL_LINGUAS; do
 
1031
    POFILES="$POFILES $srcdirpre$lang.po"
 
1032
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
1033
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
1034
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
1035
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
 
1036
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
 
1037
    QMFILES="$QMFILES $srcdirpre$lang.qm"
 
1038
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
1039
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
 
1040
    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
1041
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
 
1042
  done
 
1043
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
1044
  # environment variable.
 
1045
  INST_LINGUAS=
 
1046
  if test -n "$ALL_LINGUAS"; then
 
1047
    for presentlang in $ALL_LINGUAS; do
 
1048
      useit=no
 
1049
      if test "%UNSET%" != "$LINGUAS"; then
 
1050
        desiredlanguages="$LINGUAS"
 
1051
      else
 
1052
        desiredlanguages="$ALL_LINGUAS"
 
1053
      fi
 
1054
      for desiredlang in $desiredlanguages; do
 
1055
        # Use the presentlang catalog if desiredlang is
 
1056
        #   a. equal to presentlang, or
 
1057
        #   b. a variant of presentlang (because in this case,
 
1058
        #      presentlang can be used as a fallback for messages
 
1059
        #      which are not translated in the desiredlang catalog).
 
1060
        case "$desiredlang" in
 
1061
          "$presentlang"*) useit=yes;;
 
1062
        esac
 
1063
      done
 
1064
      if test $useit = yes; then
 
1065
        INST_LINGUAS="$INST_LINGUAS $presentlang"
 
1066
      fi
 
1067
    done
 
1068
  fi
 
1069
  CATALOGS=
 
1070
  JAVACATALOGS=
 
1071
  QTCATALOGS=
 
1072
  TCLCATALOGS=
 
1073
  CSHARPCATALOGS=
 
1074
  if test -n "$INST_LINGUAS"; then
 
1075
    for lang in $INST_LINGUAS; do
 
1076
      CATALOGS="$CATALOGS $lang.gmo"
 
1077
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
 
1078
      QTCATALOGS="$QTCATALOGS $lang.qm"
 
1079
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
1080
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
 
1081
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
1082
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
 
1083
    done
 
1084
  fi
 
1085
 
 
1086
  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"
 
1087
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
 
1088
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
1089
    for lang in $ALL_LINGUAS; do
 
1090
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
 
1091
      cat >> "$ac_file.tmp" <<EOF
 
1092
$frobbedlang.msg: $lang.po
 
1093
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
 
1094
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
1095
EOF
 
1096
    done
 
1097
  fi
 
1098
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
 
1099
    # Add dependencies that cannot be formulated as a simple suffix rule.
 
1100
    for lang in $ALL_LINGUAS; do
 
1101
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
 
1102
      cat >> "$ac_file.tmp" <<EOF
 
1103
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
 
1104
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
 
1105
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
 
1106
EOF
 
1107
    done
 
1108
  fi
 
1109
  if test -n "$POMAKEFILEDEPS"; then
 
1110
    cat >> "$ac_file.tmp" <<EOF
 
1111
Makefile: $POMAKEFILEDEPS
 
1112
EOF
 
1113
  fi
 
1114
  mv "$ac_file.tmp" "$ac_file"
 
1115
])
 
1116
 
 
1117
# nls.m4 serial 1 (gettext-0.12)
 
1118
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
 
1119
dnl This file is free software, distributed under the terms of the GNU
 
1120
dnl General Public License.  As a special exception to the GNU General
 
1121
dnl Public License, this file may be distributed as part of a program
 
1122
dnl that contains a configuration script generated by Autoconf, under
 
1123
dnl the same distribution terms as the rest of that program.
 
1124
dnl
 
1125
dnl This file can can be used in projects which are not available under
 
1126
dnl the GNU General Public License or the GNU Library General Public
 
1127
dnl License but which still want to provide support for the GNU gettext
 
1128
dnl functionality.
 
1129
dnl Please note that the actual code of the GNU gettext library is covered
 
1130
dnl by the GNU Library General Public License, and the rest of the GNU
 
1131
dnl gettext package package is covered by the GNU General Public License.
 
1132
dnl They are *not* in the public domain.
 
1133
 
 
1134
dnl Authors:
 
1135
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
1136
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
1137
 
 
1138
AC_DEFUN([AM_NLS],
 
1139
[
 
1140
  AC_MSG_CHECKING([whether NLS is requested])
 
1141
  dnl Default is enabled NLS
 
1142
  AC_ARG_ENABLE(nls,
 
1143
    [  --disable-nls           do not use Native Language Support],
 
1144
    USE_NLS=$enableval, USE_NLS=yes)
 
1145
  AC_MSG_RESULT($USE_NLS)
 
1146
  AC_SUBST(USE_NLS)
 
1147
])
 
1148
 
 
1149
AC_DEFUN([AM_MKINSTALLDIRS],
 
1150
[
 
1151
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
1152
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
 
1153
  dnl Try to locate it.
 
1154
  MKINSTALLDIRS=
 
1155
  if test -n "$ac_aux_dir"; then
 
1156
    case "$ac_aux_dir" in
 
1157
      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
 
1158
      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
 
1159
    esac
 
1160
  fi
 
1161
  if test -z "$MKINSTALLDIRS"; then
 
1162
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
1163
  fi
 
1164
  AC_SUBST(MKINSTALLDIRS)
 
1165
])
 
1166
 
 
1167
# progtest.m4 serial 3 (gettext-0.12)
 
1168
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 
1169
dnl This file is free software, distributed under the terms of the GNU
 
1170
dnl General Public License.  As a special exception to the GNU General
 
1171
dnl Public License, this file may be distributed as part of a program
 
1172
dnl that contains a configuration script generated by Autoconf, under
 
1173
dnl the same distribution terms as the rest of that program.
 
1174
dnl
 
1175
dnl This file can can be used in projects which are not available under
 
1176
dnl the GNU General Public License or the GNU Library General Public
 
1177
dnl License but which still want to provide support for the GNU gettext
 
1178
dnl functionality.
 
1179
dnl Please note that the actual code of the GNU gettext library is covered
 
1180
dnl by the GNU Library General Public License, and the rest of the GNU
 
1181
dnl gettext package package is covered by the GNU General Public License.
 
1182
dnl They are *not* in the public domain.
 
1183
 
 
1184
dnl Authors:
 
1185
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
 
1186
 
 
1187
# Search path for a program which passes the given test.
 
1188
 
 
1189
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
1190
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
1191
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
 
1192
[
 
1193
# Prepare PATH_SEPARATOR.
 
1194
# The user is always right.
 
1195
if test "${PATH_SEPARATOR+set}" != set; then
 
1196
  echo "#! /bin/sh" >conf$$.sh
 
1197
  echo  "exit 0"   >>conf$$.sh
 
1198
  chmod +x conf$$.sh
 
1199
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
1200
    PATH_SEPARATOR=';'
 
1201
  else
 
1202
    PATH_SEPARATOR=:
 
1203
  fi
 
1204
  rm -f conf$$.sh
 
1205
fi
 
1206
 
 
1207
# Find out how to test for executable files. Don't use a zero-byte file,
 
1208
# as systems may use methods other than mode bits to determine executability.
 
1209
cat >conf$$.file <<_ASEOF
 
1210
#! /bin/sh
 
1211
exit 0
 
1212
_ASEOF
 
1213
chmod +x conf$$.file
 
1214
if test -x conf$$.file >/dev/null 2>&1; then
 
1215
  ac_executable_p="test -x"
 
1216
else
 
1217
  ac_executable_p="test -f"
 
1218
fi
 
1219
rm -f conf$$.file
 
1220
 
 
1221
# Extract the first word of "$2", so it can be a program name with args.
 
1222
set dummy $2; ac_word=[$]2
 
1223
AC_MSG_CHECKING([for $ac_word])
 
1224
AC_CACHE_VAL(ac_cv_path_$1,
 
1225
[case "[$]$1" in
 
1226
  [[\\/]]* | ?:[[\\/]]*)
 
1227
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
1228
    ;;
 
1229
  *)
 
1230
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
 
1231
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
1232
      IFS="$ac_save_IFS"
 
1233
      test -z "$ac_dir" && ac_dir=.
 
1234
      for ac_exec_ext in '' $ac_executable_extensions; do
 
1235
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
 
1236
          if [$3]; then
 
1237
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
 
1238
            break 2
 
1239
          fi
 
1240
        fi
 
1241
      done
 
1242
    done
 
1243
    IFS="$ac_save_IFS"
 
1244
dnl If no 4th arg is given, leave the cache variable unset,
 
1245
dnl so AC_PATH_PROGS will keep looking.
 
1246
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
1247
])dnl
 
1248
    ;;
 
1249
esac])dnl
 
1250
$1="$ac_cv_path_$1"
 
1251
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
1252
  AC_MSG_RESULT([$]$1)
 
1253
else
 
1254
  AC_MSG_RESULT(no)
 
1255
fi
 
1256
AC_SUBST($1)dnl
 
1257
])
 
1258
 
 
1259
# lib-prefix.m4 serial 3 (gettext-0.13)
 
1260
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
1261
dnl This file is free software, distributed under the terms of the GNU
 
1262
dnl General Public License.  As a special exception to the GNU General
 
1263
dnl Public License, this file may be distributed as part of a program
 
1264
dnl that contains a configuration script generated by Autoconf, under
 
1265
dnl the same distribution terms as the rest of that program.
 
1266
 
 
1267
dnl From Bruno Haible.
 
1268
 
 
1269
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
 
1270
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
 
1271
dnl require excessive bracketing.
 
1272
ifdef([AC_HELP_STRING],
 
1273
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
 
1274
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
 
1275
 
 
1276
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
1277
dnl to access previously installed libraries. The basic assumption is that
 
1278
dnl a user will want packages to use other packages he previously installed
 
1279
dnl with the same --prefix option.
 
1280
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
1281
dnl libraries, but is otherwise very convenient.
 
1282
AC_DEFUN([AC_LIB_PREFIX],
 
1283
[
 
1284
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
1285
  AC_REQUIRE([AC_PROG_CC])
 
1286
  AC_REQUIRE([AC_CANONICAL_HOST])
 
1287
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1288
  dnl By default, look in $includedir and $libdir.
 
1289
  use_additional=yes
 
1290
  AC_LIB_WITH_FINAL_PREFIX([
 
1291
    eval additional_includedir=\"$includedir\"
 
1292
    eval additional_libdir=\"$libdir\"
 
1293
  ])
 
1294
  AC_LIB_ARG_WITH([lib-prefix],
 
1295
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
1296
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
1297
[
 
1298
    if test "X$withval" = "Xno"; then
 
1299
      use_additional=no
 
1300
    else
 
1301
      if test "X$withval" = "X"; then
 
1302
        AC_LIB_WITH_FINAL_PREFIX([
 
1303
          eval additional_includedir=\"$includedir\"
 
1304
          eval additional_libdir=\"$libdir\"
 
1305
        ])
 
1306
      else
 
1307
        additional_includedir="$withval/include"
 
1308
        additional_libdir="$withval/lib"
 
1309
      fi
 
1310
    fi
 
1311
])
 
1312
  if test $use_additional = yes; then
 
1313
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
1314
    dnl But don't add it
 
1315
    dnl   1. if it's the standard /usr/include,
 
1316
    dnl   2. if it's already present in $CPPFLAGS,
 
1317
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
1318
    dnl   4. if it doesn't exist as a directory.
 
1319
    if test "X$additional_includedir" != "X/usr/include"; then
 
1320
      haveit=
 
1321
      for x in $CPPFLAGS; do
 
1322
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1323
        if test "X$x" = "X-I$additional_includedir"; then
 
1324
          haveit=yes
 
1325
          break
 
1326
        fi
 
1327
      done
 
1328
      if test -z "$haveit"; then
 
1329
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
1330
          if test -n "$GCC"; then
 
1331
            case $host_os in
 
1332
              linux*) haveit=yes;;
 
1333
            esac
 
1334
          fi
 
1335
        fi
 
1336
        if test -z "$haveit"; then
 
1337
          if test -d "$additional_includedir"; then
 
1338
            dnl Really add $additional_includedir to $CPPFLAGS.
 
1339
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
1340
          fi
 
1341
        fi
 
1342
      fi
 
1343
    fi
 
1344
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
1345
    dnl But don't add it
 
1346
    dnl   1. if it's the standard /usr/lib,
 
1347
    dnl   2. if it's already present in $LDFLAGS,
 
1348
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
1349
    dnl   4. if it doesn't exist as a directory.
 
1350
    if test "X$additional_libdir" != "X/usr/lib"; then
 
1351
      haveit=
 
1352
      for x in $LDFLAGS; do
 
1353
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1354
        if test "X$x" = "X-L$additional_libdir"; then
 
1355
          haveit=yes
 
1356
          break
 
1357
        fi
 
1358
      done
 
1359
      if test -z "$haveit"; then
 
1360
        if test "X$additional_libdir" = "X/usr/local/lib"; then
 
1361
          if test -n "$GCC"; then
 
1362
            case $host_os in
 
1363
              linux*) haveit=yes;;
 
1364
            esac
 
1365
          fi
 
1366
        fi
 
1367
        if test -z "$haveit"; then
 
1368
          if test -d "$additional_libdir"; then
 
1369
            dnl Really add $additional_libdir to $LDFLAGS.
 
1370
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
1371
          fi
 
1372
        fi
 
1373
      fi
 
1374
    fi
 
1375
  fi
 
1376
])
 
1377
 
 
1378
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
1379
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
1380
dnl $exec_prefix will expand at the end of the configure script.
 
1381
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
1382
[
 
1383
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
1384
  dnl at the end of configure.
 
1385
  if test "X$prefix" = "XNONE"; then
 
1386
    acl_final_prefix="$ac_default_prefix"
 
1387
  else
 
1388
    acl_final_prefix="$prefix"
 
1389
  fi
 
1390
  if test "X$exec_prefix" = "XNONE"; then
 
1391
    acl_final_exec_prefix='${prefix}'
 
1392
  else
 
1393
    acl_final_exec_prefix="$exec_prefix"
 
1394
  fi
 
1395
  acl_save_prefix="$prefix"
 
1396
  prefix="$acl_final_prefix"
 
1397
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
1398
  prefix="$acl_save_prefix"
 
1399
])
 
1400
 
 
1401
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
1402
dnl variables prefix and exec_prefix bound to the values they will have
 
1403
dnl at the end of the configure script.
 
1404
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
1405
[
 
1406
  acl_save_prefix="$prefix"
 
1407
  prefix="$acl_final_prefix"
 
1408
  acl_save_exec_prefix="$exec_prefix"
 
1409
  exec_prefix="$acl_final_exec_prefix"
 
1410
  $1
 
1411
  exec_prefix="$acl_save_exec_prefix"
 
1412
  prefix="$acl_save_prefix"
 
1413
])
 
1414
 
 
1415
# lib-link.m4 serial 4 (gettext-0.12)
 
1416
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
 
1417
dnl This file is free software, distributed under the terms of the GNU
 
1418
dnl General Public License.  As a special exception to the GNU General
 
1419
dnl Public License, this file may be distributed as part of a program
 
1420
dnl that contains a configuration script generated by Autoconf, under
 
1421
dnl the same distribution terms as the rest of that program.
 
1422
 
 
1423
dnl From Bruno Haible.
 
1424
 
 
1425
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
1426
dnl the libraries corresponding to explicit and implicit dependencies.
 
1427
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
1428
dnl augments the CPPFLAGS variable.
 
1429
AC_DEFUN([AC_LIB_LINKFLAGS],
 
1430
[
 
1431
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1432
  AC_REQUIRE([AC_LIB_RPATH])
 
1433
  define([Name],[translit([$1],[./-], [___])])
 
1434
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1435
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1436
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
1437
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1438
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
1439
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
1440
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
1441
  ])
 
1442
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
1443
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
1444
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
1445
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1446
  AC_SUBST([LIB]NAME)
 
1447
  AC_SUBST([LTLIB]NAME)
 
1448
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
1449
  dnl results of this search when this library appears as a dependency.
 
1450
  HAVE_LIB[]NAME=yes
 
1451
  undefine([Name])
 
1452
  undefine([NAME])
 
1453
])
 
1454
 
 
1455
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
 
1456
dnl searches for libname and the libraries corresponding to explicit and
 
1457
dnl implicit dependencies, together with the specified include files and
 
1458
dnl the ability to compile and link the specified testcode. If found, it
 
1459
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 
1460
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
1461
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
1462
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
1463
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
1464
[
 
1465
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1466
  AC_REQUIRE([AC_LIB_RPATH])
 
1467
  define([Name],[translit([$1],[./-], [___])])
 
1468
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1469
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1470
 
 
1471
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
1472
  dnl accordingly.
 
1473
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1474
 
 
1475
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
1476
  dnl because if the user has installed lib[]Name and not disabled its use
 
1477
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
1478
  ac_save_CPPFLAGS="$CPPFLAGS"
 
1479
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1480
 
 
1481
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
1482
    ac_save_LIBS="$LIBS"
 
1483
    LIBS="$LIBS $LIB[]NAME"
 
1484
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
 
1485
    LIBS="$ac_save_LIBS"
 
1486
  ])
 
1487
  if test "$ac_cv_lib[]Name" = yes; then
 
1488
    HAVE_LIB[]NAME=yes
 
1489
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
 
1490
    AC_MSG_CHECKING([how to link with lib[]$1])
 
1491
    AC_MSG_RESULT([$LIB[]NAME])
 
1492
  else
 
1493
    HAVE_LIB[]NAME=no
 
1494
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
1495
    dnl $INC[]NAME either.
 
1496
    CPPFLAGS="$ac_save_CPPFLAGS"
 
1497
    LIB[]NAME=
 
1498
    LTLIB[]NAME=
 
1499
  fi
 
1500
  AC_SUBST([HAVE_LIB]NAME)
 
1501
  AC_SUBST([LIB]NAME)
 
1502
  AC_SUBST([LTLIB]NAME)
 
1503
  undefine([Name])
 
1504
  undefine([NAME])
 
1505
])
 
1506
 
 
1507
dnl Determine the platform dependent parameters needed to use rpath:
 
1508
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
 
1509
dnl hardcode_direct, hardcode_minus_L.
 
1510
AC_DEFUN([AC_LIB_RPATH],
 
1511
[
 
1512
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
1513
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
1514
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
1515
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
1516
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
 
1517
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
1518
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
1519
    . ./conftest.sh
 
1520
    rm -f ./conftest.sh
 
1521
    acl_cv_rpath=done
 
1522
  ])
 
1523
  wl="$acl_cv_wl"
 
1524
  libext="$acl_cv_libext"
 
1525
  shlibext="$acl_cv_shlibext"
 
1526
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
1527
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
1528
  hardcode_direct="$acl_cv_hardcode_direct"
 
1529
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
1530
  dnl Determine whether the user wants rpath handling at all.
 
1531
  AC_ARG_ENABLE(rpath,
 
1532
    [  --disable-rpath         do not hardcode runtime library paths],
 
1533
    :, enable_rpath=yes)
 
1534
])
 
1535
 
 
1536
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
1537
dnl the libraries corresponding to explicit and implicit dependencies.
 
1538
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
1539
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
1540
[
 
1541
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1542
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1543
  dnl By default, look in $includedir and $libdir.
 
1544
  use_additional=yes
 
1545
  AC_LIB_WITH_FINAL_PREFIX([
 
1546
    eval additional_includedir=\"$includedir\"
 
1547
    eval additional_libdir=\"$libdir\"
 
1548
  ])
 
1549
  AC_LIB_ARG_WITH([lib$1-prefix],
 
1550
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
 
1551
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
 
1552
[
 
1553
    if test "X$withval" = "Xno"; then
 
1554
      use_additional=no
 
1555
    else
 
1556
      if test "X$withval" = "X"; then
 
1557
        AC_LIB_WITH_FINAL_PREFIX([
 
1558
          eval additional_includedir=\"$includedir\"
 
1559
          eval additional_libdir=\"$libdir\"
 
1560
        ])
 
1561
      else
 
1562
        additional_includedir="$withval/include"
 
1563
        additional_libdir="$withval/lib"
 
1564
      fi
 
1565
    fi
 
1566
])
 
1567
  dnl Search the library and its dependencies in $additional_libdir and
 
1568
  dnl $LDFLAGS. Using breadth-first-seach.
 
1569
  LIB[]NAME=
 
1570
  LTLIB[]NAME=
 
1571
  INC[]NAME=
 
1572
  rpathdirs=
 
1573
  ltrpathdirs=
 
1574
  names_already_handled=
 
1575
  names_next_round='$1 $2'
 
1576
  while test -n "$names_next_round"; do
 
1577
    names_this_round="$names_next_round"
 
1578
    names_next_round=
 
1579
    for name in $names_this_round; do
 
1580
      already_handled=
 
1581
      for n in $names_already_handled; do
 
1582
        if test "$n" = "$name"; then
 
1583
          already_handled=yes
 
1584
          break
 
1585
        fi
 
1586
      done
 
1587
      if test -z "$already_handled"; then
 
1588
        names_already_handled="$names_already_handled $name"
 
1589
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
1590
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
1591
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
1592
        eval value=\"\$HAVE_LIB$uppername\"
 
1593
        if test -n "$value"; then
 
1594
          if test "$value" = yes; then
 
1595
            eval value=\"\$LIB$uppername\"
 
1596
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
1597
            eval value=\"\$LTLIB$uppername\"
 
1598
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
1599
          else
 
1600
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
1601
            dnl that this library doesn't exist. So just drop it.
 
1602
            :
 
1603
          fi
 
1604
        else
 
1605
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
1606
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
1607
          found_dir=
 
1608
          found_la=
 
1609
          found_so=
 
1610
          found_a=
 
1611
          if test $use_additional = yes; then
 
1612
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
 
1613
              found_dir="$additional_libdir"
 
1614
              found_so="$additional_libdir/lib$name.$shlibext"
 
1615
              if test -f "$additional_libdir/lib$name.la"; then
 
1616
                found_la="$additional_libdir/lib$name.la"
 
1617
              fi
 
1618
            else
 
1619
              if test -f "$additional_libdir/lib$name.$libext"; then
 
1620
                found_dir="$additional_libdir"
 
1621
                found_a="$additional_libdir/lib$name.$libext"
 
1622
                if test -f "$additional_libdir/lib$name.la"; then
 
1623
                  found_la="$additional_libdir/lib$name.la"
 
1624
                fi
 
1625
              fi
 
1626
            fi
 
1627
          fi
 
1628
          if test "X$found_dir" = "X"; then
 
1629
            for x in $LDFLAGS $LTLIB[]NAME; do
 
1630
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1631
              case "$x" in
 
1632
                -L*)
 
1633
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
1634
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
 
1635
                    found_dir="$dir"
 
1636
                    found_so="$dir/lib$name.$shlibext"
 
1637
                    if test -f "$dir/lib$name.la"; then
 
1638
                      found_la="$dir/lib$name.la"
 
1639
                    fi
 
1640
                  else
 
1641
                    if test -f "$dir/lib$name.$libext"; then
 
1642
                      found_dir="$dir"
 
1643
                      found_a="$dir/lib$name.$libext"
 
1644
                      if test -f "$dir/lib$name.la"; then
 
1645
                        found_la="$dir/lib$name.la"
 
1646
                      fi
 
1647
                    fi
 
1648
                  fi
 
1649
                  ;;
 
1650
              esac
 
1651
              if test "X$found_dir" != "X"; then
 
1652
                break
 
1653
              fi
 
1654
            done
 
1655
          fi
 
1656
          if test "X$found_dir" != "X"; then
 
1657
            dnl Found the library.
 
1658
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
1659
            if test "X$found_so" != "X"; then
 
1660
              dnl Linking with a shared library. We attempt to hardcode its
 
1661
              dnl directory into the executable's runpath, unless it's the
 
1662
              dnl standard /usr/lib.
 
1663
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
 
1664
                dnl No hardcoding is needed.
 
1665
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1666
              else
 
1667
                dnl Use an explicit option to hardcode DIR into the resulting
 
1668
                dnl binary.
 
1669
                dnl Potentially add DIR to ltrpathdirs.
 
1670
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1671
                haveit=
 
1672
                for x in $ltrpathdirs; do
 
1673
                  if test "X$x" = "X$found_dir"; then
 
1674
                    haveit=yes
 
1675
                    break
 
1676
                  fi
 
1677
                done
 
1678
                if test -z "$haveit"; then
 
1679
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
1680
                fi
 
1681
                dnl The hardcoding into $LIBNAME is system dependent.
 
1682
                if test "$hardcode_direct" = yes; then
 
1683
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
1684
                  dnl resulting binary.
 
1685
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1686
                else
 
1687
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
1688
                    dnl Use an explicit option to hardcode DIR into the resulting
 
1689
                    dnl binary.
 
1690
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1691
                    dnl Potentially add DIR to rpathdirs.
 
1692
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1693
                    haveit=
 
1694
                    for x in $rpathdirs; do
 
1695
                      if test "X$x" = "X$found_dir"; then
 
1696
                        haveit=yes
 
1697
                        break
 
1698
                      fi
 
1699
                    done
 
1700
                    if test -z "$haveit"; then
 
1701
                      rpathdirs="$rpathdirs $found_dir"
 
1702
                    fi
 
1703
                  else
 
1704
                    dnl Rely on "-L$found_dir".
 
1705
                    dnl But don't add it if it's already contained in the LDFLAGS
 
1706
                    dnl or the already constructed $LIBNAME
 
1707
                    haveit=
 
1708
                    for x in $LDFLAGS $LIB[]NAME; do
 
1709
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1710
                      if test "X$x" = "X-L$found_dir"; then
 
1711
                        haveit=yes
 
1712
                        break
 
1713
                      fi
 
1714
                    done
 
1715
                    if test -z "$haveit"; then
 
1716
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
1717
                    fi
 
1718
                    if test "$hardcode_minus_L" != no; then
 
1719
                      dnl FIXME: Not sure whether we should use
 
1720
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1721
                      dnl here.
 
1722
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1723
                    else
 
1724
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
 
1725
                      dnl here, because this doesn't fit in flags passed to the
 
1726
                      dnl compiler. So give up. No hardcoding. This affects only
 
1727
                      dnl very old systems.
 
1728
                      dnl FIXME: Not sure whether we should use
 
1729
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1730
                      dnl here.
 
1731
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
1732
                    fi
 
1733
                  fi
 
1734
                fi
 
1735
              fi
 
1736
            else
 
1737
              if test "X$found_a" != "X"; then
 
1738
                dnl Linking with a static library.
 
1739
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
1740
              else
 
1741
                dnl We shouldn't come here, but anyway it's good to have a
 
1742
                dnl fallback.
 
1743
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
1744
              fi
 
1745
            fi
 
1746
            dnl Assume the include files are nearby.
 
1747
            additional_includedir=
 
1748
            case "$found_dir" in
 
1749
              */lib | */lib/)
 
1750
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
 
1751
                additional_includedir="$basedir/include"
 
1752
                ;;
 
1753
            esac
 
1754
            if test "X$additional_includedir" != "X"; then
 
1755
              dnl Potentially add $additional_includedir to $INCNAME.
 
1756
              dnl But don't add it
 
1757
              dnl   1. if it's the standard /usr/include,
 
1758
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
1759
              dnl   3. if it's already present in $CPPFLAGS or the already
 
1760
              dnl      constructed $INCNAME,
 
1761
              dnl   4. if it doesn't exist as a directory.
 
1762
              if test "X$additional_includedir" != "X/usr/include"; then
 
1763
                haveit=
 
1764
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
1765
                  if test -n "$GCC"; then
 
1766
                    case $host_os in
 
1767
                      linux*) haveit=yes;;
 
1768
                    esac
 
1769
                  fi
 
1770
                fi
 
1771
                if test -z "$haveit"; then
 
1772
                  for x in $CPPFLAGS $INC[]NAME; do
 
1773
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1774
                    if test "X$x" = "X-I$additional_includedir"; then
 
1775
                      haveit=yes
 
1776
                      break
 
1777
                    fi
 
1778
                  done
 
1779
                  if test -z "$haveit"; then
 
1780
                    if test -d "$additional_includedir"; then
 
1781
                      dnl Really add $additional_includedir to $INCNAME.
 
1782
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
1783
                    fi
 
1784
                  fi
 
1785
                fi
 
1786
              fi
 
1787
            fi
 
1788
            dnl Look for dependencies.
 
1789
            if test -n "$found_la"; then
 
1790
              dnl Read the .la file. It defines the variables
 
1791
              dnl dlname, library_names, old_library, dependency_libs, current,
 
1792
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
1793
              save_libdir="$libdir"
 
1794
              case "$found_la" in
 
1795
                */* | *\\*) . "$found_la" ;;
 
1796
                *) . "./$found_la" ;;
 
1797
              esac
 
1798
              libdir="$save_libdir"
 
1799
              dnl We use only dependency_libs.
 
1800
              for dep in $dependency_libs; do
 
1801
                case "$dep" in
 
1802
                  -L*)
 
1803
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
1804
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
1805
                    dnl But don't add it
 
1806
                    dnl   1. if it's the standard /usr/lib,
 
1807
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
1808
                    dnl   3. if it's already present in $LDFLAGS or the already
 
1809
                    dnl      constructed $LIBNAME,
 
1810
                    dnl   4. if it doesn't exist as a directory.
 
1811
                    if test "X$additional_libdir" != "X/usr/lib"; then
 
1812
                      haveit=
 
1813
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
 
1814
                        if test -n "$GCC"; then
 
1815
                          case $host_os in
 
1816
                            linux*) haveit=yes;;
 
1817
                          esac
 
1818
                        fi
 
1819
                      fi
 
1820
                      if test -z "$haveit"; then
 
1821
                        haveit=
 
1822
                        for x in $LDFLAGS $LIB[]NAME; do
 
1823
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1824
                          if test "X$x" = "X-L$additional_libdir"; then
 
1825
                            haveit=yes
 
1826
                            break
 
1827
                          fi
 
1828
                        done
 
1829
                        if test -z "$haveit"; then
 
1830
                          if test -d "$additional_libdir"; then
 
1831
                            dnl Really add $additional_libdir to $LIBNAME.
 
1832
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
1833
                          fi
 
1834
                        fi
 
1835
                        haveit=
 
1836
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
1837
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1838
                          if test "X$x" = "X-L$additional_libdir"; then
 
1839
                            haveit=yes
 
1840
                            break
 
1841
                          fi
 
1842
                        done
 
1843
                        if test -z "$haveit"; then
 
1844
                          if test -d "$additional_libdir"; then
 
1845
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
1846
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
1847
                          fi
 
1848
                        fi
 
1849
                      fi
 
1850
                    fi
 
1851
                    ;;
 
1852
                  -R*)
 
1853
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
1854
                    if test "$enable_rpath" != no; then
 
1855
                      dnl Potentially add DIR to rpathdirs.
 
1856
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1857
                      haveit=
 
1858
                      for x in $rpathdirs; do
 
1859
                        if test "X$x" = "X$dir"; then
 
1860
                          haveit=yes
 
1861
                          break
 
1862
                        fi
 
1863
                      done
 
1864
                      if test -z "$haveit"; then
 
1865
                        rpathdirs="$rpathdirs $dir"
 
1866
                      fi
 
1867
                      dnl Potentially add DIR to ltrpathdirs.
 
1868
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1869
                      haveit=
 
1870
                      for x in $ltrpathdirs; do
 
1871
                        if test "X$x" = "X$dir"; then
 
1872
                          haveit=yes
 
1873
                          break
 
1874
                        fi
 
1875
                      done
 
1876
                      if test -z "$haveit"; then
 
1877
                        ltrpathdirs="$ltrpathdirs $dir"
 
1878
                      fi
 
1879
                    fi
 
1880
                    ;;
 
1881
                  -l*)
 
1882
                    dnl Handle this in the next round.
 
1883
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
1884
                    ;;
 
1885
                  *.la)
 
1886
                    dnl Handle this in the next round. Throw away the .la's
 
1887
                    dnl directory; it is already contained in a preceding -L
 
1888
                    dnl option.
 
1889
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
1890
                    ;;
 
1891
                  *)
 
1892
                    dnl Most likely an immediate library name.
 
1893
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
1894
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
1895
                    ;;
 
1896
                esac
 
1897
              done
 
1898
            fi
 
1899
          else
 
1900
            dnl Didn't find the library; assume it is in the system directories
 
1901
            dnl known to the linker and runtime loader. (All the system
 
1902
            dnl directories known to the linker should also be known to the
 
1903
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
1904
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
1905
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
1906
          fi
 
1907
        fi
 
1908
      fi
 
1909
    done
 
1910
  done
 
1911
  if test "X$rpathdirs" != "X"; then
 
1912
    if test -n "$hardcode_libdir_separator"; then
 
1913
      dnl Weird platform: only the last -rpath option counts, the user must
 
1914
      dnl pass all path elements in one option. We can arrange that for a
 
1915
      dnl single library, but not when more than one $LIBNAMEs are used.
 
1916
      alldirs=
 
1917
      for found_dir in $rpathdirs; do
 
1918
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
 
1919
      done
 
1920
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
 
1921
      acl_save_libdir="$libdir"
 
1922
      libdir="$alldirs"
 
1923
      eval flag=\"$hardcode_libdir_flag_spec\"
 
1924
      libdir="$acl_save_libdir"
 
1925
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
1926
    else
 
1927
      dnl The -rpath options are cumulative.
 
1928
      for found_dir in $rpathdirs; do
 
1929
        acl_save_libdir="$libdir"
 
1930
        libdir="$found_dir"
 
1931
        eval flag=\"$hardcode_libdir_flag_spec\"
 
1932
        libdir="$acl_save_libdir"
 
1933
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
1934
      done
 
1935
    fi
 
1936
  fi
 
1937
  if test "X$ltrpathdirs" != "X"; then
 
1938
    dnl When using libtool, the option that works for both libraries and
 
1939
    dnl executables is -R. The -R options are cumulative.
 
1940
    for found_dir in $ltrpathdirs; do
 
1941
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
1942
    done
 
1943
  fi
 
1944
])
 
1945
 
 
1946
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
1947
dnl unless already present in VAR.
 
1948
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
1949
dnl contains two or three consecutive elements that belong together.
 
1950
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
1951
[
 
1952
  for element in [$2]; do
 
1953
    haveit=
 
1954
    for x in $[$1]; do
 
1955
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1956
      if test "X$x" = "X$element"; then
 
1957
        haveit=yes
 
1958
        break
 
1959
      fi
 
1960
    done
 
1961
    if test -z "$haveit"; then
 
1962
      [$1]="${[$1]}${[$1]:+ }$element"
 
1963
    fi
 
1964
  done
 
1965
])
 
1966
 
 
1967
# lib-ld.m4 serial 3 (gettext-0.13)
 
1968
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
 
1969
dnl This file is free software, distributed under the terms of the GNU
 
1970
dnl General Public License.  As a special exception to the GNU General
 
1971
dnl Public License, this file may be distributed as part of a program
 
1972
dnl that contains a configuration script generated by Autoconf, under
 
1973
dnl the same distribution terms as the rest of that program.
 
1974
 
 
1975
dnl Subroutines of libtool.m4,
 
1976
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
 
1977
dnl with libtool.m4.
 
1978
 
 
1979
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 
1980
AC_DEFUN([AC_LIB_PROG_LD_GNU],
 
1981
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 
1982
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
1983
case `$LD -v 2>&1 </dev/null` in
 
1984
*GNU* | *'with BFD'*)
 
1985
  acl_cv_prog_gnu_ld=yes ;;
 
1986
*)
 
1987
  acl_cv_prog_gnu_ld=no ;;
 
1988
esac])
 
1989
with_gnu_ld=$acl_cv_prog_gnu_ld
 
1990
])
 
1991
 
 
1992
dnl From libtool-1.4. Sets the variable LD.
 
1993
AC_DEFUN([AC_LIB_PROG_LD],
 
1994
[AC_ARG_WITH(gnu-ld,
 
1995
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
1996
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
1997
AC_REQUIRE([AC_PROG_CC])dnl
 
1998
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
1999
# Prepare PATH_SEPARATOR.
 
2000
# The user is always right.
 
2001
if test "${PATH_SEPARATOR+set}" != set; then
 
2002
  echo "#! /bin/sh" >conf$$.sh
 
2003
  echo  "exit 0"   >>conf$$.sh
 
2004
  chmod +x conf$$.sh
 
2005
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
 
2006
    PATH_SEPARATOR=';'
 
2007
  else
 
2008
    PATH_SEPARATOR=:
 
2009
  fi
 
2010
  rm -f conf$$.sh
 
2011
fi
 
2012
ac_prog=ld
 
2013
if test "$GCC" = yes; then
 
2014
  # Check if gcc -print-prog-name=ld gives a path.
 
2015
  AC_MSG_CHECKING([for ld used by GCC])
 
2016
  case $host in
 
2017
  *-*-mingw*)
 
2018
    # gcc leaves a trailing carriage return which upsets mingw
 
2019
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
2020
  *)
 
2021
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
2022
  esac
 
2023
  case $ac_prog in
 
2024
    # Accept absolute paths.
 
2025
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
2026
      [re_direlt='/[^/][^/]*/\.\./']
 
2027
      # Canonicalize the path of ld
 
2028
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
2029
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
2030
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
2031
      done
 
2032
      test -z "$LD" && LD="$ac_prog"
 
2033
      ;;
 
2034
  "")
 
2035
    # If it fails, then pretend we aren't using GCC.
 
2036
    ac_prog=ld
 
2037
    ;;
 
2038
  *)
 
2039
    # If it is relative, then search for the first ld in PATH.
 
2040
    with_gnu_ld=unknown
 
2041
    ;;
 
2042
  esac
 
2043
elif test "$with_gnu_ld" = yes; then
 
2044
  AC_MSG_CHECKING([for GNU ld])
 
2045
else
 
2046
  AC_MSG_CHECKING([for non-GNU ld])
 
2047
fi
 
2048
AC_CACHE_VAL(acl_cv_path_LD,
 
2049
[if test -z "$LD"; then
 
2050
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
2051
  for ac_dir in $PATH; do
 
2052
    test -z "$ac_dir" && ac_dir=.
 
2053
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
2054
      acl_cv_path_LD="$ac_dir/$ac_prog"
 
2055
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
2056
      # but apparently some GNU ld's only accept -v.
 
2057
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
2058
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
 
2059
      *GNU* | *'with BFD'*)
 
2060
        test "$with_gnu_ld" != no && break ;;
 
2061
      *)
 
2062
        test "$with_gnu_ld" != yes && break ;;
 
2063
      esac
 
2064
    fi
 
2065
  done
 
2066
  IFS="$ac_save_ifs"
 
2067
else
 
2068
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
2069
fi])
 
2070
LD="$acl_cv_path_LD"
 
2071
if test -n "$LD"; then
 
2072
  AC_MSG_RESULT($LD)
 
2073
else
 
2074
  AC_MSG_RESULT(no)
 
2075
fi
 
2076
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
2077
AC_LIB_PROG_LD_GNU
 
2078
])
 
2079
 
 
2080
# iconv.m4 serial AM4 (gettext-0.11.3)
 
2081
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
2082
dnl This file is free software, distributed under the terms of the GNU
 
2083
dnl General Public License.  As a special exception to the GNU General
 
2084
dnl Public License, this file may be distributed as part of a program
 
2085
dnl that contains a configuration script generated by Autoconf, under
 
2086
dnl the same distribution terms as the rest of that program.
 
2087
 
 
2088
dnl From Bruno Haible.
 
2089
 
 
2090
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 
2091
[
 
2092
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
2093
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
2094
  AC_REQUIRE([AC_LIB_RPATH])
 
2095
 
 
2096
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
2097
  dnl accordingly.
 
2098
  AC_LIB_LINKFLAGS_BODY([iconv])
 
2099
])
 
2100
 
 
2101
AC_DEFUN([AM_ICONV_LINK],
 
2102
[
 
2103
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
2104
  dnl those with the standalone portable GNU libiconv installed).
 
2105
 
 
2106
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
2107
  dnl accordingly.
 
2108
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
2109
 
 
2110
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
 
2111
  dnl because if the user has installed libiconv and not disabled its use
 
2112
  dnl via --without-libiconv-prefix, he wants to use it. The first
 
2113
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
 
2114
  am_save_CPPFLAGS="$CPPFLAGS"
 
2115
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
2116
 
 
2117
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
 
2118
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
2119
    am_cv_lib_iconv=no
 
2120
    AC_TRY_LINK([#include <stdlib.h>
 
2121
#include <iconv.h>],
 
2122
      [iconv_t cd = iconv_open("","");
 
2123
       iconv(cd,NULL,NULL,NULL,NULL);
 
2124
       iconv_close(cd);],
 
2125
      am_cv_func_iconv=yes)
 
2126
    if test "$am_cv_func_iconv" != yes; then
 
2127
      am_save_LIBS="$LIBS"
 
2128
      LIBS="$LIBS $LIBICONV"
 
2129
      AC_TRY_LINK([#include <stdlib.h>
 
2130
#include <iconv.h>],
 
2131
        [iconv_t cd = iconv_open("","");
 
2132
         iconv(cd,NULL,NULL,NULL,NULL);
 
2133
         iconv_close(cd);],
 
2134
        am_cv_lib_iconv=yes
 
2135
        am_cv_func_iconv=yes)
 
2136
      LIBS="$am_save_LIBS"
 
2137
    fi
 
2138
  ])
 
2139
  if test "$am_cv_func_iconv" = yes; then
 
2140
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
 
2141
  fi
 
2142
  if test "$am_cv_lib_iconv" = yes; then
 
2143
    AC_MSG_CHECKING([how to link with libiconv])
 
2144
    AC_MSG_RESULT([$LIBICONV])
 
2145
  else
 
2146
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
 
2147
    dnl either.
 
2148
    CPPFLAGS="$am_save_CPPFLAGS"
 
2149
    LIBICONV=
 
2150
    LTLIBICONV=
 
2151
  fi
 
2152
  AC_SUBST(LIBICONV)
 
2153
  AC_SUBST(LTLIBICONV)
 
2154
])
 
2155
 
 
2156
AC_DEFUN([AM_ICONV],
 
2157
[
 
2158
  AM_ICONV_LINK
 
2159
  if test "$am_cv_func_iconv" = yes; then
 
2160
    AC_MSG_CHECKING([for iconv declaration])
 
2161
    AC_CACHE_VAL(am_cv_proto_iconv, [
 
2162
      AC_TRY_COMPILE([
 
2163
#include <stdlib.h>
 
2164
#include <iconv.h>
 
2165
extern
 
2166
#ifdef __cplusplus
 
2167
"C"
 
2168
#endif
 
2169
#if defined(__STDC__) || defined(__cplusplus)
 
2170
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
2171
#else
 
2172
size_t iconv();
 
2173
#endif
 
2174
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
 
2175
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
 
2176
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
2177
    AC_MSG_RESULT([$]{ac_t:-
 
2178
         }[$]am_cv_proto_iconv)
 
2179
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
 
2180
      [Define as const if the declaration of iconv() needs const.])
 
2181
  fi
 
2182
])
 
2183
 
 
2184
# signed.m4 serial 1 (gettext-0.10.40)
 
2185
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
2186
dnl This file is free software, distributed under the terms of the GNU
 
2187
dnl General Public License.  As a special exception to the GNU General
 
2188
dnl Public License, this file may be distributed as part of a program
 
2189
dnl that contains a configuration script generated by Autoconf, under
 
2190
dnl the same distribution terms as the rest of that program.
 
2191
 
 
2192
dnl From Bruno Haible.
 
2193
 
 
2194
AC_DEFUN([bh_C_SIGNED],
 
2195
[
 
2196
  AC_CACHE_CHECK([for signed], bh_cv_c_signed,
 
2197
   [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
 
2198
  if test $bh_cv_c_signed = no; then
 
2199
    AC_DEFINE(signed, ,
 
2200
              [Define to empty if the C compiler doesn't support this keyword.])
 
2201
  fi
 
2202
])
 
2203
 
 
2204
# longlong.m4 serial 4
 
2205
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
 
2206
dnl This file is free software, distributed under the terms of the GNU
 
2207
dnl General Public License.  As a special exception to the GNU General
 
2208
dnl Public License, this file may be distributed as part of a program
 
2209
dnl that contains a configuration script generated by Autoconf, under
 
2210
dnl the same distribution terms as the rest of that program.
 
2211
 
 
2212
dnl From Paul Eggert.
 
2213
 
 
2214
# Define HAVE_LONG_LONG if 'long long' works.
 
2215
 
 
2216
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
 
2217
[
 
2218
  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
 
2219
  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
 
2220
    [long long llmax = (long long) -1;
 
2221
     return ll << i | ll >> i | llmax / ll | llmax % ll;],
 
2222
    ac_cv_type_long_long=yes,
 
2223
    ac_cv_type_long_long=no)])
 
2224
  if test $ac_cv_type_long_long = yes; then
 
2225
    AC_DEFINE(HAVE_LONG_LONG, 1,
 
2226
      [Define if you have the 'long long' type.])
 
2227
  fi
 
2228
])
 
2229
 
 
2230
# longdouble.m4 serial 1 (gettext-0.12)
 
2231
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
2232
dnl This file is free software, distributed under the terms of the GNU
 
2233
dnl General Public License.  As a special exception to the GNU General
 
2234
dnl Public License, this file may be distributed as part of a program
 
2235
dnl that contains a configuration script generated by Autoconf, under
 
2236
dnl the same distribution terms as the rest of that program.
 
2237
 
 
2238
dnl From Bruno Haible.
 
2239
dnl Test whether the compiler supports the 'long double' type.
 
2240
dnl Prerequisite: AC_PROG_CC
 
2241
 
 
2242
AC_DEFUN([gt_TYPE_LONGDOUBLE],
 
2243
[
 
2244
  AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
 
2245
    [if test "$GCC" = yes; then
 
2246
       gt_cv_c_long_double=yes
 
2247
     else
 
2248
       AC_TRY_COMPILE([
 
2249
         /* The Stardent Vistra knows sizeof(long double), but does not support it.  */
 
2250
         long double foo = 0.0;
 
2251
         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
 
2252
         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
 
2253
         ], ,
 
2254
         gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
 
2255
     fi])
 
2256
  if test $gt_cv_c_long_double = yes; then
 
2257
    AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
 
2258
  fi
 
2259
])
 
2260
 
 
2261
# wchar_t.m4 serial 1 (gettext-0.12)
 
2262
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
2263
dnl This file is free software, distributed under the terms of the GNU
 
2264
dnl General Public License.  As a special exception to the GNU General
 
2265
dnl Public License, this file may be distributed as part of a program
 
2266
dnl that contains a configuration script generated by Autoconf, under
 
2267
dnl the same distribution terms as the rest of that program.
 
2268
 
 
2269
dnl From Bruno Haible.
 
2270
dnl Test whether <stddef.h> has the 'wchar_t' type.
 
2271
dnl Prerequisite: AC_PROG_CC
 
2272
 
 
2273
AC_DEFUN([gt_TYPE_WCHAR_T],
 
2274
[
 
2275
  AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
 
2276
    [AC_TRY_COMPILE([#include <stddef.h>
 
2277
       wchar_t foo = (wchar_t)'\0';], ,
 
2278
       gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
 
2279
  if test $gt_cv_c_wchar_t = yes; then
 
2280
    AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
 
2281
  fi
 
2282
])
 
2283
 
 
2284
# wint_t.m4 serial 1 (gettext-0.12)
 
2285
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2286
dnl This file is free software, distributed under the terms of the GNU
 
2287
dnl General Public License.  As a special exception to the GNU General
 
2288
dnl Public License, this file may be distributed as part of a program
 
2289
dnl that contains a configuration script generated by Autoconf, under
 
2290
dnl the same distribution terms as the rest of that program.
 
2291
 
 
2292
dnl From Bruno Haible.
 
2293
dnl Test whether <wchar.h> has the 'wint_t' type.
 
2294
dnl Prerequisite: AC_PROG_CC
 
2295
 
 
2296
AC_DEFUN([gt_TYPE_WINT_T],
 
2297
[
 
2298
  AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
 
2299
    [AC_TRY_COMPILE([#include <wchar.h>
 
2300
       wint_t foo = (wchar_t)'\0';], ,
 
2301
       gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
 
2302
  if test $gt_cv_c_wint_t = yes; then
 
2303
    AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
 
2304
  fi
 
2305
])
 
2306
 
 
2307
# inttypes_h.m4 serial 5 (gettext-0.12)
 
2308
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
 
2309
dnl This file is free software, distributed under the terms of the GNU
 
2310
dnl General Public License.  As a special exception to the GNU General
 
2311
dnl Public License, this file may be distributed as part of a program
 
2312
dnl that contains a configuration script generated by Autoconf, under
 
2313
dnl the same distribution terms as the rest of that program.
 
2314
 
 
2315
dnl From Paul Eggert.
 
2316
 
 
2317
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
 
2318
# doesn't clash with <sys/types.h>, and declares uintmax_t.
 
2319
 
 
2320
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
 
2321
[
 
2322
  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
 
2323
  [AC_TRY_COMPILE(
 
2324
    [#include <sys/types.h>
 
2325
#include <inttypes.h>],
 
2326
    [uintmax_t i = (uintmax_t) -1;],
 
2327
    jm_ac_cv_header_inttypes_h=yes,
 
2328
    jm_ac_cv_header_inttypes_h=no)])
 
2329
  if test $jm_ac_cv_header_inttypes_h = yes; then
 
2330
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
 
2331
      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
 
2332
       and declares uintmax_t. ])
 
2333
  fi
 
2334
])
 
2335
 
 
2336
# stdint_h.m4 serial 3 (gettext-0.12)
 
2337
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
 
2338
dnl This file is free software, distributed under the terms of the GNU
 
2339
dnl General Public License.  As a special exception to the GNU General
 
2340
dnl Public License, this file may be distributed as part of a program
 
2341
dnl that contains a configuration script generated by Autoconf, under
 
2342
dnl the same distribution terms as the rest of that program.
 
2343
 
 
2344
dnl From Paul Eggert.
 
2345
 
 
2346
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
 
2347
# doesn't clash with <sys/types.h>, and declares uintmax_t.
 
2348
 
 
2349
AC_DEFUN([jm_AC_HEADER_STDINT_H],
 
2350
[
 
2351
  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
 
2352
  [AC_TRY_COMPILE(
 
2353
    [#include <sys/types.h>
 
2354
#include <stdint.h>],
 
2355
    [uintmax_t i = (uintmax_t) -1;],
 
2356
    jm_ac_cv_header_stdint_h=yes,
 
2357
    jm_ac_cv_header_stdint_h=no)])
 
2358
  if test $jm_ac_cv_header_stdint_h = yes; then
 
2359
    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
 
2360
      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
 
2361
       and declares uintmax_t. ])
 
2362
  fi
 
2363
])
 
2364
 
 
2365
# intmax.m4 serial 1 (gettext-0.12)
 
2366
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
 
2367
dnl This file is free software, distributed under the terms of the GNU
 
2368
dnl General Public License.  As a special exception to the GNU General
 
2369
dnl Public License, this file may be distributed as part of a program
 
2370
dnl that contains a configuration script generated by Autoconf, under
 
2371
dnl the same distribution terms as the rest of that program.
 
2372
 
 
2373
dnl From Bruno Haible.
 
2374
dnl Test whether the system has the 'intmax_t' type, but don't attempt to
 
2375
dnl find a replacement if it is lacking.
 
2376
 
 
2377
AC_DEFUN([gt_TYPE_INTMAX_T],
 
2378
[
 
2379
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
2380
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
2381
  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
 
2382
    [AC_TRY_COMPILE([
 
2383
#include <stddef.h> 
 
2384
#include <stdlib.h>
 
2385
#if HAVE_STDINT_H_WITH_UINTMAX
 
2386
#include <stdint.h>
 
2387
#endif
 
2388
#if HAVE_INTTYPES_H_WITH_UINTMAX
 
2389
#include <inttypes.h>
 
2390
#endif
 
2391
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
 
2392
  if test $gt_cv_c_intmax_t = yes; then
 
2393
    AC_DEFINE(HAVE_INTMAX_T, 1,
 
2394
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
 
2395
  fi
 
2396
])
 
2397
 
 
2398
# printf-posix.m4 serial 2 (gettext-0.13.1)
 
2399
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2400
dnl This file is free software, distributed under the terms of the GNU
 
2401
dnl General Public License.  As a special exception to the GNU General
 
2402
dnl Public License, this file may be distributed as part of a program
 
2403
dnl that contains a configuration script generated by Autoconf, under
 
2404
dnl the same distribution terms as the rest of that program.
 
2405
 
 
2406
dnl From Bruno Haible.
 
2407
dnl Test whether the printf() function supports POSIX/XSI format strings with
 
2408
dnl positions.
 
2409
 
 
2410
AC_DEFUN([gt_PRINTF_POSIX],
 
2411
[
 
2412
  AC_REQUIRE([AC_PROG_CC])
 
2413
  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
 
2414
    gt_cv_func_printf_posix,
 
2415
    [
 
2416
      AC_TRY_RUN([
 
2417
#include <stdio.h>
 
2418
#include <string.h>
 
2419
/* The string "%2$d %1$d", with dollar characters protected from the shell's
 
2420
   dollar expansion (possibly an autoconf bug).  */
 
2421
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
 
2422
static char buf[100];
 
2423
int main ()
 
2424
{
 
2425
  sprintf (buf, format, 33, 55);
 
2426
  return (strcmp (buf, "55 33") != 0);
 
2427
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
 
2428
      [
 
2429
        AC_EGREP_CPP(notposix, [
 
2430
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
 
2431
  notposix
 
2432
#endif
 
2433
        ], gt_cv_func_printf_posix="guessing no",
 
2434
           gt_cv_func_printf_posix="guessing yes")
 
2435
      ])
 
2436
    ])
 
2437
  case $gt_cv_func_printf_posix in
 
2438
    *yes)
 
2439
      AC_DEFINE(HAVE_POSIX_PRINTF, 1,
 
2440
        [Define if your printf() function supports format strings with positions.])
 
2441
      ;;
 
2442
  esac
 
2443
])
 
2444
 
 
2445
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
 
2446
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
2447
dnl This file is free software, distributed under the terms of the GNU
 
2448
dnl General Public License.  As a special exception to the GNU General
 
2449
dnl Public License, this file may be distributed as part of a program
 
2450
dnl that contains a configuration script generated by Autoconf, under
 
2451
dnl the same distribution terms as the rest of that program.
 
2452
 
 
2453
# Test for the GNU C Library, version 2.1 or newer.
 
2454
# From Bruno Haible.
 
2455
 
 
2456
AC_DEFUN([jm_GLIBC21],
 
2457
  [
 
2458
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
 
2459
      ac_cv_gnu_library_2_1,
 
2460
      [AC_EGREP_CPP([Lucky GNU user],
 
2461
        [
 
2462
#include <features.h>
 
2463
#ifdef __GNU_LIBRARY__
 
2464
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
 
2465
  Lucky GNU user
 
2466
 #endif
 
2467
#endif
 
2468
        ],
 
2469
        ac_cv_gnu_library_2_1=yes,
 
2470
        ac_cv_gnu_library_2_1=no)
 
2471
      ]
 
2472
    )
 
2473
    AC_SUBST(GLIBC21)
 
2474
    GLIBC21="$ac_cv_gnu_library_2_1"
 
2475
  ]
 
2476
)
 
2477
 
 
2478
# intdiv0.m4 serial 1 (gettext-0.11.3)
 
2479
dnl Copyright (C) 2002 Free Software Foundation, Inc.
 
2480
dnl This file is free software, distributed under the terms of the GNU
 
2481
dnl General Public License.  As a special exception to the GNU General
 
2482
dnl Public License, this file may be distributed as part of a program
 
2483
dnl that contains a configuration script generated by Autoconf, under
 
2484
dnl the same distribution terms as the rest of that program.
 
2485
 
 
2486
dnl From Bruno Haible.
 
2487
 
 
2488
AC_DEFUN([gt_INTDIV0],
 
2489
[
 
2490
  AC_REQUIRE([AC_PROG_CC])dnl
 
2491
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2492
 
 
2493
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
 
2494
    gt_cv_int_divbyzero_sigfpe,
 
2495
    [
 
2496
      AC_TRY_RUN([
 
2497
#include <stdlib.h>
 
2498
#include <signal.h>
 
2499
 
 
2500
static void
 
2501
#ifdef __cplusplus
 
2502
sigfpe_handler (int sig)
 
2503
#else
 
2504
sigfpe_handler (sig) int sig;
 
2505
#endif
 
2506
{
 
2507
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
 
2508
  exit (sig != SIGFPE);
 
2509
}
 
2510
 
 
2511
int x = 1;
 
2512
int y = 0;
 
2513
int z;
 
2514
int nan;
 
2515
 
 
2516
int main ()
 
2517
{
 
2518
  signal (SIGFPE, sigfpe_handler);
 
2519
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
 
2520
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
 
2521
  signal (SIGTRAP, sigfpe_handler);
 
2522
#endif
 
2523
/* Linux/SPARC yields signal SIGILL.  */
 
2524
#if defined (__sparc__) && defined (__linux__)
 
2525
  signal (SIGILL, sigfpe_handler);
 
2526
#endif
 
2527
 
 
2528
  z = x / y;
 
2529
  nan = y / y;
 
2530
  exit (1);
 
2531
}
 
2532
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
 
2533
        [
 
2534
          # Guess based on the CPU.
 
2535
          case "$host_cpu" in
 
2536
            alpha* | i[34567]86 | m68k | s390*)
 
2537
              gt_cv_int_divbyzero_sigfpe="guessing yes";;
 
2538
            *)
 
2539
              gt_cv_int_divbyzero_sigfpe="guessing no";;
 
2540
          esac
 
2541
        ])
 
2542
    ])
 
2543
  case "$gt_cv_int_divbyzero_sigfpe" in
 
2544
    *yes) value=1;;
 
2545
    *) value=0;;
 
2546
  esac
 
2547
  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
 
2548
    [Define if integer division by zero raises signal SIGFPE.])
 
2549
])
 
2550
 
 
2551
# uintmax_t.m4 serial 7 (gettext-0.12)
 
2552
dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
 
2553
dnl This file is free software, distributed under the terms of the GNU
 
2554
dnl General Public License.  As a special exception to the GNU General
 
2555
dnl Public License, this file may be distributed as part of a program
 
2556
dnl that contains a configuration script generated by Autoconf, under
 
2557
dnl the same distribution terms as the rest of that program.
 
2558
 
 
2559
dnl From Paul Eggert.
 
2560
 
 
2561
AC_PREREQ(2.13)
 
2562
 
 
2563
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
 
2564
# if it is not already defined in <stdint.h> or <inttypes.h>.
 
2565
 
 
2566
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
 
2567
[
 
2568
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
 
2569
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
 
2570
  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
 
2571
    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
 
2572
    test $ac_cv_type_unsigned_long_long = yes \
 
2573
      && ac_type='unsigned long long' \
 
2574
      || ac_type='unsigned long'
 
2575
    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
 
2576
      [Define to unsigned long or unsigned long long
 
2577
       if <stdint.h> and <inttypes.h> don't define.])
 
2578
  else
 
2579
    AC_DEFINE(HAVE_UINTMAX_T, 1,
 
2580
      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
 
2581
  fi
 
2582
])
 
2583
 
 
2584
# ulonglong.m4 serial 3
 
2585
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
 
2586
dnl This file is free software, distributed under the terms of the GNU
 
2587
dnl General Public License.  As a special exception to the GNU General
 
2588
dnl Public License, this file may be distributed as part of a program
 
2589
dnl that contains a configuration script generated by Autoconf, under
 
2590
dnl the same distribution terms as the rest of that program.
 
2591
 
 
2592
dnl From Paul Eggert.
 
2593
 
 
2594
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
 
2595
 
 
2596
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
 
2597
[
 
2598
  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
 
2599
  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
 
2600
    [unsigned long long ullmax = (unsigned long long) -1;
 
2601
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
 
2602
    ac_cv_type_unsigned_long_long=yes,
 
2603
    ac_cv_type_unsigned_long_long=no)])
 
2604
  if test $ac_cv_type_unsigned_long_long = yes; then
 
2605
    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
 
2606
      [Define if you have the 'unsigned long long' type.])
 
2607
  fi
 
2608
])
 
2609
 
 
2610
# inttypes.m4 serial 1 (gettext-0.11.4)
 
2611
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
2612
dnl This file is free software, distributed under the terms of the GNU
 
2613
dnl General Public License.  As a special exception to the GNU General
 
2614
dnl Public License, this file may be distributed as part of a program
 
2615
dnl that contains a configuration script generated by Autoconf, under
 
2616
dnl the same distribution terms as the rest of that program.
 
2617
 
 
2618
dnl From Paul Eggert.
 
2619
 
 
2620
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
 
2621
# <sys/types.h>.
 
2622
 
 
2623
AC_DEFUN([gt_HEADER_INTTYPES_H],
 
2624
[
 
2625
  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
 
2626
  [
 
2627
    AC_TRY_COMPILE(
 
2628
      [#include <sys/types.h>
 
2629
#include <inttypes.h>],
 
2630
      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
 
2631
  ])
 
2632
  if test $gt_cv_header_inttypes_h = yes; then
 
2633
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
 
2634
      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
 
2635
  fi
 
2636
])
 
2637
 
 
2638
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
 
2639
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
 
2640
dnl This file is free software, distributed under the terms of the GNU
 
2641
dnl General Public License.  As a special exception to the GNU General
 
2642
dnl Public License, this file may be distributed as part of a program
 
2643
dnl that contains a configuration script generated by Autoconf, under
 
2644
dnl the same distribution terms as the rest of that program.
 
2645
 
 
2646
dnl From Bruno Haible.
 
2647
 
 
2648
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
 
2649
# macros to non-string values.  This is the case on AIX 4.3.3.
 
2650
 
 
2651
AC_DEFUN([gt_INTTYPES_PRI],
 
2652
[
 
2653
  AC_REQUIRE([gt_HEADER_INTTYPES_H])
 
2654
  if test $gt_cv_header_inttypes_h = yes; then
 
2655
    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
 
2656
      gt_cv_inttypes_pri_broken,
 
2657
      [
 
2658
        AC_TRY_COMPILE([#include <inttypes.h>
 
2659
#ifdef PRId32
 
2660
char *p = PRId32;
 
2661
#endif
 
2662
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
 
2663
      ])
 
2664
  fi
 
2665
  if test "$gt_cv_inttypes_pri_broken" = yes; then
 
2666
    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
 
2667
      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
 
2668
  fi
 
2669
])
 
2670
 
 
2671
# xsize.m4 serial 2
 
2672
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2673
dnl This file is free software, distributed under the terms of the GNU
 
2674
dnl General Public License.  As a special exception to the GNU General
 
2675
dnl Public License, this file may be distributed as part of a program
 
2676
dnl that contains a configuration script generated by Autoconf, under
 
2677
dnl the same distribution terms as the rest of that program.
 
2678
 
 
2679
AC_DEFUN([gl_XSIZE],
 
2680
[
 
2681
  dnl Prerequisites of lib/xsize.h.
 
2682
  AC_REQUIRE([gl_SIZE_MAX])
 
2683
  AC_CHECK_HEADERS(stdint.h)
 
2684
])
 
2685
 
 
2686
# size_max.m4 serial 2
 
2687
dnl Copyright (C) 2003 Free Software Foundation, Inc.
 
2688
dnl This file is free software, distributed under the terms of the GNU
 
2689
dnl General Public License.  As a special exception to the GNU General
 
2690
dnl Public License, this file may be distributed as part of a program
 
2691
dnl that contains a configuration script generated by Autoconf, under
 
2692
dnl the same distribution terms as the rest of that program.
 
2693
 
 
2694
dnl From Bruno Haible.
 
2695
 
 
2696
AC_DEFUN([gl_SIZE_MAX],
 
2697
[
 
2698
  AC_CHECK_HEADERS(stdint.h)
 
2699
  dnl First test whether the system already has SIZE_MAX.
 
2700
  AC_MSG_CHECKING([for SIZE_MAX])
 
2701
  result=
 
2702
  AC_EGREP_CPP([Found it], [
 
2703
#include <limits.h>
 
2704
#if HAVE_STDINT_H
 
2705
#include <stdint.h>
 
2706
#endif
 
2707
#ifdef SIZE_MAX
 
2708
Found it
 
2709
#endif
 
2710
], result=yes)
 
2711
  if test -z "$result"; then
 
2712
    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
 
2713
    dnl than the type 'unsigned long'.
 
2714
    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
 
2715
    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
 
2716
    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
 
2717
      [#include <stddef.h>], result=?)
 
2718
    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
 
2719
      [#include <stddef.h>], result=?)
 
2720
    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
 
2721
      [#include <stddef.h>], result=?)
 
2722
    if test "$fits_in_uint" = 1; then
 
2723
      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
 
2724
      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
 
2725
      AC_TRY_COMPILE([#include <stddef.h>
 
2726
        extern size_t foo;
 
2727
        extern unsigned long foo;
 
2728
        ], [], fits_in_uint=0)
 
2729
    fi
 
2730
    if test -z "$result"; then
 
2731
      if test "$fits_in_uint" = 1; then
 
2732
        result="$res_hi$res_lo"U
 
2733
      else
 
2734
        result="$res_hi$res_lo"UL
 
2735
      fi
 
2736
    else
 
2737
      dnl Shouldn't happen, but who knows...
 
2738
      result='~(size_t)0'
 
2739
    fi
 
2740
  fi
 
2741
  AC_MSG_RESULT([$result])
 
2742
  if test "$result" != yes; then
 
2743
    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
 
2744
      [Define as the maximum value of type 'size_t', if the system doesn't define it.])
 
2745
  fi
 
2746
])
 
2747
 
 
2748
# codeset.m4 serial AM1 (gettext-0.10.40)
 
2749
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
2750
dnl This file is free software, distributed under the terms of the GNU
 
2751
dnl General Public License.  As a special exception to the GNU General
 
2752
dnl Public License, this file may be distributed as part of a program
 
2753
dnl that contains a configuration script generated by Autoconf, under
 
2754
dnl the same distribution terms as the rest of that program.
 
2755
 
 
2756
dnl From Bruno Haible.
 
2757
 
 
2758
AC_DEFUN([AM_LANGINFO_CODESET],
 
2759
[
 
2760
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
 
2761
    [AC_TRY_LINK([#include <langinfo.h>],
 
2762
      [char* cs = nl_langinfo(CODESET);],
 
2763
      am_cv_langinfo_codeset=yes,
 
2764
      am_cv_langinfo_codeset=no)
 
2765
    ])
 
2766
  if test $am_cv_langinfo_codeset = yes; then
 
2767
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
 
2768
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
 
2769
  fi
 
2770
])
 
2771
 
 
2772
# lcmessage.m4 serial 3 (gettext-0.11.3)
 
2773
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
2774
dnl This file is free software, distributed under the terms of the GNU
 
2775
dnl General Public License.  As a special exception to the GNU General
 
2776
dnl Public License, this file may be distributed as part of a program
 
2777
dnl that contains a configuration script generated by Autoconf, under
 
2778
dnl the same distribution terms as the rest of that program.
 
2779
dnl
 
2780
dnl This file can can be used in projects which are not available under
 
2781
dnl the GNU General Public License or the GNU Library General Public
 
2782
dnl License but which still want to provide support for the GNU gettext
 
2783
dnl functionality.
 
2784
dnl Please note that the actual code of the GNU gettext library is covered
 
2785
dnl by the GNU Library General Public License, and the rest of the GNU
 
2786
dnl gettext package package is covered by the GNU General Public License.
 
2787
dnl They are *not* in the public domain.
 
2788
 
 
2789
dnl Authors:
 
2790
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
 
2791
 
 
2792
# Check whether LC_MESSAGES is available in <locale.h>.
 
2793
 
 
2794
AC_DEFUN([AM_LC_MESSAGES],
 
2795
[
 
2796
  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
2797
    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
2798
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
2799
  if test $am_cv_val_LC_MESSAGES = yes; then
 
2800
    AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
2801
      [Define if your <locale.h> file defines LC_MESSAGES.])
 
2802
  fi
 
2803
])
 
2804