~ubuntu-branches/ubuntu/oneiric/soundmodem/oneiric

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Kamal Mostafa
  • Date: 2011-06-22 07:12:47 UTC
  • mfrom: (1.3.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110622071247-s9548jfjv3shfu1v
Tags: 0.16-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
 
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17
 
[m4_warning([this file was generated for autoconf 2.65.
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
 
17
[m4_warning([this file was generated for autoconf 2.68.
18
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
161
161
])
162
162
 
163
163
 
164
 
# gettext.m4 serial 60 (gettext-0.17)
165
 
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
166
 
dnl This file is free software; the Free Software Foundation
167
 
dnl gives unlimited permission to copy and/or distribute it,
168
 
dnl with or without modifications, as long as this notice is preserved.
169
 
dnl
170
 
dnl This file can can be used in projects which are not available under
171
 
dnl the GNU General Public License or the GNU Library General Public
172
 
dnl License but which still want to provide support for the GNU gettext
173
 
dnl functionality.
174
 
dnl Please note that the actual code of the GNU gettext library is covered
175
 
dnl by the GNU Library General Public License, and the rest of the GNU
176
 
dnl gettext package package is covered by the GNU General Public License.
177
 
dnl They are *not* in the public domain.
178
 
 
179
 
dnl Authors:
180
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
181
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
182
 
 
183
 
dnl Macro to add for using GNU gettext.
184
 
 
185
 
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
186
 
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
187
 
dnl    default (if it is not specified or empty) is 'no-libtool'.
188
 
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
189
 
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
190
 
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
191
 
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
192
 
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
193
 
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
194
 
dnl    $(top_builddir)/intl/libintl.a will be created.
195
 
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
196
 
dnl    implementations (in libc or libintl) without the ngettext() function
197
 
dnl    will be ignored.  If NEEDSYMBOL is specified and is
198
 
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
199
 
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
200
 
dnl INTLDIR is used to find the intl libraries.  If empty,
201
 
dnl    the value `$(top_builddir)/intl/' is used.
202
 
dnl
203
 
dnl The result of the configuration is one of three cases:
204
 
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
205
 
dnl    and used.
206
 
dnl    Catalog format: GNU --> install in $(datadir)
207
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
208
 
dnl 2) GNU gettext has been found in the system's C library.
209
 
dnl    Catalog format: GNU --> install in $(datadir)
210
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
211
 
dnl 3) No internationalization, always use English msgid.
212
 
dnl    Catalog format: none
213
 
dnl    Catalog extension: none
214
 
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
215
 
dnl The use of .gmo is historical (it was needed to avoid overwriting the
216
 
dnl GNU format catalogs when building on a platform with an X/Open gettext),
217
 
dnl but we keep it in order not to force irrelevant filename changes on the
218
 
dnl maintainers.
219
 
dnl
220
 
AC_DEFUN([AM_GNU_GETTEXT],
221
 
[
222
 
  dnl Argument checking.
223
 
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
224
 
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
225
 
])])])])])
226
 
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
227
 
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
228
 
])])])])
229
 
  define([gt_included_intl],
230
 
    ifelse([$1], [external],
231
 
      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
232
 
      [yes]))
233
 
  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
234
 
  gt_NEEDS_INIT
235
 
  AM_GNU_GETTEXT_NEED([$2])
236
 
 
237
 
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
238
 
  ifelse(gt_included_intl, yes, [
239
 
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
240
 
  ])
241
 
 
242
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
243
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
244
 
  AC_REQUIRE([AC_LIB_RPATH])
245
 
 
246
 
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
247
 
  dnl Ideally we would do this search only after the
248
 
  dnl      if test "$USE_NLS" = "yes"; then
249
 
  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
250
 
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
251
 
  dnl the configure script would need to contain the same shell code
252
 
  dnl again, outside any 'if'. There are two solutions:
253
 
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
254
 
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
255
 
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
256
 
  dnl documented, we avoid it.
257
 
  ifelse(gt_included_intl, yes, , [
258
 
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
259
 
  ])
260
 
 
261
 
  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
262
 
  gt_INTL_MACOSX
263
 
 
264
 
  dnl Set USE_NLS.
265
 
  AC_REQUIRE([AM_NLS])
266
 
 
267
 
  ifelse(gt_included_intl, yes, [
268
 
    BUILD_INCLUDED_LIBINTL=no
269
 
    USE_INCLUDED_LIBINTL=no
270
 
  ])
271
 
  LIBINTL=
272
 
  LTLIBINTL=
273
 
  POSUB=
274
 
 
275
 
  dnl Add a version number to the cache macros.
276
 
  case " $gt_needs " in
277
 
    *" need-formatstring-macros "*) gt_api_version=3 ;;
278
 
    *" need-ngettext "*) gt_api_version=2 ;;
279
 
    *) gt_api_version=1 ;;
280
 
  esac
281
 
  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
282
 
  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
283
 
 
284
 
  dnl If we use NLS figure out what method
285
 
  if test "$USE_NLS" = "yes"; then
286
 
    gt_use_preinstalled_gnugettext=no
287
 
    ifelse(gt_included_intl, yes, [
288
 
      AC_MSG_CHECKING([whether included gettext is requested])
289
 
      AC_ARG_WITH(included-gettext,
290
 
        [  --with-included-gettext use the GNU gettext library included here],
291
 
        nls_cv_force_use_gnu_gettext=$withval,
292
 
        nls_cv_force_use_gnu_gettext=no)
293
 
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
294
 
 
295
 
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
296
 
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
297
 
    ])
298
 
        dnl User does not insist on using GNU NLS library.  Figure out what
299
 
        dnl to use.  If GNU gettext is available we use this.  Else we have
300
 
        dnl to fall back to GNU NLS library.
301
 
 
302
 
        if test $gt_api_version -ge 3; then
303
 
          gt_revision_test_code='
304
 
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
305
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
306
 
#endif
307
 
changequote(,)dnl
308
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
309
 
changequote([,])dnl
310
 
'
311
 
        else
312
 
          gt_revision_test_code=
313
 
        fi
314
 
        if test $gt_api_version -ge 2; then
315
 
          gt_expression_test_code=' + * ngettext ("", "", 0)'
316
 
        else
317
 
          gt_expression_test_code=
318
 
        fi
319
 
 
320
 
        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
321
 
         [AC_TRY_LINK([#include <libintl.h>
322
 
$gt_revision_test_code
323
 
extern int _nl_msg_cat_cntr;
324
 
extern int *_nl_domain_bindings;],
325
 
            [bindtextdomain ("", "");
326
 
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
327
 
            [eval "$gt_func_gnugettext_libc=yes"],
328
 
            [eval "$gt_func_gnugettext_libc=no"])])
329
 
 
330
 
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
331
 
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
332
 
          ifelse(gt_included_intl, yes, , [
333
 
            AM_ICONV_LINK
334
 
          ])
335
 
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
336
 
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
337
 
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
338
 
          dnl even if libiconv doesn't exist.
339
 
          AC_LIB_LINKFLAGS_BODY([intl])
340
 
          AC_CACHE_CHECK([for GNU gettext in libintl],
341
 
            [$gt_func_gnugettext_libintl],
342
 
           [gt_save_CPPFLAGS="$CPPFLAGS"
343
 
            CPPFLAGS="$CPPFLAGS $INCINTL"
344
 
            gt_save_LIBS="$LIBS"
345
 
            LIBS="$LIBS $LIBINTL"
346
 
            dnl Now see whether libintl exists and does not depend on libiconv.
347
 
            AC_TRY_LINK([#include <libintl.h>
348
 
$gt_revision_test_code
349
 
extern int _nl_msg_cat_cntr;
350
 
extern
351
 
#ifdef __cplusplus
352
 
"C"
353
 
#endif
354
 
const char *_nl_expand_alias (const char *);],
355
 
              [bindtextdomain ("", "");
356
 
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
357
 
              [eval "$gt_func_gnugettext_libintl=yes"],
358
 
              [eval "$gt_func_gnugettext_libintl=no"])
359
 
            dnl Now see whether libintl exists and depends on libiconv.
360
 
            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
361
 
              LIBS="$LIBS $LIBICONV"
362
 
              AC_TRY_LINK([#include <libintl.h>
363
 
$gt_revision_test_code
364
 
extern int _nl_msg_cat_cntr;
365
 
extern
366
 
#ifdef __cplusplus
367
 
"C"
368
 
#endif
369
 
const char *_nl_expand_alias (const char *);],
370
 
                [bindtextdomain ("", "");
371
 
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
372
 
               [LIBINTL="$LIBINTL $LIBICONV"
373
 
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
374
 
                eval "$gt_func_gnugettext_libintl=yes"
375
 
               ])
376
 
            fi
377
 
            CPPFLAGS="$gt_save_CPPFLAGS"
378
 
            LIBS="$gt_save_LIBS"])
379
 
        fi
380
 
 
381
 
        dnl If an already present or preinstalled GNU gettext() is found,
382
 
        dnl use it.  But if this macro is used in GNU gettext, and GNU
383
 
        dnl gettext is already preinstalled in libintl, we update this
384
 
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
385
 
        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
386
 
           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
387
 
                && test "$PACKAGE" != gettext-runtime \
388
 
                && test "$PACKAGE" != gettext-tools; }; then
389
 
          gt_use_preinstalled_gnugettext=yes
390
 
        else
391
 
          dnl Reset the values set by searching for libintl.
392
 
          LIBINTL=
393
 
          LTLIBINTL=
394
 
          INCINTL=
395
 
        fi
396
 
 
397
 
    ifelse(gt_included_intl, yes, [
398
 
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
399
 
          dnl GNU gettext is not found in the C library.
400
 
          dnl Fall back on included GNU gettext library.
401
 
          nls_cv_use_gnu_gettext=yes
402
 
        fi
403
 
      fi
404
 
 
405
 
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
406
 
        dnl Mark actions used to generate GNU NLS library.
407
 
        BUILD_INCLUDED_LIBINTL=yes
408
 
        USE_INCLUDED_LIBINTL=yes
409
 
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
410
 
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
411
 
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
412
 
      fi
413
 
 
414
 
      CATOBJEXT=
415
 
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
416
 
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
417
 
        dnl Mark actions to use GNU gettext tools.
418
 
        CATOBJEXT=.gmo
419
 
      fi
420
 
    ])
421
 
 
422
 
    if test -n "$INTL_MACOSX_LIBS"; then
423
 
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
424
 
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
425
 
        dnl Some extra flags are needed during linking.
426
 
        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
427
 
        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
428
 
      fi
429
 
    fi
430
 
 
431
 
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
432
 
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
433
 
      AC_DEFINE(ENABLE_NLS, 1,
434
 
        [Define to 1 if translation of program messages to the user's native language
435
 
   is requested.])
436
 
    else
437
 
      USE_NLS=no
438
 
    fi
439
 
  fi
440
 
 
441
 
  AC_MSG_CHECKING([whether to use NLS])
442
 
  AC_MSG_RESULT([$USE_NLS])
443
 
  if test "$USE_NLS" = "yes"; then
444
 
    AC_MSG_CHECKING([where the gettext function comes from])
445
 
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
446
 
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
447
 
        gt_source="external libintl"
448
 
      else
449
 
        gt_source="libc"
450
 
      fi
451
 
    else
452
 
      gt_source="included intl directory"
453
 
    fi
454
 
    AC_MSG_RESULT([$gt_source])
455
 
  fi
456
 
 
457
 
  if test "$USE_NLS" = "yes"; then
458
 
 
459
 
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
460
 
      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
461
 
        AC_MSG_CHECKING([how to link with libintl])
462
 
        AC_MSG_RESULT([$LIBINTL])
463
 
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
464
 
      fi
465
 
 
466
 
      dnl For backward compatibility. Some packages may be using this.
467
 
      AC_DEFINE(HAVE_GETTEXT, 1,
468
 
       [Define if the GNU gettext() function is already present or preinstalled.])
469
 
      AC_DEFINE(HAVE_DCGETTEXT, 1,
470
 
       [Define if the GNU dcgettext() function is already present or preinstalled.])
471
 
    fi
472
 
 
473
 
    dnl We need to process the po/ directory.
474
 
    POSUB=po
475
 
  fi
476
 
 
477
 
  ifelse(gt_included_intl, yes, [
478
 
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
479
 
    dnl to 'yes' because some of the testsuite requires it.
480
 
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
481
 
      BUILD_INCLUDED_LIBINTL=yes
482
 
    fi
483
 
 
484
 
    dnl Make all variables we use known to autoconf.
485
 
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
486
 
    AC_SUBST(USE_INCLUDED_LIBINTL)
487
 
    AC_SUBST(CATOBJEXT)
488
 
 
489
 
    dnl For backward compatibility. Some configure.ins may be using this.
490
 
    nls_cv_header_intl=
491
 
    nls_cv_header_libgt=
492
 
 
493
 
    dnl For backward compatibility. Some Makefiles may be using this.
494
 
    DATADIRNAME=share
495
 
    AC_SUBST(DATADIRNAME)
496
 
 
497
 
    dnl For backward compatibility. Some Makefiles may be using this.
498
 
    INSTOBJEXT=.mo
499
 
    AC_SUBST(INSTOBJEXT)
500
 
 
501
 
    dnl For backward compatibility. Some Makefiles may be using this.
502
 
    GENCAT=gencat
503
 
    AC_SUBST(GENCAT)
504
 
 
505
 
    dnl For backward compatibility. Some Makefiles may be using this.
506
 
    INTLOBJS=
507
 
    if test "$USE_INCLUDED_LIBINTL" = yes; then
508
 
      INTLOBJS="\$(GETTOBJS)"
509
 
    fi
510
 
    AC_SUBST(INTLOBJS)
511
 
 
512
 
    dnl Enable libtool support if the surrounding package wishes it.
513
 
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
514
 
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
515
 
  ])
516
 
 
517
 
  dnl For backward compatibility. Some Makefiles may be using this.
518
 
  INTLLIBS="$LIBINTL"
519
 
  AC_SUBST(INTLLIBS)
520
 
 
521
 
  dnl Make all documented variables known to autoconf.
522
 
  AC_SUBST(LIBINTL)
523
 
  AC_SUBST(LTLIBINTL)
524
 
  AC_SUBST(POSUB)
525
 
])
526
 
 
527
 
 
528
 
dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
529
 
m4_define([gt_NEEDS_INIT],
530
 
[
531
 
  m4_divert_text([DEFAULTS], [gt_needs=])
532
 
  m4_define([gt_NEEDS_INIT], [])
533
 
])
534
 
 
535
 
 
536
 
dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
537
 
AC_DEFUN([AM_GNU_GETTEXT_NEED],
538
 
[
539
 
  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
540
 
])
541
 
 
542
 
 
543
 
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
544
 
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
545
 
 
546
 
# iconv.m4 serial AM6 (gettext-0.17)
547
 
dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
548
 
dnl This file is free software; the Free Software Foundation
549
 
dnl gives unlimited permission to copy and/or distribute it,
550
 
dnl with or without modifications, as long as this notice is preserved.
551
 
 
552
 
dnl From Bruno Haible.
553
 
 
554
 
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
555
 
[
556
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
557
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
558
 
  AC_REQUIRE([AC_LIB_RPATH])
559
 
 
560
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
561
 
  dnl accordingly.
562
 
  AC_LIB_LINKFLAGS_BODY([iconv])
563
 
])
564
 
 
565
 
AC_DEFUN([AM_ICONV_LINK],
566
 
[
567
 
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
568
 
  dnl those with the standalone portable GNU libiconv installed).
569
 
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
570
 
 
571
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
572
 
  dnl accordingly.
573
 
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
574
 
 
575
 
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
576
 
  dnl because if the user has installed libiconv and not disabled its use
577
 
  dnl via --without-libiconv-prefix, he wants to use it. The first
578
 
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
579
 
  am_save_CPPFLAGS="$CPPFLAGS"
580
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
581
 
 
582
 
  AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
583
 
    am_cv_func_iconv="no, consider installing GNU libiconv"
584
 
    am_cv_lib_iconv=no
585
 
    AC_TRY_LINK([#include <stdlib.h>
586
 
#include <iconv.h>],
587
 
      [iconv_t cd = iconv_open("","");
588
 
       iconv(cd,NULL,NULL,NULL,NULL);
589
 
       iconv_close(cd);],
590
 
      am_cv_func_iconv=yes)
591
 
    if test "$am_cv_func_iconv" != yes; then
592
 
      am_save_LIBS="$LIBS"
593
 
      LIBS="$LIBS $LIBICONV"
594
 
      AC_TRY_LINK([#include <stdlib.h>
595
 
#include <iconv.h>],
596
 
        [iconv_t cd = iconv_open("","");
597
 
         iconv(cd,NULL,NULL,NULL,NULL);
598
 
         iconv_close(cd);],
599
 
        am_cv_lib_iconv=yes
600
 
        am_cv_func_iconv=yes)
601
 
      LIBS="$am_save_LIBS"
602
 
    fi
603
 
  ])
604
 
  if test "$am_cv_func_iconv" = yes; then
605
 
    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
606
 
      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
607
 
      am_save_LIBS="$LIBS"
608
 
      if test $am_cv_lib_iconv = yes; then
609
 
        LIBS="$LIBS $LIBICONV"
610
 
      fi
611
 
      AC_TRY_RUN([
612
 
#include <iconv.h>
613
 
#include <string.h>
614
 
int main ()
615
 
{
616
 
  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
617
 
     returns.  */
618
 
  {
619
 
    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
620
 
    if (cd_utf8_to_88591 != (iconv_t)(-1))
621
 
      {
622
 
        static const char input[] = "\342\202\254"; /* EURO SIGN */
623
 
        char buf[10];
624
 
        const char *inptr = input;
625
 
        size_t inbytesleft = strlen (input);
626
 
        char *outptr = buf;
627
 
        size_t outbytesleft = sizeof (buf);
628
 
        size_t res = iconv (cd_utf8_to_88591,
629
 
                            (char **) &inptr, &inbytesleft,
630
 
                            &outptr, &outbytesleft);
631
 
        if (res == 0)
632
 
          return 1;
633
 
      }
634
 
  }
635
 
#if 0 /* This bug could be worked around by the caller.  */
636
 
  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
637
 
  {
638
 
    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
639
 
    if (cd_88591_to_utf8 != (iconv_t)(-1))
640
 
      {
641
 
        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
642
 
        char buf[50];
643
 
        const char *inptr = input;
644
 
        size_t inbytesleft = strlen (input);
645
 
        char *outptr = buf;
646
 
        size_t outbytesleft = sizeof (buf);
647
 
        size_t res = iconv (cd_88591_to_utf8,
648
 
                            (char **) &inptr, &inbytesleft,
649
 
                            &outptr, &outbytesleft);
650
 
        if ((int)res > 0)
651
 
          return 1;
652
 
      }
653
 
  }
654
 
#endif
655
 
  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
656
 
     provided.  */
657
 
  if (/* Try standardized names.  */
658
 
      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
659
 
      /* Try IRIX, OSF/1 names.  */
660
 
      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
661
 
      /* Try AIX names.  */
662
 
      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
663
 
      /* Try HP-UX names.  */
664
 
      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
665
 
    return 1;
666
 
  return 0;
667
 
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
668
 
        [case "$host_os" in
669
 
           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
670
 
           *)            am_cv_func_iconv_works="guessing yes" ;;
671
 
         esac])
672
 
      LIBS="$am_save_LIBS"
673
 
    ])
674
 
    case "$am_cv_func_iconv_works" in
675
 
      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
676
 
      *)   am_func_iconv=yes ;;
677
 
    esac
678
 
  else
679
 
    am_func_iconv=no am_cv_lib_iconv=no
680
 
  fi
681
 
  if test "$am_func_iconv" = yes; then
682
 
    AC_DEFINE(HAVE_ICONV, 1,
683
 
      [Define if you have the iconv() function and it works.])
684
 
  fi
685
 
  if test "$am_cv_lib_iconv" = yes; then
686
 
    AC_MSG_CHECKING([how to link with libiconv])
687
 
    AC_MSG_RESULT([$LIBICONV])
688
 
  else
689
 
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
690
 
    dnl either.
691
 
    CPPFLAGS="$am_save_CPPFLAGS"
692
 
    LIBICONV=
693
 
    LTLIBICONV=
694
 
  fi
695
 
  AC_SUBST(LIBICONV)
696
 
  AC_SUBST(LTLIBICONV)
697
 
])
698
 
 
699
 
AC_DEFUN([AM_ICONV],
700
 
[
701
 
  AM_ICONV_LINK
702
 
  if test "$am_cv_func_iconv" = yes; then
703
 
    AC_MSG_CHECKING([for iconv declaration])
704
 
    AC_CACHE_VAL(am_cv_proto_iconv, [
705
 
      AC_TRY_COMPILE([
706
 
#include <stdlib.h>
707
 
#include <iconv.h>
708
 
extern
709
 
#ifdef __cplusplus
710
 
"C"
711
 
#endif
712
 
#if defined(__STDC__) || defined(__cplusplus)
713
 
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
714
 
#else
715
 
size_t iconv();
716
 
#endif
717
 
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
718
 
      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);"])
719
 
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
720
 
    AC_MSG_RESULT([$]{ac_t:-
721
 
         }[$]am_cv_proto_iconv)
722
 
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
723
 
      [Define as const if the declaration of iconv() needs const.])
724
 
  fi
725
 
])
726
 
 
727
 
# intlmacosx.m4 serial 1 (gettext-0.17)
728
 
dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
 
164
# intlmacosx.m4 serial 3 (gettext-0.18)
 
165
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
729
166
dnl This file is free software; the Free Software Foundation
730
167
dnl gives unlimited permission to copy and/or distribute it,
731
168
dnl with or without modifications, as long as this notice is preserved.
745
182
[
746
183
  dnl Check for API introduced in MacOS X 10.2.
747
184
  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
748
 
    gt_cv_func_CFPreferencesCopyAppValue,
 
185
    [gt_cv_func_CFPreferencesCopyAppValue],
749
186
    [gt_save_LIBS="$LIBS"
750
187
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
751
188
     AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
754
191
       [gt_cv_func_CFPreferencesCopyAppValue=no])
755
192
     LIBS="$gt_save_LIBS"])
756
193
  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
757
 
    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
 
194
    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
758
195
      [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
759
196
  fi
760
197
  dnl Check for API introduced in MacOS X 10.3.
761
 
  AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
 
198
  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
762
199
    [gt_save_LIBS="$LIBS"
763
200
     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
764
201
     AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
766
203
       [gt_cv_func_CFLocaleCopyCurrent=no])
767
204
     LIBS="$gt_save_LIBS"])
768
205
  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
769
 
    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
 
206
    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
770
207
      [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
771
208
  fi
772
209
  INTL_MACOSX_LIBS=
776
213
  AC_SUBST([INTL_MACOSX_LIBS])
777
214
])
778
215
 
779
 
# lib-ld.m4 serial 3 (gettext-0.13)
780
 
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
781
 
dnl This file is free software; the Free Software Foundation
782
 
dnl gives unlimited permission to copy and/or distribute it,
783
 
dnl with or without modifications, as long as this notice is preserved.
784
 
 
785
 
dnl Subroutines of libtool.m4,
786
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
787
 
dnl with libtool.m4.
788
 
 
789
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
790
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
791
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
792
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
793
 
case `$LD -v 2>&1 </dev/null` in
794
 
*GNU* | *'with BFD'*)
795
 
  acl_cv_prog_gnu_ld=yes ;;
796
 
*)
797
 
  acl_cv_prog_gnu_ld=no ;;
798
 
esac])
799
 
with_gnu_ld=$acl_cv_prog_gnu_ld
800
 
])
801
 
 
802
 
dnl From libtool-1.4. Sets the variable LD.
803
 
AC_DEFUN([AC_LIB_PROG_LD],
804
 
[AC_ARG_WITH(gnu-ld,
805
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
806
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
807
 
AC_REQUIRE([AC_PROG_CC])dnl
808
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
809
 
# Prepare PATH_SEPARATOR.
810
 
# The user is always right.
811
 
if test "${PATH_SEPARATOR+set}" != set; then
812
 
  echo "#! /bin/sh" >conf$$.sh
813
 
  echo  "exit 0"   >>conf$$.sh
814
 
  chmod +x conf$$.sh
815
 
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
816
 
    PATH_SEPARATOR=';'
817
 
  else
818
 
    PATH_SEPARATOR=:
819
 
  fi
820
 
  rm -f conf$$.sh
821
 
fi
822
 
ac_prog=ld
823
 
if test "$GCC" = yes; then
824
 
  # Check if gcc -print-prog-name=ld gives a path.
825
 
  AC_MSG_CHECKING([for ld used by GCC])
826
 
  case $host in
827
 
  *-*-mingw*)
828
 
    # gcc leaves a trailing carriage return which upsets mingw
829
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
830
 
  *)
831
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
832
 
  esac
833
 
  case $ac_prog in
834
 
    # Accept absolute paths.
835
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
836
 
      [re_direlt='/[^/][^/]*/\.\./']
837
 
      # Canonicalize the path of ld
838
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
839
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
840
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
841
 
      done
842
 
      test -z "$LD" && LD="$ac_prog"
843
 
      ;;
844
 
  "")
845
 
    # If it fails, then pretend we aren't using GCC.
846
 
    ac_prog=ld
847
 
    ;;
848
 
  *)
849
 
    # If it is relative, then search for the first ld in PATH.
850
 
    with_gnu_ld=unknown
851
 
    ;;
852
 
  esac
853
 
elif test "$with_gnu_ld" = yes; then
854
 
  AC_MSG_CHECKING([for GNU ld])
855
 
else
856
 
  AC_MSG_CHECKING([for non-GNU ld])
857
 
fi
858
 
AC_CACHE_VAL(acl_cv_path_LD,
859
 
[if test -z "$LD"; then
860
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
861
 
  for ac_dir in $PATH; do
862
 
    test -z "$ac_dir" && ac_dir=.
863
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
864
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
865
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
866
 
      # but apparently some GNU ld's only accept -v.
867
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
868
 
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
869
 
      *GNU* | *'with BFD'*)
870
 
        test "$with_gnu_ld" != no && break ;;
871
 
      *)
872
 
        test "$with_gnu_ld" != yes && break ;;
873
 
      esac
874
 
    fi
875
 
  done
876
 
  IFS="$ac_save_ifs"
877
 
else
878
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
879
 
fi])
880
 
LD="$acl_cv_path_LD"
881
 
if test -n "$LD"; then
882
 
  AC_MSG_RESULT($LD)
883
 
else
884
 
  AC_MSG_RESULT(no)
885
 
fi
886
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
887
 
AC_LIB_PROG_LD_GNU
888
 
])
889
 
 
890
 
# lib-link.m4 serial 13 (gettext-0.17)
891
 
dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
892
 
dnl This file is free software; the Free Software Foundation
893
 
dnl gives unlimited permission to copy and/or distribute it,
894
 
dnl with or without modifications, as long as this notice is preserved.
895
 
 
896
 
dnl From Bruno Haible.
897
 
 
898
 
AC_PREREQ(2.54)
899
 
 
900
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
901
 
dnl the libraries corresponding to explicit and implicit dependencies.
902
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
903
 
dnl augments the CPPFLAGS variable.
904
 
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
905
 
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
906
 
AC_DEFUN([AC_LIB_LINKFLAGS],
907
 
[
908
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
909
 
  AC_REQUIRE([AC_LIB_RPATH])
910
 
  define([Name],[translit([$1],[./-], [___])])
911
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
912
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
913
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
914
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
915
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
916
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
917
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
918
 
    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
919
 
  ])
920
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
921
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
922
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
923
 
  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
924
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
925
 
  AC_SUBST([LIB]NAME)
926
 
  AC_SUBST([LTLIB]NAME)
927
 
  AC_SUBST([LIB]NAME[_PREFIX])
928
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
929
 
  dnl results of this search when this library appears as a dependency.
930
 
  HAVE_LIB[]NAME=yes
931
 
  undefine([Name])
932
 
  undefine([NAME])
933
 
])
934
 
 
935
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
936
 
dnl searches for libname and the libraries corresponding to explicit and
937
 
dnl implicit dependencies, together with the specified include files and
938
 
dnl the ability to compile and link the specified testcode. If found, it
939
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
940
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
941
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
942
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
943
 
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
944
 
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
945
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
946
 
[
947
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
948
 
  AC_REQUIRE([AC_LIB_RPATH])
949
 
  define([Name],[translit([$1],[./-], [___])])
950
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
951
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
952
 
 
953
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
954
 
  dnl accordingly.
955
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
956
 
 
957
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
958
 
  dnl because if the user has installed lib[]Name and not disabled its use
959
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
960
 
  ac_save_CPPFLAGS="$CPPFLAGS"
961
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
962
 
 
963
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
964
 
    ac_save_LIBS="$LIBS"
965
 
    LIBS="$LIBS $LIB[]NAME"
966
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
967
 
    LIBS="$ac_save_LIBS"
968
 
  ])
969
 
  if test "$ac_cv_lib[]Name" = yes; then
970
 
    HAVE_LIB[]NAME=yes
971
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
972
 
    AC_MSG_CHECKING([how to link with lib[]$1])
973
 
    AC_MSG_RESULT([$LIB[]NAME])
974
 
  else
975
 
    HAVE_LIB[]NAME=no
976
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
977
 
    dnl $INC[]NAME either.
978
 
    CPPFLAGS="$ac_save_CPPFLAGS"
979
 
    LIB[]NAME=
980
 
    LTLIB[]NAME=
981
 
    LIB[]NAME[]_PREFIX=
982
 
  fi
983
 
  AC_SUBST([HAVE_LIB]NAME)
984
 
  AC_SUBST([LIB]NAME)
985
 
  AC_SUBST([LTLIB]NAME)
986
 
  AC_SUBST([LIB]NAME[_PREFIX])
987
 
  undefine([Name])
988
 
  undefine([NAME])
989
 
])
990
 
 
991
 
dnl Determine the platform dependent parameters needed to use rpath:
992
 
dnl   acl_libext,
993
 
dnl   acl_shlibext,
994
 
dnl   acl_hardcode_libdir_flag_spec,
995
 
dnl   acl_hardcode_libdir_separator,
996
 
dnl   acl_hardcode_direct,
997
 
dnl   acl_hardcode_minus_L.
998
 
AC_DEFUN([AC_LIB_RPATH],
999
 
[
1000
 
  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1001
 
  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1002
 
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1003
 
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
1004
 
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
1005
 
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1006
 
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1007
 
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1008
 
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1009
 
    . ./conftest.sh
1010
 
    rm -f ./conftest.sh
1011
 
    acl_cv_rpath=done
1012
 
  ])
1013
 
  wl="$acl_cv_wl"
1014
 
  acl_libext="$acl_cv_libext"
1015
 
  acl_shlibext="$acl_cv_shlibext"
1016
 
  acl_libname_spec="$acl_cv_libname_spec"
1017
 
  acl_library_names_spec="$acl_cv_library_names_spec"
1018
 
  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1019
 
  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1020
 
  acl_hardcode_direct="$acl_cv_hardcode_direct"
1021
 
  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1022
 
  dnl Determine whether the user wants rpath handling at all.
1023
 
  AC_ARG_ENABLE(rpath,
1024
 
    [  --disable-rpath         do not hardcode runtime library paths],
1025
 
    :, enable_rpath=yes)
1026
 
])
1027
 
 
1028
 
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1029
 
dnl the libraries corresponding to explicit and implicit dependencies.
1030
 
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1031
 
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1032
 
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1033
 
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1034
 
[
1035
 
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1036
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1037
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1038
 
  dnl Autoconf >= 2.61 supports dots in --with options.
1039
 
  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
1040
 
  dnl By default, look in $includedir and $libdir.
1041
 
  use_additional=yes
1042
 
  AC_LIB_WITH_FINAL_PREFIX([
1043
 
    eval additional_includedir=\"$includedir\"
1044
 
    eval additional_libdir=\"$libdir\"
1045
 
  ])
1046
 
  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
1047
 
[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
1048
 
  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
1049
 
[
1050
 
    if test "X$withval" = "Xno"; then
1051
 
      use_additional=no
1052
 
    else
1053
 
      if test "X$withval" = "X"; then
1054
 
        AC_LIB_WITH_FINAL_PREFIX([
1055
 
          eval additional_includedir=\"$includedir\"
1056
 
          eval additional_libdir=\"$libdir\"
1057
 
        ])
1058
 
      else
1059
 
        additional_includedir="$withval/include"
1060
 
        additional_libdir="$withval/$acl_libdirstem"
1061
 
      fi
1062
 
    fi
1063
 
])
1064
 
  dnl Search the library and its dependencies in $additional_libdir and
1065
 
  dnl $LDFLAGS. Using breadth-first-seach.
1066
 
  LIB[]NAME=
1067
 
  LTLIB[]NAME=
1068
 
  INC[]NAME=
1069
 
  LIB[]NAME[]_PREFIX=
1070
 
  rpathdirs=
1071
 
  ltrpathdirs=
1072
 
  names_already_handled=
1073
 
  names_next_round='$1 $2'
1074
 
  while test -n "$names_next_round"; do
1075
 
    names_this_round="$names_next_round"
1076
 
    names_next_round=
1077
 
    for name in $names_this_round; do
1078
 
      already_handled=
1079
 
      for n in $names_already_handled; do
1080
 
        if test "$n" = "$name"; then
1081
 
          already_handled=yes
1082
 
          break
1083
 
        fi
1084
 
      done
1085
 
      if test -z "$already_handled"; then
1086
 
        names_already_handled="$names_already_handled $name"
1087
 
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1088
 
        dnl or AC_LIB_HAVE_LINKFLAGS call.
1089
 
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1090
 
        eval value=\"\$HAVE_LIB$uppername\"
1091
 
        if test -n "$value"; then
1092
 
          if test "$value" = yes; then
1093
 
            eval value=\"\$LIB$uppername\"
1094
 
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1095
 
            eval value=\"\$LTLIB$uppername\"
1096
 
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1097
 
          else
1098
 
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1099
 
            dnl that this library doesn't exist. So just drop it.
1100
 
            :
1101
 
          fi
1102
 
        else
1103
 
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1104
 
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
1105
 
          found_dir=
1106
 
          found_la=
1107
 
          found_so=
1108
 
          found_a=
1109
 
          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
1110
 
          if test -n "$acl_shlibext"; then
1111
 
            shrext=".$acl_shlibext"             # typically: shrext=.so
1112
 
          else
1113
 
            shrext=
1114
 
          fi
1115
 
          if test $use_additional = yes; then
1116
 
            dir="$additional_libdir"
1117
 
            dnl The same code as in the loop below:
1118
 
            dnl First look for a shared library.
1119
 
            if test -n "$acl_shlibext"; then
1120
 
              if test -f "$dir/$libname$shrext"; then
1121
 
                found_dir="$dir"
1122
 
                found_so="$dir/$libname$shrext"
1123
 
              else
1124
 
                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1125
 
                  ver=`(cd "$dir" && \
1126
 
                        for f in "$libname$shrext".*; do echo "$f"; done \
1127
 
                        | sed -e "s,^$libname$shrext\\\\.,," \
1128
 
                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1129
 
                        | sed 1q ) 2>/dev/null`
1130
 
                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1131
 
                    found_dir="$dir"
1132
 
                    found_so="$dir/$libname$shrext.$ver"
1133
 
                  fi
1134
 
                else
1135
 
                  eval library_names=\"$acl_library_names_spec\"
1136
 
                  for f in $library_names; do
1137
 
                    if test -f "$dir/$f"; then
1138
 
                      found_dir="$dir"
1139
 
                      found_so="$dir/$f"
1140
 
                      break
1141
 
                    fi
1142
 
                  done
1143
 
                fi
1144
 
              fi
1145
 
            fi
1146
 
            dnl Then look for a static library.
1147
 
            if test "X$found_dir" = "X"; then
1148
 
              if test -f "$dir/$libname.$acl_libext"; then
1149
 
                found_dir="$dir"
1150
 
                found_a="$dir/$libname.$acl_libext"
1151
 
              fi
1152
 
            fi
1153
 
            if test "X$found_dir" != "X"; then
1154
 
              if test -f "$dir/$libname.la"; then
1155
 
                found_la="$dir/$libname.la"
1156
 
              fi
1157
 
            fi
1158
 
          fi
1159
 
          if test "X$found_dir" = "X"; then
1160
 
            for x in $LDFLAGS $LTLIB[]NAME; do
1161
 
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1162
 
              case "$x" in
1163
 
                -L*)
1164
 
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
1165
 
                  dnl First look for a shared library.
1166
 
                  if test -n "$acl_shlibext"; then
1167
 
                    if test -f "$dir/$libname$shrext"; then
1168
 
                      found_dir="$dir"
1169
 
                      found_so="$dir/$libname$shrext"
1170
 
                    else
1171
 
                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1172
 
                        ver=`(cd "$dir" && \
1173
 
                              for f in "$libname$shrext".*; do echo "$f"; done \
1174
 
                              | sed -e "s,^$libname$shrext\\\\.,," \
1175
 
                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1176
 
                              | sed 1q ) 2>/dev/null`
1177
 
                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1178
 
                          found_dir="$dir"
1179
 
                          found_so="$dir/$libname$shrext.$ver"
1180
 
                        fi
1181
 
                      else
1182
 
                        eval library_names=\"$acl_library_names_spec\"
1183
 
                        for f in $library_names; do
1184
 
                          if test -f "$dir/$f"; then
1185
 
                            found_dir="$dir"
1186
 
                            found_so="$dir/$f"
1187
 
                            break
1188
 
                          fi
1189
 
                        done
1190
 
                      fi
1191
 
                    fi
1192
 
                  fi
1193
 
                  dnl Then look for a static library.
1194
 
                  if test "X$found_dir" = "X"; then
1195
 
                    if test -f "$dir/$libname.$acl_libext"; then
1196
 
                      found_dir="$dir"
1197
 
                      found_a="$dir/$libname.$acl_libext"
1198
 
                    fi
1199
 
                  fi
1200
 
                  if test "X$found_dir" != "X"; then
1201
 
                    if test -f "$dir/$libname.la"; then
1202
 
                      found_la="$dir/$libname.la"
1203
 
                    fi
1204
 
                  fi
1205
 
                  ;;
1206
 
              esac
1207
 
              if test "X$found_dir" != "X"; then
1208
 
                break
1209
 
              fi
1210
 
            done
1211
 
          fi
1212
 
          if test "X$found_dir" != "X"; then
1213
 
            dnl Found the library.
1214
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1215
 
            if test "X$found_so" != "X"; then
1216
 
              dnl Linking with a shared library. We attempt to hardcode its
1217
 
              dnl directory into the executable's runpath, unless it's the
1218
 
              dnl standard /usr/lib.
1219
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
1220
 
                dnl No hardcoding is needed.
1221
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1222
 
              else
1223
 
                dnl Use an explicit option to hardcode DIR into the resulting
1224
 
                dnl binary.
1225
 
                dnl Potentially add DIR to ltrpathdirs.
1226
 
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1227
 
                haveit=
1228
 
                for x in $ltrpathdirs; do
1229
 
                  if test "X$x" = "X$found_dir"; then
1230
 
                    haveit=yes
1231
 
                    break
1232
 
                  fi
1233
 
                done
1234
 
                if test -z "$haveit"; then
1235
 
                  ltrpathdirs="$ltrpathdirs $found_dir"
1236
 
                fi
1237
 
                dnl The hardcoding into $LIBNAME is system dependent.
1238
 
                if test "$acl_hardcode_direct" = yes; then
1239
 
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1240
 
                  dnl resulting binary.
1241
 
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1242
 
                else
1243
 
                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1244
 
                    dnl Use an explicit option to hardcode DIR into the resulting
1245
 
                    dnl binary.
1246
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1247
 
                    dnl Potentially add DIR to rpathdirs.
1248
 
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
1249
 
                    haveit=
1250
 
                    for x in $rpathdirs; do
1251
 
                      if test "X$x" = "X$found_dir"; then
1252
 
                        haveit=yes
1253
 
                        break
1254
 
                      fi
1255
 
                    done
1256
 
                    if test -z "$haveit"; then
1257
 
                      rpathdirs="$rpathdirs $found_dir"
1258
 
                    fi
1259
 
                  else
1260
 
                    dnl Rely on "-L$found_dir".
1261
 
                    dnl But don't add it if it's already contained in the LDFLAGS
1262
 
                    dnl or the already constructed $LIBNAME
1263
 
                    haveit=
1264
 
                    for x in $LDFLAGS $LIB[]NAME; do
1265
 
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1266
 
                      if test "X$x" = "X-L$found_dir"; then
1267
 
                        haveit=yes
1268
 
                        break
1269
 
                      fi
1270
 
                    done
1271
 
                    if test -z "$haveit"; then
1272
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1273
 
                    fi
1274
 
                    if test "$acl_hardcode_minus_L" != no; then
1275
 
                      dnl FIXME: Not sure whether we should use
1276
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1277
 
                      dnl here.
1278
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1279
 
                    else
1280
 
                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1281
 
                      dnl here, because this doesn't fit in flags passed to the
1282
 
                      dnl compiler. So give up. No hardcoding. This affects only
1283
 
                      dnl very old systems.
1284
 
                      dnl FIXME: Not sure whether we should use
1285
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1286
 
                      dnl here.
1287
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1288
 
                    fi
1289
 
                  fi
1290
 
                fi
1291
 
              fi
1292
 
            else
1293
 
              if test "X$found_a" != "X"; then
1294
 
                dnl Linking with a static library.
1295
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1296
 
              else
1297
 
                dnl We shouldn't come here, but anyway it's good to have a
1298
 
                dnl fallback.
1299
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1300
 
              fi
1301
 
            fi
1302
 
            dnl Assume the include files are nearby.
1303
 
            additional_includedir=
1304
 
            case "$found_dir" in
1305
 
              */$acl_libdirstem | */$acl_libdirstem/)
1306
 
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1307
 
                LIB[]NAME[]_PREFIX="$basedir"
1308
 
                additional_includedir="$basedir/include"
1309
 
                ;;
1310
 
            esac
1311
 
            if test "X$additional_includedir" != "X"; then
1312
 
              dnl Potentially add $additional_includedir to $INCNAME.
1313
 
              dnl But don't add it
1314
 
              dnl   1. if it's the standard /usr/include,
1315
 
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1316
 
              dnl   3. if it's already present in $CPPFLAGS or the already
1317
 
              dnl      constructed $INCNAME,
1318
 
              dnl   4. if it doesn't exist as a directory.
1319
 
              if test "X$additional_includedir" != "X/usr/include"; then
1320
 
                haveit=
1321
 
                if test "X$additional_includedir" = "X/usr/local/include"; then
1322
 
                  if test -n "$GCC"; then
1323
 
                    case $host_os in
1324
 
                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1325
 
                    esac
1326
 
                  fi
1327
 
                fi
1328
 
                if test -z "$haveit"; then
1329
 
                  for x in $CPPFLAGS $INC[]NAME; do
1330
 
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1331
 
                    if test "X$x" = "X-I$additional_includedir"; then
1332
 
                      haveit=yes
1333
 
                      break
1334
 
                    fi
1335
 
                  done
1336
 
                  if test -z "$haveit"; then
1337
 
                    if test -d "$additional_includedir"; then
1338
 
                      dnl Really add $additional_includedir to $INCNAME.
1339
 
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1340
 
                    fi
1341
 
                  fi
1342
 
                fi
1343
 
              fi
1344
 
            fi
1345
 
            dnl Look for dependencies.
1346
 
            if test -n "$found_la"; then
1347
 
              dnl Read the .la file. It defines the variables
1348
 
              dnl dlname, library_names, old_library, dependency_libs, current,
1349
 
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
1350
 
              save_libdir="$libdir"
1351
 
              case "$found_la" in
1352
 
                */* | *\\*) . "$found_la" ;;
1353
 
                *) . "./$found_la" ;;
1354
 
              esac
1355
 
              libdir="$save_libdir"
1356
 
              dnl We use only dependency_libs.
1357
 
              for dep in $dependency_libs; do
1358
 
                case "$dep" in
1359
 
                  -L*)
1360
 
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1361
 
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1362
 
                    dnl But don't add it
1363
 
                    dnl   1. if it's the standard /usr/lib,
1364
 
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1365
 
                    dnl   3. if it's already present in $LDFLAGS or the already
1366
 
                    dnl      constructed $LIBNAME,
1367
 
                    dnl   4. if it doesn't exist as a directory.
1368
 
                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1369
 
                      haveit=
1370
 
                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1371
 
                        if test -n "$GCC"; then
1372
 
                          case $host_os in
1373
 
                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1374
 
                          esac
1375
 
                        fi
1376
 
                      fi
1377
 
                      if test -z "$haveit"; then
1378
 
                        haveit=
1379
 
                        for x in $LDFLAGS $LIB[]NAME; do
1380
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1381
 
                          if test "X$x" = "X-L$additional_libdir"; then
1382
 
                            haveit=yes
1383
 
                            break
1384
 
                          fi
1385
 
                        done
1386
 
                        if test -z "$haveit"; then
1387
 
                          if test -d "$additional_libdir"; then
1388
 
                            dnl Really add $additional_libdir to $LIBNAME.
1389
 
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1390
 
                          fi
1391
 
                        fi
1392
 
                        haveit=
1393
 
                        for x in $LDFLAGS $LTLIB[]NAME; do
1394
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1395
 
                          if test "X$x" = "X-L$additional_libdir"; then
1396
 
                            haveit=yes
1397
 
                            break
1398
 
                          fi
1399
 
                        done
1400
 
                        if test -z "$haveit"; then
1401
 
                          if test -d "$additional_libdir"; then
1402
 
                            dnl Really add $additional_libdir to $LTLIBNAME.
1403
 
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1404
 
                          fi
1405
 
                        fi
1406
 
                      fi
1407
 
                    fi
1408
 
                    ;;
1409
 
                  -R*)
1410
 
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
1411
 
                    if test "$enable_rpath" != no; then
1412
 
                      dnl Potentially add DIR to rpathdirs.
1413
 
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
1414
 
                      haveit=
1415
 
                      for x in $rpathdirs; do
1416
 
                        if test "X$x" = "X$dir"; then
1417
 
                          haveit=yes
1418
 
                          break
1419
 
                        fi
1420
 
                      done
1421
 
                      if test -z "$haveit"; then
1422
 
                        rpathdirs="$rpathdirs $dir"
1423
 
                      fi
1424
 
                      dnl Potentially add DIR to ltrpathdirs.
1425
 
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1426
 
                      haveit=
1427
 
                      for x in $ltrpathdirs; do
1428
 
                        if test "X$x" = "X$dir"; then
1429
 
                          haveit=yes
1430
 
                          break
1431
 
                        fi
1432
 
                      done
1433
 
                      if test -z "$haveit"; then
1434
 
                        ltrpathdirs="$ltrpathdirs $dir"
1435
 
                      fi
1436
 
                    fi
1437
 
                    ;;
1438
 
                  -l*)
1439
 
                    dnl Handle this in the next round.
1440
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1441
 
                    ;;
1442
 
                  *.la)
1443
 
                    dnl Handle this in the next round. Throw away the .la's
1444
 
                    dnl directory; it is already contained in a preceding -L
1445
 
                    dnl option.
1446
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1447
 
                    ;;
1448
 
                  *)
1449
 
                    dnl Most likely an immediate library name.
1450
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1451
 
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1452
 
                    ;;
1453
 
                esac
1454
 
              done
1455
 
            fi
1456
 
          else
1457
 
            dnl Didn't find the library; assume it is in the system directories
1458
 
            dnl known to the linker and runtime loader. (All the system
1459
 
            dnl directories known to the linker should also be known to the
1460
 
            dnl runtime loader, otherwise the system is severely misconfigured.)
1461
 
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1462
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1463
 
          fi
1464
 
        fi
1465
 
      fi
1466
 
    done
1467
 
  done
1468
 
  if test "X$rpathdirs" != "X"; then
1469
 
    if test -n "$acl_hardcode_libdir_separator"; then
1470
 
      dnl Weird platform: only the last -rpath option counts, the user must
1471
 
      dnl pass all path elements in one option. We can arrange that for a
1472
 
      dnl single library, but not when more than one $LIBNAMEs are used.
1473
 
      alldirs=
1474
 
      for found_dir in $rpathdirs; do
1475
 
        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1476
 
      done
1477
 
      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1478
 
      acl_save_libdir="$libdir"
1479
 
      libdir="$alldirs"
1480
 
      eval flag=\"$acl_hardcode_libdir_flag_spec\"
1481
 
      libdir="$acl_save_libdir"
1482
 
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1483
 
    else
1484
 
      dnl The -rpath options are cumulative.
1485
 
      for found_dir in $rpathdirs; do
1486
 
        acl_save_libdir="$libdir"
1487
 
        libdir="$found_dir"
1488
 
        eval flag=\"$acl_hardcode_libdir_flag_spec\"
1489
 
        libdir="$acl_save_libdir"
1490
 
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1491
 
      done
1492
 
    fi
1493
 
  fi
1494
 
  if test "X$ltrpathdirs" != "X"; then
1495
 
    dnl When using libtool, the option that works for both libraries and
1496
 
    dnl executables is -R. The -R options are cumulative.
1497
 
    for found_dir in $ltrpathdirs; do
1498
 
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1499
 
    done
1500
 
  fi
1501
 
])
1502
 
 
1503
 
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1504
 
dnl unless already present in VAR.
1505
 
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1506
 
dnl contains two or three consecutive elements that belong together.
1507
 
AC_DEFUN([AC_LIB_APPENDTOVAR],
1508
 
[
1509
 
  for element in [$2]; do
1510
 
    haveit=
1511
 
    for x in $[$1]; do
1512
 
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1513
 
      if test "X$x" = "X$element"; then
1514
 
        haveit=yes
1515
 
        break
1516
 
      fi
1517
 
    done
1518
 
    if test -z "$haveit"; then
1519
 
      [$1]="${[$1]}${[$1]:+ }$element"
1520
 
    fi
1521
 
  done
1522
 
])
1523
 
 
1524
 
dnl For those cases where a variable contains several -L and -l options
1525
 
dnl referring to unknown libraries and directories, this macro determines the
1526
 
dnl necessary additional linker options for the runtime path.
1527
 
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1528
 
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1529
 
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1530
 
dnl otherwise linking without libtool is assumed.
1531
 
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1532
 
[
1533
 
  AC_REQUIRE([AC_LIB_RPATH])
1534
 
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1535
 
  $1=
1536
 
  if test "$enable_rpath" != no; then
1537
 
    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1538
 
      dnl Use an explicit option to hardcode directories into the resulting
1539
 
      dnl binary.
1540
 
      rpathdirs=
1541
 
      next=
1542
 
      for opt in $2; do
1543
 
        if test -n "$next"; then
1544
 
          dir="$next"
1545
 
          dnl No need to hardcode the standard /usr/lib.
1546
 
          if test "X$dir" != "X/usr/$acl_libdirstem"; then
1547
 
            rpathdirs="$rpathdirs $dir"
1548
 
          fi
1549
 
          next=
1550
 
        else
1551
 
          case $opt in
1552
 
            -L) next=yes ;;
1553
 
            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1554
 
                 dnl No need to hardcode the standard /usr/lib.
1555
 
                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1556
 
                   rpathdirs="$rpathdirs $dir"
1557
 
                 fi
1558
 
                 next= ;;
1559
 
            *) next= ;;
1560
 
          esac
1561
 
        fi
1562
 
      done
1563
 
      if test "X$rpathdirs" != "X"; then
1564
 
        if test -n ""$3""; then
1565
 
          dnl libtool is used for linking. Use -R options.
1566
 
          for dir in $rpathdirs; do
1567
 
            $1="${$1}${$1:+ }-R$dir"
1568
 
          done
1569
 
        else
1570
 
          dnl The linker is used for linking directly.
1571
 
          if test -n "$acl_hardcode_libdir_separator"; then
1572
 
            dnl Weird platform: only the last -rpath option counts, the user
1573
 
            dnl must pass all path elements in one option.
1574
 
            alldirs=
1575
 
            for dir in $rpathdirs; do
1576
 
              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1577
 
            done
1578
 
            acl_save_libdir="$libdir"
1579
 
            libdir="$alldirs"
1580
 
            eval flag=\"$acl_hardcode_libdir_flag_spec\"
1581
 
            libdir="$acl_save_libdir"
1582
 
            $1="$flag"
1583
 
          else
1584
 
            dnl The -rpath options are cumulative.
1585
 
            for dir in $rpathdirs; do
1586
 
              acl_save_libdir="$libdir"
1587
 
              libdir="$dir"
1588
 
              eval flag=\"$acl_hardcode_libdir_flag_spec\"
1589
 
              libdir="$acl_save_libdir"
1590
 
              $1="${$1}${$1:+ }$flag"
1591
 
            done
1592
 
          fi
1593
 
        fi
1594
 
      fi
1595
 
    fi
1596
 
  fi
1597
 
  AC_SUBST([$1])
1598
 
])
1599
 
 
1600
 
# lib-prefix.m4 serial 5 (gettext-0.15)
1601
 
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1602
 
dnl This file is free software; the Free Software Foundation
1603
 
dnl gives unlimited permission to copy and/or distribute it,
1604
 
dnl with or without modifications, as long as this notice is preserved.
1605
 
 
1606
 
dnl From Bruno Haible.
1607
 
 
1608
 
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1609
 
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1610
 
dnl require excessive bracketing.
1611
 
ifdef([AC_HELP_STRING],
1612
 
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1613
 
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1614
 
 
1615
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1616
 
dnl to access previously installed libraries. The basic assumption is that
1617
 
dnl a user will want packages to use other packages he previously installed
1618
 
dnl with the same --prefix option.
1619
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1620
 
dnl libraries, but is otherwise very convenient.
1621
 
AC_DEFUN([AC_LIB_PREFIX],
1622
 
[
1623
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1624
 
  AC_REQUIRE([AC_PROG_CC])
1625
 
  AC_REQUIRE([AC_CANONICAL_HOST])
1626
 
  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1627
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1628
 
  dnl By default, look in $includedir and $libdir.
1629
 
  use_additional=yes
1630
 
  AC_LIB_WITH_FINAL_PREFIX([
1631
 
    eval additional_includedir=\"$includedir\"
1632
 
    eval additional_libdir=\"$libdir\"
1633
 
  ])
1634
 
  AC_LIB_ARG_WITH([lib-prefix],
1635
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1636
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
1637
 
[
1638
 
    if test "X$withval" = "Xno"; then
1639
 
      use_additional=no
1640
 
    else
1641
 
      if test "X$withval" = "X"; then
1642
 
        AC_LIB_WITH_FINAL_PREFIX([
1643
 
          eval additional_includedir=\"$includedir\"
1644
 
          eval additional_libdir=\"$libdir\"
1645
 
        ])
1646
 
      else
1647
 
        additional_includedir="$withval/include"
1648
 
        additional_libdir="$withval/$acl_libdirstem"
1649
 
      fi
1650
 
    fi
1651
 
])
1652
 
  if test $use_additional = yes; then
1653
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
1654
 
    dnl But don't add it
1655
 
    dnl   1. if it's the standard /usr/include,
1656
 
    dnl   2. if it's already present in $CPPFLAGS,
1657
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1658
 
    dnl   4. if it doesn't exist as a directory.
1659
 
    if test "X$additional_includedir" != "X/usr/include"; then
1660
 
      haveit=
1661
 
      for x in $CPPFLAGS; do
1662
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1663
 
        if test "X$x" = "X-I$additional_includedir"; then
1664
 
          haveit=yes
1665
 
          break
1666
 
        fi
1667
 
      done
1668
 
      if test -z "$haveit"; then
1669
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
1670
 
          if test -n "$GCC"; then
1671
 
            case $host_os in
1672
 
              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1673
 
            esac
1674
 
          fi
1675
 
        fi
1676
 
        if test -z "$haveit"; then
1677
 
          if test -d "$additional_includedir"; then
1678
 
            dnl Really add $additional_includedir to $CPPFLAGS.
1679
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1680
 
          fi
1681
 
        fi
1682
 
      fi
1683
 
    fi
1684
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
1685
 
    dnl But don't add it
1686
 
    dnl   1. if it's the standard /usr/lib,
1687
 
    dnl   2. if it's already present in $LDFLAGS,
1688
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1689
 
    dnl   4. if it doesn't exist as a directory.
1690
 
    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1691
 
      haveit=
1692
 
      for x in $LDFLAGS; do
1693
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1694
 
        if test "X$x" = "X-L$additional_libdir"; then
1695
 
          haveit=yes
1696
 
          break
1697
 
        fi
1698
 
      done
1699
 
      if test -z "$haveit"; then
1700
 
        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1701
 
          if test -n "$GCC"; then
1702
 
            case $host_os in
1703
 
              linux*) haveit=yes;;
1704
 
            esac
1705
 
          fi
1706
 
        fi
1707
 
        if test -z "$haveit"; then
1708
 
          if test -d "$additional_libdir"; then
1709
 
            dnl Really add $additional_libdir to $LDFLAGS.
1710
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1711
 
          fi
1712
 
        fi
1713
 
      fi
1714
 
    fi
1715
 
  fi
1716
 
])
1717
 
 
1718
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1719
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
1720
 
dnl $exec_prefix will expand at the end of the configure script.
1721
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1722
 
[
1723
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
1724
 
  dnl at the end of configure.
1725
 
  if test "X$prefix" = "XNONE"; then
1726
 
    acl_final_prefix="$ac_default_prefix"
1727
 
  else
1728
 
    acl_final_prefix="$prefix"
1729
 
  fi
1730
 
  if test "X$exec_prefix" = "XNONE"; then
1731
 
    acl_final_exec_prefix='${prefix}'
1732
 
  else
1733
 
    acl_final_exec_prefix="$exec_prefix"
1734
 
  fi
1735
 
  acl_save_prefix="$prefix"
1736
 
  prefix="$acl_final_prefix"
1737
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1738
 
  prefix="$acl_save_prefix"
1739
 
])
1740
 
 
1741
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1742
 
dnl variables prefix and exec_prefix bound to the values they will have
1743
 
dnl at the end of the configure script.
1744
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1745
 
[
1746
 
  acl_save_prefix="$prefix"
1747
 
  prefix="$acl_final_prefix"
1748
 
  acl_save_exec_prefix="$exec_prefix"
1749
 
  exec_prefix="$acl_final_exec_prefix"
1750
 
  $1
1751
 
  exec_prefix="$acl_save_exec_prefix"
1752
 
  prefix="$acl_save_prefix"
1753
 
])
1754
 
 
1755
 
dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1756
 
dnl the basename of the libdir, either "lib" or "lib64".
1757
 
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1758
 
[
1759
 
  dnl There is no formal standard regarding lib and lib64. The current
1760
 
  dnl practice is that on a system supporting 32-bit and 64-bit instruction
1761
 
  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1762
 
  dnl libraries go under $prefix/lib. We determine the compiler's default
1763
 
  dnl mode by looking at the compiler's library search path. If at least
1764
 
  dnl of its elements ends in /lib64 or points to a directory whose absolute
1765
 
  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1766
 
  dnl default, namely "lib".
1767
 
  acl_libdirstem=lib
1768
 
  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1769
 
  if test -n "$searchpath"; then
1770
 
    acl_save_IFS="${IFS=        }"; IFS=":"
1771
 
    for searchdir in $searchpath; do
1772
 
      if test -d "$searchdir"; then
1773
 
        case "$searchdir" in
1774
 
          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1775
 
          *) searchdir=`cd "$searchdir" && pwd`
1776
 
             case "$searchdir" in
1777
 
               */lib64 ) acl_libdirstem=lib64 ;;
1778
 
             esac ;;
1779
 
        esac
1780
 
      fi
1781
 
    done
1782
 
    IFS="$acl_save_IFS"
1783
 
  fi
1784
 
])
1785
 
 
1786
 
# nls.m4 serial 3 (gettext-0.15)
1787
 
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
1788
 
dnl This file is free software; the Free Software Foundation
1789
 
dnl gives unlimited permission to copy and/or distribute it,
1790
 
dnl with or without modifications, as long as this notice is preserved.
1791
 
dnl
1792
 
dnl This file can can be used in projects which are not available under
1793
 
dnl the GNU General Public License or the GNU Library General Public
1794
 
dnl License but which still want to provide support for the GNU gettext
1795
 
dnl functionality.
1796
 
dnl Please note that the actual code of the GNU gettext library is covered
1797
 
dnl by the GNU Library General Public License, and the rest of the GNU
1798
 
dnl gettext package package is covered by the GNU General Public License.
1799
 
dnl They are *not* in the public domain.
1800
 
 
1801
 
dnl Authors:
1802
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1803
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1804
 
 
1805
 
AC_PREREQ(2.50)
1806
 
 
1807
 
AC_DEFUN([AM_NLS],
1808
 
[
1809
 
  AC_MSG_CHECKING([whether NLS is requested])
1810
 
  dnl Default is enabled NLS
1811
 
  AC_ARG_ENABLE(nls,
1812
 
    [  --disable-nls           do not use Native Language Support],
1813
 
    USE_NLS=$enableval, USE_NLS=yes)
1814
 
  AC_MSG_RESULT($USE_NLS)
1815
 
  AC_SUBST(USE_NLS)
1816
 
])
1817
 
 
1818
216
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
217
# serial 1 (pkg-config-0.24)
1819
218
1820
219
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1821
220
#
1843
242
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1844
243
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1845
244
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1846
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
245
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
246
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
247
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
248
 
1847
249
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1848
250
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1849
251
fi
1856
258
                AC_MSG_RESULT([no])
1857
259
                PKG_CONFIG=""
1858
260
        fi
1859
 
                
1860
261
fi[]dnl
1861
262
])# PKG_PROG_PKG_CONFIG
1862
263
 
1865
266
# Check to see whether a particular set of modules exists.  Similar
1866
267
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1867
268
#
1868
 
#
1869
 
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
1870
 
# this or PKG_CHECK_MODULES is called, or make sure to call
1871
 
# PKG_CHECK_EXISTS manually
 
269
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
270
# only at the first occurence in configure.ac, so if the first place
 
271
# it's called might be skipped (such as if it is within an "if", you
 
272
# have to call PKG_CHECK_EXISTS manually
1872
273
# --------------------------------------------------------------
1873
274
AC_DEFUN([PKG_CHECK_EXISTS],
1874
275
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1875
276
if test -n "$PKG_CONFIG" && \
1876
277
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1877
 
  m4_ifval([$2], [$2], [:])
 
278
  m4_default([$2], [:])
1878
279
m4_ifvaln([$3], [else
1879
280
  $3])dnl
1880
281
fi])
1881
282
 
1882
 
 
1883
283
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1884
284
# ---------------------------------------------
1885
285
m4_define([_PKG_CONFIG],
1932
332
See the pkg-config man page for more details.])
1933
333
 
1934
334
if test $pkg_failed = yes; then
 
335
        AC_MSG_RESULT([no])
1935
336
        _PKG_SHORT_ERRORS_SUPPORTED
1936
337
        if test $_pkg_short_errors_supported = yes; then
1937
338
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1941
342
        # Put the nasty error message in config.log where it belongs
1942
343
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1943
344
 
1944
 
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
345
        m4_default([$4], [AC_MSG_ERROR(
1945
346
[Package requirements ($2) were not met:
1946
347
 
1947
348
$$1_PKG_ERRORS
1949
350
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1950
351
installed software in a non-standard prefix.
1951
352
 
1952
 
_PKG_TEXT
1953
 
])],
1954
 
                [AC_MSG_RESULT([no])
1955
 
                $4])
 
353
_PKG_TEXT])
 
354
        ])
1956
355
elif test $pkg_failed = untried; then
1957
 
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
356
        AC_MSG_RESULT([no])
 
357
        m4_default([$4], [AC_MSG_FAILURE(
1958
358
[The pkg-config script could not be found or is too old.  Make sure it
1959
359
is in your PATH or set the PKG_CONFIG environment variable to the full
1960
360
path to pkg-config.
1961
361
 
1962
362
_PKG_TEXT
1963
363
 
1964
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
1965
 
                [$4])
 
364
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
 
365
        ])
1966
366
else
1967
367
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1968
368
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1969
369
        AC_MSG_RESULT([yes])
1970
 
        ifelse([$3], , :, [$3])
 
370
        $3
1971
371
fi[]dnl
1972
372
])# PKG_CHECK_MODULES
1973
373
 
1974
 
# po.m4 serial 15 (gettext-0.17)
1975
 
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
1976
 
dnl This file is free software; the Free Software Foundation
1977
 
dnl gives unlimited permission to copy and/or distribute it,
1978
 
dnl with or without modifications, as long as this notice is preserved.
1979
 
dnl
1980
 
dnl This file can can be used in projects which are not available under
1981
 
dnl the GNU General Public License or the GNU Library General Public
1982
 
dnl License but which still want to provide support for the GNU gettext
1983
 
dnl functionality.
1984
 
dnl Please note that the actual code of the GNU gettext library is covered
1985
 
dnl by the GNU Library General Public License, and the rest of the GNU
1986
 
dnl gettext package package is covered by the GNU General Public License.
1987
 
dnl They are *not* in the public domain.
1988
 
 
1989
 
dnl Authors:
1990
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1991
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1992
 
 
1993
 
AC_PREREQ(2.50)
1994
 
 
1995
 
dnl Checks for all prerequisites of the po subdirectory.
1996
 
AC_DEFUN([AM_PO_SUBDIRS],
1997
 
[
1998
 
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1999
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
2000
 
  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
2001
 
  AC_REQUIRE([AM_NLS])dnl
2002
 
 
2003
 
  dnl Release version of the gettext macros. This is used to ensure that
2004
 
  dnl the gettext macros and po/Makefile.in.in are in sync.
2005
 
  AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
2006
 
 
2007
 
  dnl Perform the following tests also if --disable-nls has been given,
2008
 
  dnl because they are needed for "make dist" to work.
2009
 
 
2010
 
  dnl Search for GNU msgfmt in the PATH.
2011
 
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
2012
 
  dnl The second test excludes FreeBSD msgfmt.
2013
 
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2014
 
    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2015
 
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
2016
 
    :)
2017
 
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2018
 
 
2019
 
  dnl Test whether it is GNU msgfmt >= 0.15.
2020
 
changequote(,)dnl
2021
 
  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2022
 
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
2023
 
    *) MSGFMT_015=$MSGFMT ;;
2024
 
  esac
2025
 
changequote([,])dnl
2026
 
  AC_SUBST([MSGFMT_015])
2027
 
changequote(,)dnl
2028
 
  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2029
 
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
2030
 
    *) GMSGFMT_015=$GMSGFMT ;;
2031
 
  esac
2032
 
changequote([,])dnl
2033
 
  AC_SUBST([GMSGFMT_015])
2034
 
 
2035
 
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
2036
 
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
2037
 
  dnl The second test excludes FreeBSD xgettext.
2038
 
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2039
 
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
2040
 
     (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)],
2041
 
    :)
2042
 
  dnl Remove leftover from FreeBSD xgettext call.
2043
 
  rm -f messages.po
2044
 
 
2045
 
  dnl Test whether it is GNU xgettext >= 0.15.
2046
 
changequote(,)dnl
2047
 
  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2048
 
    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2049
 
    *) XGETTEXT_015=$XGETTEXT ;;
2050
 
  esac
2051
 
changequote([,])dnl
2052
 
  AC_SUBST([XGETTEXT_015])
2053
 
 
2054
 
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2055
 
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2056
 
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2057
 
 
2058
 
  dnl Installation directories.
2059
 
  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2060
 
  dnl have to define it here, so that it can be used in po/Makefile.
2061
 
  test -n "$localedir" || localedir='${datadir}/locale'
2062
 
  AC_SUBST([localedir])
2063
 
 
2064
 
  dnl Support for AM_XGETTEXT_OPTION.
2065
 
  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2066
 
  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2067
 
 
2068
 
  AC_CONFIG_COMMANDS([po-directories], [[
2069
 
    for ac_file in $CONFIG_FILES; do
2070
 
      # Support "outfile[:infile[:infile...]]"
2071
 
      case "$ac_file" in
2072
 
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2073
 
      esac
2074
 
      # PO directories have a Makefile.in generated from Makefile.in.in.
2075
 
      case "$ac_file" in */Makefile.in)
2076
 
        # Adjust a relative srcdir.
2077
 
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2078
 
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2079
 
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2080
 
        # In autoconf-2.13 it is called $ac_given_srcdir.
2081
 
        # In autoconf-2.50 it is called $srcdir.
2082
 
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2083
 
        case "$ac_given_srcdir" in
2084
 
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2085
 
          /*) top_srcdir="$ac_given_srcdir" ;;
2086
 
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2087
 
        esac
2088
 
        # Treat a directory as a PO directory if and only if it has a
2089
 
        # POTFILES.in file. This allows packages to have multiple PO
2090
 
        # directories under different names or in different locations.
2091
 
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2092
 
          rm -f "$ac_dir/POTFILES"
2093
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2094
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
2095
 
          POMAKEFILEDEPS="POTFILES.in"
2096
 
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2097
 
          # on $ac_dir but don't depend on user-specified configuration
2098
 
          # parameters.
2099
 
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2100
 
            # The LINGUAS file contains the set of available languages.
2101
 
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
2102
 
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2103
 
            fi
2104
 
            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2105
 
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
2106
 
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2107
 
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2108
 
          else
2109
 
            # The set of available languages was given in configure.in.
2110
 
            # Hide the ALL_LINGUAS assigment from automake < 1.5.
2111
 
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2112
 
          fi
2113
 
          # Compute POFILES
2114
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2115
 
          # Compute UPDATEPOFILES
2116
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2117
 
          # Compute DUMMYPOFILES
2118
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2119
 
          # Compute GMOFILES
2120
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2121
 
          case "$ac_given_srcdir" in
2122
 
            .) srcdirpre= ;;
2123
 
            *) srcdirpre='$(srcdir)/' ;;
2124
 
          esac
2125
 
          POFILES=
2126
 
          UPDATEPOFILES=
2127
 
          DUMMYPOFILES=
2128
 
          GMOFILES=
2129
 
          for lang in $ALL_LINGUAS; do
2130
 
            POFILES="$POFILES $srcdirpre$lang.po"
2131
 
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2132
 
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2133
 
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2134
 
          done
2135
 
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
2136
 
          # environment variable.
2137
 
          INST_LINGUAS=
2138
 
          if test -n "$ALL_LINGUAS"; then
2139
 
            for presentlang in $ALL_LINGUAS; do
2140
 
              useit=no
2141
 
              if test "%UNSET%" != "$LINGUAS"; then
2142
 
                desiredlanguages="$LINGUAS"
2143
 
              else
2144
 
                desiredlanguages="$ALL_LINGUAS"
2145
 
              fi
2146
 
              for desiredlang in $desiredlanguages; do
2147
 
                # Use the presentlang catalog if desiredlang is
2148
 
                #   a. equal to presentlang, or
2149
 
                #   b. a variant of presentlang (because in this case,
2150
 
                #      presentlang can be used as a fallback for messages
2151
 
                #      which are not translated in the desiredlang catalog).
2152
 
                case "$desiredlang" in
2153
 
                  "$presentlang"*) useit=yes;;
2154
 
                esac
2155
 
              done
2156
 
              if test $useit = yes; then
2157
 
                INST_LINGUAS="$INST_LINGUAS $presentlang"
2158
 
              fi
2159
 
            done
2160
 
          fi
2161
 
          CATALOGS=
2162
 
          if test -n "$INST_LINGUAS"; then
2163
 
            for lang in $INST_LINGUAS; do
2164
 
              CATALOGS="$CATALOGS $lang.gmo"
2165
 
            done
2166
 
          fi
2167
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2168
 
          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"
2169
 
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2170
 
            if test -f "$f"; then
2171
 
              case "$f" in
2172
 
                *.orig | *.bak | *~) ;;
2173
 
                *) cat "$f" >> "$ac_dir/Makefile" ;;
2174
 
              esac
2175
 
            fi
2176
 
          done
2177
 
        fi
2178
 
        ;;
2179
 
      esac
2180
 
    done]],
2181
 
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2182
 
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2183
 
    # from automake < 1.5.
2184
 
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2185
 
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
2186
 
    LINGUAS="${LINGUAS-%UNSET%}"
2187
 
   ])
2188
 
])
2189
 
 
2190
 
dnl Postprocesses a Makefile in a directory containing PO files.
2191
 
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2192
 
[
2193
 
  # When this code is run, in config.status, two variables have already been
2194
 
  # set:
2195
 
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2196
 
  # - LINGUAS is the value of the environment variable LINGUAS at configure
2197
 
  #   time.
2198
 
 
2199
 
changequote(,)dnl
2200
 
  # Adjust a relative srcdir.
2201
 
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2202
 
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2203
 
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2204
 
  # In autoconf-2.13 it is called $ac_given_srcdir.
2205
 
  # In autoconf-2.50 it is called $srcdir.
2206
 
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2207
 
  case "$ac_given_srcdir" in
2208
 
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2209
 
    /*) top_srcdir="$ac_given_srcdir" ;;
2210
 
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2211
 
  esac
2212
 
 
2213
 
  # Find a way to echo strings without interpreting backslash.
2214
 
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2215
 
    gt_echo='echo'
2216
 
  else
2217
 
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2218
 
      gt_echo='printf %s\n'
2219
 
    else
2220
 
      echo_func () {
2221
 
        cat <<EOT
2222
 
$*
2223
 
EOT
2224
 
      }
2225
 
      gt_echo='echo_func'
2226
 
    fi
2227
 
  fi
2228
 
 
2229
 
  # A sed script that extracts the value of VARIABLE from a Makefile.
2230
 
  sed_x_variable='
2231
 
# Test if the hold space is empty.
2232
 
x
2233
 
s/P/P/
2234
 
x
2235
 
ta
2236
 
# Yes it was empty. Look if we have the expected variable definition.
2237
 
/^[      ]*VARIABLE[     ]*=/{
2238
 
  # Seen the first line of the variable definition.
2239
 
  s/^[   ]*VARIABLE[     ]*=//
2240
 
  ba
2241
 
}
2242
 
bd
2243
 
:a
2244
 
# Here we are processing a line from the variable definition.
2245
 
# Remove comment, more precisely replace it with a space.
2246
 
s/#.*$/ /
2247
 
# See if the line ends in a backslash.
2248
 
tb
2249
 
:b
2250
 
s/\\$//
2251
 
# Print the line, without the trailing backslash.
2252
 
p
2253
 
tc
2254
 
# There was no trailing backslash. The end of the variable definition is
2255
 
# reached. Clear the hold space.
2256
 
s/^.*$//
2257
 
x
2258
 
bd
2259
 
:c
2260
 
# A trailing backslash means that the variable definition continues in the
2261
 
# next line. Put a nonempty string into the hold space to indicate this.
2262
 
s/^.*$/P/
2263
 
x
2264
 
:d
2265
 
'
2266
 
changequote([,])dnl
2267
 
 
2268
 
  # Set POTFILES to the value of the Makefile variable POTFILES.
2269
 
  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2270
 
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2271
 
  # Compute POTFILES_DEPS as
2272
 
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2273
 
  POTFILES_DEPS=
2274
 
  for file in $POTFILES; do
2275
 
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2276
 
  done
2277
 
  POMAKEFILEDEPS=""
2278
 
 
2279
 
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
2280
 
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2281
 
  fi
2282
 
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2283
 
    # The LINGUAS file contains the set of available languages.
2284
 
    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2285
 
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2286
 
  else
2287
 
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2288
 
    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2289
 
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2290
 
  fi
2291
 
  # Hide the ALL_LINGUAS assigment from automake < 1.5.
2292
 
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2293
 
  # Compute POFILES
2294
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2295
 
  # Compute UPDATEPOFILES
2296
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2297
 
  # Compute DUMMYPOFILES
2298
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2299
 
  # Compute GMOFILES
2300
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2301
 
  # Compute PROPERTIESFILES
2302
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2303
 
  # Compute CLASSFILES
2304
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2305
 
  # Compute QMFILES
2306
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2307
 
  # Compute MSGFILES
2308
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2309
 
  # Compute RESOURCESDLLFILES
2310
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2311
 
  case "$ac_given_srcdir" in
2312
 
    .) srcdirpre= ;;
2313
 
    *) srcdirpre='$(srcdir)/' ;;
2314
 
  esac
2315
 
  POFILES=
2316
 
  UPDATEPOFILES=
2317
 
  DUMMYPOFILES=
2318
 
  GMOFILES=
2319
 
  PROPERTIESFILES=
2320
 
  CLASSFILES=
2321
 
  QMFILES=
2322
 
  MSGFILES=
2323
 
  RESOURCESDLLFILES=
2324
 
  for lang in $ALL_LINGUAS; do
2325
 
    POFILES="$POFILES $srcdirpre$lang.po"
2326
 
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2327
 
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2328
 
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2329
 
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2330
 
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2331
 
    QMFILES="$QMFILES $srcdirpre$lang.qm"
2332
 
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2333
 
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2334
 
    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2335
 
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2336
 
  done
2337
 
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
2338
 
  # environment variable.
2339
 
  INST_LINGUAS=
2340
 
  if test -n "$ALL_LINGUAS"; then
2341
 
    for presentlang in $ALL_LINGUAS; do
2342
 
      useit=no
2343
 
      if test "%UNSET%" != "$LINGUAS"; then
2344
 
        desiredlanguages="$LINGUAS"
2345
 
      else
2346
 
        desiredlanguages="$ALL_LINGUAS"
2347
 
      fi
2348
 
      for desiredlang in $desiredlanguages; do
2349
 
        # Use the presentlang catalog if desiredlang is
2350
 
        #   a. equal to presentlang, or
2351
 
        #   b. a variant of presentlang (because in this case,
2352
 
        #      presentlang can be used as a fallback for messages
2353
 
        #      which are not translated in the desiredlang catalog).
2354
 
        case "$desiredlang" in
2355
 
          "$presentlang"*) useit=yes;;
2356
 
        esac
2357
 
      done
2358
 
      if test $useit = yes; then
2359
 
        INST_LINGUAS="$INST_LINGUAS $presentlang"
2360
 
      fi
2361
 
    done
2362
 
  fi
2363
 
  CATALOGS=
2364
 
  JAVACATALOGS=
2365
 
  QTCATALOGS=
2366
 
  TCLCATALOGS=
2367
 
  CSHARPCATALOGS=
2368
 
  if test -n "$INST_LINGUAS"; then
2369
 
    for lang in $INST_LINGUAS; do
2370
 
      CATALOGS="$CATALOGS $lang.gmo"
2371
 
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2372
 
      QTCATALOGS="$QTCATALOGS $lang.qm"
2373
 
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2374
 
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2375
 
      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2376
 
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2377
 
    done
2378
 
  fi
2379
 
 
2380
 
  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"
2381
 
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2382
 
    # Add dependencies that cannot be formulated as a simple suffix rule.
2383
 
    for lang in $ALL_LINGUAS; do
2384
 
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2385
 
      cat >> "$ac_file.tmp" <<EOF
2386
 
$frobbedlang.msg: $lang.po
2387
 
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2388
 
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2389
 
EOF
2390
 
    done
2391
 
  fi
2392
 
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2393
 
    # Add dependencies that cannot be formulated as a simple suffix rule.
2394
 
    for lang in $ALL_LINGUAS; do
2395
 
      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2396
 
      cat >> "$ac_file.tmp" <<EOF
2397
 
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2398
 
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2399
 
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2400
 
EOF
2401
 
    done
2402
 
  fi
2403
 
  if test -n "$POMAKEFILEDEPS"; then
2404
 
    cat >> "$ac_file.tmp" <<EOF
2405
 
Makefile: $POMAKEFILEDEPS
2406
 
EOF
2407
 
  fi
2408
 
  mv "$ac_file.tmp" "$ac_file"
2409
 
])
2410
 
 
2411
 
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2412
 
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2413
 
[
2414
 
  XGETTEXT_EXTRA_OPTIONS=
2415
 
])
2416
 
 
2417
 
dnl Registers an option to be passed to xgettext in the po subdirectory.
2418
 
AC_DEFUN([AM_XGETTEXT_OPTION],
2419
 
[
2420
 
  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2421
 
  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2422
 
])
2423
 
 
2424
 
# progtest.m4 serial 4 (gettext-0.14.2)
2425
 
dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
2426
 
dnl This file is free software; the Free Software Foundation
2427
 
dnl gives unlimited permission to copy and/or distribute it,
2428
 
dnl with or without modifications, as long as this notice is preserved.
2429
 
dnl
2430
 
dnl This file can can be used in projects which are not available under
2431
 
dnl the GNU General Public License or the GNU Library General Public
2432
 
dnl License but which still want to provide support for the GNU gettext
2433
 
dnl functionality.
2434
 
dnl Please note that the actual code of the GNU gettext library is covered
2435
 
dnl by the GNU Library General Public License, and the rest of the GNU
2436
 
dnl gettext package package is covered by the GNU General Public License.
2437
 
dnl They are *not* in the public domain.
2438
 
 
2439
 
dnl Authors:
2440
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
2441
 
 
2442
 
AC_PREREQ(2.50)
2443
 
 
2444
 
# Search path for a program which passes the given test.
2445
 
 
2446
 
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2447
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2448
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2449
 
[
2450
 
# Prepare PATH_SEPARATOR.
2451
 
# The user is always right.
2452
 
if test "${PATH_SEPARATOR+set}" != set; then
2453
 
  echo "#! /bin/sh" >conf$$.sh
2454
 
  echo  "exit 0"   >>conf$$.sh
2455
 
  chmod +x conf$$.sh
2456
 
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2457
 
    PATH_SEPARATOR=';'
2458
 
  else
2459
 
    PATH_SEPARATOR=:
2460
 
  fi
2461
 
  rm -f conf$$.sh
2462
 
fi
2463
 
 
2464
 
# Find out how to test for executable files. Don't use a zero-byte file,
2465
 
# as systems may use methods other than mode bits to determine executability.
2466
 
cat >conf$$.file <<_ASEOF
2467
 
#! /bin/sh
2468
 
exit 0
2469
 
_ASEOF
2470
 
chmod +x conf$$.file
2471
 
if test -x conf$$.file >/dev/null 2>&1; then
2472
 
  ac_executable_p="test -x"
2473
 
else
2474
 
  ac_executable_p="test -f"
2475
 
fi
2476
 
rm -f conf$$.file
2477
 
 
2478
 
# Extract the first word of "$2", so it can be a program name with args.
2479
 
set dummy $2; ac_word=[$]2
2480
 
AC_MSG_CHECKING([for $ac_word])
2481
 
AC_CACHE_VAL(ac_cv_path_$1,
2482
 
[case "[$]$1" in
2483
 
  [[\\/]]* | ?:[[\\/]]*)
2484
 
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2485
 
    ;;
2486
 
  *)
2487
 
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2488
 
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
2489
 
      IFS="$ac_save_IFS"
2490
 
      test -z "$ac_dir" && ac_dir=.
2491
 
      for ac_exec_ext in '' $ac_executable_extensions; do
2492
 
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2493
 
          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2494
 
          if [$3]; then
2495
 
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2496
 
            break 2
2497
 
          fi
2498
 
        fi
2499
 
      done
2500
 
    done
2501
 
    IFS="$ac_save_IFS"
2502
 
dnl If no 4th arg is given, leave the cache variable unset,
2503
 
dnl so AC_PATH_PROGS will keep looking.
2504
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2505
 
])dnl
2506
 
    ;;
2507
 
esac])dnl
2508
 
$1="$ac_cv_path_$1"
2509
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2510
 
  AC_MSG_RESULT([$]$1)
2511
 
else
2512
 
  AC_MSG_RESULT(no)
2513
 
fi
2514
 
AC_SUBST($1)dnl
2515
 
])
2516
 
 
2517
374
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
2518
375
#
2519
376
# This file is free software; the Free Software Foundation
3479
1336
AC_SUBST([am__untar])
3480
1337
]) # _AM_PROG_TAR
3481
1338
 
 
1339
m4_include([m4/gettext.m4])
 
1340
m4_include([m4/iconv.m4])
 
1341
m4_include([m4/lib-ld.m4])
 
1342
m4_include([m4/lib-link.m4])
 
1343
m4_include([m4/lib-prefix.m4])
 
1344
m4_include([m4/nls.m4])
 
1345
m4_include([m4/po.m4])
 
1346
m4_include([m4/progtest.m4])