~ubuntu-branches/ubuntu/maverick/hello/maverick

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-01-05 16:42:30 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040105164230-ze0yqbimyx4sx1gs
Tags: 2.1.1-4
Updated config.guess and config.sub for GNU/K*BSD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# aclocal.m4 generated automatically by aclocal 1.6.1 -*- Autoconf -*-
 
2
 
 
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
4
# Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
# Do all the work for Automake.                            -*- Autoconf -*-
 
15
 
 
16
# This macro actually does too much some checks are only needed if
 
17
# your package does certain things.  But this isn't really a big deal.
 
18
 
 
19
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
 
20
# Free Software Foundation, Inc.
 
21
 
 
22
# This program is free software; you can redistribute it and/or modify
 
23
# it under the terms of the GNU General Public License as published by
 
24
# the Free Software Foundation; either version 2, or (at your option)
 
25
# any later version.
 
26
 
 
27
# This program is distributed in the hope that it will be useful,
 
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
30
# GNU General Public License for more details.
 
31
 
 
32
# You should have received a copy of the GNU General Public License
 
33
# along with this program; if not, write to the Free Software
 
34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
35
# 02111-1307, USA.
 
36
 
 
37
# serial 8
 
38
 
 
39
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
40
# written in clear, in which case automake, when reading aclocal.m4,
 
41
# will think it sees a *use*, and therefore will trigger all it's
 
42
# C support machinery.  Also note that it means that autoscan, seeing
 
43
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
44
 
 
45
 
 
46
AC_PREREQ([2.52])
 
47
 
 
48
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 
49
# the ones we care about.
 
50
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
51
 
 
52
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
53
# AM_INIT_AUTOMAKE([OPTIONS])
 
54
# -----------------------------------------------
 
55
# The call with PACKAGE and VERSION arguments is the old style
 
56
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
57
# and VERSION should now be passed to AC_INIT and removed from
 
58
# the call to AM_INIT_AUTOMAKE.
 
59
# We support both call styles for the transition.  After
 
60
# the next Automake release, Autoconf can make the AC_INIT
 
61
# arguments mandatory, and then we can depend on a new Autoconf
 
62
# release and drop the old call support.
 
63
AC_DEFUN([AM_INIT_AUTOMAKE],
 
64
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
65
 AC_REQUIRE([AC_PROG_INSTALL])dnl
 
66
# test to see if srcdir already configured
 
67
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
68
   test -f $srcdir/config.status; then
 
69
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
70
fi
 
71
 
 
72
# Define the identity of the package.
 
73
dnl Distinguish between old-style and new-style calls.
 
74
m4_ifval([$2],
 
75
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
76
 AC_SUBST([PACKAGE], [$1])dnl
 
77
 AC_SUBST([VERSION], [$2])],
 
78
[_AM_SET_OPTIONS([$1])dnl
 
79
 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
 
80
 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
 
81
 
 
82
_AM_IF_OPTION([no-define],,
 
83
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
84
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
85
 
 
86
# Some tools Automake needs.
 
87
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
88
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
89
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
90
AM_MISSING_PROG(AUTOCONF, autoconf)
 
91
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
92
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
93
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
94
AM_MISSING_PROG(AMTAR, tar)
 
95
AM_PROG_INSTALL_SH
 
96
AM_PROG_INSTALL_STRIP
 
97
# We need awk for the "check" target.  The system "awk" is bad on
 
98
# some platforms.
 
99
AC_REQUIRE([AC_PROG_AWK])dnl
 
100
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
101
 
 
102
_AM_IF_OPTION([no-dependencies],,
 
103
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
 
104
                  [_AM_DEPENDENCIES(CC)],
 
105
                  [define([AC_PROG_][CC],
 
106
                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
 
107
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
 
108
                  [_AM_DEPENDENCIES(CXX)],
 
109
                  [define([AC_PROG_][CXX],
 
110
                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
111
])
 
112
])
 
113
 
 
114
# Copyright 2002  Free Software Foundation, Inc.
 
115
 
 
116
# This program is free software; you can redistribute it and/or modify
 
117
# it under the terms of the GNU General Public License as published by
 
118
# the Free Software Foundation; either version 2, or (at your option)
 
119
# any later version.
 
120
 
 
121
# This program is distributed in the hope that it will be useful,
 
122
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
123
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
124
# GNU General Public License for more details.
 
125
 
 
126
# You should have received a copy of the GNU General Public License
 
127
# along with this program; if not, write to the Free Software
 
128
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
129
 
 
130
# AM_AUTOMAKE_VERSION(VERSION)
 
131
# ----------------------------
 
132
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
133
# generated from the m4 files accompanying Automake X.Y.
 
134
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
 
135
 
 
136
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
137
# -------------------------------
 
138
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
139
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
140
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
141
         [AM_AUTOMAKE_VERSION([1.6.1])])
 
142
 
 
143
# Helper functions for option handling.                    -*- Autoconf -*-
 
144
 
 
145
# Copyright 2001, 2002  Free Software Foundation, Inc.
 
146
 
 
147
# This program is free software; you can redistribute it and/or modify
 
148
# it under the terms of the GNU General Public License as published by
 
149
# the Free Software Foundation; either version 2, or (at your option)
 
150
# any later version.
 
151
 
 
152
# This program is distributed in the hope that it will be useful,
 
153
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
154
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
155
# GNU General Public License for more details.
 
156
 
 
157
# You should have received a copy of the GNU General Public License
 
158
# along with this program; if not, write to the Free Software
 
159
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
160
# 02111-1307, USA.
 
161
 
 
162
# serial 2
 
163
 
 
164
# _AM_MANGLE_OPTION(NAME)
 
165
# -----------------------
 
166
AC_DEFUN([_AM_MANGLE_OPTION],
 
167
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
168
 
 
169
# _AM_SET_OPTION(NAME)
 
170
# ------------------------------
 
171
# Set option NAME.  Presently that only means defining a flag for this option.
 
172
AC_DEFUN([_AM_SET_OPTION],
 
173
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
174
 
 
175
# _AM_SET_OPTIONS(OPTIONS)
 
176
# ----------------------------------
 
177
# OPTIONS is a space-separated list of Automake options.
 
178
AC_DEFUN([_AM_SET_OPTIONS],
 
179
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
180
 
 
181
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
182
# -------------------------------------------
 
183
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
184
AC_DEFUN([_AM_IF_OPTION],
 
185
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
186
 
 
187
#
 
188
# Check to make sure that the build environment is sane.
 
189
#
 
190
 
 
191
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
192
 
 
193
# This program is free software; you can redistribute it and/or modify
 
194
# it under the terms of the GNU General Public License as published by
 
195
# the Free Software Foundation; either version 2, or (at your option)
 
196
# any later version.
 
197
 
 
198
# This program is distributed in the hope that it will be useful,
 
199
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
200
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
201
# GNU General Public License for more details.
 
202
 
 
203
# You should have received a copy of the GNU General Public License
 
204
# along with this program; if not, write to the Free Software
 
205
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
206
# 02111-1307, USA.
 
207
 
 
208
# serial 3
 
209
 
 
210
# AM_SANITY_CHECK
 
211
# ---------------
 
212
AC_DEFUN([AM_SANITY_CHECK],
 
213
[AC_MSG_CHECKING([whether build environment is sane])
 
214
# Just in case
 
215
sleep 1
 
216
echo timestamp > conftest.file
 
217
# Do `set' in a subshell so we don't clobber the current shell's
 
218
# arguments.  Must try -L first in case configure is actually a
 
219
# symlink; some systems play weird games with the mod time of symlinks
 
220
# (eg FreeBSD returns the mod time of the symlink's containing
 
221
# directory).
 
222
if (
 
223
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
224
   if test "$[*]" = "X"; then
 
225
      # -L didn't work.
 
226
      set X `ls -t $srcdir/configure conftest.file`
 
227
   fi
 
228
   rm -f conftest.file
 
229
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
230
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
231
 
 
232
      # If neither matched, then we have a broken ls.  This can happen
 
233
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
234
      # broken ls alias from the environment.  This has actually
 
235
      # happened.  Such a system could not be considered "sane".
 
236
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
237
alias in your environment])
 
238
   fi
 
239
 
 
240
   test "$[2]" = conftest.file
 
241
   )
 
242
then
 
243
   # Ok.
 
244
   :
 
245
else
 
246
   AC_MSG_ERROR([newly created file is older than distributed files!
 
247
Check your system clock])
 
248
fi
 
249
AC_MSG_RESULT(yes)])
 
250
 
 
251
#  -*- Autoconf -*-
 
252
 
 
253
 
 
254
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
 
255
 
 
256
# This program is free software; you can redistribute it and/or modify
 
257
# it under the terms of the GNU General Public License as published by
 
258
# the Free Software Foundation; either version 2, or (at your option)
 
259
# any later version.
 
260
 
 
261
# This program is distributed in the hope that it will be useful,
 
262
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
263
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
264
# GNU General Public License for more details.
 
265
 
 
266
# You should have received a copy of the GNU General Public License
 
267
# along with this program; if not, write to the Free Software
 
268
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
269
# 02111-1307, USA.
 
270
 
 
271
# serial 3
 
272
 
 
273
# AM_MISSING_PROG(NAME, PROGRAM)
 
274
# ------------------------------
 
275
AC_DEFUN([AM_MISSING_PROG],
 
276
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
277
$1=${$1-"${am_missing_run}$2"}
 
278
AC_SUBST($1)])
 
279
 
 
280
 
 
281
# AM_MISSING_HAS_RUN
 
282
# ------------------
 
283
# Define MISSING if not defined so far and test if it supports --run.
 
284
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
285
AC_DEFUN([AM_MISSING_HAS_RUN],
 
286
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
287
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
288
# Use eval to expand $SHELL
 
289
if eval "$MISSING --run true"; then
 
290
  am_missing_run="$MISSING --run "
 
291
else
 
292
  am_missing_run=
 
293
  AC_MSG_WARN([`missing' script is too old or missing])
 
294
fi
 
295
])
 
296
 
 
297
# AM_AUX_DIR_EXPAND
 
298
 
 
299
# Copyright 2001 Free Software Foundation, Inc.
 
300
 
 
301
# This program is free software; you can redistribute it and/or modify
 
302
# it under the terms of the GNU General Public License as published by
 
303
# the Free Software Foundation; either version 2, or (at your option)
 
304
# any later version.
 
305
 
 
306
# This program is distributed in the hope that it will be useful,
 
307
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
308
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
309
# GNU General Public License for more details.
 
310
 
 
311
# You should have received a copy of the GNU General Public License
 
312
# along with this program; if not, write to the Free Software
 
313
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
314
# 02111-1307, USA.
 
315
 
 
316
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
317
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
318
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
319
#
 
320
# Of course, Automake must honor this variable whenever it calls a
 
321
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
322
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
323
# depending on how configure is run.  This is pretty annoying, since
 
324
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
325
# source directory, any form will work fine, but in subdirectories a
 
326
# relative path needs to be adjusted first.
 
327
#
 
328
# $ac_aux_dir/missing
 
329
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
330
# $top_srcdir/$ac_aux_dir/missing
 
331
#    fails if $ac_aux_dir is absolute,
 
332
#    fails when called from a subdirectory in a VPATH build with
 
333
#          a relative $ac_aux_dir
 
334
#
 
335
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
336
# are both prefixed by $srcdir.  In an in-source build this is usually
 
337
# harmless because $srcdir is `.', but things will broke when you
 
338
# start a VPATH build or use an absolute $srcdir.
 
339
#
 
340
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
341
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
342
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
343
# and then we would define $MISSING as
 
344
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
345
# This will work as long as MISSING is not called from configure, because
 
346
# unfortunately $(top_srcdir) has no meaning in configure.
 
347
# However there are other variables, like CC, which are often used in
 
348
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
349
#
 
350
# Another solution, used here, is to always expand $ac_aux_dir to an
 
351
# absolute PATH.  The drawback is that using absolute paths prevent a
 
352
# configured tree to be moved without reconfiguration.
 
353
 
 
354
# Rely on autoconf to set up CDPATH properly.
 
355
AC_PREREQ([2.50])
 
356
 
 
357
AC_DEFUN([AM_AUX_DIR_EXPAND], [
 
358
# expand $ac_aux_dir to an absolute path
 
359
am_aux_dir=`cd $ac_aux_dir && pwd`
 
360
])
 
361
 
 
362
# AM_PROG_INSTALL_SH
 
363
# ------------------
 
364
# Define $install_sh.
 
365
 
 
366
# Copyright 2001 Free Software Foundation, Inc.
 
367
 
 
368
# This program is free software; you can redistribute it and/or modify
 
369
# it under the terms of the GNU General Public License as published by
 
370
# the Free Software Foundation; either version 2, or (at your option)
 
371
# any later version.
 
372
 
 
373
# This program is distributed in the hope that it will be useful,
 
374
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
375
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
376
# GNU General Public License for more details.
 
377
 
 
378
# You should have received a copy of the GNU General Public License
 
379
# along with this program; if not, write to the Free Software
 
380
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
381
# 02111-1307, USA.
 
382
 
 
383
AC_DEFUN([AM_PROG_INSTALL_SH],
 
384
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
385
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
386
AC_SUBST(install_sh)])
 
387
 
 
388
# AM_PROG_INSTALL_STRIP
 
389
 
 
390
# Copyright 2001 Free Software Foundation, Inc.
 
391
 
 
392
# This program is free software; you can redistribute it and/or modify
 
393
# it under the terms of the GNU General Public License as published by
 
394
# the Free Software Foundation; either version 2, or (at your option)
 
395
# any later version.
 
396
 
 
397
# This program is distributed in the hope that it will be useful,
 
398
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
399
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
400
# GNU General Public License for more details.
 
401
 
 
402
# You should have received a copy of the GNU General Public License
 
403
# along with this program; if not, write to the Free Software
 
404
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
405
# 02111-1307, USA.
 
406
 
 
407
# One issue with vendor `install' (even GNU) is that you can't
 
408
# specify the program used to strip binaries.  This is especially
 
409
# annoying in cross-compiling environments, where the build's strip
 
410
# is unlikely to handle the host's binaries.
 
411
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
412
# always use install-sh in `make install-strip', and initialize
 
413
# STRIPPROG with the value of the STRIP variable (set by the user).
 
414
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
415
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
416
# Installed binaries are usually stripped using `strip' when the user
 
417
# run `make install-strip'.  However `strip' might not be the right
 
418
# tool to use in cross-compilation environments, therefore Automake
 
419
# will honor the `STRIP' environment variable to overrule this program.
 
420
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
421
if test "$cross_compiling" != no; then
 
422
  AC_CHECK_TOOL([STRIP], [strip], :)
 
423
fi
 
424
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
425
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
426
 
 
427
# serial 4                                              -*- Autoconf -*-
 
428
 
 
429
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 
430
 
 
431
# This program is free software; you can redistribute it and/or modify
 
432
# it under the terms of the GNU General Public License as published by
 
433
# the Free Software Foundation; either version 2, or (at your option)
 
434
# any later version.
 
435
 
 
436
# This program is distributed in the hope that it will be useful,
 
437
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
438
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
439
# GNU General Public License for more details.
 
440
 
 
441
# You should have received a copy of the GNU General Public License
 
442
# along with this program; if not, write to the Free Software
 
443
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
444
# 02111-1307, USA.
 
445
 
 
446
 
 
447
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
448
# written in clear, in which case automake, when reading aclocal.m4,
 
449
# will think it sees a *use*, and therefore will trigger all it's
 
450
# C support machinery.  Also note that it means that autoscan, seeing
 
451
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
452
 
 
453
 
 
454
 
 
455
# _AM_DEPENDENCIES(NAME)
 
456
# ----------------------
 
457
# See how the compiler implements dependency checking.
 
458
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
459
# We try a few techniques and use that to set a single cache variable.
 
460
#
 
461
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
462
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
463
# dependency, and given that the user is not expected to run this macro,
 
464
# just rely on AC_PROG_CC.
 
465
AC_DEFUN([_AM_DEPENDENCIES],
 
466
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
467
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
468
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
469
AC_REQUIRE([AM_DEP_TRACK])dnl
 
470
 
 
471
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
472
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
473
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
 
474
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
475
                   [depcc="$$1"   am_compiler_list=])
 
476
 
 
477
AC_CACHE_CHECK([dependency style of $depcc],
 
478
               [am_cv_$1_dependencies_compiler_type],
 
479
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
480
  # We make a subdir and do the tests there.  Otherwise we can end up
 
481
  # making bogus files that we don't know about and never remove.  For
 
482
  # instance it was reported that on HP-UX the gcc test will end up
 
483
  # making a dummy file named `D' -- because `-MD' means `put the output
 
484
  # in D'.
 
485
  mkdir conftest.dir
 
486
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
487
  # using a relative directory.
 
488
  cp "$am_depcomp" conftest.dir
 
489
  cd conftest.dir
 
490
 
 
491
  am_cv_$1_dependencies_compiler_type=none
 
492
  if test "$am_compiler_list" = ""; then
 
493
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
494
  fi
 
495
  for depmode in $am_compiler_list; do
 
496
    # We need to recreate these files for each test, as the compiler may
 
497
    # overwrite some of them when testing with obscure command lines.
 
498
    # This happens at least with the AIX C compiler.
 
499
    echo '#include "conftest.h"' > conftest.c
 
500
    echo 'int i;' > conftest.h
 
501
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
 
502
 
 
503
    case $depmode in
 
504
    nosideeffect)
 
505
      # after this tag, mechanisms are not by side-effect, so they'll
 
506
      # only be used when explicitly requested
 
507
      if test "x$enable_dependency_tracking" = xyes; then
 
508
        continue
 
509
      else
 
510
        break
 
511
      fi
 
512
      ;;
 
513
    none) break ;;
 
514
    esac
 
515
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
516
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
517
    # handle `-M -o', and we need to detect this.
 
518
    if depmode=$depmode \
 
519
       source=conftest.c object=conftest.o \
 
520
       depfile=conftest.Po tmpdepfile=conftest.TPo \
 
521
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
 
522
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
 
523
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
524
      am_cv_$1_dependencies_compiler_type=$depmode
 
525
      break
 
526
    fi
 
527
  done
 
528
 
 
529
  cd ..
 
530
  rm -rf conftest.dir
 
531
else
 
532
  am_cv_$1_dependencies_compiler_type=none
 
533
fi
 
534
])
 
535
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
536
])
 
537
 
 
538
 
 
539
# AM_SET_DEPDIR
 
540
# -------------
 
541
# Choose a directory name for dependency files.
 
542
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
543
AC_DEFUN([AM_SET_DEPDIR],
 
544
[rm -f .deps 2>/dev/null
 
545
mkdir .deps 2>/dev/null
 
546
if test -d .deps; then
 
547
  DEPDIR=.deps
 
548
else
 
549
  # MS-DOS does not allow filenames that begin with a dot.
 
550
  DEPDIR=_deps
 
551
fi
 
552
rmdir .deps 2>/dev/null
 
553
AC_SUBST([DEPDIR])
 
554
])
 
555
 
 
556
 
 
557
# AM_DEP_TRACK
 
558
# ------------
 
559
AC_DEFUN([AM_DEP_TRACK],
 
560
[AC_ARG_ENABLE(dependency-tracking,
 
561
[  --disable-dependency-tracking Speeds up one-time builds
 
562
  --enable-dependency-tracking  Do not reject slow dependency extractors])
 
563
if test "x$enable_dependency_tracking" != xno; then
 
564
  am_depcomp="$ac_aux_dir/depcomp"
 
565
  AMDEPBACKSLASH='\'
 
566
fi
 
567
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
568
AC_SUBST([AMDEPBACKSLASH])
 
569
])
 
570
 
 
571
# Generate code to set up dependency tracking.   -*- Autoconf -*-
 
572
 
 
573
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
574
 
 
575
# This program is free software; you can redistribute it and/or modify
 
576
# it under the terms of the GNU General Public License as published by
 
577
# the Free Software Foundation; either version 2, or (at your option)
 
578
# any later version.
 
579
 
 
580
# This program is distributed in the hope that it will be useful,
 
581
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
582
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
583
# GNU General Public License for more details.
 
584
 
 
585
# You should have received a copy of the GNU General Public License
 
586
# along with this program; if not, write to the Free Software
 
587
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
588
# 02111-1307, USA.
 
589
 
 
590
#serial 2
 
591
 
 
592
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
593
# ------------------------------
 
594
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
595
[for mf in $CONFIG_FILES; do
 
596
  # Strip MF so we end up with the name of the file.
 
597
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
598
  if (sed 4q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
 
599
    dirpart=`AS_DIRNAME("$mf")`
 
600
  else
 
601
    continue
 
602
  fi
 
603
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
 
604
  # Extract the definition of DEP_FILES from the Makefile without
 
605
  # running `make'.
 
606
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 
607
  test -z "$DEPDIR" && continue
 
608
  # When using ansi2knr, U may be empty or an underscore; expand it
 
609
  U=`sed -n -e '/^U = / s///p' < "$mf"`
 
610
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
 
611
  # We invoke sed twice because it is the simplest approach to
 
612
  # changing $(DEPDIR) to its actual value in the expansion.
 
613
  for file in `sed -n -e '
 
614
    /^DEP_FILES = .*\\\\$/ {
 
615
      s/^DEP_FILES = //
 
616
      :loop
 
617
        s/\\\\$//
 
618
        p
 
619
        n
 
620
        /\\\\$/ b loop
 
621
      p
 
622
    }
 
623
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 
624
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
625
    # Make sure the directory exists.
 
626
    test -f "$dirpart/$file" && continue
 
627
    fdir=`AS_DIRNAME(["$file"])`
 
628
    AS_MKDIR_P([$dirpart/$fdir])
 
629
    # echo "creating $dirpart/$file"
 
630
    echo '# dummy' > "$dirpart/$file"
 
631
  done
 
632
done
 
633
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
634
 
 
635
 
 
636
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
637
# -----------------------------
 
638
# This macro should only be invoked once -- use via AC_REQUIRE.
 
639
#
 
640
# This code is only required when automatic dependency tracking
 
641
# is enabled.  FIXME.  This creates each `.P' file that we will
 
642
# need in order to bootstrap the dependency handling code.
 
643
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
644
[AC_CONFIG_COMMANDS([depfiles],
 
645
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
646
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
647
])
 
648
 
 
649
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
 
650
 
 
651
# This program is free software; you can redistribute it and/or modify
 
652
# it under the terms of the GNU General Public License as published by
 
653
# the Free Software Foundation; either version 2, or (at your option)
 
654
# any later version.
 
655
 
 
656
# This program is distributed in the hope that it will be useful,
 
657
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
658
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
659
# GNU General Public License for more details.
 
660
 
 
661
# You should have received a copy of the GNU General Public License
 
662
# along with this program; if not, write to the Free Software
 
663
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
664
# 02111-1307, USA.
 
665
 
 
666
# serial 2
 
667
 
 
668
# AM_MAKE_INCLUDE()
 
669
# -----------------
 
670
# Check to see how make treats includes.
 
671
AC_DEFUN([AM_MAKE_INCLUDE],
 
672
[am_make=${MAKE-make}
 
673
cat > confinc << 'END'
 
674
doit:
 
675
        @echo done
 
676
END
 
677
# If we don't find an include directive, just comment out the code.
 
678
AC_MSG_CHECKING([for style of include used by $am_make])
 
679
am__include="#"
 
680
am__quote=
 
681
_am_result=none
 
682
# First try GNU make style include.
 
683
echo "include confinc" > confmf
 
684
# We grep out `Entering directory' and `Leaving directory'
 
685
# messages which can occur if `w' ends up in MAKEFLAGS.
 
686
# In particular we don't look at `^make:' because GNU make might
 
687
# be invoked under some other name (usually "gmake"), in which
 
688
# case it prints its new name instead of `make'.
 
689
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
 
690
   am__include=include
 
691
   am__quote=
 
692
   _am_result=GNU
 
693
fi
 
694
# Now try BSD make style include.
 
695
if test "$am__include" = "#"; then
 
696
   echo '.include "confinc"' > confmf
 
697
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
698
      am__include=.include
 
699
      am__quote="\""
 
700
      _am_result=BSD
 
701
   fi
 
702
fi
 
703
AC_SUBST(am__include)
 
704
AC_SUBST(am__quote)
 
705
AC_MSG_RESULT($_am_result)
 
706
rm -f confinc confmf
 
707
])
 
708
 
 
709
# AM_CONDITIONAL                                              -*- Autoconf -*-
 
710
 
 
711
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
 
712
 
 
713
# This program is free software; you can redistribute it and/or modify
 
714
# it under the terms of the GNU General Public License as published by
 
715
# the Free Software Foundation; either version 2, or (at your option)
 
716
# any later version.
 
717
 
 
718
# This program is distributed in the hope that it will be useful,
 
719
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
720
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
721
# GNU General Public License for more details.
 
722
 
 
723
# You should have received a copy of the GNU General Public License
 
724
# along with this program; if not, write to the Free Software
 
725
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
726
# 02111-1307, USA.
 
727
 
 
728
# serial 5
 
729
 
 
730
AC_PREREQ(2.52)
 
731
 
 
732
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
733
# -------------------------------------
 
734
# Define a conditional.
 
735
AC_DEFUN([AM_CONDITIONAL],
 
736
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
737
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
738
AC_SUBST([$1_TRUE])
 
739
AC_SUBST([$1_FALSE])
 
740
if $2; then
 
741
  $1_TRUE=
 
742
  $1_FALSE='#'
 
743
else
 
744
  $1_TRUE='#'
 
745
  $1_FALSE=
 
746
fi
 
747
AC_CONFIG_COMMANDS_PRE(
 
748
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
749
  AC_MSG_ERROR([conditional \"$1\" was never defined.
 
750
Usually this means the macro was only invoked conditionally.])
 
751
fi])])
 
752
 
 
753
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
 
754
 
 
755
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
 
756
 
 
757
# This program is free software; you can redistribute it and/or modify
 
758
# it under the terms of the GNU General Public License as published by
 
759
# the Free Software Foundation; either version 2, or (at your option)
 
760
# any later version.
 
761
 
 
762
# This program is distributed in the hope that it will be useful,
 
763
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
764
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
765
# GNU General Public License for more details.
 
766
 
 
767
# You should have received a copy of the GNU General Public License
 
768
# along with this program; if not, write to the Free Software
 
769
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
770
# 02111-1307, USA.
 
771
 
 
772
AC_PREREQ([2.52])
 
773
 
 
774
# serial 6
 
775
 
 
776
# When config.status generates a header, we must update the stamp-h file.
 
777
# This file resides in the same directory as the config header
 
778
# that is generated.  We must strip everything past the first ":",
 
779
# and everything past the last "/".
 
780
 
 
781
# _AM_DIRNAME(PATH)
 
782
# -----------------
 
783
# Like AS_DIRNAME, only do it during macro expansion
 
784
AC_DEFUN([_AM_DIRNAME],
 
785
       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
 
786
              m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
 
787
                    m4_if(regexp([$1], [^/.*]), -1,
 
788
                          [.],
 
789
                          patsubst([$1], [^\(/\).*], [\1])),
 
790
                    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
 
791
              patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
 
792
])# _AM_DIRNAME
 
793
 
 
794
 
 
795
# The stamp files are numbered to have different names.
 
796
# We could number them on a directory basis, but that's additional
 
797
# complications, let's have a unique counter.
 
798
m4_define([_AM_STAMP_Count], [0])
 
799
 
 
800
 
 
801
# _AM_STAMP(HEADER)
 
802
# -----------------
 
803
# The name of the stamp file for HEADER.
 
804
AC_DEFUN([_AM_STAMP],
 
805
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
 
806
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
 
807
                               [:.*])))/stamp-h[]_AM_STAMP_Count])
 
808
 
 
809
 
 
810
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
 
811
# ------------------------------------------------------------
 
812
# We used to try to get a real timestamp in stamp-h.  But the fear is that
 
813
# that will cause unnecessary cvs conflicts.
 
814
AC_DEFUN([_AM_CONFIG_HEADER],
 
815
[# Add the stamp file to the list of files AC keeps track of,
 
816
# along with our hook.
 
817
AC_CONFIG_HEADERS([$1],
 
818
                  [# update the timestamp
 
819
echo 'timestamp for $1' >"_AM_STAMP([$1])"
 
820
$2],
 
821
                  [$3])
 
822
])# _AM_CONFIG_HEADER
 
823
 
 
824
 
 
825
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
 
826
# --------------------------------------------------------------
 
827
AC_DEFUN([AM_CONFIG_HEADER],
 
828
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
 
829
])# AM_CONFIG_HEADER
 
830
 
 
831
# isc-posix.m4 serial 2 (gettext-0.11.2)
 
832
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
833
dnl This file is free software, distributed under the terms of the GNU
 
834
dnl General Public License.  As a special exception to the GNU General
 
835
dnl Public License, this file may be distributed as part of a program
 
836
dnl that contains a configuration script generated by Autoconf, under
 
837
dnl the same distribution terms as the rest of that program.
 
838
 
 
839
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
 
840
 
 
841
# This test replaces the one in autoconf.
 
842
# Currently this macro should have the same name as the autoconf macro
 
843
# because gettext's gettext.m4 (distributed in the automake package)
 
844
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
 
845
# give these diagnostics:
 
846
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
 
847
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
 
848
 
 
849
undefine([AC_ISC_POSIX])
 
850
 
 
851
AC_DEFUN([AC_ISC_POSIX],
 
852
  [
 
853
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
 
854
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
 
855
  ]
 
856
)
 
857
 
 
858
# gettext.m4 serial 14 (gettext-0.11.2)
 
859
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
860
dnl This file is free software, distributed under the terms of the GNU
 
861
dnl General Public License.  As a special exception to the GNU General
 
862
dnl Public License, this file may be distributed as part of a program
 
863
dnl that contains a configuration script generated by Autoconf, under
 
864
dnl the same distribution terms as the rest of that program.
 
865
dnl
 
866
dnl This file can can be used in projects which are not available under
 
867
dnl the GNU General Public License or the GNU Library General Public
 
868
dnl License but which still want to provide support for the GNU gettext
 
869
dnl functionality.
 
870
dnl Please note that the actual code of the GNU gettext library is covered
 
871
dnl by the GNU Library General Public License, and the rest of the GNU
 
872
dnl gettext package package is covered by the GNU General Public License.
 
873
dnl They are *not* in the public domain.
 
874
 
 
875
dnl Authors:
 
876
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 
877
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2002.
 
878
 
 
879
dnl Macro to add for using GNU gettext.
 
880
 
 
881
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
 
882
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
 
883
dnl    default (if it is not specified or empty) is 'no-libtool'.
 
884
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
 
885
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
 
886
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
 
887
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
 
888
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
 
889
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
 
890
dnl    $(top_builddir)/intl/libintl.a will be created.
 
891
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
 
892
dnl    implementations (in libc or libintl) without the ngettext() function
 
893
dnl    will be ignored.
 
894
dnl INTLDIR is used to find the intl libraries.  If empty,
 
895
dnl    the value `$(top_builddir)/intl/' is used.
 
896
dnl
 
897
dnl The result of the configuration is one of three cases:
 
898
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
 
899
dnl    and used.
 
900
dnl    Catalog format: GNU --> install in $(datadir)
 
901
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
902
dnl 2) GNU gettext has been found in the system's C library.
 
903
dnl    Catalog format: GNU --> install in $(datadir)
 
904
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
905
dnl 3) No internationalization, always use English msgid.
 
906
dnl    Catalog format: none
 
907
dnl    Catalog extension: none
 
908
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
 
909
dnl The use of .gmo is historical (it was needed to avoid overwriting the
 
910
dnl GNU format catalogs when building on a platform with an X/Open gettext),
 
911
dnl but we keep it in order not to force irrelevant filename changes on the
 
912
dnl maintainers.
 
913
dnl
 
914
AC_DEFUN([AM_GNU_GETTEXT],
 
915
[
 
916
  dnl Argument checking.
 
917
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
 
918
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
 
919
])])])])])
 
920
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
 
921
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
 
922
])])])
 
923
  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
 
924
  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
 
925
 
 
926
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
 
927
  ifelse(gt_included_intl, yes, [
 
928
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
 
929
  ])
 
930
 
 
931
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
932
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
933
  AC_REQUIRE([AC_LIB_RPATH])
 
934
 
 
935
  AC_MSG_CHECKING([whether NLS is requested])
 
936
  dnl Default is enabled NLS
 
937
  AC_ARG_ENABLE(nls,
 
938
    [  --disable-nls           do not use Native Language Support],
 
939
    USE_NLS=$enableval, USE_NLS=yes)
 
940
  AC_MSG_RESULT($USE_NLS)
 
941
  AC_SUBST(USE_NLS)
 
942
 
 
943
  ifelse(gt_included_intl, yes, [
 
944
    BUILD_INCLUDED_LIBINTL=no
 
945
    USE_INCLUDED_LIBINTL=no
 
946
  ])
 
947
  LIBINTL=
 
948
  LTLIBINTL=
 
949
  POSUB=
 
950
 
 
951
  dnl If we use NLS figure out what method
 
952
  if test "$USE_NLS" = "yes"; then
 
953
    gt_use_preinstalled_gnugettext=no
 
954
    ifelse(gt_included_intl, yes, [
 
955
      AC_MSG_CHECKING([whether included gettext is requested])
 
956
      AC_ARG_WITH(included-gettext,
 
957
        [  --with-included-gettext use the GNU gettext library included here],
 
958
        nls_cv_force_use_gnu_gettext=$withval,
 
959
        nls_cv_force_use_gnu_gettext=no)
 
960
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
 
961
 
 
962
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
 
963
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
 
964
    ])
 
965
        dnl User does not insist on using GNU NLS library.  Figure out what
 
966
        dnl to use.  If GNU gettext is available we use this.  Else we have
 
967
        dnl to fall back to GNU NLS library.
 
968
 
 
969
        dnl Add a version number to the cache macros.
 
970
        define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
 
971
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
 
972
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
 
973
 
 
974
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
 
975
         [AC_TRY_LINK([#include <libintl.h>
 
976
extern int _nl_msg_cat_cntr;
 
977
extern int *_nl_domain_bindings;],
 
978
            [bindtextdomain ("", "");
 
979
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
 
980
            gt_cv_func_gnugettext_libc=yes,
 
981
            gt_cv_func_gnugettext_libc=no)])
 
982
 
 
983
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
984
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
 
985
          ifelse(gt_included_intl, yes, , [
 
986
            AM_ICONV_LINK
 
987
          ])
 
988
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
 
989
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
 
990
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
 
991
          dnl even if libiconv doesn't exist.
 
992
          AC_LIB_LINKFLAGS_BODY([intl])
 
993
          AC_CACHE_CHECK([for GNU gettext in libintl],
 
994
            gt_cv_func_gnugettext_libintl,
 
995
           [gt_save_CPPFLAGS="$CPPFLAGS"
 
996
            CPPFLAGS="$CPPFLAGS $INCINTL"
 
997
            gt_save_LIBS="$LIBS"
 
998
            LIBS="$LIBS $LIBINTL"
 
999
            dnl Now see whether libintl exists and does not depend on libiconv.
 
1000
            AC_TRY_LINK([#include <libintl.h>
 
1001
extern int _nl_msg_cat_cntr;
 
1002
extern
 
1003
#ifdef __cplusplus
 
1004
"C"
 
1005
#endif
 
1006
const char *_nl_expand_alias ();],
 
1007
              [bindtextdomain ("", "");
 
1008
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
 
1009
              gt_cv_func_gnugettext_libintl=yes,
 
1010
              gt_cv_func_gnugettext_libintl=no)
 
1011
            dnl Now see whether libintl exists and depends on libiconv.
 
1012
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
 
1013
              LIBS="$LIBS $LIBICONV"
 
1014
              AC_TRY_LINK([#include <libintl.h>
 
1015
extern int _nl_msg_cat_cntr;
 
1016
extern
 
1017
#ifdef __cplusplus
 
1018
"C"
 
1019
#endif
 
1020
const char *_nl_expand_alias ();],
 
1021
                [bindtextdomain ("", "");
 
1022
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
 
1023
               [LIBINTL="$LIBINTL $LIBICONV"
 
1024
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
 
1025
                gt_cv_func_gnugettext_libintl=yes
 
1026
               ])
 
1027
            fi
 
1028
            CPPFLAGS="$gt_save_CPPFLAGS"
 
1029
            LIBS="$gt_save_LIBS"])
 
1030
        fi
 
1031
 
 
1032
        dnl If an already present or preinstalled GNU gettext() is found,
 
1033
        dnl use it.  But if this macro is used in GNU gettext, and GNU
 
1034
        dnl gettext is already preinstalled in libintl, we update this
 
1035
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
 
1036
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
 
1037
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
 
1038
                && test "$PACKAGE" != gettext; }; then
 
1039
          gt_use_preinstalled_gnugettext=yes
 
1040
        else
 
1041
          dnl Reset the values set by searching for libintl.
 
1042
          LIBINTL=
 
1043
          LTLIBINTL=
 
1044
          INCINTL=
 
1045
        fi
 
1046
 
 
1047
    ifelse(gt_included_intl, yes, [
 
1048
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
 
1049
          dnl GNU gettext is not found in the C library.
 
1050
          dnl Fall back on included GNU gettext library.
 
1051
          nls_cv_use_gnu_gettext=yes
 
1052
        fi
 
1053
      fi
 
1054
 
 
1055
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
 
1056
        dnl Mark actions used to generate GNU NLS library.
 
1057
        INTLOBJS="\$(GETTOBJS)"
 
1058
        BUILD_INCLUDED_LIBINTL=yes
 
1059
        USE_INCLUDED_LIBINTL=yes
 
1060
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
 
1061
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
 
1062
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
 
1063
      fi
 
1064
 
 
1065
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
1066
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
1067
        dnl Mark actions to use GNU gettext tools.
 
1068
        CATOBJEXT=.gmo
 
1069
      fi
 
1070
    ])
 
1071
 
 
1072
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
 
1073
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
 
1074
      AC_DEFINE(ENABLE_NLS, 1,
 
1075
        [Define to 1 if translation of program messages to the user's native language
 
1076
   is requested.])
 
1077
    else
 
1078
      USE_NLS=no
 
1079
    fi
 
1080
  fi
 
1081
 
 
1082
  if test "$USE_NLS" = "yes"; then
 
1083
 
 
1084
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
 
1085
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
1086
        AC_MSG_CHECKING([how to link with libintl])
 
1087
        AC_MSG_RESULT([$LIBINTL])
 
1088
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
 
1089
      fi
 
1090
 
 
1091
      dnl For backward compatibility. Some packages may be using this.
 
1092
      AC_DEFINE(HAVE_GETTEXT, 1,
 
1093
       [Define if the GNU gettext() function is already present or preinstalled.])
 
1094
      AC_DEFINE(HAVE_DCGETTEXT, 1,
 
1095
       [Define if the GNU dcgettext() function is already present or preinstalled.])
 
1096
    fi
 
1097
 
 
1098
    dnl We need to process the po/ directory.
 
1099
    POSUB=po
 
1100
  fi
 
1101
 
 
1102
  ifelse(gt_included_intl, yes, [
 
1103
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
 
1104
    dnl to 'yes' because some of the testsuite requires it.
 
1105
    if test "$PACKAGE" = gettext; then
 
1106
      BUILD_INCLUDED_LIBINTL=yes
 
1107
    fi
 
1108
 
 
1109
    dnl Make all variables we use known to autoconf.
 
1110
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
 
1111
    AC_SUBST(USE_INCLUDED_LIBINTL)
 
1112
    AC_SUBST(CATOBJEXT)
 
1113
    AC_SUBST(INTLOBJS)
 
1114
 
 
1115
    dnl For backward compatibility. Some configure.ins may be using this.
 
1116
    nls_cv_header_intl=
 
1117
    nls_cv_header_libgt=
 
1118
 
 
1119
    dnl For backward compatibility. Some Makefiles may be using this.
 
1120
    DATADIRNAME=share
 
1121
    AC_SUBST(DATADIRNAME)
 
1122
 
 
1123
    dnl For backward compatibility. Some Makefiles may be using this.
 
1124
    INSTOBJEXT=.mo
 
1125
    AC_SUBST(INSTOBJEXT)
 
1126
 
 
1127
    dnl For backward compatibility. Some Makefiles may be using this.
 
1128
    GENCAT=gencat
 
1129
    AC_SUBST(GENCAT)
 
1130
 
 
1131
    dnl Enable libtool support if the surrounding package wishes it.
 
1132
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
 
1133
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
 
1134
  ])
 
1135
 
 
1136
  dnl For backward compatibility. Some Makefiles may be using this.
 
1137
  INTLLIBS="$LIBINTL"
 
1138
  AC_SUBST(INTLLIBS)
 
1139
 
 
1140
  dnl Make all documented variables known to autoconf.
 
1141
  AC_SUBST(LIBINTL)
 
1142
  AC_SUBST(LTLIBINTL)
 
1143
  AC_SUBST(POSUB)
 
1144
])
 
1145
 
 
1146
 
 
1147
dnl Checks for all prerequisites of the po subdirectory,
 
1148
dnl except for USE_NLS.
 
1149
AC_DEFUN([AM_PO_SUBDIRS],
 
1150
[
 
1151
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1152
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1153
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
1154
 
 
1155
  dnl Perform the following tests also if --disable-nls has been given,
 
1156
  dnl because they are needed for "make dist" to work.
 
1157
 
 
1158
  dnl Search for GNU msgfmt in the PATH.
 
1159
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
 
1160
  dnl The second test excludes FreeBSD msgfmt.
 
1161
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
1162
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
 
1163
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
1164
    :)
 
1165
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1166
 
 
1167
  dnl Search for GNU xgettext 0.11 or newer in the PATH.
 
1168
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
 
1169
  dnl The second test excludes FreeBSD xgettext.
 
1170
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
1171
    [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
 
1172
     (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
 
1173
    :)
 
1174
  dnl Remove leftover from FreeBSD xgettext call.
 
1175
  rm -f messages.po
 
1176
 
 
1177
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
 
1178
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
 
1179
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
 
1180
 
 
1181
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
1182
  dnl Test whether we really found GNU msgfmt.
 
1183
  if test "$GMSGFMT" != ":"; then
 
1184
    dnl If it is no GNU msgfmt we define it as : so that the
 
1185
    dnl Makefiles still can work.
 
1186
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
 
1187
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
1188
      : ;
 
1189
    else
 
1190
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
 
1191
      AC_MSG_RESULT(
 
1192
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
 
1193
      GMSGFMT=":"
 
1194
    fi
 
1195
  fi
 
1196
 
 
1197
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
1198
  dnl Test whether we really found GNU xgettext.
 
1199
  if test "$XGETTEXT" != ":"; then
 
1200
    dnl If it is no GNU xgettext we define it as : so that the
 
1201
    dnl Makefiles still can work.
 
1202
    if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
 
1203
       (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
 
1204
      : ;
 
1205
    else
 
1206
      AC_MSG_RESULT(
 
1207
        [found xgettext program is not GNU xgettext; ignore it])
 
1208
      XGETTEXT=":"
 
1209
    fi
 
1210
    dnl Remove leftover from FreeBSD xgettext call.
 
1211
    rm -f messages.po
 
1212
  fi
 
1213
 
 
1214
  AC_OUTPUT_COMMANDS([
 
1215
    for ac_file in $CONFIG_FILES; do
 
1216
      # Support "outfile[:infile[:infile...]]"
 
1217
      case "$ac_file" in
 
1218
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
1219
      esac
 
1220
      # PO directories have a Makefile.in generated from Makefile.in.in.
 
1221
      case "$ac_file" in */Makefile.in)
 
1222
        # Adjust a relative srcdir.
 
1223
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
1224
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
1225
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
1226
        # In autoconf-2.13 it is called $ac_given_srcdir.
 
1227
        # In autoconf-2.50 it is called $srcdir.
 
1228
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
1229
        case "$ac_given_srcdir" in
 
1230
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
1231
          /*) top_srcdir="$ac_given_srcdir" ;;
 
1232
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
1233
        esac
 
1234
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
 
1235
          rm -f "$ac_dir/POTFILES"
 
1236
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
 
1237
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
 
1238
          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
 
1239
          # on $ac_dir but don't depend on user-specified configuration
 
1240
          # parameters.
 
1241
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
 
1242
            # The LINGUAS file contains the set of available languages.
 
1243
            if test -n "$ALL_LINGUAS"; then
 
1244
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
 
1245
            fi
 
1246
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
 
1247
            # Hide the ALL_LINGUAS assigment from automake.
 
1248
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
 
1249
          fi
 
1250
          case "$ac_given_srcdir" in
 
1251
            .) srcdirpre= ;;
 
1252
            *) srcdirpre='$(srcdir)/' ;;
 
1253
          esac
 
1254
          POFILES=
 
1255
          GMOFILES=
 
1256
          UPDATEPOFILES=
 
1257
          DUMMYPOFILES=
 
1258
          for lang in $ALL_LINGUAS; do
 
1259
            POFILES="$POFILES $srcdirpre$lang.po"
 
1260
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
 
1261
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
 
1262
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
 
1263
          done
 
1264
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
 
1265
          # environment variable.
 
1266
          INST_LINGUAS=
 
1267
          if test -n "$ALL_LINGUAS"; then
 
1268
            for presentlang in $ALL_LINGUAS; do
 
1269
              useit=no
 
1270
              if test "%UNSET%" != "$LINGUAS"; then
 
1271
                desiredlanguages="$LINGUAS"
 
1272
              else
 
1273
                desiredlanguages="$ALL_LINGUAS"
 
1274
              fi
 
1275
              for desiredlang in $desiredlanguages; do
 
1276
                # Use the presentlang catalog if desiredlang is
 
1277
                #   a. equal to presentlang, or
 
1278
                #   b. a variant of presentlang (because in this case,
 
1279
                #      presentlang can be used as a fallback for messages
 
1280
                #      which are not translated in the desiredlang catalog).
 
1281
                case "$desiredlang" in
 
1282
                  "$presentlang"*) useit=yes;;
 
1283
                esac
 
1284
              done
 
1285
              if test $useit = yes; then
 
1286
                INST_LINGUAS="$INST_LINGUAS $presentlang"
 
1287
              fi
 
1288
            done
 
1289
          fi
 
1290
          CATALOGS=
 
1291
          if test -n "$INST_LINGUAS"; then
 
1292
            for lang in $INST_LINGUAS; do
 
1293
              CATALOGS="$CATALOGS $lang.gmo"
 
1294
            done
 
1295
          fi
 
1296
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
 
1297
          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
 
1298
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
 
1299
            if test -f "$f"; then
 
1300
              case "$f" in
 
1301
                *.orig | *.bak | *~) ;;
 
1302
                *) cat "$f" >> "$ac_dir/Makefile" ;;
 
1303
              esac
 
1304
            fi
 
1305
          done
 
1306
        fi
 
1307
        ;;
 
1308
      esac
 
1309
    done],
 
1310
   [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
 
1311
    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
 
1312
    # from automake.
 
1313
    eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
 
1314
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
 
1315
    LINGUAS="${LINGUAS-%UNSET%}"
 
1316
   ])
 
1317
])
 
1318
 
 
1319
 
 
1320
dnl Checks for all prerequisites of the intl subdirectory,
 
1321
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
 
1322
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
 
1323
AC_DEFUN([AM_INTL_SUBDIR],
 
1324
[
 
1325
  AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1326
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
 
1327
  AC_REQUIRE([AC_PROG_CC])dnl
 
1328
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
1329
  AC_REQUIRE([AC_PROG_RANLIB])dnl
 
1330
  AC_REQUIRE([AC_ISC_POSIX])dnl
 
1331
  AC_REQUIRE([AC_HEADER_STDC])dnl
 
1332
  AC_REQUIRE([AC_C_CONST])dnl
 
1333
  AC_REQUIRE([AC_C_INLINE])dnl
 
1334
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
1335
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
1336
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
1337
  AC_REQUIRE([AC_FUNC_MMAP])dnl
 
1338
  AC_REQUIRE([jm_GLIBC21])dnl
 
1339
 
 
1340
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
 
1341
stdlib.h string.h unistd.h sys/param.h])
 
1342
  AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
 
1343
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
 
1344
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
 
1345
 
 
1346
  AM_ICONV
 
1347
  AM_LANGINFO_CODESET
 
1348
  AM_LC_MESSAGES
 
1349
 
 
1350
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
 
1351
  dnl because plural.y uses bison specific features. It requires at least
 
1352
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
 
1353
  dnl compile.
 
1354
  dnl bison is only needed for the maintainer (who touches plural.y). But in
 
1355
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
 
1356
  dnl the rule in general Makefile. Now, some people carelessly touch the
 
1357
  dnl files or have a broken "make" program, hence the plural.c rule will
 
1358
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
 
1359
  dnl present or too old.
 
1360
  AC_CHECK_PROGS([INTLBISON], [bison])
 
1361
  if test -z "$INTLBISON"; then
 
1362
    ac_verc_fail=yes
 
1363
  else
 
1364
    dnl Found it, now check the version.
 
1365
    AC_MSG_CHECKING([version of bison])
 
1366
changequote(<<,>>)dnl
 
1367
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
 
1368
    case $ac_prog_version in
 
1369
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
 
1370
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
 
1371
changequote([,])dnl
 
1372
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
 
1373
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
1374
    esac
 
1375
    AC_MSG_RESULT([$ac_prog_version])
 
1376
  fi
 
1377
  if test $ac_verc_fail = yes; then
 
1378
    INTLBISON=:
 
1379
  fi
 
1380
])
 
1381
 
 
1382
 
 
1383
AC_DEFUN([AM_MKINSTALLDIRS],
 
1384
[
 
1385
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
1386
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
 
1387
  dnl Try to locate is.
 
1388
  MKINSTALLDIRS=
 
1389
  if test -n "$ac_aux_dir"; then
 
1390
    MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
1391
  fi
 
1392
  if test -z "$MKINSTALLDIRS"; then
 
1393
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
1394
  fi
 
1395
  AC_SUBST(MKINSTALLDIRS)
 
1396
])
 
1397
 
 
1398
# lib-prefix.m4 serial 1 (gettext-0.11)
 
1399
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
1400
dnl This file is free software, distributed under the terms of the GNU
 
1401
dnl General Public License.  As a special exception to the GNU General
 
1402
dnl Public License, this file may be distributed as part of a program
 
1403
dnl that contains a configuration script generated by Autoconf, under
 
1404
dnl the same distribution terms as the rest of that program.
 
1405
 
 
1406
dnl From Bruno Haible.
 
1407
 
 
1408
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
 
1409
dnl to access previously installed libraries. The basic assumption is that
 
1410
dnl a user will want packages to use other packages he previously installed
 
1411
dnl with the same --prefix option.
 
1412
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
 
1413
dnl libraries, but is otherwise very convenient.
 
1414
AC_DEFUN([AC_LIB_PREFIX],
 
1415
[
 
1416
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
 
1417
  AC_REQUIRE([AC_PROG_CC])
 
1418
  AC_REQUIRE([AC_CANONICAL_HOST])
 
1419
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1420
  dnl By default, look in $includedir and $libdir.
 
1421
  use_additional=yes
 
1422
  AC_LIB_WITH_FINAL_PREFIX([
 
1423
    eval additional_includedir=\"$includedir\"
 
1424
    eval additional_libdir=\"$libdir\"
 
1425
  ])
 
1426
  AC_ARG_WITH([lib-prefix],
 
1427
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
 
1428
  --without-lib-prefix    don't search for libraries in includedir and libdir],
 
1429
[
 
1430
    if test "X$withval" = "Xno"; then
 
1431
      use_additional=no
 
1432
    else
 
1433
      if test "X$withval" = "X"; then
 
1434
        AC_LIB_WITH_FINAL_PREFIX([
 
1435
          eval additional_includedir=\"$includedir\"
 
1436
          eval additional_libdir=\"$libdir\"
 
1437
        ])
 
1438
      else
 
1439
        additional_includedir="$withval/include"
 
1440
        additional_libdir="$withval/lib"
 
1441
      fi
 
1442
    fi
 
1443
])
 
1444
  if test $use_additional = yes; then
 
1445
    dnl Potentially add $additional_includedir to $CPPFLAGS.
 
1446
    dnl But don't add it
 
1447
    dnl   1. if it's the standard /usr/include,
 
1448
    dnl   2. if it's already present in $CPPFLAGS,
 
1449
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
 
1450
    dnl   4. if it doesn't exist as a directory.
 
1451
    if test "X$additional_includedir" != "X/usr/include"; then
 
1452
      haveit=
 
1453
      for x in $CPPFLAGS; do
 
1454
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1455
        if test "X$x" = "X-I$additional_includedir"; then
 
1456
          haveit=yes
 
1457
          break
 
1458
        fi
 
1459
      done
 
1460
      if test -z "$haveit"; then
 
1461
        if test "X$additional_includedir" = "X/usr/local/include"; then
 
1462
          if test -n "$GCC"; then
 
1463
            case $host_os in
 
1464
              linux*) haveit=yes;;
 
1465
            esac
 
1466
          fi
 
1467
        fi
 
1468
        if test -z "$haveit"; then
 
1469
          if test -d "$additional_includedir"; then
 
1470
            dnl Really add $additional_includedir to $CPPFLAGS.
 
1471
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
 
1472
          fi
 
1473
        fi
 
1474
      fi
 
1475
    fi
 
1476
    dnl Potentially add $additional_libdir to $LDFLAGS.
 
1477
    dnl But don't add it
 
1478
    dnl   1. if it's the standard /usr/lib,
 
1479
    dnl   2. if it's already present in $LDFLAGS,
 
1480
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
 
1481
    dnl   4. if it doesn't exist as a directory.
 
1482
    if test "X$additional_libdir" != "X/usr/lib"; then
 
1483
      haveit=
 
1484
      for x in $LDFLAGS; do
 
1485
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1486
        if test "X$x" = "X-L$additional_libdir"; then
 
1487
          haveit=yes
 
1488
          break
 
1489
        fi
 
1490
      done
 
1491
      if test -z "$haveit"; then
 
1492
        if test "X$additional_libdir" = "X/usr/local/lib"; then
 
1493
          if test -n "$GCC"; then
 
1494
            case $host_os in
 
1495
              linux*) haveit=yes;;
 
1496
            esac
 
1497
          fi
 
1498
        fi
 
1499
        if test -z "$haveit"; then
 
1500
          if test -d "$additional_libdir"; then
 
1501
            dnl Really add $additional_libdir to $LDFLAGS.
 
1502
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
 
1503
          fi
 
1504
        fi
 
1505
      fi
 
1506
    fi
 
1507
  fi
 
1508
])
 
1509
 
 
1510
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
 
1511
dnl acl_final_exec_prefix, containing the values to which $prefix and
 
1512
dnl $exec_prefix will expand at the end of the configure script.
 
1513
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
 
1514
[
 
1515
  dnl Unfortunately, prefix and exec_prefix get only finally determined
 
1516
  dnl at the end of configure.
 
1517
  if test "X$prefix" = "XNONE"; then
 
1518
    acl_final_prefix="$ac_default_prefix"
 
1519
  else
 
1520
    acl_final_prefix="$prefix"
 
1521
  fi
 
1522
  if test "X$exec_prefix" = "XNONE"; then
 
1523
    acl_final_exec_prefix='${prefix}'
 
1524
  else
 
1525
    acl_final_exec_prefix="$exec_prefix"
 
1526
  fi
 
1527
  acl_save_prefix="$prefix"
 
1528
  prefix="$acl_final_prefix"
 
1529
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
 
1530
  prefix="$acl_save_prefix"
 
1531
])
 
1532
 
 
1533
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
 
1534
dnl variables prefix and exec_prefix bound to the values they will have
 
1535
dnl at the end of the configure script.
 
1536
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 
1537
[
 
1538
  acl_save_prefix="$prefix"
 
1539
  prefix="$acl_final_prefix"
 
1540
  acl_save_exec_prefix="$exec_prefix"
 
1541
  exec_prefix="$acl_final_exec_prefix"
 
1542
  $1
 
1543
  exec_prefix="$acl_save_exec_prefix"
 
1544
  prefix="$acl_save_prefix"
 
1545
])
 
1546
 
 
1547
# lib-link.m4 serial 2 (gettext-0.11.2)
 
1548
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
1549
dnl This file is free software, distributed under the terms of the GNU
 
1550
dnl General Public License.  As a special exception to the GNU General
 
1551
dnl Public License, this file may be distributed as part of a program
 
1552
dnl that contains a configuration script generated by Autoconf, under
 
1553
dnl the same distribution terms as the rest of that program.
 
1554
 
 
1555
dnl From Bruno Haible.
 
1556
 
 
1557
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 
1558
dnl the libraries corresponding to explicit and implicit dependencies.
 
1559
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 
1560
dnl augments the CPPFLAGS variable.
 
1561
AC_DEFUN([AC_LIB_LINKFLAGS],
 
1562
[
 
1563
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1564
  AC_REQUIRE([AC_LIB_RPATH])
 
1565
  define([Name],[translit([$1],[./-], [___])])
 
1566
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1567
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1568
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
 
1569
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1570
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
 
1571
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
 
1572
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
 
1573
  ])
 
1574
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
 
1575
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
 
1576
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
 
1577
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1578
  AC_SUBST([LIB]NAME)
 
1579
  AC_SUBST([LTLIB]NAME)
 
1580
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
 
1581
  dnl results of this search when this library appears as a dependency.
 
1582
  HAVE_LIB[]NAME=yes
 
1583
  undefine([Name])
 
1584
  undefine([NAME])
 
1585
])
 
1586
 
 
1587
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
 
1588
dnl searches for libname and the libraries corresponding to explicit and
 
1589
dnl implicit dependencies, together with the specified include files and
 
1590
dnl the ability to compile and link the specified testcode. If found, it
 
1591
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 
1592
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 
1593
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 
1594
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
 
1595
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 
1596
[
 
1597
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
1598
  AC_REQUIRE([AC_LIB_RPATH])
 
1599
  define([Name],[translit([$1],[./-], [___])])
 
1600
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1601
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1602
 
 
1603
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
 
1604
  dnl accordingly.
 
1605
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
 
1606
 
 
1607
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
 
1608
  dnl because if the user has installed lib[]Name and not disabled its use
 
1609
  dnl via --without-lib[]Name-prefix, he wants to use it.
 
1610
  ac_save_CPPFLAGS="$CPPFLAGS"
 
1611
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
 
1612
 
 
1613
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
 
1614
    ac_save_LIBS="$LIBS"
 
1615
    LIBS="$LIBS $LIB[]NAME"
 
1616
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
 
1617
    LIBS="$ac_save_LIBS"
 
1618
  ])
 
1619
  if test "$ac_cv_lib[]Name" = yes; then
 
1620
    HAVE_LIB[]NAME=yes
 
1621
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
 
1622
    AC_MSG_CHECKING([how to link with lib[]$1])
 
1623
    AC_MSG_RESULT([$LIB[]NAME])
 
1624
  else
 
1625
    HAVE_LIB[]NAME=no
 
1626
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
 
1627
    dnl $INC[]NAME either.
 
1628
    CPPFLAGS="$ac_save_CPPFLAGS"
 
1629
    LIB[]NAME=
 
1630
    LTLIB[]NAME=
 
1631
  fi
 
1632
  AC_SUBST([HAVE_LIB]NAME)
 
1633
  AC_SUBST([LIB]NAME)
 
1634
  AC_SUBST([LTLIB]NAME)
 
1635
  undefine([Name])
 
1636
  undefine([NAME])
 
1637
])
 
1638
 
 
1639
dnl Determine the platform dependent parameters needed to use rpath:
 
1640
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
 
1641
dnl hardcode_direct, hardcode_minus_L,
 
1642
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
 
1643
AC_DEFUN([AC_LIB_RPATH],
 
1644
[
 
1645
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
 
1646
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
 
1647
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
 
1648
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
 
1649
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
 
1650
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
 
1651
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
 
1652
    . ./conftest.sh
 
1653
    rm -f ./conftest.sh
 
1654
    acl_cv_rpath=done
 
1655
  ])
 
1656
  wl="$acl_cv_wl"
 
1657
  libext="$acl_cv_libext"
 
1658
  shlibext="$acl_cv_shlibext"
 
1659
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
 
1660
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
 
1661
  hardcode_direct="$acl_cv_hardcode_direct"
 
1662
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
 
1663
  sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
 
1664
  sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
 
1665
])
 
1666
 
 
1667
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 
1668
dnl the libraries corresponding to explicit and implicit dependencies.
 
1669
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
 
1670
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 
1671
[
 
1672
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
 
1673
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
 
1674
  dnl By default, look in $includedir and $libdir.
 
1675
  use_additional=yes
 
1676
  AC_LIB_WITH_FINAL_PREFIX([
 
1677
    eval additional_includedir=\"$includedir\"
 
1678
    eval additional_libdir=\"$libdir\"
 
1679
  ])
 
1680
  AC_ARG_WITH([lib$1-prefix],
 
1681
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
 
1682
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
 
1683
[
 
1684
    if test "X$withval" = "Xno"; then
 
1685
      use_additional=no
 
1686
    else
 
1687
      if test "X$withval" = "X"; then
 
1688
        AC_LIB_WITH_FINAL_PREFIX([
 
1689
          eval additional_includedir=\"$includedir\"
 
1690
          eval additional_libdir=\"$libdir\"
 
1691
        ])
 
1692
      else
 
1693
        additional_includedir="$withval/include"
 
1694
        additional_libdir="$withval/lib"
 
1695
      fi
 
1696
    fi
 
1697
])
 
1698
  dnl Search the library and its dependencies in $additional_libdir and
 
1699
  dnl $LDFLAGS. Using breadth-first-seach.
 
1700
  LIB[]NAME=
 
1701
  LTLIB[]NAME=
 
1702
  INC[]NAME=
 
1703
  rpathdirs=
 
1704
  ltrpathdirs=
 
1705
  names_already_handled=
 
1706
  names_next_round='$1 $2'
 
1707
  while test -n "$names_next_round"; do
 
1708
    names_this_round="$names_next_round"
 
1709
    names_next_round=
 
1710
    for name in $names_this_round; do
 
1711
      already_handled=
 
1712
      for n in $names_already_handled; do
 
1713
        if test "$n" = "$name"; then
 
1714
          already_handled=yes
 
1715
          break
 
1716
        fi
 
1717
      done
 
1718
      if test -z "$already_handled"; then
 
1719
        names_already_handled="$names_already_handled $name"
 
1720
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
 
1721
        dnl or AC_LIB_HAVE_LINKFLAGS call.
 
1722
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
 
1723
        eval value=\"\$HAVE_LIB$uppername\"
 
1724
        if test -n "$value"; then
 
1725
          if test "$value" = yes; then
 
1726
            eval value=\"\$LIB$uppername\"
 
1727
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
 
1728
            eval value=\"\$LTLIB$uppername\"
 
1729
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
 
1730
          else
 
1731
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
 
1732
            dnl that this library doesn't exist. So just drop it.
 
1733
            :
 
1734
          fi
 
1735
        else
 
1736
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
 
1737
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
 
1738
          found_dir=
 
1739
          found_la=
 
1740
          found_so=
 
1741
          found_a=
 
1742
          if test $use_additional = yes; then
 
1743
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
 
1744
              found_dir="$additional_libdir"
 
1745
              found_so="$additional_libdir/lib$name.$shlibext"
 
1746
              if test -f "$additional_libdir/lib$name.la"; then
 
1747
                found_la="$additional_libdir/lib$name.la"
 
1748
              fi
 
1749
            else
 
1750
              if test -f "$additional_libdir/lib$name.$libext"; then
 
1751
                found_dir="$additional_libdir"
 
1752
                found_a="$additional_libdir/lib$name.$libext"
 
1753
                if test -f "$additional_libdir/lib$name.la"; then
 
1754
                  found_la="$additional_libdir/lib$name.la"
 
1755
                fi
 
1756
              fi
 
1757
            fi
 
1758
          fi
 
1759
          if test "X$found_dir" = "X"; then
 
1760
            for x in $LDFLAGS $LTLIB[]NAME; do
 
1761
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1762
              case "$x" in
 
1763
                -L*)
 
1764
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
 
1765
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
 
1766
                    found_dir="$dir"
 
1767
                    found_so="$dir/lib$name.$shlibext"
 
1768
                    if test -f "$dir/lib$name.la"; then
 
1769
                      found_la="$dir/lib$name.la"
 
1770
                    fi
 
1771
                  else
 
1772
                    if test -f "$dir/lib$name.$libext"; then
 
1773
                      found_dir="$dir"
 
1774
                      found_a="$dir/lib$name.$libext"
 
1775
                      if test -f "$dir/lib$name.la"; then
 
1776
                        found_la="$dir/lib$name.la"
 
1777
                      fi
 
1778
                    fi
 
1779
                  fi
 
1780
                  ;;
 
1781
              esac
 
1782
              if test "X$found_dir" != "X"; then
 
1783
                break
 
1784
              fi
 
1785
            done
 
1786
          fi
 
1787
          if test "X$found_dir" != "X"; then
 
1788
            dnl Found the library.
 
1789
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
 
1790
            if test "X$found_so" != "X"; then
 
1791
              dnl Linking with a shared library. We attempt to hardcode its
 
1792
              dnl directory into the executable's runpath, unless it's the
 
1793
              dnl standard /usr/lib.
 
1794
              if test "X$found_dir" = "X/usr/lib"; then
 
1795
                dnl No hardcoding is needed.
 
1796
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1797
              else
 
1798
                dnl Use an explicit option to hardcode DIR into the resulting
 
1799
                dnl binary.
 
1800
                dnl Potentially add DIR to ltrpathdirs.
 
1801
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1802
                haveit=
 
1803
                for x in $ltrpathdirs; do
 
1804
                  if test "X$x" = "X$found_dir"; then
 
1805
                    haveit=yes
 
1806
                    break
 
1807
                  fi
 
1808
                done
 
1809
                if test -z "$haveit"; then
 
1810
                  ltrpathdirs="$ltrpathdirs $found_dir"
 
1811
                fi
 
1812
                dnl The hardcoding into $LIBNAME is system dependent.
 
1813
                if test "$hardcode_direct" = yes; then
 
1814
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
 
1815
                  dnl resulting binary.
 
1816
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1817
                else
 
1818
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
 
1819
                    dnl Use an explicit option to hardcode DIR into the resulting
 
1820
                    dnl binary.
 
1821
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1822
                    dnl Potentially add DIR to rpathdirs.
 
1823
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1824
                    haveit=
 
1825
                    for x in $rpathdirs; do
 
1826
                      if test "X$x" = "X$found_dir"; then
 
1827
                        haveit=yes
 
1828
                        break
 
1829
                      fi
 
1830
                    done
 
1831
                    if test -z "$haveit"; then
 
1832
                      rpathdirs="$rpathdirs $found_dir"
 
1833
                    fi
 
1834
                  else
 
1835
                    dnl Rely on "-L$found_dir".
 
1836
                    dnl But don't add it if it's already contained in the LDFLAGS
 
1837
                    dnl or the already constructed $LIBNAME
 
1838
                    haveit=
 
1839
                    for x in $LDFLAGS $LIB[]NAME; do
 
1840
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1841
                      if test "X$x" = "X-L$found_dir"; then
 
1842
                        haveit=yes
 
1843
                        break
 
1844
                      fi
 
1845
                    done
 
1846
                    if test -z "$haveit"; then
 
1847
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
 
1848
                    fi
 
1849
                    if test "$hardcode_minus_L" != no; then
 
1850
                      dnl FIXME: Not sure whether we should use
 
1851
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1852
                      dnl here.
 
1853
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
 
1854
                    else
 
1855
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
 
1856
                      dnl here, because this doesn't fit in flags passed to the
 
1857
                      dnl compiler. So give up. No hardcoding. This affects only
 
1858
                      dnl very old systems.
 
1859
                      dnl FIXME: Not sure whether we should use
 
1860
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
 
1861
                      dnl here.
 
1862
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
1863
                    fi
 
1864
                  fi
 
1865
                fi
 
1866
              fi
 
1867
            else
 
1868
              if test "X$found_a" != "X"; then
 
1869
                dnl Linking with a static library.
 
1870
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
 
1871
              else
 
1872
                dnl We shouldn't come here, but anyway it's good to have a
 
1873
                dnl fallback.
 
1874
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
 
1875
              fi
 
1876
            fi
 
1877
            dnl Assume the include files are nearby.
 
1878
            additional_includedir=
 
1879
            case "$found_dir" in
 
1880
              */lib | */lib/)
 
1881
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
 
1882
                additional_includedir="$basedir/include"
 
1883
                ;;
 
1884
            esac
 
1885
            if test "X$additional_includedir" != "X"; then
 
1886
              dnl Potentially add $additional_includedir to $INCNAME.
 
1887
              dnl But don't add it
 
1888
              dnl   1. if it's the standard /usr/include,
 
1889
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
 
1890
              dnl   3. if it's already present in $CPPFLAGS or the already
 
1891
              dnl      constructed $INCNAME,
 
1892
              dnl   4. if it doesn't exist as a directory.
 
1893
              if test "X$additional_includedir" != "X/usr/include"; then
 
1894
                haveit=
 
1895
                if test "X$additional_includedir" = "X/usr/local/include"; then
 
1896
                  if test -n "$GCC"; then
 
1897
                    case $host_os in
 
1898
                      linux*) haveit=yes;;
 
1899
                    esac
 
1900
                  fi
 
1901
                fi
 
1902
                if test -z "$haveit"; then
 
1903
                  for x in $CPPFLAGS $INC[]NAME; do
 
1904
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1905
                    if test "X$x" = "X-I$additional_includedir"; then
 
1906
                      haveit=yes
 
1907
                      break
 
1908
                    fi
 
1909
                  done
 
1910
                  if test -z "$haveit"; then
 
1911
                    if test -d "$additional_includedir"; then
 
1912
                      dnl Really add $additional_includedir to $INCNAME.
 
1913
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
 
1914
                    fi
 
1915
                  fi
 
1916
                fi
 
1917
              fi
 
1918
            fi
 
1919
            dnl Look for dependencies.
 
1920
            if test -n "$found_la"; then
 
1921
              dnl Read the .la file. It defines the variables
 
1922
              dnl dlname, library_names, old_library, dependency_libs, current,
 
1923
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
 
1924
              save_libdir="$libdir"
 
1925
              case "$found_la" in
 
1926
                */* | *\\*) . "$found_la" ;;
 
1927
                *) . "./$found_la" ;;
 
1928
              esac
 
1929
              libdir="$save_libdir"
 
1930
              dnl We use only dependency_libs.
 
1931
              for dep in $dependency_libs; do
 
1932
                case "$dep" in
 
1933
                  -L*)
 
1934
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
 
1935
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
 
1936
                    dnl But don't add it
 
1937
                    dnl   1. if it's the standard /usr/lib,
 
1938
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
 
1939
                    dnl   3. if it's already present in $LDFLAGS or the already
 
1940
                    dnl      constructed $LIBNAME,
 
1941
                    dnl   4. if it doesn't exist as a directory.
 
1942
                    if test "X$additional_libdir" != "X/usr/lib"; then
 
1943
                      haveit=
 
1944
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
 
1945
                        if test -n "$GCC"; then
 
1946
                          case $host_os in
 
1947
                            linux*) haveit=yes;;
 
1948
                          esac
 
1949
                        fi
 
1950
                      fi
 
1951
                      if test -z "$haveit"; then
 
1952
                        haveit=
 
1953
                        for x in $LDFLAGS $LIB[]NAME; do
 
1954
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1955
                          if test "X$x" = "X-L$additional_libdir"; then
 
1956
                            haveit=yes
 
1957
                            break
 
1958
                          fi
 
1959
                        done
 
1960
                        if test -z "$haveit"; then
 
1961
                          if test -d "$additional_libdir"; then
 
1962
                            dnl Really add $additional_libdir to $LIBNAME.
 
1963
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
 
1964
                          fi
 
1965
                        fi
 
1966
                        haveit=
 
1967
                        for x in $LDFLAGS $LTLIB[]NAME; do
 
1968
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
1969
                          if test "X$x" = "X-L$additional_libdir"; then
 
1970
                            haveit=yes
 
1971
                            break
 
1972
                          fi
 
1973
                        done
 
1974
                        if test -z "$haveit"; then
 
1975
                          if test -d "$additional_libdir"; then
 
1976
                            dnl Really add $additional_libdir to $LTLIBNAME.
 
1977
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
 
1978
                          fi
 
1979
                        fi
 
1980
                      fi
 
1981
                    fi
 
1982
                    ;;
 
1983
                  -R*)
 
1984
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
 
1985
                    dnl Potentially add DIR to rpathdirs.
 
1986
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
 
1987
                    haveit=
 
1988
                    for x in $rpathdirs; do
 
1989
                      if test "X$x" = "X$dir"; then
 
1990
                        haveit=yes
 
1991
                        break
 
1992
                      fi
 
1993
                    done
 
1994
                    if test -z "$haveit"; then
 
1995
                      rpathdirs="$rpathdirs $dir"
 
1996
                    fi
 
1997
                    dnl Potentially add DIR to ltrpathdirs.
 
1998
                    dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
 
1999
                    haveit=
 
2000
                    for x in $ltrpathdirs; do
 
2001
                      if test "X$x" = "X$dir"; then
 
2002
                        haveit=yes
 
2003
                        break
 
2004
                      fi
 
2005
                    done
 
2006
                    if test -z "$haveit"; then
 
2007
                      ltrpathdirs="$ltrpathdirs $dir"
 
2008
                    fi
 
2009
                    ;;
 
2010
                  -l*)
 
2011
                    dnl Handle this in the next round.
 
2012
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
 
2013
                    ;;
 
2014
                  *.la)
 
2015
                    dnl Handle this in the next round. Throw away the .la's
 
2016
                    dnl directory; it is already contained in a preceding -L
 
2017
                    dnl option.
 
2018
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
 
2019
                    ;;
 
2020
                  *)
 
2021
                    dnl Most likely an immediate library name.
 
2022
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
 
2023
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
 
2024
                    ;;
 
2025
                esac
 
2026
              done
 
2027
            fi
 
2028
          else
 
2029
            dnl Didn't find the library; assume it is in the system directories
 
2030
            dnl known to the linker and runtime loader. (All the system
 
2031
            dnl directories known to the linker should also be known to the
 
2032
            dnl runtime loader, otherwise the system is severely misconfigured.)
 
2033
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
 
2034
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
 
2035
          fi
 
2036
        fi
 
2037
      fi
 
2038
    done
 
2039
  done
 
2040
  if test "X$rpathdirs" != "X"; then
 
2041
    if test -n "$hardcode_libdir_separator"; then
 
2042
      dnl Weird platform: only the last -rpath option counts, the user must
 
2043
      dnl pass all path elements in one option. We can arrange that for a
 
2044
      dnl single library, but not when more than one $LIBNAMEs are used.
 
2045
      alldirs=
 
2046
      for found_dir in $rpathdirs; do
 
2047
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
 
2048
      done
 
2049
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
 
2050
      acl_save_libdir="$libdir"
 
2051
      libdir="$alldirs"
 
2052
      eval flag=\"$hardcode_libdir_flag_spec\"
 
2053
      libdir="$acl_save_libdir"
 
2054
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
2055
    else
 
2056
      dnl The -rpath options are cumulative.
 
2057
      for found_dir in $rpathdirs; do
 
2058
        acl_save_libdir="$libdir"
 
2059
        libdir="$found_dir"
 
2060
        eval flag=\"$hardcode_libdir_flag_spec\"
 
2061
        libdir="$acl_save_libdir"
 
2062
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
 
2063
      done
 
2064
    fi
 
2065
  fi
 
2066
  if test "X$ltrpathdirs" != "X"; then
 
2067
    dnl When using libtool, the option that works for both libraries and
 
2068
    dnl executables is -R. The -R options are cumulative.
 
2069
    for found_dir in $ltrpathdirs; do
 
2070
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
 
2071
    done
 
2072
  fi
 
2073
])
 
2074
 
 
2075
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 
2076
dnl unless already present in VAR.
 
2077
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
 
2078
dnl contains two or three consecutive elements that belong together.
 
2079
AC_DEFUN([AC_LIB_APPENDTOVAR],
 
2080
[
 
2081
  for element in [$2]; do
 
2082
    haveit=
 
2083
    for x in $[$1]; do
 
2084
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
 
2085
      if test "X$x" = "X$element"; then
 
2086
        haveit=yes
 
2087
        break
 
2088
      fi
 
2089
    done
 
2090
    if test -z "$haveit"; then
 
2091
      [$1]="${[$1]}${[$1]:+ }$element"
 
2092
    fi
 
2093
  done
 
2094
])
 
2095
 
 
2096
# lib-ld.m4 serial 1 (gettext-0.11)
 
2097
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
 
2098
dnl This file is free software, distributed under the terms of the GNU
 
2099
dnl General Public License.  As a special exception to the GNU General
 
2100
dnl Public License, this file may be distributed as part of a program
 
2101
dnl that contains a configuration script generated by Autoconf, under
 
2102
dnl the same distribution terms as the rest of that program.
 
2103
 
 
2104
dnl Subroutines of libtool.m4,
 
2105
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
 
2106
dnl with libtool.m4.
 
2107
 
 
2108
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 
2109
AC_DEFUN([AC_LIB_PROG_LD_GNU],
 
2110
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
 
2111
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
2112
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 
2113
  acl_cv_prog_gnu_ld=yes
 
2114
else
 
2115
  acl_cv_prog_gnu_ld=no
 
2116
fi])
 
2117
with_gnu_ld=$acl_cv_prog_gnu_ld
 
2118
])
 
2119
 
 
2120
dnl From libtool-1.4. Sets the variable LD.
 
2121
AC_DEFUN([AC_LIB_PROG_LD],
 
2122
[AC_ARG_WITH(gnu-ld,
 
2123
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
2124
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
2125
AC_REQUIRE([AC_PROG_CC])dnl
 
2126
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2127
ac_prog=ld
 
2128
if test "$GCC" = yes; then
 
2129
  # Check if gcc -print-prog-name=ld gives a path.
 
2130
  AC_MSG_CHECKING([for ld used by GCC])
 
2131
  case $host in
 
2132
  *-*-mingw*)
 
2133
    # gcc leaves a trailing carriage return which upsets mingw
 
2134
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
2135
  *)
 
2136
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
2137
  esac
 
2138
  case $ac_prog in
 
2139
    # Accept absolute paths.
 
2140
    [[\\/]* | [A-Za-z]:[\\/]*)]
 
2141
      [re_direlt='/[^/][^/]*/\.\./']
 
2142
      # Canonicalize the path of ld
 
2143
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
2144
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
2145
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
2146
      done
 
2147
      test -z "$LD" && LD="$ac_prog"
 
2148
      ;;
 
2149
  "")
 
2150
    # If it fails, then pretend we aren't using GCC.
 
2151
    ac_prog=ld
 
2152
    ;;
 
2153
  *)
 
2154
    # If it is relative, then search for the first ld in PATH.
 
2155
    with_gnu_ld=unknown
 
2156
    ;;
 
2157
  esac
 
2158
elif test "$with_gnu_ld" = yes; then
 
2159
  AC_MSG_CHECKING([for GNU ld])
 
2160
else
 
2161
  AC_MSG_CHECKING([for non-GNU ld])
 
2162
fi
 
2163
AC_CACHE_VAL(acl_cv_path_LD,
 
2164
[if test -z "$LD"; then
 
2165
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
 
2166
  for ac_dir in $PATH; do
 
2167
    test -z "$ac_dir" && ac_dir=.
 
2168
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
2169
      acl_cv_path_LD="$ac_dir/$ac_prog"
 
2170
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
2171
      # but apparently some GNU ld's only accept -v.
 
2172
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
2173
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 
2174
        test "$with_gnu_ld" != no && break
 
2175
      else
 
2176
        test "$with_gnu_ld" != yes && break
 
2177
      fi
 
2178
    fi
 
2179
  done
 
2180
  IFS="$ac_save_ifs"
 
2181
else
 
2182
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
 
2183
fi])
 
2184
LD="$acl_cv_path_LD"
 
2185
if test -n "$LD"; then
 
2186
  AC_MSG_RESULT($LD)
 
2187
else
 
2188
  AC_MSG_RESULT(no)
 
2189
fi
 
2190
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
2191
AC_LIB_PROG_LD_GNU
 
2192
])
 
2193
 
 
2194
# iconv.m4 serial AM3 (gettext-0.11)
 
2195
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
2196
dnl This file is free software, distributed under the terms of the GNU
 
2197
dnl General Public License.  As a special exception to the GNU General
 
2198
dnl Public License, this file may be distributed as part of a program
 
2199
dnl that contains a configuration script generated by Autoconf, under
 
2200
dnl the same distribution terms as the rest of that program.
 
2201
 
 
2202
dnl From Bruno Haible.
 
2203
 
 
2204
AC_DEFUN([AM_ICONV_LINK],
 
2205
[
 
2206
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
2207
  dnl those with the standalone portable GNU libiconv installed).
 
2208
 
 
2209
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
2210
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
2211
  AC_REQUIRE([AC_LIB_RPATH])
 
2212
 
 
2213
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
2214
  dnl accordingly.
 
2215
  AC_LIB_LINKFLAGS_BODY([iconv])
 
2216
 
 
2217
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
 
2218
  dnl because if the user has installed libiconv and not disabled its use
 
2219
  dnl via --without-libiconv-prefix, he wants to use it. The first
 
2220
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
 
2221
  am_save_CPPFLAGS="$CPPFLAGS"
 
2222
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
2223
 
 
2224
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
 
2225
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
2226
    am_cv_lib_iconv=no
 
2227
    AC_TRY_LINK([#include <stdlib.h>
 
2228
#include <iconv.h>],
 
2229
      [iconv_t cd = iconv_open("","");
 
2230
       iconv(cd,NULL,NULL,NULL,NULL);
 
2231
       iconv_close(cd);],
 
2232
      am_cv_func_iconv=yes)
 
2233
    if test "$am_cv_func_iconv" != yes; then
 
2234
      am_save_LIBS="$LIBS"
 
2235
      LIBS="$LIBS $LIBICONV"
 
2236
      AC_TRY_LINK([#include <stdlib.h>
 
2237
#include <iconv.h>],
 
2238
        [iconv_t cd = iconv_open("","");
 
2239
         iconv(cd,NULL,NULL,NULL,NULL);
 
2240
         iconv_close(cd);],
 
2241
        am_cv_lib_iconv=yes
 
2242
        am_cv_func_iconv=yes)
 
2243
      LIBS="$am_save_LIBS"
 
2244
    fi
 
2245
  ])
 
2246
  if test "$am_cv_func_iconv" = yes; then
 
2247
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
 
2248
  fi
 
2249
  if test "$am_cv_lib_iconv" = yes; then
 
2250
    AC_MSG_CHECKING([how to link with libiconv])
 
2251
    AC_MSG_RESULT([$LIBICONV])
 
2252
  else
 
2253
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
 
2254
    dnl either.
 
2255
    CPPFLAGS="$am_save_CPPFLAGS"
 
2256
    LIBICONV=
 
2257
    LTLIBICONV=
 
2258
  fi
 
2259
  AC_SUBST(LIBICONV)
 
2260
  AC_SUBST(LTLIBICONV)
 
2261
])
 
2262
 
 
2263
AC_DEFUN([AM_ICONV],
 
2264
[
 
2265
  AC_REQUIRE([AM_ICONV_LINK])
 
2266
  if test "$am_cv_func_iconv" = yes; then
 
2267
    AC_MSG_CHECKING([for iconv declaration])
 
2268
    AC_CACHE_VAL(am_cv_proto_iconv, [
 
2269
      AC_TRY_COMPILE([
 
2270
#include <stdlib.h>
 
2271
#include <iconv.h>
 
2272
extern
 
2273
#ifdef __cplusplus
 
2274
"C"
 
2275
#endif
 
2276
#if defined(__STDC__) || defined(__cplusplus)
 
2277
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
2278
#else
 
2279
size_t iconv();
 
2280
#endif
 
2281
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
 
2282
      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);"])
 
2283
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
2284
    AC_MSG_RESULT([$]{ac_t:-
 
2285
         }[$]am_cv_proto_iconv)
 
2286
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
 
2287
      [Define as const if the declaration of iconv() needs const.])
 
2288
  fi
 
2289
])
 
2290
 
 
2291
# progtest.m4 serial 2 (gettext-0.10.40)
 
2292
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
 
2293
dnl This file is free software, distributed under the terms of the GNU
 
2294
dnl General Public License.  As a special exception to the GNU General
 
2295
dnl Public License, this file may be distributed as part of a program
 
2296
dnl that contains a configuration script generated by Autoconf, under
 
2297
dnl the same distribution terms as the rest of that program.
 
2298
dnl
 
2299
dnl This file can can be used in projects which are not available under
 
2300
dnl the GNU General Public License or the GNU Library General Public
 
2301
dnl License but which still want to provide support for the GNU gettext
 
2302
dnl functionality.
 
2303
dnl Please note that the actual code of the GNU gettext library is covered
 
2304
dnl by the GNU Library General Public License, and the rest of the GNU
 
2305
dnl gettext package package is covered by the GNU General Public License.
 
2306
dnl They are *not* in the public domain.
 
2307
 
 
2308
dnl Authors:
 
2309
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
 
2310
 
 
2311
# Search path for a program which passes the given test.
 
2312
 
 
2313
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
2314
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
2315
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
 
2316
[# Extract the first word of "$2", so it can be a program name with args.
 
2317
set dummy $2; ac_word=[$]2
 
2318
AC_MSG_CHECKING([for $ac_word])
 
2319
AC_CACHE_VAL(ac_cv_path_$1,
 
2320
[case "[$]$1" in
 
2321
  /*)
 
2322
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
2323
  ;;
 
2324
  *)
 
2325
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
2326
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
2327
    test -z "$ac_dir" && ac_dir=.
 
2328
    if test -f $ac_dir/$ac_word; then
 
2329
      if [$3]; then
 
2330
        ac_cv_path_$1="$ac_dir/$ac_word"
 
2331
        break
 
2332
      fi
 
2333
    fi
 
2334
  done
 
2335
  IFS="$ac_save_ifs"
 
2336
dnl If no 4th arg is given, leave the cache variable unset,
 
2337
dnl so AC_PATH_PROGS will keep looking.
 
2338
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
2339
])dnl
 
2340
  ;;
 
2341
esac])dnl
 
2342
$1="$ac_cv_path_$1"
 
2343
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
2344
  AC_MSG_RESULT([$]$1)
 
2345
else
 
2346
  AC_MSG_RESULT(no)
 
2347
fi
 
2348
AC_SUBST($1)dnl
 
2349
])
 
2350
 
 
2351
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
 
2352
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
2353
dnl This file is free software, distributed under the terms of the GNU
 
2354
dnl General Public License.  As a special exception to the GNU General
 
2355
dnl Public License, this file may be distributed as part of a program
 
2356
dnl that contains a configuration script generated by Autoconf, under
 
2357
dnl the same distribution terms as the rest of that program.
 
2358
 
 
2359
# Test for the GNU C Library, version 2.1 or newer.
 
2360
# From Bruno Haible.
 
2361
 
 
2362
AC_DEFUN([jm_GLIBC21],
 
2363
  [
 
2364
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
 
2365
      ac_cv_gnu_library_2_1,
 
2366
      [AC_EGREP_CPP([Lucky GNU user],
 
2367
        [
 
2368
#include <features.h>
 
2369
#ifdef __GNU_LIBRARY__
 
2370
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
 
2371
  Lucky GNU user
 
2372
 #endif
 
2373
#endif
 
2374
        ],
 
2375
        ac_cv_gnu_library_2_1=yes,
 
2376
        ac_cv_gnu_library_2_1=no)
 
2377
      ]
 
2378
    )
 
2379
    AC_SUBST(GLIBC21)
 
2380
    GLIBC21="$ac_cv_gnu_library_2_1"
 
2381
  ]
 
2382
)
 
2383
 
 
2384
# codeset.m4 serial AM1 (gettext-0.10.40)
 
2385
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
2386
dnl This file is free software, distributed under the terms of the GNU
 
2387
dnl General Public License.  As a special exception to the GNU General
 
2388
dnl Public License, this file may be distributed as part of a program
 
2389
dnl that contains a configuration script generated by Autoconf, under
 
2390
dnl the same distribution terms as the rest of that program.
 
2391
 
 
2392
dnl From Bruno Haible.
 
2393
 
 
2394
AC_DEFUN([AM_LANGINFO_CODESET],
 
2395
[
 
2396
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
 
2397
    [AC_TRY_LINK([#include <langinfo.h>],
 
2398
      [char* cs = nl_langinfo(CODESET);],
 
2399
      am_cv_langinfo_codeset=yes,
 
2400
      am_cv_langinfo_codeset=no)
 
2401
    ])
 
2402
  if test $am_cv_langinfo_codeset = yes; then
 
2403
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
 
2404
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
 
2405
  fi
 
2406
])
 
2407
 
 
2408
# lcmessage.m4 serial 2 (gettext-0.10.40)
 
2409
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
2410
dnl This file is free software, distributed under the terms of the GNU
 
2411
dnl General Public License.  As a special exception to the GNU General
 
2412
dnl Public License, this file may be distributed as part of a program
 
2413
dnl that contains a configuration script generated by Autoconf, under
 
2414
dnl the same distribution terms as the rest of that program.
 
2415
dnl
 
2416
dnl This file can can be used in projects which are not available under
 
2417
dnl the GNU General Public License or the GNU Library General Public
 
2418
dnl License but which still want to provide support for the GNU gettext
 
2419
dnl functionality.
 
2420
dnl Please note that the actual code of the GNU gettext library is covered
 
2421
dnl by the GNU Library General Public License, and the rest of the GNU
 
2422
dnl gettext package package is covered by the GNU General Public License.
 
2423
dnl They are *not* in the public domain.
 
2424
 
 
2425
dnl Authors:
 
2426
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
 
2427
 
 
2428
# Check whether LC_MESSAGES is available in <locale.h>.
 
2429
 
 
2430
AC_DEFUN([AM_LC_MESSAGES],
 
2431
  [if test $ac_cv_header_locale_h = yes; then
 
2432
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
2433
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
2434
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
2435
    if test $am_cv_val_LC_MESSAGES = yes; then
 
2436
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
2437
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
2438
    fi
 
2439
  fi])
 
2440