~ubuntu-branches/ubuntu/karmic/mhwaveedit/karmic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2008-01-08 22:20:37 UTC
  • mfrom: (2.1.6 hardy)
  • Revision ID: james.westby@ubuntu.com-20080108222037-tsazhckl5vmc8yih
Tags: 1.4.14-2
Added desktop file (Closes: #457849), thanks to Marco Rodrigues

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
 
1
# generated automatically by aclocal 1.10 -*- Autoconf -*-
2
2
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4
 
# Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005, 2006  Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
# gettext.m4 serial 28 (gettext-0.13)
15
 
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
16
 
dnl This file is free software, distributed under the terms of the GNU
17
 
dnl General Public License.  As a special exception to the GNU General
18
 
dnl Public License, this file may be distributed as part of a program
19
 
dnl that contains a configuration script generated by Autoconf, under
20
 
dnl the same distribution terms as the rest of that program.
21
 
dnl
22
 
dnl This file can can be used in projects which are not available under
23
 
dnl the GNU General Public License or the GNU Library General Public
24
 
dnl License but which still want to provide support for the GNU gettext
25
 
dnl functionality.
26
 
dnl Please note that the actual code of the GNU gettext library is covered
27
 
dnl by the GNU Library General Public License, and the rest of the GNU
28
 
dnl gettext package package is covered by the GNU General Public License.
29
 
dnl They are *not* in the public domain.
30
 
 
31
 
dnl Authors:
32
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
33
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
34
 
 
35
 
dnl Macro to add for using GNU gettext.
36
 
 
37
 
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
38
 
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
39
 
dnl    default (if it is not specified or empty) is 'no-libtool'.
40
 
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
41
 
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
42
 
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
43
 
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
44
 
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
45
 
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
46
 
dnl    $(top_builddir)/intl/libintl.a will be created.
47
 
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
48
 
dnl    implementations (in libc or libintl) without the ngettext() function
49
 
dnl    will be ignored.  If NEEDSYMBOL is specified and is
50
 
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
51
 
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
52
 
dnl INTLDIR is used to find the intl libraries.  If empty,
53
 
dnl    the value `$(top_builddir)/intl/' is used.
54
 
dnl
55
 
dnl The result of the configuration is one of three cases:
56
 
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
57
 
dnl    and used.
58
 
dnl    Catalog format: GNU --> install in $(datadir)
59
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
60
 
dnl 2) GNU gettext has been found in the system's C library.
61
 
dnl    Catalog format: GNU --> install in $(datadir)
62
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
63
 
dnl 3) No internationalization, always use English msgid.
64
 
dnl    Catalog format: none
65
 
dnl    Catalog extension: none
66
 
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
67
 
dnl The use of .gmo is historical (it was needed to avoid overwriting the
68
 
dnl GNU format catalogs when building on a platform with an X/Open gettext),
69
 
dnl but we keep it in order not to force irrelevant filename changes on the
70
 
dnl maintainers.
71
 
dnl
72
 
AC_DEFUN([AM_GNU_GETTEXT],
73
 
[
74
 
  dnl Argument checking.
75
 
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
76
 
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
77
 
])])])])])
78
 
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
79
 
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
80
 
])])])])
81
 
  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
82
 
  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
83
 
 
84
 
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
85
 
  ifelse(gt_included_intl, yes, [
86
 
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
87
 
  ])
88
 
 
89
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
90
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
91
 
  AC_REQUIRE([AC_LIB_RPATH])
92
 
 
93
 
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
94
 
  dnl Ideally we would do this search only after the
95
 
  dnl      if test "$USE_NLS" = "yes"; then
96
 
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
97
 
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
98
 
  dnl the configure script would need to contain the same shell code
99
 
  dnl again, outside any 'if'. There are two solutions:
100
 
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
101
 
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
102
 
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
103
 
  dnl documented, we avoid it.
104
 
  ifelse(gt_included_intl, yes, , [
105
 
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
106
 
  ])
107
 
 
108
 
  dnl Set USE_NLS.
109
 
  AM_NLS
110
 
 
111
 
  ifelse(gt_included_intl, yes, [
112
 
    BUILD_INCLUDED_LIBINTL=no
113
 
    USE_INCLUDED_LIBINTL=no
114
 
  ])
115
 
  LIBINTL=
116
 
  LTLIBINTL=
117
 
  POSUB=
118
 
 
119
 
  dnl If we use NLS figure out what method
120
 
  if test "$USE_NLS" = "yes"; then
121
 
    gt_use_preinstalled_gnugettext=no
122
 
    ifelse(gt_included_intl, yes, [
123
 
      AC_MSG_CHECKING([whether included gettext is requested])
124
 
      AC_ARG_WITH(included-gettext,
125
 
        [  --with-included-gettext use the GNU gettext library included here],
126
 
        nls_cv_force_use_gnu_gettext=$withval,
127
 
        nls_cv_force_use_gnu_gettext=no)
128
 
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
129
 
 
130
 
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
131
 
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
132
 
    ])
133
 
        dnl User does not insist on using GNU NLS library.  Figure out what
134
 
        dnl to use.  If GNU gettext is available we use this.  Else we have
135
 
        dnl to fall back to GNU NLS library.
136
 
 
137
 
        dnl Add a version number to the cache macros.
138
 
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
139
 
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
140
 
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
141
 
 
142
 
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
143
 
         [AC_TRY_LINK([#include <libintl.h>
144
 
]ifelse([$2], [need-formatstring-macros],
145
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
146
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
147
 
#endif
148
 
changequote(,)dnl
149
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
150
 
changequote([,])dnl
151
 
], [])[extern int _nl_msg_cat_cntr;
152
 
extern int *_nl_domain_bindings;],
153
 
            [bindtextdomain ("", "");
154
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
155
 
            gt_cv_func_gnugettext_libc=yes,
156
 
            gt_cv_func_gnugettext_libc=no)])
157
 
 
158
 
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
159
 
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
160
 
          ifelse(gt_included_intl, yes, , [
161
 
            AM_ICONV_LINK
162
 
          ])
163
 
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
164
 
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
165
 
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
166
 
          dnl even if libiconv doesn't exist.
167
 
          AC_LIB_LINKFLAGS_BODY([intl])
168
 
          AC_CACHE_CHECK([for GNU gettext in libintl],
169
 
            gt_cv_func_gnugettext_libintl,
170
 
           [gt_save_CPPFLAGS="$CPPFLAGS"
171
 
            CPPFLAGS="$CPPFLAGS $INCINTL"
172
 
            gt_save_LIBS="$LIBS"
173
 
            LIBS="$LIBS $LIBINTL"
174
 
            dnl Now see whether libintl exists and does not depend on libiconv.
175
 
            AC_TRY_LINK([#include <libintl.h>
176
 
]ifelse([$2], [need-formatstring-macros],
177
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
178
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
179
 
#endif
180
 
changequote(,)dnl
181
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
182
 
changequote([,])dnl
183
 
], [])[extern int _nl_msg_cat_cntr;
184
 
extern
185
 
#ifdef __cplusplus
186
 
"C"
187
 
#endif
188
 
const char *_nl_expand_alias ();],
189
 
              [bindtextdomain ("", "");
190
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
191
 
              gt_cv_func_gnugettext_libintl=yes,
192
 
              gt_cv_func_gnugettext_libintl=no)
193
 
            dnl Now see whether libintl exists and depends on libiconv.
194
 
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
195
 
              LIBS="$LIBS $LIBICONV"
196
 
              AC_TRY_LINK([#include <libintl.h>
197
 
]ifelse([$2], [need-formatstring-macros],
198
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
199
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
200
 
#endif
201
 
changequote(,)dnl
202
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
203
 
changequote([,])dnl
204
 
], [])[extern int _nl_msg_cat_cntr;
205
 
extern
206
 
#ifdef __cplusplus
207
 
"C"
208
 
#endif
209
 
const char *_nl_expand_alias ();],
210
 
                [bindtextdomain ("", "");
211
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
212
 
               [LIBINTL="$LIBINTL $LIBICONV"
213
 
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
214
 
                gt_cv_func_gnugettext_libintl=yes
215
 
               ])
216
 
            fi
217
 
            CPPFLAGS="$gt_save_CPPFLAGS"
218
 
            LIBS="$gt_save_LIBS"])
219
 
        fi
220
 
 
221
 
        dnl If an already present or preinstalled GNU gettext() is found,
222
 
        dnl use it.  But if this macro is used in GNU gettext, and GNU
223
 
        dnl gettext is already preinstalled in libintl, we update this
224
 
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
225
 
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
226
 
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
227
 
                && test "$PACKAGE" != gettext-runtime \
228
 
                && test "$PACKAGE" != gettext-tools; }; then
229
 
          gt_use_preinstalled_gnugettext=yes
230
 
        else
231
 
          dnl Reset the values set by searching for libintl.
232
 
          LIBINTL=
233
 
          LTLIBINTL=
234
 
          INCINTL=
235
 
        fi
236
 
 
237
 
    ifelse(gt_included_intl, yes, [
238
 
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
239
 
          dnl GNU gettext is not found in the C library.
240
 
          dnl Fall back on included GNU gettext library.
241
 
          nls_cv_use_gnu_gettext=yes
242
 
        fi
243
 
      fi
244
 
 
245
 
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
246
 
        dnl Mark actions used to generate GNU NLS library.
247
 
        BUILD_INCLUDED_LIBINTL=yes
248
 
        USE_INCLUDED_LIBINTL=yes
249
 
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
250
 
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
251
 
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
252
 
      fi
253
 
 
254
 
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
255
 
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
256
 
        dnl Mark actions to use GNU gettext tools.
257
 
        CATOBJEXT=.gmo
258
 
      fi
259
 
    ])
260
 
 
261
 
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
262
 
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
263
 
      AC_DEFINE(ENABLE_NLS, 1,
264
 
        [Define to 1 if translation of program messages to the user's native language
265
 
   is requested.])
266
 
    else
267
 
      USE_NLS=no
268
 
    fi
269
 
  fi
270
 
 
271
 
  AC_MSG_CHECKING([whether to use NLS])
272
 
  AC_MSG_RESULT([$USE_NLS])
273
 
  if test "$USE_NLS" = "yes"; then
274
 
    AC_MSG_CHECKING([where the gettext function comes from])
275
 
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
276
 
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
277
 
        gt_source="external libintl"
278
 
      else
279
 
        gt_source="libc"
280
 
      fi
281
 
    else
282
 
      gt_source="included intl directory"
283
 
    fi
284
 
    AC_MSG_RESULT([$gt_source])
285
 
  fi
286
 
 
287
 
  if test "$USE_NLS" = "yes"; then
288
 
 
289
 
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
290
 
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
291
 
        AC_MSG_CHECKING([how to link with libintl])
292
 
        AC_MSG_RESULT([$LIBINTL])
293
 
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
294
 
      fi
295
 
 
296
 
      dnl For backward compatibility. Some packages may be using this.
297
 
      AC_DEFINE(HAVE_GETTEXT, 1,
298
 
       [Define if the GNU gettext() function is already present or preinstalled.])
299
 
      AC_DEFINE(HAVE_DCGETTEXT, 1,
300
 
       [Define if the GNU dcgettext() function is already present or preinstalled.])
301
 
    fi
302
 
 
303
 
    dnl We need to process the po/ directory.
304
 
    POSUB=po
305
 
  fi
306
 
 
307
 
  ifelse(gt_included_intl, yes, [
308
 
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
309
 
    dnl to 'yes' because some of the testsuite requires it.
310
 
    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
311
 
      BUILD_INCLUDED_LIBINTL=yes
312
 
    fi
313
 
 
314
 
    dnl Make all variables we use known to autoconf.
315
 
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
316
 
    AC_SUBST(USE_INCLUDED_LIBINTL)
317
 
    AC_SUBST(CATOBJEXT)
318
 
 
319
 
    dnl For backward compatibility. Some configure.ins may be using this.
320
 
    nls_cv_header_intl=
321
 
    nls_cv_header_libgt=
322
 
 
323
 
    dnl For backward compatibility. Some Makefiles may be using this.
324
 
    DATADIRNAME=share
325
 
    AC_SUBST(DATADIRNAME)
326
 
 
327
 
    dnl For backward compatibility. Some Makefiles may be using this.
328
 
    INSTOBJEXT=.mo
329
 
    AC_SUBST(INSTOBJEXT)
330
 
 
331
 
    dnl For backward compatibility. Some Makefiles may be using this.
332
 
    GENCAT=gencat
333
 
    AC_SUBST(GENCAT)
334
 
 
335
 
    dnl For backward compatibility. Some Makefiles may be using this.
336
 
    if test "$USE_INCLUDED_LIBINTL" = yes; then
337
 
      INTLOBJS="\$(GETTOBJS)"
338
 
    fi
339
 
    AC_SUBST(INTLOBJS)
340
 
 
341
 
    dnl Enable libtool support if the surrounding package wishes it.
342
 
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
343
 
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
344
 
  ])
345
 
 
346
 
  dnl For backward compatibility. Some Makefiles may be using this.
347
 
  INTLLIBS="$LIBINTL"
348
 
  AC_SUBST(INTLLIBS)
349
 
 
350
 
  dnl Make all documented variables known to autoconf.
351
 
  AC_SUBST(LIBINTL)
352
 
  AC_SUBST(LTLIBINTL)
353
 
  AC_SUBST(POSUB)
354
 
])
355
 
 
356
 
 
357
 
dnl Checks for all prerequisites of the intl subdirectory,
358
 
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
359
 
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
360
 
AC_DEFUN([AM_INTL_SUBDIR],
361
 
[
362
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
363
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
364
 
  AC_REQUIRE([AC_PROG_CC])dnl
365
 
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
366
 
  AC_REQUIRE([AC_PROG_RANLIB])dnl
367
 
  AC_REQUIRE([AC_ISC_POSIX])dnl
368
 
  AC_REQUIRE([AC_HEADER_STDC])dnl
369
 
  AC_REQUIRE([AC_C_CONST])dnl
370
 
  AC_REQUIRE([bh_C_SIGNED])dnl
371
 
  AC_REQUIRE([AC_C_INLINE])dnl
372
 
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
373
 
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
374
 
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
375
 
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
376
 
  AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
377
 
  AC_REQUIRE([gt_TYPE_WINT_T])dnl
378
 
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
379
 
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
380
 
  AC_REQUIRE([gt_TYPE_INTMAX_T])
381
 
  AC_REQUIRE([gt_PRINTF_POSIX])
382
 
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
383
 
  AC_REQUIRE([AC_FUNC_MMAP])dnl
384
 
  AC_REQUIRE([jm_GLIBC21])dnl
385
 
  AC_REQUIRE([gt_INTDIV0])dnl
386
 
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
387
 
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
388
 
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
389
 
  AC_REQUIRE([gl_XSIZE])dnl
390
 
 
391
 
  AC_CHECK_TYPE([ptrdiff_t], ,
392
 
    [AC_DEFINE([ptrdiff_t], [long],
393
 
       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
394
 
    ])
395
 
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
396
 
stdlib.h string.h unistd.h sys/param.h])
397
 
  AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
398
 
mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
399
 
strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
400
 
__fsetlocking])
401
 
 
402
 
  dnl Use the _snprintf function only if it is declared (because on NetBSD it
403
 
  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
404
 
  gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
405
 
  gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
406
 
 
407
 
  dnl Use the *_unlocked functions only if they are declared.
408
 
  dnl (because some of them were defined without being declared in Solaris
409
 
  dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
410
 
  dnl on Solaris 2.5.1 to run on Solaris 2.6).
411
 
  dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
412
 
  gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
413
 
  gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
414
 
  gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
415
 
 
416
 
  case $gt_cv_func_printf_posix in
417
 
    *yes) HAVE_POSIX_PRINTF=1 ;;
418
 
    *) HAVE_POSIX_PRINTF=0 ;;
419
 
  esac
420
 
  AC_SUBST([HAVE_POSIX_PRINTF])
421
 
  if test "$ac_cv_func_asprintf" = yes; then
422
 
    HAVE_ASPRINTF=1
423
 
  else
424
 
    HAVE_ASPRINTF=0
425
 
  fi
426
 
  AC_SUBST([HAVE_ASPRINTF])
427
 
  if test "$ac_cv_func_snprintf" = yes; then
428
 
    HAVE_SNPRINTF=1
429
 
  else
430
 
    HAVE_SNPRINTF=0
431
 
  fi
432
 
  AC_SUBST([HAVE_SNPRINTF])
433
 
  if test "$ac_cv_func_wprintf" = yes; then
434
 
    HAVE_WPRINTF=1
435
 
  else
436
 
    HAVE_WPRINTF=0
437
 
  fi
438
 
  AC_SUBST([HAVE_WPRINTF])
439
 
 
440
 
  AM_ICONV
441
 
  AM_LANGINFO_CODESET
442
 
  if test $ac_cv_header_locale_h = yes; then
443
 
    AM_LC_MESSAGES
444
 
  fi
445
 
 
446
 
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
447
 
  dnl because plural.y uses bison specific features. It requires at least
448
 
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
449
 
  dnl compile.
450
 
  dnl bison is only needed for the maintainer (who touches plural.y). But in
451
 
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
452
 
  dnl the rule in general Makefile. Now, some people carelessly touch the
453
 
  dnl files or have a broken "make" program, hence the plural.c rule will
454
 
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
455
 
  dnl present or too old.
456
 
  AC_CHECK_PROGS([INTLBISON], [bison])
457
 
  if test -z "$INTLBISON"; then
458
 
    ac_verc_fail=yes
459
 
  else
460
 
    dnl Found it, now check the version.
461
 
    AC_MSG_CHECKING([version of bison])
462
 
changequote(<<,>>)dnl
463
 
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
464
 
    case $ac_prog_version in
465
 
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
466
 
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
467
 
changequote([,])dnl
468
 
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
469
 
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
470
 
    esac
471
 
    AC_MSG_RESULT([$ac_prog_version])
472
 
  fi
473
 
  if test $ac_verc_fail = yes; then
474
 
    INTLBISON=:
475
 
  fi
476
 
])
477
 
 
478
 
 
479
 
dnl gt_CHECK_DECL(FUNC, INCLUDES)
480
 
dnl Check whether a function is declared.
481
 
AC_DEFUN([gt_CHECK_DECL],
482
 
[
483
 
  AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
484
 
    [AC_TRY_COMPILE([$2], [
485
 
#ifndef $1
486
 
  char *p = (char *) $1;
487
 
#endif
488
 
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
489
 
  if test $ac_cv_have_decl_$1 = yes; then
490
 
    gt_value=1
491
 
  else
492
 
    gt_value=0
493
 
  fi
494
 
  AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
495
 
    [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
496
 
])
497
 
 
498
 
 
499
 
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
500
 
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
 
14
m4_if(m4_PACKAGE_VERSION, [2.61],,
 
15
[m4_fatal([this file was generated for autoconf 2.61.
 
16
You have another version of autoconf.  If you want to use that,
 
17
you should regenerate the build system entirely.], [63])])
501
18
 
502
19
# Configure paths for GTK+
503
20
# Owen Taylor     1997-2001
702
219
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
703
220
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
704
221
dnl
705
 
AC_DEFUN(AM_PATH_GTK,
 
222
AC_DEFUN([AM_PATH_GTK],
706
223
[dnl 
707
224
dnl Get the cflags and libraries from the gtk-config script
708
225
dnl
891
408
  rm -f conf.gtktest
892
409
])
893
410
 
894
 
# iconv.m4 serial AM4 (gettext-0.11.3)
895
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
896
 
dnl This file is free software, distributed under the terms of the GNU
897
 
dnl General Public License.  As a special exception to the GNU General
898
 
dnl Public License, this file may be distributed as part of a program
899
 
dnl that contains a configuration script generated by Autoconf, under
900
 
dnl the same distribution terms as the rest of that program.
901
 
 
902
 
dnl From Bruno Haible.
903
 
 
904
 
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
905
 
[
906
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
907
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
908
 
  AC_REQUIRE([AC_LIB_RPATH])
909
 
 
910
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
911
 
  dnl accordingly.
912
 
  AC_LIB_LINKFLAGS_BODY([iconv])
913
 
])
914
 
 
915
 
AC_DEFUN([AM_ICONV_LINK],
916
 
[
917
 
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
918
 
  dnl those with the standalone portable GNU libiconv installed).
919
 
 
920
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
921
 
  dnl accordingly.
922
 
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
923
 
 
924
 
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
925
 
  dnl because if the user has installed libiconv and not disabled its use
926
 
  dnl via --without-libiconv-prefix, he wants to use it. The first
927
 
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
928
 
  am_save_CPPFLAGS="$CPPFLAGS"
929
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
930
 
 
931
 
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
932
 
    am_cv_func_iconv="no, consider installing GNU libiconv"
933
 
    am_cv_lib_iconv=no
934
 
    AC_TRY_LINK([#include <stdlib.h>
935
 
#include <iconv.h>],
936
 
      [iconv_t cd = iconv_open("","");
937
 
       iconv(cd,NULL,NULL,NULL,NULL);
938
 
       iconv_close(cd);],
939
 
      am_cv_func_iconv=yes)
940
 
    if test "$am_cv_func_iconv" != yes; then
941
 
      am_save_LIBS="$LIBS"
942
 
      LIBS="$LIBS $LIBICONV"
943
 
      AC_TRY_LINK([#include <stdlib.h>
944
 
#include <iconv.h>],
945
 
        [iconv_t cd = iconv_open("","");
946
 
         iconv(cd,NULL,NULL,NULL,NULL);
947
 
         iconv_close(cd);],
948
 
        am_cv_lib_iconv=yes
949
 
        am_cv_func_iconv=yes)
950
 
      LIBS="$am_save_LIBS"
951
 
    fi
952
 
  ])
953
 
  if test "$am_cv_func_iconv" = yes; then
954
 
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
955
 
  fi
956
 
  if test "$am_cv_lib_iconv" = yes; then
957
 
    AC_MSG_CHECKING([how to link with libiconv])
958
 
    AC_MSG_RESULT([$LIBICONV])
959
 
  else
960
 
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
961
 
    dnl either.
962
 
    CPPFLAGS="$am_save_CPPFLAGS"
963
 
    LIBICONV=
964
 
    LTLIBICONV=
965
 
  fi
966
 
  AC_SUBST(LIBICONV)
967
 
  AC_SUBST(LTLIBICONV)
968
 
])
969
 
 
970
 
AC_DEFUN([AM_ICONV],
971
 
[
972
 
  AM_ICONV_LINK
973
 
  if test "$am_cv_func_iconv" = yes; then
974
 
    AC_MSG_CHECKING([for iconv declaration])
975
 
    AC_CACHE_VAL(am_cv_proto_iconv, [
976
 
      AC_TRY_COMPILE([
977
 
#include <stdlib.h>
978
 
#include <iconv.h>
979
 
extern
980
 
#ifdef __cplusplus
981
 
"C"
982
 
#endif
983
 
#if defined(__STDC__) || defined(__cplusplus)
984
 
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
985
 
#else
986
 
size_t iconv();
987
 
#endif
988
 
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
989
 
      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);"])
990
 
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
991
 
    AC_MSG_RESULT([$]{ac_t:-
992
 
         }[$]am_cv_proto_iconv)
993
 
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
994
 
      [Define as const if the declaration of iconv() needs const.])
995
 
  fi
996
 
])
997
 
 
998
 
# lib-ld.m4 serial 3 (gettext-0.13)
999
 
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
1000
 
dnl This file is free software, distributed under the terms of the GNU
1001
 
dnl General Public License.  As a special exception to the GNU General
1002
 
dnl Public License, this file may be distributed as part of a program
1003
 
dnl that contains a configuration script generated by Autoconf, under
1004
 
dnl the same distribution terms as the rest of that program.
1005
 
 
1006
 
dnl Subroutines of libtool.m4,
1007
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1008
 
dnl with libtool.m4.
1009
 
 
1010
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1011
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
1012
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1013
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1014
 
case `$LD -v 2>&1 </dev/null` in
1015
 
*GNU* | *'with BFD'*)
1016
 
  acl_cv_prog_gnu_ld=yes ;;
1017
 
*)
1018
 
  acl_cv_prog_gnu_ld=no ;;
1019
 
esac])
1020
 
with_gnu_ld=$acl_cv_prog_gnu_ld
1021
 
])
1022
 
 
1023
 
dnl From libtool-1.4. Sets the variable LD.
1024
 
AC_DEFUN([AC_LIB_PROG_LD],
1025
 
[AC_ARG_WITH(gnu-ld,
1026
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
1027
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1028
 
AC_REQUIRE([AC_PROG_CC])dnl
1029
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1030
 
# Prepare PATH_SEPARATOR.
1031
 
# The user is always right.
1032
 
if test "${PATH_SEPARATOR+set}" != set; then
1033
 
  echo "#! /bin/sh" >conf$$.sh
1034
 
  echo  "exit 0"   >>conf$$.sh
1035
 
  chmod +x conf$$.sh
1036
 
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1037
 
    PATH_SEPARATOR=';'
1038
 
  else
1039
 
    PATH_SEPARATOR=:
1040
 
  fi
1041
 
  rm -f conf$$.sh
1042
 
fi
1043
 
ac_prog=ld
1044
 
if test "$GCC" = yes; then
1045
 
  # Check if gcc -print-prog-name=ld gives a path.
1046
 
  AC_MSG_CHECKING([for ld used by GCC])
1047
 
  case $host in
1048
 
  *-*-mingw*)
1049
 
    # gcc leaves a trailing carriage return which upsets mingw
1050
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1051
 
  *)
1052
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1053
 
  esac
1054
 
  case $ac_prog in
1055
 
    # Accept absolute paths.
1056
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
1057
 
      [re_direlt='/[^/][^/]*/\.\./']
1058
 
      # Canonicalize the path of ld
1059
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1060
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1061
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1062
 
      done
1063
 
      test -z "$LD" && LD="$ac_prog"
1064
 
      ;;
1065
 
  "")
1066
 
    # If it fails, then pretend we aren't using GCC.
1067
 
    ac_prog=ld
1068
 
    ;;
1069
 
  *)
1070
 
    # If it is relative, then search for the first ld in PATH.
1071
 
    with_gnu_ld=unknown
1072
 
    ;;
1073
 
  esac
1074
 
elif test "$with_gnu_ld" = yes; then
1075
 
  AC_MSG_CHECKING([for GNU ld])
1076
 
else
1077
 
  AC_MSG_CHECKING([for non-GNU ld])
1078
 
fi
1079
 
AC_CACHE_VAL(acl_cv_path_LD,
1080
 
[if test -z "$LD"; then
1081
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1082
 
  for ac_dir in $PATH; do
1083
 
    test -z "$ac_dir" && ac_dir=.
1084
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1085
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
1086
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
1087
 
      # but apparently some GNU ld's only accept -v.
1088
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
1089
 
      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1090
 
      *GNU* | *'with BFD'*)
1091
 
        test "$with_gnu_ld" != no && break ;;
1092
 
      *)
1093
 
        test "$with_gnu_ld" != yes && break ;;
1094
 
      esac
1095
 
    fi
1096
 
  done
1097
 
  IFS="$ac_save_ifs"
1098
 
else
1099
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
411
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
412
 
413
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
414
#
 
415
# This program is free software; you can redistribute it and/or modify
 
416
# it under the terms of the GNU General Public License as published by
 
417
# the Free Software Foundation; either version 2 of the License, or
 
418
# (at your option) any later version.
 
419
#
 
420
# This program is distributed in the hope that it will be useful, but
 
421
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
422
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
423
# General Public License for more details.
 
424
#
 
425
# You should have received a copy of the GNU General Public License
 
426
# along with this program; if not, write to the Free Software
 
427
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
428
#
 
429
# As a special exception to the GNU General Public License, if you
 
430
# distribute this file as part of a program that contains a
 
431
# configuration script generated by Autoconf, you may include it under
 
432
# the same distribution terms that you use for the rest of that program.
 
433
 
 
434
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
435
# ----------------------------------
 
436
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
437
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
438
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
439
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
440
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
441
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
442
fi
 
443
if test -n "$PKG_CONFIG"; then
 
444
        _pkg_min_version=m4_default([$1], [0.9.0])
 
445
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
446
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
447
                AC_MSG_RESULT([yes])
 
448
        else
 
449
                AC_MSG_RESULT([no])
 
450
                PKG_CONFIG=""
 
451
        fi
 
452
                
 
453
fi[]dnl
 
454
])# PKG_PROG_PKG_CONFIG
 
455
 
 
456
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
457
#
 
458
# Check to see whether a particular set of modules exists.  Similar
 
459
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
460
#
 
461
#
 
462
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
463
# this or PKG_CHECK_MODULES is called, or make sure to call
 
464
# PKG_CHECK_EXISTS manually
 
465
# --------------------------------------------------------------
 
466
AC_DEFUN([PKG_CHECK_EXISTS],
 
467
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
468
if test -n "$PKG_CONFIG" && \
 
469
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
470
  m4_ifval([$2], [$2], [:])
 
471
m4_ifvaln([$3], [else
 
472
  $3])dnl
1100
473
fi])
1101
 
LD="$acl_cv_path_LD"
1102
 
if test -n "$LD"; then
1103
 
  AC_MSG_RESULT($LD)
1104
 
else
1105
 
  AC_MSG_RESULT(no)
1106
 
fi
1107
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1108
 
AC_LIB_PROG_LD_GNU
1109
 
])
1110
 
 
1111
 
# lib-link.m4 serial 4 (gettext-0.12)
1112
 
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1113
 
dnl This file is free software, distributed under the terms of the GNU
1114
 
dnl General Public License.  As a special exception to the GNU General
1115
 
dnl Public License, this file may be distributed as part of a program
1116
 
dnl that contains a configuration script generated by Autoconf, under
1117
 
dnl the same distribution terms as the rest of that program.
1118
 
 
1119
 
dnl From Bruno Haible.
1120
 
 
1121
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1122
 
dnl the libraries corresponding to explicit and implicit dependencies.
1123
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1124
 
dnl augments the CPPFLAGS variable.
1125
 
AC_DEFUN([AC_LIB_LINKFLAGS],
1126
 
[
1127
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1128
 
  AC_REQUIRE([AC_LIB_RPATH])
1129
 
  define([Name],[translit([$1],[./-], [___])])
1130
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1131
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1132
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1133
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
1134
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1135
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1136
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1137
 
  ])
1138
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1139
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1140
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1141
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1142
 
  AC_SUBST([LIB]NAME)
1143
 
  AC_SUBST([LTLIB]NAME)
1144
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1145
 
  dnl results of this search when this library appears as a dependency.
1146
 
  HAVE_LIB[]NAME=yes
1147
 
  undefine([Name])
1148
 
  undefine([NAME])
1149
 
])
1150
 
 
1151
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1152
 
dnl searches for libname and the libraries corresponding to explicit and
1153
 
dnl implicit dependencies, together with the specified include files and
1154
 
dnl the ability to compile and link the specified testcode. If found, it
1155
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1156
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1157
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1158
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1159
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1160
 
[
1161
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1162
 
  AC_REQUIRE([AC_LIB_RPATH])
1163
 
  define([Name],[translit([$1],[./-], [___])])
1164
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1165
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1166
 
 
1167
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1168
 
  dnl accordingly.
1169
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
1170
 
 
1171
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1172
 
  dnl because if the user has installed lib[]Name and not disabled its use
1173
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
1174
 
  ac_save_CPPFLAGS="$CPPFLAGS"
1175
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1176
 
 
1177
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1178
 
    ac_save_LIBS="$LIBS"
1179
 
    LIBS="$LIBS $LIB[]NAME"
1180
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1181
 
    LIBS="$ac_save_LIBS"
1182
 
  ])
1183
 
  if test "$ac_cv_lib[]Name" = yes; then
1184
 
    HAVE_LIB[]NAME=yes
1185
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1186
 
    AC_MSG_CHECKING([how to link with lib[]$1])
1187
 
    AC_MSG_RESULT([$LIB[]NAME])
1188
 
  else
1189
 
    HAVE_LIB[]NAME=no
1190
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1191
 
    dnl $INC[]NAME either.
1192
 
    CPPFLAGS="$ac_save_CPPFLAGS"
1193
 
    LIB[]NAME=
1194
 
    LTLIB[]NAME=
1195
 
  fi
1196
 
  AC_SUBST([HAVE_LIB]NAME)
1197
 
  AC_SUBST([LIB]NAME)
1198
 
  AC_SUBST([LTLIB]NAME)
1199
 
  undefine([Name])
1200
 
  undefine([NAME])
1201
 
])
1202
 
 
1203
 
dnl Determine the platform dependent parameters needed to use rpath:
1204
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1205
 
dnl hardcode_direct, hardcode_minus_L.
1206
 
AC_DEFUN([AC_LIB_RPATH],
1207
 
[
1208
 
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1209
 
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
1210
 
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
1211
 
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1212
 
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1213
 
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1214
 
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1215
 
    . ./conftest.sh
1216
 
    rm -f ./conftest.sh
1217
 
    acl_cv_rpath=done
1218
 
  ])
1219
 
  wl="$acl_cv_wl"
1220
 
  libext="$acl_cv_libext"
1221
 
  shlibext="$acl_cv_shlibext"
1222
 
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1223
 
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1224
 
  hardcode_direct="$acl_cv_hardcode_direct"
1225
 
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
1226
 
  dnl Determine whether the user wants rpath handling at all.
1227
 
  AC_ARG_ENABLE(rpath,
1228
 
    [  --disable-rpath         do not hardcode runtime library paths],
1229
 
    :, enable_rpath=yes)
1230
 
])
1231
 
 
1232
 
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1233
 
dnl the libraries corresponding to explicit and implicit dependencies.
1234
 
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1235
 
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1236
 
[
1237
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1238
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1239
 
  dnl By default, look in $includedir and $libdir.
1240
 
  use_additional=yes
1241
 
  AC_LIB_WITH_FINAL_PREFIX([
1242
 
    eval additional_includedir=\"$includedir\"
1243
 
    eval additional_libdir=\"$libdir\"
1244
 
  ])
1245
 
  AC_LIB_ARG_WITH([lib$1-prefix],
1246
 
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
1247
 
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
1248
 
[
1249
 
    if test "X$withval" = "Xno"; then
1250
 
      use_additional=no
1251
 
    else
1252
 
      if test "X$withval" = "X"; then
1253
 
        AC_LIB_WITH_FINAL_PREFIX([
1254
 
          eval additional_includedir=\"$includedir\"
1255
 
          eval additional_libdir=\"$libdir\"
1256
 
        ])
1257
 
      else
1258
 
        additional_includedir="$withval/include"
1259
 
        additional_libdir="$withval/lib"
1260
 
      fi
1261
 
    fi
1262
 
])
1263
 
  dnl Search the library and its dependencies in $additional_libdir and
1264
 
  dnl $LDFLAGS. Using breadth-first-seach.
1265
 
  LIB[]NAME=
1266
 
  LTLIB[]NAME=
1267
 
  INC[]NAME=
1268
 
  rpathdirs=
1269
 
  ltrpathdirs=
1270
 
  names_already_handled=
1271
 
  names_next_round='$1 $2'
1272
 
  while test -n "$names_next_round"; do
1273
 
    names_this_round="$names_next_round"
1274
 
    names_next_round=
1275
 
    for name in $names_this_round; do
1276
 
      already_handled=
1277
 
      for n in $names_already_handled; do
1278
 
        if test "$n" = "$name"; then
1279
 
          already_handled=yes
1280
 
          break
1281
 
        fi
1282
 
      done
1283
 
      if test -z "$already_handled"; then
1284
 
        names_already_handled="$names_already_handled $name"
1285
 
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1286
 
        dnl or AC_LIB_HAVE_LINKFLAGS call.
1287
 
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1288
 
        eval value=\"\$HAVE_LIB$uppername\"
1289
 
        if test -n "$value"; then
1290
 
          if test "$value" = yes; then
1291
 
            eval value=\"\$LIB$uppername\"
1292
 
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1293
 
            eval value=\"\$LTLIB$uppername\"
1294
 
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1295
 
          else
1296
 
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1297
 
            dnl that this library doesn't exist. So just drop it.
1298
 
            :
1299
 
          fi
1300
 
        else
1301
 
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1302
 
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
1303
 
          found_dir=
1304
 
          found_la=
1305
 
          found_so=
1306
 
          found_a=
1307
 
          if test $use_additional = yes; then
1308
 
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1309
 
              found_dir="$additional_libdir"
1310
 
              found_so="$additional_libdir/lib$name.$shlibext"
1311
 
              if test -f "$additional_libdir/lib$name.la"; then
1312
 
                found_la="$additional_libdir/lib$name.la"
1313
 
              fi
1314
 
            else
1315
 
              if test -f "$additional_libdir/lib$name.$libext"; then
1316
 
                found_dir="$additional_libdir"
1317
 
                found_a="$additional_libdir/lib$name.$libext"
1318
 
                if test -f "$additional_libdir/lib$name.la"; then
1319
 
                  found_la="$additional_libdir/lib$name.la"
1320
 
                fi
1321
 
              fi
1322
 
            fi
1323
 
          fi
1324
 
          if test "X$found_dir" = "X"; then
1325
 
            for x in $LDFLAGS $LTLIB[]NAME; do
1326
 
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1327
 
              case "$x" in
1328
 
                -L*)
1329
 
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
1330
 
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1331
 
                    found_dir="$dir"
1332
 
                    found_so="$dir/lib$name.$shlibext"
1333
 
                    if test -f "$dir/lib$name.la"; then
1334
 
                      found_la="$dir/lib$name.la"
1335
 
                    fi
1336
 
                  else
1337
 
                    if test -f "$dir/lib$name.$libext"; then
1338
 
                      found_dir="$dir"
1339
 
                      found_a="$dir/lib$name.$libext"
1340
 
                      if test -f "$dir/lib$name.la"; then
1341
 
                        found_la="$dir/lib$name.la"
1342
 
                      fi
1343
 
                    fi
1344
 
                  fi
1345
 
                  ;;
1346
 
              esac
1347
 
              if test "X$found_dir" != "X"; then
1348
 
                break
1349
 
              fi
1350
 
            done
1351
 
          fi
1352
 
          if test "X$found_dir" != "X"; then
1353
 
            dnl Found the library.
1354
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1355
 
            if test "X$found_so" != "X"; then
1356
 
              dnl Linking with a shared library. We attempt to hardcode its
1357
 
              dnl directory into the executable's runpath, unless it's the
1358
 
              dnl standard /usr/lib.
1359
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1360
 
                dnl No hardcoding is needed.
1361
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1362
 
              else
1363
 
                dnl Use an explicit option to hardcode DIR into the resulting
1364
 
                dnl binary.
1365
 
                dnl Potentially add DIR to ltrpathdirs.
1366
 
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1367
 
                haveit=
1368
 
                for x in $ltrpathdirs; do
1369
 
                  if test "X$x" = "X$found_dir"; then
1370
 
                    haveit=yes
1371
 
                    break
1372
 
                  fi
1373
 
                done
1374
 
                if test -z "$haveit"; then
1375
 
                  ltrpathdirs="$ltrpathdirs $found_dir"
1376
 
                fi
1377
 
                dnl The hardcoding into $LIBNAME is system dependent.
1378
 
                if test "$hardcode_direct" = yes; then
1379
 
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1380
 
                  dnl resulting binary.
1381
 
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1382
 
                else
1383
 
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1384
 
                    dnl Use an explicit option to hardcode DIR into the resulting
1385
 
                    dnl binary.
1386
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1387
 
                    dnl Potentially add DIR to rpathdirs.
1388
 
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
1389
 
                    haveit=
1390
 
                    for x in $rpathdirs; do
1391
 
                      if test "X$x" = "X$found_dir"; then
1392
 
                        haveit=yes
1393
 
                        break
1394
 
                      fi
1395
 
                    done
1396
 
                    if test -z "$haveit"; then
1397
 
                      rpathdirs="$rpathdirs $found_dir"
1398
 
                    fi
1399
 
                  else
1400
 
                    dnl Rely on "-L$found_dir".
1401
 
                    dnl But don't add it if it's already contained in the LDFLAGS
1402
 
                    dnl or the already constructed $LIBNAME
1403
 
                    haveit=
1404
 
                    for x in $LDFLAGS $LIB[]NAME; do
1405
 
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1406
 
                      if test "X$x" = "X-L$found_dir"; then
1407
 
                        haveit=yes
1408
 
                        break
1409
 
                      fi
1410
 
                    done
1411
 
                    if test -z "$haveit"; then
1412
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1413
 
                    fi
1414
 
                    if test "$hardcode_minus_L" != no; then
1415
 
                      dnl FIXME: Not sure whether we should use
1416
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1417
 
                      dnl here.
1418
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1419
 
                    else
1420
 
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1421
 
                      dnl here, because this doesn't fit in flags passed to the
1422
 
                      dnl compiler. So give up. No hardcoding. This affects only
1423
 
                      dnl very old systems.
1424
 
                      dnl FIXME: Not sure whether we should use
1425
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1426
 
                      dnl here.
1427
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1428
 
                    fi
1429
 
                  fi
1430
 
                fi
1431
 
              fi
1432
 
            else
1433
 
              if test "X$found_a" != "X"; then
1434
 
                dnl Linking with a static library.
1435
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1436
 
              else
1437
 
                dnl We shouldn't come here, but anyway it's good to have a
1438
 
                dnl fallback.
1439
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1440
 
              fi
1441
 
            fi
1442
 
            dnl Assume the include files are nearby.
1443
 
            additional_includedir=
1444
 
            case "$found_dir" in
1445
 
              */lib | */lib/)
1446
 
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1447
 
                additional_includedir="$basedir/include"
1448
 
                ;;
1449
 
            esac
1450
 
            if test "X$additional_includedir" != "X"; then
1451
 
              dnl Potentially add $additional_includedir to $INCNAME.
1452
 
              dnl But don't add it
1453
 
              dnl   1. if it's the standard /usr/include,
1454
 
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1455
 
              dnl   3. if it's already present in $CPPFLAGS or the already
1456
 
              dnl      constructed $INCNAME,
1457
 
              dnl   4. if it doesn't exist as a directory.
1458
 
              if test "X$additional_includedir" != "X/usr/include"; then
1459
 
                haveit=
1460
 
                if test "X$additional_includedir" = "X/usr/local/include"; then
1461
 
                  if test -n "$GCC"; then
1462
 
                    case $host_os in
1463
 
                      linux*) haveit=yes;;
1464
 
                    esac
1465
 
                  fi
1466
 
                fi
1467
 
                if test -z "$haveit"; then
1468
 
                  for x in $CPPFLAGS $INC[]NAME; do
1469
 
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1470
 
                    if test "X$x" = "X-I$additional_includedir"; then
1471
 
                      haveit=yes
1472
 
                      break
1473
 
                    fi
1474
 
                  done
1475
 
                  if test -z "$haveit"; then
1476
 
                    if test -d "$additional_includedir"; then
1477
 
                      dnl Really add $additional_includedir to $INCNAME.
1478
 
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1479
 
                    fi
1480
 
                  fi
1481
 
                fi
1482
 
              fi
1483
 
            fi
1484
 
            dnl Look for dependencies.
1485
 
            if test -n "$found_la"; then
1486
 
              dnl Read the .la file. It defines the variables
1487
 
              dnl dlname, library_names, old_library, dependency_libs, current,
1488
 
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
1489
 
              save_libdir="$libdir"
1490
 
              case "$found_la" in
1491
 
                */* | *\\*) . "$found_la" ;;
1492
 
                *) . "./$found_la" ;;
1493
 
              esac
1494
 
              libdir="$save_libdir"
1495
 
              dnl We use only dependency_libs.
1496
 
              for dep in $dependency_libs; do
1497
 
                case "$dep" in
1498
 
                  -L*)
1499
 
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1500
 
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1501
 
                    dnl But don't add it
1502
 
                    dnl   1. if it's the standard /usr/lib,
1503
 
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1504
 
                    dnl   3. if it's already present in $LDFLAGS or the already
1505
 
                    dnl      constructed $LIBNAME,
1506
 
                    dnl   4. if it doesn't exist as a directory.
1507
 
                    if test "X$additional_libdir" != "X/usr/lib"; then
1508
 
                      haveit=
1509
 
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
1510
 
                        if test -n "$GCC"; then
1511
 
                          case $host_os in
1512
 
                            linux*) haveit=yes;;
1513
 
                          esac
1514
 
                        fi
1515
 
                      fi
1516
 
                      if test -z "$haveit"; then
1517
 
                        haveit=
1518
 
                        for x in $LDFLAGS $LIB[]NAME; do
1519
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1520
 
                          if test "X$x" = "X-L$additional_libdir"; then
1521
 
                            haveit=yes
1522
 
                            break
1523
 
                          fi
1524
 
                        done
1525
 
                        if test -z "$haveit"; then
1526
 
                          if test -d "$additional_libdir"; then
1527
 
                            dnl Really add $additional_libdir to $LIBNAME.
1528
 
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1529
 
                          fi
1530
 
                        fi
1531
 
                        haveit=
1532
 
                        for x in $LDFLAGS $LTLIB[]NAME; do
1533
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1534
 
                          if test "X$x" = "X-L$additional_libdir"; then
1535
 
                            haveit=yes
1536
 
                            break
1537
 
                          fi
1538
 
                        done
1539
 
                        if test -z "$haveit"; then
1540
 
                          if test -d "$additional_libdir"; then
1541
 
                            dnl Really add $additional_libdir to $LTLIBNAME.
1542
 
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1543
 
                          fi
1544
 
                        fi
1545
 
                      fi
1546
 
                    fi
1547
 
                    ;;
1548
 
                  -R*)
1549
 
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
1550
 
                    if test "$enable_rpath" != no; then
1551
 
                      dnl Potentially add DIR to rpathdirs.
1552
 
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
1553
 
                      haveit=
1554
 
                      for x in $rpathdirs; do
1555
 
                        if test "X$x" = "X$dir"; then
1556
 
                          haveit=yes
1557
 
                          break
1558
 
                        fi
1559
 
                      done
1560
 
                      if test -z "$haveit"; then
1561
 
                        rpathdirs="$rpathdirs $dir"
1562
 
                      fi
1563
 
                      dnl Potentially add DIR to ltrpathdirs.
1564
 
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1565
 
                      haveit=
1566
 
                      for x in $ltrpathdirs; do
1567
 
                        if test "X$x" = "X$dir"; then
1568
 
                          haveit=yes
1569
 
                          break
1570
 
                        fi
1571
 
                      done
1572
 
                      if test -z "$haveit"; then
1573
 
                        ltrpathdirs="$ltrpathdirs $dir"
1574
 
                      fi
1575
 
                    fi
1576
 
                    ;;
1577
 
                  -l*)
1578
 
                    dnl Handle this in the next round.
1579
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1580
 
                    ;;
1581
 
                  *.la)
1582
 
                    dnl Handle this in the next round. Throw away the .la's
1583
 
                    dnl directory; it is already contained in a preceding -L
1584
 
                    dnl option.
1585
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1586
 
                    ;;
1587
 
                  *)
1588
 
                    dnl Most likely an immediate library name.
1589
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1590
 
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1591
 
                    ;;
1592
 
                esac
1593
 
              done
1594
 
            fi
1595
 
          else
1596
 
            dnl Didn't find the library; assume it is in the system directories
1597
 
            dnl known to the linker and runtime loader. (All the system
1598
 
            dnl directories known to the linker should also be known to the
1599
 
            dnl runtime loader, otherwise the system is severely misconfigured.)
1600
 
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1601
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1602
 
          fi
1603
 
        fi
1604
 
      fi
1605
 
    done
1606
 
  done
1607
 
  if test "X$rpathdirs" != "X"; then
1608
 
    if test -n "$hardcode_libdir_separator"; then
1609
 
      dnl Weird platform: only the last -rpath option counts, the user must
1610
 
      dnl pass all path elements in one option. We can arrange that for a
1611
 
      dnl single library, but not when more than one $LIBNAMEs are used.
1612
 
      alldirs=
1613
 
      for found_dir in $rpathdirs; do
1614
 
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1615
 
      done
1616
 
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1617
 
      acl_save_libdir="$libdir"
1618
 
      libdir="$alldirs"
1619
 
      eval flag=\"$hardcode_libdir_flag_spec\"
1620
 
      libdir="$acl_save_libdir"
1621
 
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1622
 
    else
1623
 
      dnl The -rpath options are cumulative.
1624
 
      for found_dir in $rpathdirs; do
1625
 
        acl_save_libdir="$libdir"
1626
 
        libdir="$found_dir"
1627
 
        eval flag=\"$hardcode_libdir_flag_spec\"
1628
 
        libdir="$acl_save_libdir"
1629
 
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1630
 
      done
1631
 
    fi
1632
 
  fi
1633
 
  if test "X$ltrpathdirs" != "X"; then
1634
 
    dnl When using libtool, the option that works for both libraries and
1635
 
    dnl executables is -R. The -R options are cumulative.
1636
 
    for found_dir in $ltrpathdirs; do
1637
 
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1638
 
    done
1639
 
  fi
1640
 
])
1641
 
 
1642
 
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1643
 
dnl unless already present in VAR.
1644
 
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1645
 
dnl contains two or three consecutive elements that belong together.
1646
 
AC_DEFUN([AC_LIB_APPENDTOVAR],
1647
 
[
1648
 
  for element in [$2]; do
1649
 
    haveit=
1650
 
    for x in $[$1]; do
1651
 
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1652
 
      if test "X$x" = "X$element"; then
1653
 
        haveit=yes
1654
 
        break
1655
 
      fi
1656
 
    done
1657
 
    if test -z "$haveit"; then
1658
 
      [$1]="${[$1]}${[$1]:+ }$element"
1659
 
    fi
1660
 
  done
1661
 
])
1662
 
 
1663
 
# lib-prefix.m4 serial 3 (gettext-0.13)
1664
 
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
1665
 
dnl This file is free software, distributed under the terms of the GNU
1666
 
dnl General Public License.  As a special exception to the GNU General
1667
 
dnl Public License, this file may be distributed as part of a program
1668
 
dnl that contains a configuration script generated by Autoconf, under
1669
 
dnl the same distribution terms as the rest of that program.
1670
 
 
1671
 
dnl From Bruno Haible.
1672
 
 
1673
 
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1674
 
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1675
 
dnl require excessive bracketing.
1676
 
ifdef([AC_HELP_STRING],
1677
 
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1678
 
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1679
 
 
1680
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1681
 
dnl to access previously installed libraries. The basic assumption is that
1682
 
dnl a user will want packages to use other packages he previously installed
1683
 
dnl with the same --prefix option.
1684
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1685
 
dnl libraries, but is otherwise very convenient.
1686
 
AC_DEFUN([AC_LIB_PREFIX],
1687
 
[
1688
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1689
 
  AC_REQUIRE([AC_PROG_CC])
1690
 
  AC_REQUIRE([AC_CANONICAL_HOST])
1691
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1692
 
  dnl By default, look in $includedir and $libdir.
1693
 
  use_additional=yes
1694
 
  AC_LIB_WITH_FINAL_PREFIX([
1695
 
    eval additional_includedir=\"$includedir\"
1696
 
    eval additional_libdir=\"$libdir\"
1697
 
  ])
1698
 
  AC_LIB_ARG_WITH([lib-prefix],
1699
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1700
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
1701
 
[
1702
 
    if test "X$withval" = "Xno"; then
1703
 
      use_additional=no
1704
 
    else
1705
 
      if test "X$withval" = "X"; then
1706
 
        AC_LIB_WITH_FINAL_PREFIX([
1707
 
          eval additional_includedir=\"$includedir\"
1708
 
          eval additional_libdir=\"$libdir\"
1709
 
        ])
1710
 
      else
1711
 
        additional_includedir="$withval/include"
1712
 
        additional_libdir="$withval/lib"
1713
 
      fi
1714
 
    fi
1715
 
])
1716
 
  if test $use_additional = yes; then
1717
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
1718
 
    dnl But don't add it
1719
 
    dnl   1. if it's the standard /usr/include,
1720
 
    dnl   2. if it's already present in $CPPFLAGS,
1721
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1722
 
    dnl   4. if it doesn't exist as a directory.
1723
 
    if test "X$additional_includedir" != "X/usr/include"; then
1724
 
      haveit=
1725
 
      for x in $CPPFLAGS; do
1726
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1727
 
        if test "X$x" = "X-I$additional_includedir"; then
1728
 
          haveit=yes
1729
 
          break
1730
 
        fi
1731
 
      done
1732
 
      if test -z "$haveit"; then
1733
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
1734
 
          if test -n "$GCC"; then
1735
 
            case $host_os in
1736
 
              linux*) haveit=yes;;
1737
 
            esac
1738
 
          fi
1739
 
        fi
1740
 
        if test -z "$haveit"; then
1741
 
          if test -d "$additional_includedir"; then
1742
 
            dnl Really add $additional_includedir to $CPPFLAGS.
1743
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1744
 
          fi
1745
 
        fi
1746
 
      fi
1747
 
    fi
1748
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
1749
 
    dnl But don't add it
1750
 
    dnl   1. if it's the standard /usr/lib,
1751
 
    dnl   2. if it's already present in $LDFLAGS,
1752
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1753
 
    dnl   4. if it doesn't exist as a directory.
1754
 
    if test "X$additional_libdir" != "X/usr/lib"; then
1755
 
      haveit=
1756
 
      for x in $LDFLAGS; do
1757
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1758
 
        if test "X$x" = "X-L$additional_libdir"; then
1759
 
          haveit=yes
1760
 
          break
1761
 
        fi
1762
 
      done
1763
 
      if test -z "$haveit"; then
1764
 
        if test "X$additional_libdir" = "X/usr/local/lib"; then
1765
 
          if test -n "$GCC"; then
1766
 
            case $host_os in
1767
 
              linux*) haveit=yes;;
1768
 
            esac
1769
 
          fi
1770
 
        fi
1771
 
        if test -z "$haveit"; then
1772
 
          if test -d "$additional_libdir"; then
1773
 
            dnl Really add $additional_libdir to $LDFLAGS.
1774
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1775
 
          fi
1776
 
        fi
1777
 
      fi
1778
 
    fi
1779
 
  fi
1780
 
])
1781
 
 
1782
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1783
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
1784
 
dnl $exec_prefix will expand at the end of the configure script.
1785
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1786
 
[
1787
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
1788
 
  dnl at the end of configure.
1789
 
  if test "X$prefix" = "XNONE"; then
1790
 
    acl_final_prefix="$ac_default_prefix"
1791
 
  else
1792
 
    acl_final_prefix="$prefix"
1793
 
  fi
1794
 
  if test "X$exec_prefix" = "XNONE"; then
1795
 
    acl_final_exec_prefix='${prefix}'
1796
 
  else
1797
 
    acl_final_exec_prefix="$exec_prefix"
1798
 
  fi
1799
 
  acl_save_prefix="$prefix"
1800
 
  prefix="$acl_final_prefix"
1801
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1802
 
  prefix="$acl_save_prefix"
1803
 
])
1804
 
 
1805
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1806
 
dnl variables prefix and exec_prefix bound to the values they will have
1807
 
dnl at the end of the configure script.
1808
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1809
 
[
1810
 
  acl_save_prefix="$prefix"
1811
 
  prefix="$acl_final_prefix"
1812
 
  acl_save_exec_prefix="$exec_prefix"
1813
 
  exec_prefix="$acl_final_exec_prefix"
1814
 
  $1
1815
 
  exec_prefix="$acl_save_exec_prefix"
1816
 
  prefix="$acl_save_prefix"
1817
 
])
1818
 
 
1819
 
# nls.m4 serial 1 (gettext-0.12)
1820
 
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1821
 
dnl This file is free software, distributed under the terms of the GNU
1822
 
dnl General Public License.  As a special exception to the GNU General
1823
 
dnl Public License, this file may be distributed as part of a program
1824
 
dnl that contains a configuration script generated by Autoconf, under
1825
 
dnl the same distribution terms as the rest of that program.
1826
 
dnl
1827
 
dnl This file can can be used in projects which are not available under
1828
 
dnl the GNU General Public License or the GNU Library General Public
1829
 
dnl License but which still want to provide support for the GNU gettext
1830
 
dnl functionality.
1831
 
dnl Please note that the actual code of the GNU gettext library is covered
1832
 
dnl by the GNU Library General Public License, and the rest of the GNU
1833
 
dnl gettext package package is covered by the GNU General Public License.
1834
 
dnl They are *not* in the public domain.
1835
 
 
1836
 
dnl Authors:
1837
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1838
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1839
 
 
1840
 
AC_DEFUN([AM_NLS],
1841
 
[
1842
 
  AC_MSG_CHECKING([whether NLS is requested])
1843
 
  dnl Default is enabled NLS
1844
 
  AC_ARG_ENABLE(nls,
1845
 
    [  --disable-nls           do not use Native Language Support],
1846
 
    USE_NLS=$enableval, USE_NLS=yes)
1847
 
  AC_MSG_RESULT($USE_NLS)
1848
 
  AC_SUBST(USE_NLS)
1849
 
])
1850
 
 
1851
 
AC_DEFUN([AM_MKINSTALLDIRS],
1852
 
[
1853
 
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1854
 
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1855
 
  dnl Try to locate it.
1856
 
  MKINSTALLDIRS=
1857
 
  if test -n "$ac_aux_dir"; then
1858
 
    case "$ac_aux_dir" in
1859
 
      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
1860
 
      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
1861
 
    esac
1862
 
  fi
1863
 
  if test -z "$MKINSTALLDIRS"; then
1864
 
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1865
 
  fi
1866
 
  AC_SUBST(MKINSTALLDIRS)
1867
 
])
1868
 
 
1869
 
 
1870
 
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
1871
 
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
1872
 
dnl also defines GSTUFF_PKG_ERRORS on error
1873
 
AC_DEFUN(PKG_CHECK_MODULES, [
1874
 
  succeeded=no
1875
 
 
1876
 
  if test -z "$PKG_CONFIG"; then
1877
 
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1878
 
  fi
1879
 
 
1880
 
  if test "$PKG_CONFIG" = "no" ; then
1881
 
     echo "*** The pkg-config script could not be found. Make sure it is"
1882
 
     echo "*** in your path, or set the PKG_CONFIG environment variable"
1883
 
     echo "*** to the full path to pkg-config."
1884
 
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
1885
 
  else
1886
 
     PKG_CONFIG_MIN_VERSION=0.9.0
1887
 
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
1888
 
        AC_MSG_CHECKING(for $2)
1889
 
 
1890
 
        if $PKG_CONFIG --exists "$2" ; then
1891
 
            AC_MSG_RESULT(yes)
1892
 
            succeeded=yes
1893
 
 
1894
 
            AC_MSG_CHECKING($1_CFLAGS)
1895
 
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
1896
 
            AC_MSG_RESULT($$1_CFLAGS)
1897
 
 
1898
 
            AC_MSG_CHECKING($1_LIBS)
1899
 
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
1900
 
            AC_MSG_RESULT($$1_LIBS)
1901
 
        else
1902
 
            $1_CFLAGS=""
1903
 
            $1_LIBS=""
1904
 
            ## If we have a custom action on failure, don't print errors, but 
1905
 
            ## do set a variable so people can do so.
1906
 
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1907
 
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
1908
 
        fi
1909
 
 
1910
 
        AC_SUBST($1_CFLAGS)
1911
 
        AC_SUBST($1_LIBS)
1912
 
     else
1913
 
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
1914
 
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
1915
 
     fi
1916
 
  fi
1917
 
 
1918
 
  if test $succeeded = yes; then
1919
 
     ifelse([$3], , :, [$3])
1920
 
  else
1921
 
     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
1922
 
  fi
1923
 
])
1924
 
 
1925
 
 
1926
 
 
1927
 
# po.m4 serial 3 (gettext-0.14)
1928
 
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
1929
 
dnl This file is free software, distributed under the terms of the GNU
1930
 
dnl General Public License.  As a special exception to the GNU General
1931
 
dnl Public License, this file may be distributed as part of a program
1932
 
dnl that contains a configuration script generated by Autoconf, under
1933
 
dnl the same distribution terms as the rest of that program.
1934
 
dnl
1935
 
dnl This file can can be used in projects which are not available under
1936
 
dnl the GNU General Public License or the GNU Library General Public
1937
 
dnl License but which still want to provide support for the GNU gettext
1938
 
dnl functionality.
1939
 
dnl Please note that the actual code of the GNU gettext library is covered
1940
 
dnl by the GNU Library General Public License, and the rest of the GNU
1941
 
dnl gettext package package is covered by the GNU General Public License.
1942
 
dnl They are *not* in the public domain.
1943
 
 
1944
 
dnl Authors:
1945
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1946
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1947
 
 
1948
 
dnl Checks for all prerequisites of the po subdirectory.
1949
 
AC_DEFUN([AM_PO_SUBDIRS],
1950
 
[
1951
 
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1952
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
1953
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1954
 
  AC_REQUIRE([AM_NLS])dnl
1955
 
 
1956
 
  dnl Perform the following tests also if --disable-nls has been given,
1957
 
  dnl because they are needed for "make dist" to work.
1958
 
 
1959
 
  dnl Search for GNU msgfmt in the PATH.
1960
 
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1961
 
  dnl The second test excludes FreeBSD msgfmt.
1962
 
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1963
 
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1964
 
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1965
 
    :)
1966
 
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1967
 
 
1968
 
  dnl Search for GNU xgettext 0.12 or newer in the PATH.
1969
 
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1970
 
  dnl The second test excludes FreeBSD xgettext.
1971
 
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1972
 
    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
1973
 
     (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)],
1974
 
    :)
1975
 
  dnl Remove leftover from FreeBSD xgettext call.
1976
 
  rm -f messages.po
1977
 
 
1978
 
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1979
 
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1980
 
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1981
 
 
1982
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1983
 
  dnl Test whether we really found GNU msgfmt.
1984
 
  if test "$GMSGFMT" != ":"; then
1985
 
    dnl If it is no GNU msgfmt we define it as : so that the
1986
 
    dnl Makefiles still can work.
1987
 
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1988
 
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1989
 
      : ;
1990
 
    else
1991
 
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1992
 
      AC_MSG_RESULT(
1993
 
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
1994
 
      GMSGFMT=":"
1995
 
    fi
1996
 
  fi
1997
 
 
1998
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1999
 
  dnl Test whether we really found GNU xgettext.
2000
 
  if test "$XGETTEXT" != ":"; then
2001
 
    dnl If it is no GNU xgettext we define it as : so that the
2002
 
    dnl Makefiles still can work.
2003
 
    if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
2004
 
       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
2005
 
      : ;
2006
 
    else
2007
 
      AC_MSG_RESULT(
2008
 
        [found xgettext program is not GNU xgettext; ignore it])
2009
 
      XGETTEXT=":"
2010
 
    fi
2011
 
    dnl Remove leftover from FreeBSD xgettext call.
2012
 
    rm -f messages.po
2013
 
  fi
2014
 
 
2015
 
  AC_OUTPUT_COMMANDS([
2016
 
    for ac_file in $CONFIG_FILES; do
2017
 
      # Support "outfile[:infile[:infile...]]"
2018
 
      case "$ac_file" in
2019
 
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2020
 
      esac
2021
 
      # PO directories have a Makefile.in generated from Makefile.in.in.
2022
 
      case "$ac_file" in */Makefile.in)
2023
 
        # Adjust a relative srcdir.
2024
 
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2025
 
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2026
 
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2027
 
        # In autoconf-2.13 it is called $ac_given_srcdir.
2028
 
        # In autoconf-2.50 it is called $srcdir.
2029
 
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2030
 
        case "$ac_given_srcdir" in
2031
 
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2032
 
          /*) top_srcdir="$ac_given_srcdir" ;;
2033
 
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2034
 
        esac
2035
 
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2036
 
          rm -f "$ac_dir/POTFILES"
2037
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2038
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
2039
 
          POMAKEFILEDEPS="POTFILES.in"
2040
 
          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2041
 
          # on $ac_dir but don't depend on user-specified configuration
2042
 
          # parameters.
2043
 
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2044
 
            # The LINGUAS file contains the set of available languages.
2045
 
            if test -n "$OBSOLETE_ALL_LINGUAS"; then
2046
 
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2047
 
            fi
2048
 
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2049
 
            # Hide the ALL_LINGUAS assigment from automake.
2050
 
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2051
 
            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2052
 
          else
2053
 
            # The set of available languages was given in configure.in.
2054
 
            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2055
 
          fi
2056
 
          # Compute POFILES
2057
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2058
 
          # Compute UPDATEPOFILES
2059
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2060
 
          # Compute DUMMYPOFILES
2061
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2062
 
          # Compute GMOFILES
2063
 
          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2064
 
          case "$ac_given_srcdir" in
2065
 
            .) srcdirpre= ;;
2066
 
            *) srcdirpre='$(srcdir)/' ;;
2067
 
          esac
2068
 
          POFILES=
2069
 
          UPDATEPOFILES=
2070
 
          DUMMYPOFILES=
2071
 
          GMOFILES=
2072
 
          for lang in $ALL_LINGUAS; do
2073
 
            POFILES="$POFILES $srcdirpre$lang.po"
2074
 
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2075
 
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2076
 
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2077
 
          done
2078
 
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
2079
 
          # environment variable.
2080
 
          INST_LINGUAS=
2081
 
          if test -n "$ALL_LINGUAS"; then
2082
 
            for presentlang in $ALL_LINGUAS; do
2083
 
              useit=no
2084
 
              if test "%UNSET%" != "$LINGUAS"; then
2085
 
                desiredlanguages="$LINGUAS"
2086
 
              else
2087
 
                desiredlanguages="$ALL_LINGUAS"
2088
 
              fi
2089
 
              for desiredlang in $desiredlanguages; do
2090
 
                # Use the presentlang catalog if desiredlang is
2091
 
                #   a. equal to presentlang, or
2092
 
                #   b. a variant of presentlang (because in this case,
2093
 
                #      presentlang can be used as a fallback for messages
2094
 
                #      which are not translated in the desiredlang catalog).
2095
 
                case "$desiredlang" in
2096
 
                  "$presentlang"*) useit=yes;;
2097
 
                esac
2098
 
              done
2099
 
              if test $useit = yes; then
2100
 
                INST_LINGUAS="$INST_LINGUAS $presentlang"
2101
 
              fi
2102
 
            done
2103
 
          fi
2104
 
          CATALOGS=
2105
 
          if test -n "$INST_LINGUAS"; then
2106
 
            for lang in $INST_LINGUAS; do
2107
 
              CATALOGS="$CATALOGS $lang.gmo"
2108
 
            done
2109
 
          fi
2110
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2111
 
          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"
2112
 
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2113
 
            if test -f "$f"; then
2114
 
              case "$f" in
2115
 
                *.orig | *.bak | *~) ;;
2116
 
                *) cat "$f" >> "$ac_dir/Makefile" ;;
2117
 
              esac
2118
 
            fi
2119
 
          done
2120
 
        fi
2121
 
        ;;
2122
 
      esac
2123
 
    done],
2124
 
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2125
 
    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2126
 
    # from automake.
2127
 
    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2128
 
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
2129
 
    LINGUAS="${LINGUAS-%UNSET%}"
2130
 
   ])
2131
 
])
2132
 
 
2133
 
dnl Postprocesses a Makefile in a directory containing PO files.
2134
 
AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2135
 
[
2136
 
  # When this code is run, in config.status, two variables have already been
2137
 
  # set:
2138
 
  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2139
 
  # - LINGUAS is the value of the environment variable LINGUAS at configure
2140
 
  #   time.
2141
 
 
2142
 
changequote(,)dnl
2143
 
  # Adjust a relative srcdir.
2144
 
  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2145
 
  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2146
 
  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2147
 
  # In autoconf-2.13 it is called $ac_given_srcdir.
2148
 
  # In autoconf-2.50 it is called $srcdir.
2149
 
  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2150
 
  case "$ac_given_srcdir" in
2151
 
    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2152
 
    /*) top_srcdir="$ac_given_srcdir" ;;
2153
 
    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
2154
 
  esac
2155
 
 
2156
 
  # Find a way to echo strings without interpreting backslash.
2157
 
  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2158
 
    gt_echo='echo'
2159
 
  else
2160
 
    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2161
 
      gt_echo='printf %s\n'
2162
 
    else
2163
 
      echo_func () {
2164
 
        cat <<EOT
2165
 
$*
2166
 
EOT
2167
 
      }
2168
 
      gt_echo='echo_func'
2169
 
    fi
2170
 
  fi
2171
 
 
2172
 
  # A sed script that extracts the value of VARIABLE from a Makefile.
2173
 
  sed_x_variable='
2174
 
# Test if the hold space is empty.
2175
 
x
2176
 
s/P/P/
2177
 
x
2178
 
ta
2179
 
# Yes it was empty. Look if we have the expected variable definition.
2180
 
/^[      ]*VARIABLE[     ]*=/{
2181
 
  # Seen the first line of the variable definition.
2182
 
  s/^[   ]*VARIABLE[     ]*=//
2183
 
  ba
2184
 
}
2185
 
bd
2186
 
:a
2187
 
# Here we are processing a line from the variable definition.
2188
 
# Remove comment, more precisely replace it with a space.
2189
 
s/#.*$/ /
2190
 
# See if the line ends in a backslash.
2191
 
tb
2192
 
:b
2193
 
s/\\$//
2194
 
# Print the line, without the trailing backslash.
2195
 
p
2196
 
tc
2197
 
# There was no trailing backslash. The end of the variable definition is
2198
 
# reached. Clear the hold space.
2199
 
s/^.*$//
2200
 
x
2201
 
bd
2202
 
:c
2203
 
# A trailing backslash means that the variable definition continues in the
2204
 
# next line. Put a nonempty string into the hold space to indicate this.
2205
 
s/^.*$/P/
2206
 
x
2207
 
:d
2208
 
'
2209
 
changequote([,])dnl
2210
 
 
2211
 
  # Set POTFILES to the value of the Makefile variable POTFILES.
2212
 
  sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
2213
 
  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2214
 
  # Compute POTFILES_DEPS as
2215
 
  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2216
 
  POTFILES_DEPS=
2217
 
  for file in $POTFILES; do
2218
 
    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2219
 
  done
2220
 
  POMAKEFILEDEPS=""
2221
 
 
2222
 
  if test -n "$OBSOLETE_ALL_LINGUAS"; then
2223
 
    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2224
 
  fi
2225
 
  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2226
 
    # The LINGUAS file contains the set of available languages.
2227
 
    ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2228
 
    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2229
 
  else
2230
 
    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2231
 
    sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
2232
 
    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2233
 
  fi
2234
 
  # Hide the ALL_LINGUAS assigment from automake.
2235
 
  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2236
 
  # Compute POFILES
2237
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2238
 
  # Compute UPDATEPOFILES
2239
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2240
 
  # Compute DUMMYPOFILES
2241
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2242
 
  # Compute GMOFILES
2243
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2244
 
  # Compute PROPERTIESFILES
2245
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2246
 
  # Compute CLASSFILES
2247
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2248
 
  # Compute QMFILES
2249
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2250
 
  # Compute MSGFILES
2251
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2252
 
  # Compute RESOURCESDLLFILES
2253
 
  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2254
 
  case "$ac_given_srcdir" in
2255
 
    .) srcdirpre= ;;
2256
 
    *) srcdirpre='$(srcdir)/' ;;
2257
 
  esac
2258
 
  POFILES=
2259
 
  UPDATEPOFILES=
2260
 
  DUMMYPOFILES=
2261
 
  GMOFILES=
2262
 
  PROPERTIESFILES=
2263
 
  CLASSFILES=
2264
 
  QMFILES=
2265
 
  MSGFILES=
2266
 
  RESOURCESDLLFILES=
2267
 
  for lang in $ALL_LINGUAS; do
2268
 
    POFILES="$POFILES $srcdirpre$lang.po"
2269
 
    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2270
 
    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2271
 
    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2272
 
    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2273
 
    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2274
 
    QMFILES="$QMFILES $srcdirpre$lang.qm"
2275
 
    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2276
 
    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2277
 
    frobbedlang=`echo $lang | sed -e 's/_/-/g'`
2278
 
    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2279
 
  done
2280
 
  # CATALOGS depends on both $ac_dir and the user's LINGUAS
2281
 
  # environment variable.
2282
 
  INST_LINGUAS=
2283
 
  if test -n "$ALL_LINGUAS"; then
2284
 
    for presentlang in $ALL_LINGUAS; do
2285
 
      useit=no
2286
 
      if test "%UNSET%" != "$LINGUAS"; then
2287
 
        desiredlanguages="$LINGUAS"
2288
 
      else
2289
 
        desiredlanguages="$ALL_LINGUAS"
2290
 
      fi
2291
 
      for desiredlang in $desiredlanguages; do
2292
 
        # Use the presentlang catalog if desiredlang is
2293
 
        #   a. equal to presentlang, or
2294
 
        #   b. a variant of presentlang (because in this case,
2295
 
        #      presentlang can be used as a fallback for messages
2296
 
        #      which are not translated in the desiredlang catalog).
2297
 
        case "$desiredlang" in
2298
 
          "$presentlang"*) useit=yes;;
2299
 
        esac
2300
 
      done
2301
 
      if test $useit = yes; then
2302
 
        INST_LINGUAS="$INST_LINGUAS $presentlang"
2303
 
      fi
2304
 
    done
2305
 
  fi
2306
 
  CATALOGS=
2307
 
  JAVACATALOGS=
2308
 
  QTCATALOGS=
2309
 
  TCLCATALOGS=
2310
 
  CSHARPCATALOGS=
2311
 
  if test -n "$INST_LINGUAS"; then
2312
 
    for lang in $INST_LINGUAS; do
2313
 
      CATALOGS="$CATALOGS $lang.gmo"
2314
 
      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2315
 
      QTCATALOGS="$QTCATALOGS $lang.qm"
2316
 
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2317
 
      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2318
 
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
2319
 
      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2320
 
    done
2321
 
  fi
2322
 
 
2323
 
  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"
2324
 
  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2325
 
    # Add dependencies that cannot be formulated as a simple suffix rule.
2326
 
    for lang in $ALL_LINGUAS; do
2327
 
      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2328
 
      cat >> "$ac_file.tmp" <<EOF
2329
 
$frobbedlang.msg: $lang.po
2330
 
        @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2331
 
        \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2332
 
EOF
2333
 
    done
2334
 
  fi
2335
 
  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2336
 
    # Add dependencies that cannot be formulated as a simple suffix rule.
2337
 
    for lang in $ALL_LINGUAS; do
2338
 
      frobbedlang=`echo $lang | sed -e 's/_/-/g'`
2339
 
      cat >> "$ac_file.tmp" <<EOF
2340
 
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2341
 
        @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2342
 
        \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2343
 
EOF
2344
 
    done
2345
 
  fi
2346
 
  if test -n "$POMAKEFILEDEPS"; then
2347
 
    cat >> "$ac_file.tmp" <<EOF
2348
 
Makefile: $POMAKEFILEDEPS
2349
 
EOF
2350
 
  fi
2351
 
  mv "$ac_file.tmp" "$ac_file"
2352
 
])
2353
 
 
2354
 
# progtest.m4 serial 3 (gettext-0.12)
2355
 
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
2356
 
dnl This file is free software, distributed under the terms of the GNU
2357
 
dnl General Public License.  As a special exception to the GNU General
2358
 
dnl Public License, this file may be distributed as part of a program
2359
 
dnl that contains a configuration script generated by Autoconf, under
2360
 
dnl the same distribution terms as the rest of that program.
2361
 
dnl
2362
 
dnl This file can can be used in projects which are not available under
2363
 
dnl the GNU General Public License or the GNU Library General Public
2364
 
dnl License but which still want to provide support for the GNU gettext
2365
 
dnl functionality.
2366
 
dnl Please note that the actual code of the GNU gettext library is covered
2367
 
dnl by the GNU Library General Public License, and the rest of the GNU
2368
 
dnl gettext package package is covered by the GNU General Public License.
2369
 
dnl They are *not* in the public domain.
2370
 
 
2371
 
dnl Authors:
2372
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
2373
 
 
2374
 
# Search path for a program which passes the given test.
2375
 
 
2376
 
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2377
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2378
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2379
 
[
2380
 
# Prepare PATH_SEPARATOR.
2381
 
# The user is always right.
2382
 
if test "${PATH_SEPARATOR+set}" != set; then
2383
 
  echo "#! /bin/sh" >conf$$.sh
2384
 
  echo  "exit 0"   >>conf$$.sh
2385
 
  chmod +x conf$$.sh
2386
 
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2387
 
    PATH_SEPARATOR=';'
2388
 
  else
2389
 
    PATH_SEPARATOR=:
2390
 
  fi
2391
 
  rm -f conf$$.sh
2392
 
fi
2393
 
 
2394
 
# Find out how to test for executable files. Don't use a zero-byte file,
2395
 
# as systems may use methods other than mode bits to determine executability.
2396
 
cat >conf$$.file <<_ASEOF
2397
 
#! /bin/sh
2398
 
exit 0
2399
 
_ASEOF
2400
 
chmod +x conf$$.file
2401
 
if test -x conf$$.file >/dev/null 2>&1; then
2402
 
  ac_executable_p="test -x"
2403
 
else
2404
 
  ac_executable_p="test -f"
2405
 
fi
2406
 
rm -f conf$$.file
2407
 
 
2408
 
# Extract the first word of "$2", so it can be a program name with args.
2409
 
set dummy $2; ac_word=[$]2
2410
 
AC_MSG_CHECKING([for $ac_word])
2411
 
AC_CACHE_VAL(ac_cv_path_$1,
2412
 
[case "[$]$1" in
2413
 
  [[\\/]]* | ?:[[\\/]]*)
2414
 
    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2415
 
    ;;
2416
 
  *)
2417
 
    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2418
 
    for ac_dir in ifelse([$5], , $PATH, [$5]); do
2419
 
      IFS="$ac_save_IFS"
2420
 
      test -z "$ac_dir" && ac_dir=.
2421
 
      for ac_exec_ext in '' $ac_executable_extensions; do
2422
 
        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2423
 
          if [$3]; then
2424
 
            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2425
 
            break 2
2426
 
          fi
2427
 
        fi
2428
 
      done
2429
 
    done
2430
 
    IFS="$ac_save_IFS"
2431
 
dnl If no 4th arg is given, leave the cache variable unset,
2432
 
dnl so AC_PATH_PROGS will keep looking.
2433
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2434
 
])dnl
2435
 
    ;;
2436
 
esac])dnl
2437
 
$1="$ac_cv_path_$1"
2438
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2439
 
  AC_MSG_RESULT([$]$1)
2440
 
else
2441
 
  AC_MSG_RESULT(no)
2442
 
fi
2443
 
AC_SUBST($1)dnl
2444
 
])
 
474
 
 
475
 
 
476
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
477
# ---------------------------------------------
 
478
m4_define([_PKG_CONFIG],
 
479
[if test -n "$PKG_CONFIG"; then
 
480
    if test -n "$$1"; then
 
481
        pkg_cv_[]$1="$$1"
 
482
    else
 
483
        PKG_CHECK_EXISTS([$3],
 
484
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
485
                         [pkg_failed=yes])
 
486
    fi
 
487
else
 
488
        pkg_failed=untried
 
489
fi[]dnl
 
490
])# _PKG_CONFIG
 
491
 
 
492
# _PKG_SHORT_ERRORS_SUPPORTED
 
493
# -----------------------------
 
494
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
495
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
496
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
497
        _pkg_short_errors_supported=yes
 
498
else
 
499
        _pkg_short_errors_supported=no
 
500
fi[]dnl
 
501
])# _PKG_SHORT_ERRORS_SUPPORTED
 
502
 
 
503
 
 
504
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
505
# [ACTION-IF-NOT-FOUND])
 
506
#
 
507
#
 
508
# Note that if there is a possibility the first call to
 
509
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
510
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
511
#
 
512
#
 
513
# --------------------------------------------------------------
 
514
AC_DEFUN([PKG_CHECK_MODULES],
 
515
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
516
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
517
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
518
 
 
519
pkg_failed=no
 
520
AC_MSG_CHECKING([for $1])
 
521
 
 
522
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
523
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
524
 
 
525
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
526
and $1[]_LIBS to avoid the need to call pkg-config.
 
527
See the pkg-config man page for more details.])
 
528
 
 
529
if test $pkg_failed = yes; then
 
530
        _PKG_SHORT_ERRORS_SUPPORTED
 
531
        if test $_pkg_short_errors_supported = yes; then
 
532
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
533
        else 
 
534
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
535
        fi
 
536
        # Put the nasty error message in config.log where it belongs
 
537
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
538
 
 
539
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
540
[Package requirements ($2) were not met:
 
541
 
 
542
$$1_PKG_ERRORS
 
543
 
 
544
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
545
installed software in a non-standard prefix.
 
546
 
 
547
_PKG_TEXT
 
548
])],
 
549
                [AC_MSG_RESULT([no])
 
550
                $4])
 
551
elif test $pkg_failed = untried; then
 
552
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
553
[The pkg-config script could not be found or is too old.  Make sure it
 
554
is in your PATH or set the PKG_CONFIG environment variable to the full
 
555
path to pkg-config.
 
556
 
 
557
_PKG_TEXT
 
558
 
 
559
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
 
560
                [$4])
 
561
else
 
562
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
563
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
564
        AC_MSG_RESULT([yes])
 
565
        ifelse([$3], , :, [$3])
 
566
fi[]dnl
 
567
])# PKG_CHECK_MODULES
2445
568
 
2446
569
# Configure paths for SDL
2447
570
# Sam Lantinga 9/21/99
2465
588
                    , enable_sdltest=yes)
2466
589
 
2467
590
  if test x$sdl_exec_prefix != x ; then
2468
 
     sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
2469
 
     if test x${SDL_CONFIG+set} != xset ; then
2470
 
        SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
2471
 
     fi
 
591
    sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
 
592
    if test x${SDL_CONFIG+set} != xset ; then
 
593
      SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
 
594
    fi
2472
595
  fi
2473
596
  if test x$sdl_prefix != x ; then
2474
 
     sdl_args="$sdl_args --prefix=$sdl_prefix"
2475
 
     if test x${SDL_CONFIG+set} != xset ; then
2476
 
        SDL_CONFIG=$sdl_prefix/bin/sdl-config
2477
 
     fi
 
597
    sdl_args="$sdl_args --prefix=$sdl_prefix"
 
598
    if test x${SDL_CONFIG+set} != xset ; then
 
599
      SDL_CONFIG=$sdl_prefix/bin/sdl-config
 
600
    fi
2478
601
  fi
2479
602
 
2480
 
  AC_REQUIRE([AC_CANONICAL_TARGET])
2481
 
  PATH="$prefix/bin:$prefix/usr/bin:$PATH"
 
603
  if test "x$prefix" != xNONE; then
 
604
    PATH="$prefix/bin:$prefix/usr/bin:$PATH"
 
605
  fi
2482
606
  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
2483
607
  min_sdl_version=ifelse([$1], ,0.11.0,$1)
2484
608
  AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
2497
621
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
2498
622
    if test "x$enable_sdltest" = "xyes" ; then
2499
623
      ac_save_CFLAGS="$CFLAGS"
 
624
      ac_save_CXXFLAGS="$CXXFLAGS"
2500
625
      ac_save_LIBS="$LIBS"
2501
626
      CFLAGS="$CFLAGS $SDL_CFLAGS"
 
627
      CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
2502
628
      LIBS="$LIBS $SDL_LIBS"
2503
629
dnl
2504
630
dnl Now check if the installed SDL is sufficiently new. (Also sanity
2564
690
 
2565
691
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2566
692
       CFLAGS="$ac_save_CFLAGS"
 
693
       CXXFLAGS="$ac_save_CXXFLAGS"
2567
694
       LIBS="$ac_save_LIBS"
2568
695
     fi
2569
696
  fi
2583
710
       else
2584
711
          echo "*** Could not run SDL test program, checking why..."
2585
712
          CFLAGS="$CFLAGS $SDL_CFLAGS"
 
713
          CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
2586
714
          LIBS="$LIBS $SDL_LIBS"
2587
715
          AC_TRY_LINK([
2588
716
#include <stdio.h>
2607
735
          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
2608
736
          echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
2609
737
          CFLAGS="$ac_save_CFLAGS"
 
738
          CXXFLAGS="$ac_save_CXXFLAGS"
2610
739
          LIBS="$ac_save_LIBS"
2611
740
       fi
2612
741
     fi
2619
748
  rm -f conf.sdltest
2620
749
])
2621
750
 
2622
 
#                                                        -*- Autoconf -*-
2623
 
# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
2624
 
# Generated from amversion.in; do not edit by hand.
2625
 
 
2626
 
# This program is free software; you can redistribute it and/or modify
2627
 
# it under the terms of the GNU General Public License as published by
2628
 
# the Free Software Foundation; either version 2, or (at your option)
2629
 
# any later version.
2630
 
 
2631
 
# This program is distributed in the hope that it will be useful,
2632
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2633
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2634
 
# GNU General Public License for more details.
2635
 
 
2636
 
# You should have received a copy of the GNU General Public License
2637
 
# along with this program; if not, write to the Free Software
2638
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
751
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 
752
#
 
753
# This file is free software; the Free Software Foundation
 
754
# gives unlimited permission to copy and/or distribute it,
 
755
# with or without modifications, as long as this notice is preserved.
2639
756
 
2640
757
# AM_AUTOMAKE_VERSION(VERSION)
2641
758
# ----------------------------
2642
759
# Automake X.Y traces this macro to ensure aclocal.m4 has been
2643
760
# generated from the m4 files accompanying Automake X.Y.
2644
 
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
761
# (This private macro should not be called outside this file.)
 
762
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
763
[am__api_version='1.10'
 
764
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
765
dnl require some minimum version.  Point them to the right macro.
 
766
m4_if([$1], [1.10], [],
 
767
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
768
])
 
769
 
 
770
# _AM_AUTOCONF_VERSION(VERSION)
 
771
# -----------------------------
 
772
# aclocal traces this macro to find the Autoconf version.
 
773
# This is a private macro too.  Using m4_define simplifies
 
774
# the logic in aclocal, which can simply ignore this definition.
 
775
m4_define([_AM_AUTOCONF_VERSION], [])
2645
776
 
2646
777
# AM_SET_CURRENT_AUTOMAKE_VERSION
2647
778
# -------------------------------
2648
 
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
779
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2649
780
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
2650
781
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2651
 
         [AM_AUTOMAKE_VERSION([1.9.4])])
2652
 
 
2653
 
# AM_AUX_DIR_EXPAND
2654
 
 
2655
 
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
2656
 
 
2657
 
# This program is free software; you can redistribute it and/or modify
2658
 
# it under the terms of the GNU General Public License as published by
2659
 
# the Free Software Foundation; either version 2, or (at your option)
2660
 
# any later version.
2661
 
 
2662
 
# This program is distributed in the hope that it will be useful,
2663
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2664
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2665
 
# GNU General Public License for more details.
2666
 
 
2667
 
# You should have received a copy of the GNU General Public License
2668
 
# along with this program; if not, write to the Free Software
2669
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2670
 
# 02111-1307, USA.
 
782
[AM_AUTOMAKE_VERSION([1.10])dnl
 
783
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
 
784
 
 
785
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
786
 
 
787
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
788
#
 
789
# This file is free software; the Free Software Foundation
 
790
# gives unlimited permission to copy and/or distribute it,
 
791
# with or without modifications, as long as this notice is preserved.
2671
792
 
2672
793
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2673
794
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
2714
835
am_aux_dir=`cd $ac_aux_dir && pwd`
2715
836
])
2716
837
 
2717
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
2718
 
 
2719
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
2720
 
 
2721
 
# This program is free software; you can redistribute it and/or modify
2722
 
# it under the terms of the GNU General Public License as published by
2723
 
# the Free Software Foundation; either version 2, or (at your option)
2724
 
# any later version.
2725
 
 
2726
 
# This program is distributed in the hope that it will be useful,
2727
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2728
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2729
 
# GNU General Public License for more details.
2730
 
 
2731
 
# You should have received a copy of the GNU General Public License
2732
 
# along with this program; if not, write to the Free Software
2733
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2734
 
# 02111-1307, USA.
2735
 
 
2736
 
# serial 6
 
838
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
839
 
 
840
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 
841
# Free Software Foundation, Inc.
 
842
#
 
843
# This file is free software; the Free Software Foundation
 
844
# gives unlimited permission to copy and/or distribute it,
 
845
# with or without modifications, as long as this notice is preserved.
 
846
 
 
847
# serial 8
2737
848
 
2738
849
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
2739
850
# -------------------------------------
2742
853
[AC_PREREQ(2.52)dnl
2743
854
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
2744
855
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2745
 
AC_SUBST([$1_TRUE])
2746
 
AC_SUBST([$1_FALSE])
 
856
AC_SUBST([$1_TRUE])dnl
 
857
AC_SUBST([$1_FALSE])dnl
 
858
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
859
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
2747
860
if $2; then
2748
861
  $1_TRUE=
2749
862
  $1_FALSE='#'
2757
870
Usually this means the macro was only invoked conditionally.]])
2758
871
fi])])
2759
872
 
2760
 
# serial 7                                              -*- Autoconf -*-
2761
 
 
2762
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 
873
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
2763
874
# Free Software Foundation, Inc.
2764
 
 
2765
 
# This program is free software; you can redistribute it and/or modify
2766
 
# it under the terms of the GNU General Public License as published by
2767
 
# the Free Software Foundation; either version 2, or (at your option)
2768
 
# any later version.
2769
 
 
2770
 
# This program is distributed in the hope that it will be useful,
2771
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2772
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2773
 
# GNU General Public License for more details.
2774
 
 
2775
 
# You should have received a copy of the GNU General Public License
2776
 
# along with this program; if not, write to the Free Software
2777
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2778
 
# 02111-1307, USA.
2779
 
 
 
875
#
 
876
# This file is free software; the Free Software Foundation
 
877
# gives unlimited permission to copy and/or distribute it,
 
878
# with or without modifications, as long as this notice is preserved.
 
879
 
 
880
# serial 9
2780
881
 
2781
882
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2782
883
# written in clear, in which case automake, when reading aclocal.m4,
2785
886
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2786
887
 
2787
888
 
2788
 
 
2789
889
# _AM_DEPENDENCIES(NAME)
2790
890
# ----------------------
2791
891
# See how the compiler implements dependency checking.
2805
905
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
2806
906
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
2807
907
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
908
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
2808
909
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
2809
910
                   [depcc="$$1"   am_compiler_list=])
2810
911
 
2870
971
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2871
972
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2872
973
         >/dev/null 2>conftest.err &&
 
974
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2873
975
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2874
976
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2875
977
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2922
1024
  AMDEPBACKSLASH='\'
2923
1025
fi
2924
1026
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2925
 
AC_SUBST([AMDEPBACKSLASH])
 
1027
AC_SUBST([AMDEPBACKSLASH])dnl
 
1028
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
2926
1029
])
2927
1030
 
2928
 
# Generate code to set up dependency tracking.   -*- Autoconf -*-
2929
 
 
2930
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
2931
 
#   Free Software Foundation, Inc.
2932
 
 
2933
 
# This program is free software; you can redistribute it and/or modify
2934
 
# it under the terms of the GNU General Public License as published by
2935
 
# the Free Software Foundation; either version 2, or (at your option)
2936
 
# any later version.
2937
 
 
2938
 
# This program is distributed in the hope that it will be useful,
2939
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2940
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2941
 
# GNU General Public License for more details.
2942
 
 
2943
 
# You should have received a copy of the GNU General Public License
2944
 
# along with this program; if not, write to the Free Software
2945
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2946
 
# 02111-1307, USA.
2947
 
 
2948
 
#serial 2
 
1031
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
1032
 
 
1033
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
1034
# Free Software Foundation, Inc.
 
1035
#
 
1036
# This file is free software; the Free Software Foundation
 
1037
# gives unlimited permission to copy and/or distribute it,
 
1038
# with or without modifications, as long as this notice is preserved.
 
1039
 
 
1040
#serial 3
2949
1041
 
2950
1042
# _AM_OUTPUT_DEPENDENCY_COMMANDS
2951
1043
# ------------------------------
2958
1050
  # some people rename them; so instead we look at the file content.
2959
1051
  # Grep'ing the first line is not enough: some people post-process
2960
1052
  # each Makefile.in and add a new line on top of each file to say so.
2961
 
  # So let's grep whole file.
2962
 
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
1053
  # Grep'ing the whole file is not good either: AIX grep has a line
 
1054
  # limit of 2048, but all sed's we know have understand at least 4000.
 
1055
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
2963
1056
    dirpart=`AS_DIRNAME("$mf")`
2964
1057
  else
2965
1058
    continue
3004
1097
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
3005
1098
])
3006
1099
 
3007
 
# Do all the work for Automake.                            -*- Autoconf -*-
3008
 
 
3009
 
# This macro actually does too much some checks are only needed if
 
1100
# Do all the work for Automake.                             -*- Autoconf -*-
 
1101
 
 
1102
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
1103
# 2005, 2006 Free Software Foundation, Inc.
 
1104
#
 
1105
# This file is free software; the Free Software Foundation
 
1106
# gives unlimited permission to copy and/or distribute it,
 
1107
# with or without modifications, as long as this notice is preserved.
 
1108
 
 
1109
# serial 12
 
1110
 
 
1111
# This macro actually does too much.  Some checks are only needed if
3010
1112
# your package does certain things.  But this isn't really a big deal.
3011
1113
 
3012
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
3013
 
# Free Software Foundation, Inc.
3014
 
 
3015
 
# This program is free software; you can redistribute it and/or modify
3016
 
# it under the terms of the GNU General Public License as published by
3017
 
# the Free Software Foundation; either version 2, or (at your option)
3018
 
# any later version.
3019
 
 
3020
 
# This program is distributed in the hope that it will be useful,
3021
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3022
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3023
 
# GNU General Public License for more details.
3024
 
 
3025
 
# You should have received a copy of the GNU General Public License
3026
 
# along with this program; if not, write to the Free Software
3027
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3028
 
# 02111-1307, USA.
3029
 
 
3030
 
# serial 11
3031
 
 
3032
1114
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
3033
1115
# AM_INIT_AUTOMAKE([OPTIONS])
3034
1116
# -----------------------------------------------
3041
1123
# arguments mandatory, and then we can depend on a new Autoconf
3042
1124
# release and drop the old call support.
3043
1125
AC_DEFUN([AM_INIT_AUTOMAKE],
3044
 
[AC_PREREQ([2.58])dnl
 
1126
[AC_PREREQ([2.60])dnl
3045
1127
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
3046
1128
dnl the ones we care about.
3047
1129
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
3048
1130
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
3049
1131
AC_REQUIRE([AC_PROG_INSTALL])dnl
3050
 
# test to see if srcdir already configured
3051
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
3052
 
   test -f $srcdir/config.status; then
3053
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1132
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
1133
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
1134
  # is not polluted with repeated "-I."
 
1135
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
1136
  # test to see if srcdir already configured
 
1137
  if test -f $srcdir/config.status; then
 
1138
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1139
  fi
3054
1140
fi
3055
1141
 
3056
1142
# test whether we have cygpath
3070
1156
 AC_SUBST([PACKAGE], [$1])dnl
3071
1157
 AC_SUBST([VERSION], [$2])],
3072
1158
[_AM_SET_OPTIONS([$1])dnl
 
1159
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
1160
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
1161
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3073
1162
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3074
1163
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3075
1164
 
3105
1194
                  [_AM_DEPENDENCIES(CXX)],
3106
1195
                  [define([AC_PROG_CXX],
3107
1196
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
1197
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
1198
                  [_AM_DEPENDENCIES(OBJC)],
 
1199
                  [define([AC_PROG_OBJC],
 
1200
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
3108
1201
])
3109
1202
])
3110
1203
 
3129
1222
done
3130
1223
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
3131
1224
 
 
1225
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1226
#
 
1227
# This file is free software; the Free Software Foundation
 
1228
# gives unlimited permission to copy and/or distribute it,
 
1229
# with or without modifications, as long as this notice is preserved.
 
1230
 
3132
1231
# AM_PROG_INSTALL_SH
3133
1232
# ------------------
3134
1233
# Define $install_sh.
3135
 
 
3136
 
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
3137
 
 
3138
 
# This program is free software; you can redistribute it and/or modify
3139
 
# it under the terms of the GNU General Public License as published by
3140
 
# the Free Software Foundation; either version 2, or (at your option)
3141
 
# any later version.
3142
 
 
3143
 
# This program is distributed in the hope that it will be useful,
3144
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3145
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3146
 
# GNU General Public License for more details.
3147
 
 
3148
 
# You should have received a copy of the GNU General Public License
3149
 
# along with this program; if not, write to the Free Software
3150
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3151
 
# 02111-1307, USA.
3152
 
 
3153
1234
AC_DEFUN([AM_PROG_INSTALL_SH],
3154
1235
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3155
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
1236
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
3156
1237
AC_SUBST(install_sh)])
3157
1238
 
3158
 
#                                                          -*- Autoconf -*-
3159
 
# Copyright (C) 2003  Free Software Foundation, Inc.
3160
 
 
3161
 
# This program is free software; you can redistribute it and/or modify
3162
 
# it under the terms of the GNU General Public License as published by
3163
 
# the Free Software Foundation; either version 2, or (at your option)
3164
 
# any later version.
3165
 
 
3166
 
# This program is distributed in the hope that it will be useful,
3167
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3168
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3169
 
# GNU General Public License for more details.
3170
 
 
3171
 
# You should have received a copy of the GNU General Public License
3172
 
# along with this program; if not, write to the Free Software
3173
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3174
 
# 02111-1307, USA.
3175
 
 
3176
 
# serial 1
 
1239
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
1240
#
 
1241
# This file is free software; the Free Software Foundation
 
1242
# gives unlimited permission to copy and/or distribute it,
 
1243
# with or without modifications, as long as this notice is preserved.
 
1244
 
 
1245
# serial 2
3177
1246
 
3178
1247
# Check whether the underlying file-system supports filenames
3179
1248
# with a leading dot.  For instance MS-DOS doesn't.
3188
1257
rmdir .tst 2>/dev/null
3189
1258
AC_SUBST([am__leading_dot])])
3190
1259
 
3191
 
# Check to see how 'make' treats includes.      -*- Autoconf -*-
3192
 
 
3193
 
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
3194
 
 
3195
 
# This program is free software; you can redistribute it and/or modify
3196
 
# it under the terms of the GNU General Public License as published by
3197
 
# the Free Software Foundation; either version 2, or (at your option)
3198
 
# any later version.
3199
 
 
3200
 
# This program is distributed in the hope that it will be useful,
3201
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3202
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3203
 
# GNU General Public License for more details.
3204
 
 
3205
 
# You should have received a copy of the GNU General Public License
3206
 
# along with this program; if not, write to the Free Software
3207
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3208
 
# 02111-1307, USA.
3209
 
 
3210
 
# serial 2
 
1260
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
1261
 
 
1262
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1263
#
 
1264
# This file is free software; the Free Software Foundation
 
1265
# gives unlimited permission to copy and/or distribute it,
 
1266
# with or without modifications, as long as this notice is preserved.
 
1267
 
 
1268
# serial 3
3211
1269
 
3212
1270
# AM_MAKE_INCLUDE()
3213
1271
# -----------------
3251
1309
rm -f confinc confmf
3252
1310
])
3253
1311
 
3254
 
#  -*- Autoconf -*-
3255
 
 
3256
 
 
3257
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
3258
 
 
3259
 
# This program is free software; you can redistribute it and/or modify
3260
 
# it under the terms of the GNU General Public License as published by
3261
 
# the Free Software Foundation; either version 2, or (at your option)
3262
 
# any later version.
3263
 
 
3264
 
# This program is distributed in the hope that it will be useful,
3265
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3266
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3267
 
# GNU General Public License for more details.
3268
 
 
3269
 
# You should have received a copy of the GNU General Public License
3270
 
# along with this program; if not, write to the Free Software
3271
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3272
 
# 02111-1307, USA.
3273
 
 
3274
 
# serial 3
 
1312
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
1313
 
 
1314
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 
1315
# Free Software Foundation, Inc.
 
1316
#
 
1317
# This file is free software; the Free Software Foundation
 
1318
# gives unlimited permission to copy and/or distribute it,
 
1319
# with or without modifications, as long as this notice is preserved.
 
1320
 
 
1321
# serial 5
3275
1322
 
3276
1323
# AM_MISSING_PROG(NAME, PROGRAM)
3277
1324
# ------------------------------
3287
1334
# If it does, set am_missing_run to use it, otherwise, to nothing.
3288
1335
AC_DEFUN([AM_MISSING_HAS_RUN],
3289
1336
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1337
AC_REQUIRE_AUX_FILE([missing])dnl
3290
1338
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3291
1339
# Use eval to expand $SHELL
3292
1340
if eval "$MISSING --run true"; then
3297
1345
fi
3298
1346
])
3299
1347
 
 
1348
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
1349
#
 
1350
# This file is free software; the Free Software Foundation
 
1351
# gives unlimited permission to copy and/or distribute it,
 
1352
# with or without modifications, as long as this notice is preserved.
 
1353
 
3300
1354
# AM_PROG_MKDIR_P
3301
1355
# ---------------
3302
 
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
3303
 
 
3304
 
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
3305
 
 
3306
 
# This program is free software; you can redistribute it and/or modify
3307
 
# it under the terms of the GNU General Public License as published by
3308
 
# the Free Software Foundation; either version 2, or (at your option)
3309
 
# any later version.
3310
 
 
3311
 
# This program is distributed in the hope that it will be useful,
3312
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3313
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3314
 
# GNU General Public License for more details.
3315
 
 
3316
 
# You should have received a copy of the GNU General Public License
3317
 
# along with this program; if not, write to the Free Software
3318
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3319
 
# 02111-1307, USA.
3320
 
 
3321
 
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
3322
 
# created by `make install' are always world readable, even if the
3323
 
# installer happens to have an overly restrictive umask (e.g. 077).
3324
 
# This was a mistake.  There are at least two reasons why we must not
3325
 
# use `-m 0755':
3326
 
#   - it causes special bits like SGID to be ignored,
3327
 
#   - it may be too restrictive (some setups expect 775 directories).
3328
 
#
3329
 
# Do not use -m 0755 and let people choose whatever they expect by
3330
 
# setting umask.
3331
 
#
3332
 
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
3333
 
# Some implementations (such as Solaris 8's) are not thread-safe: if a
3334
 
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
3335
 
# concurrently, both version can detect that a/ is missing, but only
3336
 
# one can create it and the other will error out.  Consequently we
3337
 
# restrict ourselves to GNU make (using the --version option ensures
3338
 
# this.)
 
1356
# Check for `mkdir -p'.
3339
1357
AC_DEFUN([AM_PROG_MKDIR_P],
3340
 
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3341
 
  # We used to keeping the `.' as first argument, in order to
3342
 
  # allow $(mkdir_p) to be used without argument.  As in
3343
 
  #   $(mkdir_p) $(somedir)
3344
 
  # where $(somedir) is conditionally defined.  However this is wrong
3345
 
  # for two reasons:
3346
 
  #  1. if the package is installed by a user who cannot write `.'
3347
 
  #     make install will fail,
3348
 
  #  2. the above comment should most certainly read
3349
 
  #     $(mkdir_p) $(DESTDIR)$(somedir)
3350
 
  #     so it does not work when $(somedir) is undefined and
3351
 
  #     $(DESTDIR) is not.
3352
 
  #  To support the latter case, we have to write
3353
 
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3354
 
  #  so the `.' trick is pointless.
3355
 
  mkdir_p='mkdir -p --'
3356
 
else
3357
 
  # On NextStep and OpenStep, the `mkdir' command does not
3358
 
  # recognize any option.  It will interpret all options as
3359
 
  # directories to create, and then abort because `.' already
3360
 
  # exists.
3361
 
  for d in ./-p ./--version;
3362
 
  do
3363
 
    test -d $d && rmdir $d
3364
 
  done
3365
 
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3366
 
  if test -f "$ac_aux_dir/mkinstalldirs"; then
3367
 
    mkdir_p='$(mkinstalldirs)'
3368
 
  else
3369
 
    mkdir_p='$(install_sh) -d'
3370
 
  fi
3371
 
fi
3372
 
AC_SUBST([mkdir_p])])
3373
 
 
3374
 
# Helper functions for option handling.                    -*- Autoconf -*-
3375
 
 
3376
 
# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
3377
 
 
3378
 
# This program is free software; you can redistribute it and/or modify
3379
 
# it under the terms of the GNU General Public License as published by
3380
 
# the Free Software Foundation; either version 2, or (at your option)
3381
 
# any later version.
3382
 
 
3383
 
# This program is distributed in the hope that it will be useful,
3384
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3385
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3386
 
# GNU General Public License for more details.
3387
 
 
3388
 
# You should have received a copy of the GNU General Public License
3389
 
# along with this program; if not, write to the Free Software
3390
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3391
 
# 02111-1307, USA.
3392
 
 
3393
 
# serial 2
 
1358
[AC_PREREQ([2.60])dnl
 
1359
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
1360
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
1361
dnl while keeping a definition of mkdir_p for backward compatibility.
 
1362
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
1363
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
1364
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
1365
dnl adjustment using top_builddir (which is defined more often than
 
1366
dnl MKDIR_P).
 
1367
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
1368
case $mkdir_p in
 
1369
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
1370
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
1371
esac
 
1372
])
 
1373
 
 
1374
# Helper functions for option handling.                     -*- Autoconf -*-
 
1375
 
 
1376
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1377
#
 
1378
# This file is free software; the Free Software Foundation
 
1379
# gives unlimited permission to copy and/or distribute it,
 
1380
# with or without modifications, as long as this notice is preserved.
 
1381
 
 
1382
# serial 3
3394
1383
 
3395
1384
# _AM_MANGLE_OPTION(NAME)
3396
1385
# -----------------------
3415
1404
AC_DEFUN([_AM_IF_OPTION],
3416
1405
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3417
1406
 
3418
 
#
3419
 
# Check to make sure that the build environment is sane.
3420
 
#
3421
 
 
3422
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
3423
 
 
3424
 
# This program is free software; you can redistribute it and/or modify
3425
 
# it under the terms of the GNU General Public License as published by
3426
 
# the Free Software Foundation; either version 2, or (at your option)
3427
 
# any later version.
3428
 
 
3429
 
# This program is distributed in the hope that it will be useful,
3430
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3431
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3432
 
# GNU General Public License for more details.
3433
 
 
3434
 
# You should have received a copy of the GNU General Public License
3435
 
# along with this program; if not, write to the Free Software
3436
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3437
 
# 02111-1307, USA.
3438
 
 
3439
 
# serial 3
 
1407
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
1408
 
 
1409
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
1410
# Free Software Foundation, Inc.
 
1411
#
 
1412
# This file is free software; the Free Software Foundation
 
1413
# gives unlimited permission to copy and/or distribute it,
 
1414
# with or without modifications, as long as this notice is preserved.
 
1415
 
 
1416
# serial 4
3440
1417
 
3441
1418
# AM_SANITY_CHECK
3442
1419
# ---------------
3479
1456
fi
3480
1457
AC_MSG_RESULT(yes)])
3481
1458
 
 
1459
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1460
#
 
1461
# This file is free software; the Free Software Foundation
 
1462
# gives unlimited permission to copy and/or distribute it,
 
1463
# with or without modifications, as long as this notice is preserved.
 
1464
 
3482
1465
# AM_PROG_INSTALL_STRIP
3483
 
 
3484
 
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
3485
 
 
3486
 
# This program is free software; you can redistribute it and/or modify
3487
 
# it under the terms of the GNU General Public License as published by
3488
 
# the Free Software Foundation; either version 2, or (at your option)
3489
 
# any later version.
3490
 
 
3491
 
# This program is distributed in the hope that it will be useful,
3492
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3493
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3494
 
# GNU General Public License for more details.
3495
 
 
3496
 
# You should have received a copy of the GNU General Public License
3497
 
# along with this program; if not, write to the Free Software
3498
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3499
 
# 02111-1307, USA.
3500
 
 
 
1466
# ---------------------
3501
1467
# One issue with vendor `install' (even GNU) is that you can't
3502
1468
# specify the program used to strip binaries.  This is especially
3503
1469
# annoying in cross-compiling environments, where the build's strip
3515
1481
if test "$cross_compiling" != no; then
3516
1482
  AC_CHECK_TOOL([STRIP], [strip], :)
3517
1483
fi
3518
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
1484
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3519
1485
AC_SUBST([INSTALL_STRIP_PROGRAM])])
3520
1486
 
 
1487
# Copyright (C) 2006  Free Software Foundation, Inc.
 
1488
#
 
1489
# This file is free software; the Free Software Foundation
 
1490
# gives unlimited permission to copy and/or distribute it,
 
1491
# with or without modifications, as long as this notice is preserved.
 
1492
 
 
1493
# _AM_SUBST_NOTMAKE(VARIABLE)
 
1494
# ---------------------------
 
1495
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
1496
# This macro is traced by Automake.
 
1497
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
1498
 
3521
1499
# Check how to create a tarball.                            -*- Autoconf -*-
3522
1500
 
3523
 
# Copyright (C) 2004  Free Software Foundation, Inc.
3524
 
 
3525
 
# This program is free software; you can redistribute it and/or modify
3526
 
# it under the terms of the GNU General Public License as published by
3527
 
# the Free Software Foundation; either version 2, or (at your option)
3528
 
# any later version.
3529
 
 
3530
 
# This program is distributed in the hope that it will be useful,
3531
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
3532
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3533
 
# GNU General Public License for more details.
3534
 
 
3535
 
# You should have received a copy of the GNU General Public License
3536
 
# along with this program; if not, write to the Free Software
3537
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3538
 
# 02111-1307, USA.
3539
 
 
3540
 
# serial 1
3541
 
 
 
1501
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1502
#
 
1503
# This file is free software; the Free Software Foundation
 
1504
# gives unlimited permission to copy and/or distribute it,
 
1505
# with or without modifications, as long as this notice is preserved.
 
1506
 
 
1507
# serial 2
3542
1508
 
3543
1509
# _AM_PROG_TAR(FORMAT)
3544
1510
# --------------------
3626
1592
AC_SUBST([am__untar])
3627
1593
]) # _AM_PROG_TAR
3628
1594
 
 
1595
m4_include([m4/gettext.m4])
 
1596
m4_include([m4/iconv.m4])
 
1597
m4_include([m4/lib-ld.m4])
 
1598
m4_include([m4/lib-link.m4])
 
1599
m4_include([m4/lib-prefix.m4])
 
1600
m4_include([m4/progtest.m4])