~ubuntu-branches/ubuntu/raring/findutils/raring

« back to all changes in this revision

Viewing changes to gnulib/aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2005-07-04 11:37:37 UTC
  • mto: (11.1.1 lenny) (1.1.10 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050704113737-oxfumqxsqgfz5gay
Tags: upstream-4.2.22
ImportĀ upstreamĀ versionĀ 4.2.22

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.7.5 -*- Autoconf -*-
2
 
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
 
# Free Software Foundation, Inc.
5
 
# This file is free software; the Free Software Foundation
6
 
# gives unlimited permission to copy and/or distribute it,
7
 
# with or without modifications, as long as this notice is preserved.
8
 
 
9
 
# This program is distributed in the hope that it will be useful,
10
 
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
 
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
 
# PARTICULAR PURPOSE.
13
 
 
14
 
# 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 (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
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 10
38
 
 
39
 
AC_PREREQ([2.54])
40
 
 
41
 
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42
 
# the ones we care about.
43
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44
 
 
45
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46
 
# AM_INIT_AUTOMAKE([OPTIONS])
47
 
# -----------------------------------------------
48
 
# The call with PACKAGE and VERSION arguments is the old style
49
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50
 
# and VERSION should now be passed to AC_INIT and removed from
51
 
# the call to AM_INIT_AUTOMAKE.
52
 
# We support both call styles for the transition.  After
53
 
# the next Automake release, Autoconf can make the AC_INIT
54
 
# arguments mandatory, and then we can depend on a new Autoconf
55
 
# release and drop the old call support.
56
 
AC_DEFUN([AM_INIT_AUTOMAKE],
57
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58
 
 AC_REQUIRE([AC_PROG_INSTALL])dnl
59
 
# test to see if srcdir already configured
60
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
61
 
   test -f $srcdir/config.status; then
62
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63
 
fi
64
 
 
65
 
# test whether we have cygpath
66
 
if test -z "$CYGPATH_W"; then
67
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
68
 
    CYGPATH_W='cygpath -w'
69
 
  else
70
 
    CYGPATH_W=echo
71
 
  fi
72
 
fi
73
 
AC_SUBST([CYGPATH_W])
74
 
 
75
 
# Define the identity of the package.
76
 
dnl Distinguish between old-style and new-style calls.
77
 
m4_ifval([$2],
78
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79
 
 AC_SUBST([PACKAGE], [$1])dnl
80
 
 AC_SUBST([VERSION], [$2])],
81
 
[_AM_SET_OPTIONS([$1])dnl
82
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84
 
 
85
 
_AM_IF_OPTION([no-define],,
86
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88
 
 
89
 
# Some tools Automake needs.
90
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
91
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
92
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93
 
AM_MISSING_PROG(AUTOCONF, autoconf)
94
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
96
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
97
 
AM_MISSING_PROG(AMTAR, tar)
98
 
AM_PROG_INSTALL_SH
99
 
AM_PROG_INSTALL_STRIP
100
 
# We need awk for the "check" target.  The system "awk" is bad on
101
 
# some platforms.
102
 
AC_REQUIRE([AC_PROG_AWK])dnl
103
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
105
 
 
106
 
_AM_IF_OPTION([no-dependencies],,
107
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
108
 
                  [_AM_DEPENDENCIES(CC)],
109
 
                  [define([AC_PROG_CC],
110
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
112
 
                  [_AM_DEPENDENCIES(CXX)],
113
 
                  [define([AC_PROG_CXX],
114
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115
 
])
116
 
])
117
 
 
118
 
 
119
 
# When config.status generates a header, we must update the stamp-h file.
120
 
# This file resides in the same directory as the config header
121
 
# that is generated.  The stamp files are numbered to have different names.
122
 
 
123
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124
 
# loop where config.status creates the headers, so we can generate
125
 
# our stamp files there.
126
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127
 
[# Compute $1's index in $config_headers.
128
 
_am_stamp_count=1
129
 
for _am_header in $config_headers :; do
130
 
  case $_am_header in
131
 
    $1 | $1:* )
132
 
      break ;;
133
 
    * )
134
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135
 
  esac
136
 
done
137
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138
 
 
139
 
# Copyright 2002  Free Software Foundation, Inc.
140
 
 
141
 
# This program is free software; you can redistribute it and/or modify
142
 
# it under the terms of the GNU General Public License as published by
143
 
# the Free Software Foundation; either version 2, or (at your option)
144
 
# any later version.
145
 
 
146
 
# This program is distributed in the hope that it will be useful,
147
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
148
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149
 
# GNU General Public License for more details.
150
 
 
151
 
# You should have received a copy of the GNU General Public License
152
 
# along with this program; if not, write to the Free Software
153
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154
 
 
155
 
# AM_AUTOMAKE_VERSION(VERSION)
156
 
# ----------------------------
157
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
158
 
# generated from the m4 files accompanying Automake X.Y.
159
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160
 
 
161
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
162
 
# -------------------------------
163
 
# Call AM_AUTOMAKE_VERSION so it can be traced.
164
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166
 
         [AM_AUTOMAKE_VERSION([1.7.5])])
167
 
 
168
 
# Helper functions for option handling.                    -*- Autoconf -*-
169
 
 
170
 
# Copyright 2001, 2002  Free Software Foundation, Inc.
171
 
 
172
 
# This program is free software; you can redistribute it and/or modify
173
 
# it under the terms of the GNU General Public License as published by
174
 
# the Free Software Foundation; either version 2, or (at your option)
175
 
# any later version.
176
 
 
177
 
# This program is distributed in the hope that it will be useful,
178
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
179
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180
 
# GNU General Public License for more details.
181
 
 
182
 
# You should have received a copy of the GNU General Public License
183
 
# along with this program; if not, write to the Free Software
184
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185
 
# 02111-1307, USA.
186
 
 
187
 
# serial 2
188
 
 
189
 
# _AM_MANGLE_OPTION(NAME)
190
 
# -----------------------
191
 
AC_DEFUN([_AM_MANGLE_OPTION],
192
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193
 
 
194
 
# _AM_SET_OPTION(NAME)
195
 
# ------------------------------
196
 
# Set option NAME.  Presently that only means defining a flag for this option.
197
 
AC_DEFUN([_AM_SET_OPTION],
198
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199
 
 
200
 
# _AM_SET_OPTIONS(OPTIONS)
201
 
# ----------------------------------
202
 
# OPTIONS is a space-separated list of Automake options.
203
 
AC_DEFUN([_AM_SET_OPTIONS],
204
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205
 
 
206
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207
 
# -------------------------------------------
208
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209
 
AC_DEFUN([_AM_IF_OPTION],
210
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211
 
 
212
 
#
213
 
# Check to make sure that the build environment is sane.
214
 
#
215
 
 
216
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217
 
 
218
 
# This program is free software; you can redistribute it and/or modify
219
 
# it under the terms of the GNU General Public License as published by
220
 
# the Free Software Foundation; either version 2, or (at your option)
221
 
# any later version.
222
 
 
223
 
# This program is distributed in the hope that it will be useful,
224
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
225
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226
 
# GNU General Public License for more details.
227
 
 
228
 
# You should have received a copy of the GNU General Public License
229
 
# along with this program; if not, write to the Free Software
230
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231
 
# 02111-1307, USA.
232
 
 
233
 
# serial 3
234
 
 
235
 
# AM_SANITY_CHECK
236
 
# ---------------
237
 
AC_DEFUN([AM_SANITY_CHECK],
238
 
[AC_MSG_CHECKING([whether build environment is sane])
239
 
# Just in case
240
 
sleep 1
241
 
echo timestamp > conftest.file
242
 
# Do `set' in a subshell so we don't clobber the current shell's
243
 
# arguments.  Must try -L first in case configure is actually a
244
 
# symlink; some systems play weird games with the mod time of symlinks
245
 
# (eg FreeBSD returns the mod time of the symlink's containing
246
 
# directory).
247
 
if (
248
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249
 
   if test "$[*]" = "X"; then
250
 
      # -L didn't work.
251
 
      set X `ls -t $srcdir/configure conftest.file`
252
 
   fi
253
 
   rm -f conftest.file
254
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
255
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256
 
 
257
 
      # If neither matched, then we have a broken ls.  This can happen
258
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
259
 
      # broken ls alias from the environment.  This has actually
260
 
      # happened.  Such a system could not be considered "sane".
261
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262
 
alias in your environment])
263
 
   fi
264
 
 
265
 
   test "$[2]" = conftest.file
266
 
   )
267
 
then
268
 
   # Ok.
269
 
   :
270
 
else
271
 
   AC_MSG_ERROR([newly created file is older than distributed files!
272
 
Check your system clock])
273
 
fi
274
 
AC_MSG_RESULT(yes)])
275
 
 
276
 
#  -*- Autoconf -*-
277
 
 
278
 
 
279
 
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280
 
 
281
 
# This program is free software; you can redistribute it and/or modify
282
 
# it under the terms of the GNU General Public License as published by
283
 
# the Free Software Foundation; either version 2, or (at your option)
284
 
# any later version.
285
 
 
286
 
# This program is distributed in the hope that it will be useful,
287
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
288
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289
 
# GNU General Public License for more details.
290
 
 
291
 
# You should have received a copy of the GNU General Public License
292
 
# along with this program; if not, write to the Free Software
293
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294
 
# 02111-1307, USA.
295
 
 
296
 
# serial 3
297
 
 
298
 
# AM_MISSING_PROG(NAME, PROGRAM)
299
 
# ------------------------------
300
 
AC_DEFUN([AM_MISSING_PROG],
301
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
302
 
$1=${$1-"${am_missing_run}$2"}
303
 
AC_SUBST($1)])
304
 
 
305
 
 
306
 
# AM_MISSING_HAS_RUN
307
 
# ------------------
308
 
# Define MISSING if not defined so far and test if it supports --run.
309
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
310
 
AC_DEFUN([AM_MISSING_HAS_RUN],
311
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313
 
# Use eval to expand $SHELL
314
 
if eval "$MISSING --run true"; then
315
 
  am_missing_run="$MISSING --run "
316
 
else
317
 
  am_missing_run=
318
 
  AC_MSG_WARN([`missing' script is too old or missing])
319
 
fi
320
 
])
321
 
 
322
 
# AM_AUX_DIR_EXPAND
323
 
 
324
 
# Copyright 2001 Free Software Foundation, Inc.
325
 
 
326
 
# This program is free software; you can redistribute it and/or modify
327
 
# it under the terms of the GNU General Public License as published by
328
 
# the Free Software Foundation; either version 2, or (at your option)
329
 
# any later version.
330
 
 
331
 
# This program is distributed in the hope that it will be useful,
332
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
333
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334
 
# GNU General Public License for more details.
335
 
 
336
 
# You should have received a copy of the GNU General Public License
337
 
# along with this program; if not, write to the Free Software
338
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339
 
# 02111-1307, USA.
340
 
 
341
 
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
343
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344
 
#
345
 
# Of course, Automake must honor this variable whenever it calls a
346
 
# tool from the auxiliary directory.  The problem is that $srcdir (and
347
 
# therefore $ac_aux_dir as well) can be either absolute or relative,
348
 
# depending on how configure is run.  This is pretty annoying, since
349
 
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350
 
# source directory, any form will work fine, but in subdirectories a
351
 
# relative path needs to be adjusted first.
352
 
#
353
 
# $ac_aux_dir/missing
354
 
#    fails when called from a subdirectory if $ac_aux_dir is relative
355
 
# $top_srcdir/$ac_aux_dir/missing
356
 
#    fails if $ac_aux_dir is absolute,
357
 
#    fails when called from a subdirectory in a VPATH build with
358
 
#          a relative $ac_aux_dir
359
 
#
360
 
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361
 
# are both prefixed by $srcdir.  In an in-source build this is usually
362
 
# harmless because $srcdir is `.', but things will broke when you
363
 
# start a VPATH build or use an absolute $srcdir.
364
 
#
365
 
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366
 
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
367
 
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368
 
# and then we would define $MISSING as
369
 
#   MISSING="\${SHELL} $am_aux_dir/missing"
370
 
# This will work as long as MISSING is not called from configure, because
371
 
# unfortunately $(top_srcdir) has no meaning in configure.
372
 
# However there are other variables, like CC, which are often used in
373
 
# configure, and could therefore not use this "fixed" $ac_aux_dir.
374
 
#
375
 
# Another solution, used here, is to always expand $ac_aux_dir to an
376
 
# absolute PATH.  The drawback is that using absolute paths prevent a
377
 
# configured tree to be moved without reconfiguration.
378
 
 
379
 
# Rely on autoconf to set up CDPATH properly.
380
 
AC_PREREQ([2.50])
381
 
 
382
 
AC_DEFUN([AM_AUX_DIR_EXPAND], [
383
 
# expand $ac_aux_dir to an absolute path
384
 
am_aux_dir=`cd $ac_aux_dir && pwd`
385
 
])
386
 
 
387
 
# AM_PROG_INSTALL_SH
388
 
# ------------------
389
 
# Define $install_sh.
390
 
 
391
 
# Copyright 2001 Free Software Foundation, Inc.
392
 
 
393
 
# This program is free software; you can redistribute it and/or modify
394
 
# it under the terms of the GNU General Public License as published by
395
 
# the Free Software Foundation; either version 2, or (at your option)
396
 
# any later version.
397
 
 
398
 
# This program is distributed in the hope that it will be useful,
399
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
400
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401
 
# GNU General Public License for more details.
402
 
 
403
 
# You should have received a copy of the GNU General Public License
404
 
# along with this program; if not, write to the Free Software
405
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406
 
# 02111-1307, USA.
407
 
 
408
 
AC_DEFUN([AM_PROG_INSTALL_SH],
409
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
411
 
AC_SUBST(install_sh)])
412
 
 
413
 
# AM_PROG_INSTALL_STRIP
414
 
 
415
 
# Copyright 2001 Free Software Foundation, Inc.
416
 
 
417
 
# This program is free software; you can redistribute it and/or modify
418
 
# it under the terms of the GNU General Public License as published by
419
 
# the Free Software Foundation; either version 2, or (at your option)
420
 
# any later version.
421
 
 
422
 
# This program is distributed in the hope that it will be useful,
423
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
424
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425
 
# GNU General Public License for more details.
426
 
 
427
 
# You should have received a copy of the GNU General Public License
428
 
# along with this program; if not, write to the Free Software
429
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430
 
# 02111-1307, USA.
431
 
 
432
 
# One issue with vendor `install' (even GNU) is that you can't
433
 
# specify the program used to strip binaries.  This is especially
434
 
# annoying in cross-compiling environments, where the build's strip
435
 
# is unlikely to handle the host's binaries.
436
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
437
 
# always use install-sh in `make install-strip', and initialize
438
 
# STRIPPROG with the value of the STRIP variable (set by the user).
439
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
440
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441
 
# Installed binaries are usually stripped using `strip' when the user
442
 
# run `make install-strip'.  However `strip' might not be the right
443
 
# tool to use in cross-compilation environments, therefore Automake
444
 
# will honor the `STRIP' environment variable to overrule this program.
445
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446
 
if test "$cross_compiling" != no; then
447
 
  AC_CHECK_TOOL([STRIP], [strip], :)
448
 
fi
449
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
451
 
 
452
 
#                                                          -*- Autoconf -*-
453
 
# Copyright (C) 2003  Free Software Foundation, Inc.
454
 
 
455
 
# This program is free software; you can redistribute it and/or modify
456
 
# it under the terms of the GNU General Public License as published by
457
 
# the Free Software Foundation; either version 2, or (at your option)
458
 
# any later version.
459
 
 
460
 
# This program is distributed in the hope that it will be useful,
461
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
462
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463
 
# GNU General Public License for more details.
464
 
 
465
 
# You should have received a copy of the GNU General Public License
466
 
# along with this program; if not, write to the Free Software
467
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468
 
# 02111-1307, USA.
469
 
 
470
 
# serial 1
471
 
 
472
 
# Check whether the underlying file-system supports filenames
473
 
# with a leading dot.  For instance MS-DOS doesn't.
474
 
AC_DEFUN([AM_SET_LEADING_DOT],
475
 
[rm -rf .tst 2>/dev/null
476
 
mkdir .tst 2>/dev/null
477
 
if test -d .tst; then
478
 
  am__leading_dot=.
479
 
else
480
 
  am__leading_dot=_
481
 
fi
482
 
rmdir .tst 2>/dev/null
483
 
AC_SUBST([am__leading_dot])])
484
 
 
485
 
# serial 5                                              -*- Autoconf -*-
486
 
 
487
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488
 
 
489
 
# This program is free software; you can redistribute it and/or modify
490
 
# it under the terms of the GNU General Public License as published by
491
 
# the Free Software Foundation; either version 2, or (at your option)
492
 
# any later version.
493
 
 
494
 
# This program is distributed in the hope that it will be useful,
495
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497
 
# GNU General Public License for more details.
498
 
 
499
 
# You should have received a copy of the GNU General Public License
500
 
# along with this program; if not, write to the Free Software
501
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502
 
# 02111-1307, USA.
503
 
 
504
 
 
505
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506
 
# written in clear, in which case automake, when reading aclocal.m4,
507
 
# will think it sees a *use*, and therefore will trigger all it's
508
 
# C support machinery.  Also note that it means that autoscan, seeing
509
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510
 
 
511
 
 
512
 
 
513
 
# _AM_DEPENDENCIES(NAME)
514
 
# ----------------------
515
 
# See how the compiler implements dependency checking.
516
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
517
 
# We try a few techniques and use that to set a single cache variable.
518
 
#
519
 
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520
 
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521
 
# dependency, and given that the user is not expected to run this macro,
522
 
# just rely on AC_PROG_CC.
523
 
AC_DEFUN([_AM_DEPENDENCIES],
524
 
[AC_REQUIRE([AM_SET_DEPDIR])dnl
525
 
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526
 
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527
 
AC_REQUIRE([AM_DEP_TRACK])dnl
528
 
 
529
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
530
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
531
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
533
 
                   [depcc="$$1"   am_compiler_list=])
534
 
 
535
 
AC_CACHE_CHECK([dependency style of $depcc],
536
 
               [am_cv_$1_dependencies_compiler_type],
537
 
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538
 
  # We make a subdir and do the tests there.  Otherwise we can end up
539
 
  # making bogus files that we don't know about and never remove.  For
540
 
  # instance it was reported that on HP-UX the gcc test will end up
541
 
  # making a dummy file named `D' -- because `-MD' means `put the output
542
 
  # in D'.
543
 
  mkdir conftest.dir
544
 
  # Copy depcomp to subdir because otherwise we won't find it if we're
545
 
  # using a relative directory.
546
 
  cp "$am_depcomp" conftest.dir
547
 
  cd conftest.dir
548
 
 
549
 
  am_cv_$1_dependencies_compiler_type=none
550
 
  if test "$am_compiler_list" = ""; then
551
 
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
552
 
  fi
553
 
  for depmode in $am_compiler_list; do
554
 
    # We need to recreate these files for each test, as the compiler may
555
 
    # overwrite some of them when testing with obscure command lines.
556
 
    # This happens at least with the AIX C compiler.
557
 
    echo '#include "conftest.h"' > conftest.c
558
 
    echo 'int i;' > conftest.h
559
 
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
560
 
 
561
 
    case $depmode in
562
 
    nosideeffect)
563
 
      # after this tag, mechanisms are not by side-effect, so they'll
564
 
      # only be used when explicitly requested
565
 
      if test "x$enable_dependency_tracking" = xyes; then
566
 
        continue
567
 
      else
568
 
        break
569
 
      fi
570
 
      ;;
571
 
    none) break ;;
572
 
    esac
573
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
574
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
575
 
    # handle `-M -o', and we need to detect this.
576
 
    if depmode=$depmode \
577
 
       source=conftest.c object=conftest.o \
578
 
       depfile=conftest.Po tmpdepfile=conftest.TPo \
579
 
       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
580
 
         >/dev/null 2>conftest.err &&
581
 
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
582
 
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
583
 
      # icc doesn't choke on unknown options, it will just issue warnings
584
 
      # (even with -Werror).  So we grep stderr for any message
585
 
      # that says an option was ignored.
586
 
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
587
 
        am_cv_$1_dependencies_compiler_type=$depmode
588
 
        break
589
 
      fi
590
 
    fi
591
 
  done
592
 
 
593
 
  cd ..
594
 
  rm -rf conftest.dir
595
 
else
596
 
  am_cv_$1_dependencies_compiler_type=none
597
 
fi
598
 
])
599
 
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
600
 
AM_CONDITIONAL([am__fastdep$1], [
601
 
  test "x$enable_dependency_tracking" != xno \
602
 
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
603
 
])
604
 
 
605
 
 
606
 
# AM_SET_DEPDIR
607
 
# -------------
608
 
# Choose a directory name for dependency files.
609
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
610
 
AC_DEFUN([AM_SET_DEPDIR],
611
 
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
612
 
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
613
 
])
614
 
 
615
 
 
616
 
# AM_DEP_TRACK
617
 
# ------------
618
 
AC_DEFUN([AM_DEP_TRACK],
619
 
[AC_ARG_ENABLE(dependency-tracking,
620
 
[  --disable-dependency-tracking Speeds up one-time builds
621
 
  --enable-dependency-tracking  Do not reject slow dependency extractors])
622
 
if test "x$enable_dependency_tracking" != xno; then
623
 
  am_depcomp="$ac_aux_dir/depcomp"
624
 
  AMDEPBACKSLASH='\'
625
 
fi
626
 
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
627
 
AC_SUBST([AMDEPBACKSLASH])
628
 
])
629
 
 
630
 
# Generate code to set up dependency tracking.   -*- Autoconf -*-
631
 
 
632
 
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
633
 
 
634
 
# This program is free software; you can redistribute it and/or modify
635
 
# it under the terms of the GNU General Public License as published by
636
 
# the Free Software Foundation; either version 2, or (at your option)
637
 
# any later version.
638
 
 
639
 
# This program is distributed in the hope that it will be useful,
640
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
641
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
642
 
# GNU General Public License for more details.
643
 
 
644
 
# You should have received a copy of the GNU General Public License
645
 
# along with this program; if not, write to the Free Software
646
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
647
 
# 02111-1307, USA.
648
 
 
649
 
#serial 2
650
 
 
651
 
# _AM_OUTPUT_DEPENDENCY_COMMANDS
652
 
# ------------------------------
653
 
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
654
 
[for mf in $CONFIG_FILES; do
655
 
  # Strip MF so we end up with the name of the file.
656
 
  mf=`echo "$mf" | sed -e 's/:.*$//'`
657
 
  # Check whether this is an Automake generated Makefile or not.
658
 
  # We used to match only the files named `Makefile.in', but
659
 
  # some people rename them; so instead we look at the file content.
660
 
  # Grep'ing the first line is not enough: some people post-process
661
 
  # each Makefile.in and add a new line on top of each file to say so.
662
 
  # So let's grep whole file.
663
 
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
664
 
    dirpart=`AS_DIRNAME("$mf")`
665
 
  else
666
 
    continue
667
 
  fi
668
 
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
669
 
  # Extract the definition of DEP_FILES from the Makefile without
670
 
  # running `make'.
671
 
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
672
 
  test -z "$DEPDIR" && continue
673
 
  # When using ansi2knr, U may be empty or an underscore; expand it
674
 
  U=`sed -n -e '/^U = / s///p' < "$mf"`
675
 
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
676
 
  # We invoke sed twice because it is the simplest approach to
677
 
  # changing $(DEPDIR) to its actual value in the expansion.
678
 
  for file in `sed -n -e '
679
 
    /^DEP_FILES = .*\\\\$/ {
680
 
      s/^DEP_FILES = //
681
 
      :loop
682
 
        s/\\\\$//
683
 
        p
684
 
        n
685
 
        /\\\\$/ b loop
686
 
      p
687
 
    }
688
 
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
689
 
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
690
 
    # Make sure the directory exists.
691
 
    test -f "$dirpart/$file" && continue
692
 
    fdir=`AS_DIRNAME(["$file"])`
693
 
    AS_MKDIR_P([$dirpart/$fdir])
694
 
    # echo "creating $dirpart/$file"
695
 
    echo '# dummy' > "$dirpart/$file"
696
 
  done
697
 
done
698
 
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
699
 
 
700
 
 
701
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
702
 
# -----------------------------
703
 
# This macro should only be invoked once -- use via AC_REQUIRE.
704
 
#
705
 
# This code is only required when automatic dependency tracking
706
 
# is enabled.  FIXME.  This creates each `.P' file that we will
707
 
# need in order to bootstrap the dependency handling code.
708
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
709
 
[AC_CONFIG_COMMANDS([depfiles],
710
 
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
711
 
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
712
 
])
713
 
 
714
 
# Check to see how 'make' treats includes.      -*- Autoconf -*-
715
 
 
716
 
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
717
 
 
718
 
# This program is free software; you can redistribute it and/or modify
719
 
# it under the terms of the GNU General Public License as published by
720
 
# the Free Software Foundation; either version 2, or (at your option)
721
 
# any later version.
722
 
 
723
 
# This program is distributed in the hope that it will be useful,
724
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
725
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
726
 
# GNU General Public License for more details.
727
 
 
728
 
# You should have received a copy of the GNU General Public License
729
 
# along with this program; if not, write to the Free Software
730
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
731
 
# 02111-1307, USA.
732
 
 
733
 
# serial 2
734
 
 
735
 
# AM_MAKE_INCLUDE()
736
 
# -----------------
737
 
# Check to see how make treats includes.
738
 
AC_DEFUN([AM_MAKE_INCLUDE],
739
 
[am_make=${MAKE-make}
740
 
cat > confinc << 'END'
741
 
am__doit:
742
 
        @echo done
743
 
.PHONY: am__doit
744
 
END
745
 
# If we don't find an include directive, just comment out the code.
746
 
AC_MSG_CHECKING([for style of include used by $am_make])
747
 
am__include="#"
748
 
am__quote=
749
 
_am_result=none
750
 
# First try GNU make style include.
751
 
echo "include confinc" > confmf
752
 
# We grep out `Entering directory' and `Leaving directory'
753
 
# messages which can occur if `w' ends up in MAKEFLAGS.
754
 
# In particular we don't look at `^make:' because GNU make might
755
 
# be invoked under some other name (usually "gmake"), in which
756
 
# case it prints its new name instead of `make'.
757
 
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
758
 
   am__include=include
759
 
   am__quote=
760
 
   _am_result=GNU
761
 
fi
762
 
# Now try BSD make style include.
763
 
if test "$am__include" = "#"; then
764
 
   echo '.include "confinc"' > confmf
765
 
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
766
 
      am__include=.include
767
 
      am__quote="\""
768
 
      _am_result=BSD
769
 
   fi
770
 
fi
771
 
AC_SUBST([am__include])
772
 
AC_SUBST([am__quote])
773
 
AC_MSG_RESULT([$_am_result])
774
 
rm -f confinc confmf
775
 
])
776
 
 
777
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
778
 
 
779
 
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
780
 
 
781
 
# This program is free software; you can redistribute it and/or modify
782
 
# it under the terms of the GNU General Public License as published by
783
 
# the Free Software Foundation; either version 2, or (at your option)
784
 
# any later version.
785
 
 
786
 
# This program is distributed in the hope that it will be useful,
787
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
788
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
789
 
# GNU General Public License for more details.
790
 
 
791
 
# You should have received a copy of the GNU General Public License
792
 
# along with this program; if not, write to the Free Software
793
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
794
 
# 02111-1307, USA.
795
 
 
796
 
# serial 5
797
 
 
798
 
AC_PREREQ(2.52)
799
 
 
800
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
801
 
# -------------------------------------
802
 
# Define a conditional.
803
 
AC_DEFUN([AM_CONDITIONAL],
804
 
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
805
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
806
 
AC_SUBST([$1_TRUE])
807
 
AC_SUBST([$1_FALSE])
808
 
if $2; then
809
 
  $1_TRUE=
810
 
  $1_FALSE='#'
811
 
else
812
 
  $1_TRUE='#'
813
 
  $1_FALSE=
814
 
fi
815
 
AC_CONFIG_COMMANDS_PRE(
816
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
817
 
  AC_MSG_ERROR([conditional "$1" was never defined.
818
 
Usually this means the macro was only invoked conditionally.])
819
 
fi])])
820
 
 
821
 
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
822
 
 
823
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
824
 
 
825
 
# This program is free software; you can redistribute it and/or modify
826
 
# it under the terms of the GNU General Public License as published by
827
 
# the Free Software Foundation; either version 2, or (at your option)
828
 
# any later version.
829
 
 
830
 
# This program is distributed in the hope that it will be useful,
831
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
832
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
833
 
# GNU General Public License for more details.
834
 
 
835
 
# You should have received a copy of the GNU General Public License
836
 
# along with this program; if not, write to the Free Software
837
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
838
 
# 02111-1307, USA.
839
 
 
840
 
AC_PREREQ([2.52])
841
 
 
842
 
# serial 6
843
 
 
844
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
845
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
846
 
 
847
 
# alloca.m4 serial 2
848
 
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
849
 
dnl This file is free software, distributed under the terms of the GNU
850
 
dnl General Public License.  As a special exception to the GNU General
851
 
dnl Public License, this file may be distributed as part of a program
852
 
dnl that contains a configuration script generated by Autoconf, under
853
 
dnl the same distribution terms as the rest of that program.
854
 
 
855
 
AC_DEFUN([gl_FUNC_ALLOCA],
856
 
[
857
 
  dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
858
 
  AC_REQUIRE([AC_PROG_CPP])
859
 
  AC_REQUIRE([AC_PROG_EGREP])
860
 
 
861
 
  AC_REQUIRE([AC_FUNC_ALLOCA])
862
 
  if test $ac_cv_func_alloca_works = no; then
863
 
    gl_PREREQ_ALLOCA
864
 
  fi
865
 
 
866
 
  # Define an additional variable used in the Makefile substitution.
867
 
 
868
 
  AC_EGREP_CPP([Need own alloca], [
869
 
#if defined __GNUC__ || defined _MSC_VER || !HAVE_ALLOCA_H
870
 
  Need own alloca
871
 
#endif
872
 
    ],
873
 
    ALLOCA_H=alloca.h,
874
 
    ALLOCA_H=)
875
 
  AC_SUBST([ALLOCA_H])
876
 
])
877
 
 
878
 
# Prerequisites of lib/alloca.c.
879
 
# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
880
 
AC_DEFUN([gl_PREREQ_ALLOCA], [
881
 
  AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
882
 
])
883
 
 
884
 
# onceonly_2_57.m4 serial 3
885
 
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
886
 
dnl This file is free software, distributed under the terms of the GNU
887
 
dnl General Public License.  As a special exception to the GNU General
888
 
dnl Public License, this file may be distributed as part of a program
889
 
dnl that contains a configuration script generated by Autoconf, under
890
 
dnl the same distribution terms as the rest of that program.
891
 
 
892
 
dnl This file defines some "once only" variants of standard autoconf macros.
893
 
dnl   AC_CHECK_HEADERS_ONCE         like  AC_CHECK_HEADERS
894
 
dnl   AC_CHECK_FUNCS_ONCE           like  AC_CHECK_FUNCS
895
 
dnl   AC_CHECK_DECLS_ONCE           like  AC_CHECK_DECLS
896
 
dnl   AC_REQUIRE([AC_HEADER_STDC])  like  AC_HEADER_STDC
897
 
dnl The advantage is that the check for each of the headers/functions/decls
898
 
dnl will be put only once into the 'configure' file. It keeps the size of
899
 
dnl the 'configure' file down, and avoids redundant output when 'configure'
900
 
dnl is run.
901
 
dnl The drawback is that the checks cannot be conditionalized. If you write
902
 
dnl   if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
903
 
dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
904
 
dnl empty, and the check will be inserted before the body of the AC_DEFUNed
905
 
dnl function.
906
 
 
907
 
dnl This is like onceonly.m4, except that it uses diversions to named sections
908
 
dnl DEFAULTS and INIT_PREPARE in order to check all requested headers at once,
909
 
dnl thus reducing the size of 'configure'. Works with autoconf-2.57. The
910
 
dnl size reduction is ca. 9%.
911
 
 
912
 
dnl Autoconf version 2.57 or newer is recommended.
913
 
AC_PREREQ(2.54)
914
 
 
915
 
# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
916
 
# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
917
 
AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
918
 
  :
919
 
  AC_FOREACH([gl_HEADER_NAME], [$1], [
920
 
    AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
921
 
                                                 [./-], [___])), [
922
 
      m4_divert_text([INIT_PREPARE],
923
 
        [gl_header_list="$gl_header_list gl_HEADER_NAME"])
924
 
      gl_HEADERS_EXPANSION
925
 
      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
926
 
        [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
927
 
    ])
928
 
    AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
929
 
                                                   [./-], [___])))
930
 
  ])
931
 
])
932
 
m4_define([gl_HEADERS_EXPANSION], [
933
 
  m4_divert_text([DEFAULTS], [gl_header_list=])
934
 
  AC_CHECK_HEADERS([$gl_header_list])
935
 
  m4_define([gl_HEADERS_EXPANSION], [])
936
 
])
937
 
 
938
 
# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
939
 
# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
940
 
AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
941
 
  :
942
 
  AC_FOREACH([gl_FUNC_NAME], [$1], [
943
 
    AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
944
 
      m4_divert_text([INIT_PREPARE],
945
 
        [gl_func_list="$gl_func_list gl_FUNC_NAME"])
946
 
      gl_FUNCS_EXPANSION
947
 
      AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
948
 
        [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
949
 
    ])
950
 
    AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
951
 
  ])
952
 
])
953
 
m4_define([gl_FUNCS_EXPANSION], [
954
 
  m4_divert_text([DEFAULTS], [gl_func_list=])
955
 
  AC_CHECK_FUNCS([$gl_func_list])
956
 
  m4_define([gl_FUNCS_EXPANSION], [])
957
 
])
958
 
 
959
 
# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
960
 
# AC_CHECK_DECLS(DECL1, DECL2, ...).
961
 
AC_DEFUN([AC_CHECK_DECLS_ONCE], [
962
 
  :
963
 
  AC_FOREACH([gl_DECL_NAME], [$1], [
964
 
    AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
965
 
      AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
966
 
    ])
967
 
    AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
968
 
  ])
969
 
])
970
 
 
971
 
# dirname.m4 serial 1
972
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
973
 
dnl This file is free software, distributed under the terms of the GNU
974
 
dnl General Public License.  As a special exception to the GNU General
975
 
dnl Public License, this file may be distributed as part of a program
976
 
dnl that contains a configuration script generated by Autoconf, under
977
 
dnl the same distribution terms as the rest of that program.
978
 
 
979
 
AC_DEFUN([gl_DIRNAME],
980
 
[
981
 
  dnl Prerequisites of lib/dirname.h.
982
 
  AC_REQUIRE([jm_AC_DOS])
983
 
 
984
 
  dnl Prerequisites of lib/dirname.c.
985
 
  AC_REQUIRE([AC_HEADER_STDC])
986
 
  AC_CHECK_HEADERS_ONCE(string.h)
987
 
 
988
 
  dnl Prerequisites of lib/basename.c.
989
 
  AC_REQUIRE([AC_HEADER_STDC])
990
 
  AC_CHECK_HEADERS_ONCE(string.h)
991
 
 
992
 
  dnl Prerequisites of lib/stripslash.c.
993
 
  AC_REQUIRE([AC_HEADER_STDC])
994
 
  AC_CHECK_HEADERS_ONCE(string.h)
995
 
])
996
 
 
997
 
#serial 5
998
 
 
999
 
# Define some macros required for proper operation of code in lib/*.c
1000
 
# on MSDOS/Windows systems.
1001
 
 
1002
 
# From Jim Meyering.
1003
 
 
1004
 
AC_DEFUN([jm_AC_DOS],
1005
 
  [
1006
 
    AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
1007
 
      [
1008
 
        AC_TRY_COMPILE([],
1009
 
        [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__
1010
 
neither MSDOS nor Windows
1011
 
#endif],
1012
 
        [ac_cv_win_or_dos=yes],
1013
 
        [ac_cv_win_or_dos=no])
1014
 
      ])
1015
 
 
1016
 
    if test x"$ac_cv_win_or_dos" = xyes; then
1017
 
      ac_fs_accepts_drive_letter_prefix=1
1018
 
      ac_fs_backslash_is_file_name_separator=1
1019
 
    else
1020
 
      ac_fs_accepts_drive_letter_prefix=0
1021
 
      ac_fs_backslash_is_file_name_separator=0
1022
 
    fi
1023
 
 
1024
 
    AH_VERBATIM(FILESYSTEM_PREFIX_LEN,
1025
 
    [#if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
1026
 
# define FILESYSTEM_PREFIX_LEN(Filename) \
1027
 
  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
1028
 
#else
1029
 
# define FILESYSTEM_PREFIX_LEN(Filename) 0
1030
 
#endif])
1031
 
 
1032
 
    AC_DEFINE_UNQUOTED([FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
1033
 
      $ac_fs_accepts_drive_letter_prefix,
1034
 
      [Define on systems for which file names may have a so-called
1035
 
       `drive letter' prefix, define this to compute the length of that
1036
 
       prefix, including the colon.])
1037
 
 
1038
 
    AH_VERBATIM(ISSLASH,
1039
 
    [#if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
1040
 
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
1041
 
#else
1042
 
# define ISSLASH(C) ((C) == '/')
1043
 
#endif])
1044
 
 
1045
 
    AC_DEFINE_UNQUOTED([FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
1046
 
      $ac_fs_backslash_is_file_name_separator,
1047
 
      [Define if the backslash character may also serve as a file name
1048
 
       component separator.])
1049
 
  ])
1050
 
 
1051
 
#serial 7
1052
 
 
1053
 
AC_DEFUN([gl_ERROR],
1054
 
[
1055
 
  AC_FUNC_ERROR_AT_LINE
1056
 
  dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
1057
 
  jm_PREREQ_ERROR
1058
 
])
1059
 
 
1060
 
# Prerequisites of lib/error.c.
1061
 
AC_DEFUN([jm_PREREQ_ERROR],
1062
 
[
1063
 
  AC_REQUIRE([AC_HEADER_STDC])
1064
 
  AC_REQUIRE([AC_FUNC_VPRINTF])
1065
 
  AC_CHECK_FUNCS(strerror)
1066
 
  AC_CHECK_DECLS([strerror])
1067
 
  AC_FUNC_STRERROR_R
1068
 
])
1069
 
 
1070
 
#serial 1003
1071
 
# Experimental replacement for the function in the latest CVS autoconf.
1072
 
# Use with the error.c file in ../lib.
1073
 
 
1074
 
# Copyright 2001 Free Software Foundation, Inc.
1075
 
 
1076
 
# This program is free software; you can redistribute it and/or modify
1077
 
# it under the terms of the GNU General Public License as published by
1078
 
# the Free Software Foundation; either version 2, or (at your option)
1079
 
# any later version.
1080
 
 
1081
 
# This program is distributed in the hope that it will be useful,
1082
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1083
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1084
 
# GNU General Public License for more details.
1085
 
 
1086
 
# You should have received a copy of the GNU General Public License
1087
 
# along with this program; if not, write to the Free Software Foundation,
1088
 
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
1089
 
 
1090
 
undefine([AC_FUNC_STRERROR_R])
1091
 
 
1092
 
# AC_FUNC_STRERROR_R
1093
 
# ------------------
1094
 
AC_DEFUN([AC_FUNC_STRERROR_R],
1095
 
[AC_CHECK_DECLS([strerror_r])
1096
 
AC_CHECK_FUNCS([strerror_r])
1097
 
AC_CACHE_CHECK([whether strerror_r returns char *],
1098
 
               ac_cv_func_strerror_r_char_p,
1099
 
   [
1100
 
    ac_cv_func_strerror_r_char_p=no
1101
 
    if test $ac_cv_have_decl_strerror_r = yes; then
1102
 
      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
1103
 
        [[
1104
 
          char buf[100];
1105
 
          char x = *strerror_r (0, buf, sizeof buf);
1106
 
          char *p = strerror_r (0, buf, sizeof buf);
1107
 
        ]])],
1108
 
                        ac_cv_func_strerror_r_char_p=yes)
1109
 
    else
1110
 
      # strerror_r is not declared.  Choose between
1111
 
      # systems that have relatively inaccessible declarations for the
1112
 
      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
1113
 
      # former has a strerror_r that returns char*, while the latter
1114
 
      # has a strerror_r that returns `int'.
1115
 
      # This test should segfault on the DEC system.
1116
 
      AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
1117
 
        extern char *strerror_r ();],
1118
 
        [[char buf[100];
1119
 
          char x = *strerror_r (0, buf, sizeof buf);
1120
 
          exit (!isalpha (x));]])],
1121
 
                    ac_cv_func_strerror_r_char_p=yes, , :)
1122
 
    fi
1123
 
  ])
1124
 
if test $ac_cv_func_strerror_r_char_p = yes; then
1125
 
  AC_DEFINE([STRERROR_R_CHAR_P], 1,
1126
 
            [Define to 1 if strerror_r returns char *.])
1127
 
fi
1128
 
])# AC_FUNC_STRERROR_R
1129
 
 
1130
 
# fileblocks.m4 serial 1
1131
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1132
 
dnl This file is free software, distributed under the terms of the GNU
1133
 
dnl General Public License.  As a special exception to the GNU General
1134
 
dnl Public License, this file may be distributed as part of a program
1135
 
dnl that contains a configuration script generated by Autoconf, under
1136
 
dnl the same distribution terms as the rest of that program.
1137
 
 
1138
 
AC_DEFUN([gl_FILEBLOCKS],
1139
 
[
1140
 
  AC_STRUCT_ST_BLOCKS
1141
 
  dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ(fileblocks).
1142
 
  if test $ac_cv_member_struct_stat_st_blocks = no; then
1143
 
    gl_PREREQ_FILEBLOCKS
1144
 
  fi
1145
 
])
1146
 
 
1147
 
# Prerequisites of lib/fileblocks.c.
1148
 
AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
1149
 
  AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
1150
 
])
1151
 
 
1152
 
# filemode.m4 serial 1
1153
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1154
 
dnl This file is free software, distributed under the terms of the GNU
1155
 
dnl General Public License.  As a special exception to the GNU General
1156
 
dnl Public License, this file may be distributed as part of a program
1157
 
dnl that contains a configuration script generated by Autoconf, under
1158
 
dnl the same distribution terms as the rest of that program.
1159
 
 
1160
 
AC_DEFUN([gl_FILEMODE],
1161
 
[
1162
 
  dnl Prerequisites of lib/filemode.c.
1163
 
  AC_REQUIRE([AC_HEADER_STAT])
1164
 
])
1165
 
 
1166
 
# getline.m4 serial 8
1167
 
 
1168
 
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
1169
 
dnl Foundation, Inc.
1170
 
 
1171
 
dnl This file is free software, distributed under the terms of the GNU
1172
 
dnl General Public License.  As a special exception to the GNU General
1173
 
dnl Public License, this file may be distributed as part of a program
1174
 
dnl that contains a configuration script generated by Autoconf, under
1175
 
dnl the same distribution terms as the rest of that program.
1176
 
 
1177
 
AC_PREREQ(2.52)
1178
 
 
1179
 
dnl See if there's a working, system-supplied version of the getline function.
1180
 
dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
1181
 
dnl have a function by that name in -linet that doesn't have anything
1182
 
dnl to do with the function we need.
1183
 
AC_DEFUN([AM_FUNC_GETLINE],
1184
 
[
1185
 
  dnl Persuade glibc <stdio.h> to declare getline() and getdelim().
1186
 
  AC_REQUIRE([AC_GNU_SOURCE])
1187
 
 
1188
 
  am_getline_needs_run_time_check=no
1189
 
  AC_CHECK_FUNC(getline,
1190
 
                dnl Found it in some library.  Verify that it works.
1191
 
                am_getline_needs_run_time_check=yes,
1192
 
                am_cv_func_working_getline=no)
1193
 
  if test $am_getline_needs_run_time_check = yes; then
1194
 
    AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
1195
 
    [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
1196
 
    AC_TRY_RUN([
1197
 
#    include <stdio.h>
1198
 
#    include <stdlib.h>
1199
 
#    include <string.h>
1200
 
    int main ()
1201
 
    { /* Based on a test program from Karl Heuer.  */
1202
 
      char *line = NULL;
1203
 
      size_t siz = 0;
1204
 
      int len;
1205
 
      FILE *in = fopen ("./conftest.data", "r");
1206
 
      if (!in)
1207
 
        return 1;
1208
 
      len = getline (&line, &siz, in);
1209
 
      exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
1210
 
    }
1211
 
    ], am_cv_func_working_getline=yes dnl The library version works.
1212
 
    , am_cv_func_working_getline=no dnl The library version does NOT work.
1213
 
    , am_cv_func_working_getline=no dnl We're cross compiling.
1214
 
    )])
1215
 
  fi
1216
 
 
1217
 
  if test $am_cv_func_working_getline = no; then
1218
 
    dnl We must choose a different name for our function, since on ELF systems
1219
 
    dnl a broken getline() in libc.so would override our getline() in
1220
 
    dnl libgettextlib.so.
1221
 
    AC_DEFINE([getline], [gnu_getline],
1222
 
      [Define to a replacement function name for getline().])
1223
 
    AC_LIBOBJ(getline)
1224
 
    gl_PREREQ_GETLINE
1225
 
  fi
1226
 
])
1227
 
 
1228
 
# Prerequisites of lib/getline.c.
1229
 
AC_DEFUN([gl_PREREQ_GETLINE],
1230
 
[
1231
 
  AC_REQUIRE([AC_HEADER_STDC])
1232
 
  AC_CHECK_FUNCS(getdelim)
1233
 
])
1234
 
 
1235
 
# getopt.m4 serial 1
1236
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
1237
 
dnl This file is free software, distributed under the terms of the GNU
1238
 
dnl General Public License.  As a special exception to the GNU General
1239
 
dnl Public License, this file may be distributed as part of a program
1240
 
dnl that contains a configuration script generated by Autoconf, under
1241
 
dnl the same distribution terms as the rest of that program.
1242
 
 
1243
 
AC_DEFUN([gl_GETOPT],
1244
 
[
1245
 
  dnl Prerequisites of lib/getopt.c.
1246
 
  AC_CHECK_HEADERS_ONCE(string.h)
1247
 
])
1248
 
 
1249
 
# gettext.m4 serial 17 (gettext-0.11.5)
1250
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1251
 
dnl This file is free software, distributed under the terms of the GNU
1252
 
dnl General Public License.  As a special exception to the GNU General
1253
 
dnl Public License, this file may be distributed as part of a program
1254
 
dnl that contains a configuration script generated by Autoconf, under
1255
 
dnl the same distribution terms as the rest of that program.
1256
 
dnl
1257
 
dnl This file can can be used in projects which are not available under
1258
 
dnl the GNU General Public License or the GNU Library General Public
1259
 
dnl License but which still want to provide support for the GNU gettext
1260
 
dnl functionality.
1261
 
dnl Please note that the actual code of the GNU gettext library is covered
1262
 
dnl by the GNU Library General Public License, and the rest of the GNU
1263
 
dnl gettext package package is covered by the GNU General Public License.
1264
 
dnl They are *not* in the public domain.
1265
 
 
1266
 
dnl Authors:
1267
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1268
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2002.
1269
 
 
1270
 
dnl Macro to add for using GNU gettext.
1271
 
 
1272
 
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
1273
 
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
1274
 
dnl    default (if it is not specified or empty) is 'no-libtool'.
1275
 
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
1276
 
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
1277
 
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
1278
 
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
1279
 
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
1280
 
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
1281
 
dnl    $(top_builddir)/intl/libintl.a will be created.
1282
 
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
1283
 
dnl    implementations (in libc or libintl) without the ngettext() function
1284
 
dnl    will be ignored.  If NEEDSYMBOL is specified and is
1285
 
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
1286
 
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
1287
 
dnl INTLDIR is used to find the intl libraries.  If empty,
1288
 
dnl    the value `$(top_builddir)/intl/' is used.
1289
 
dnl
1290
 
dnl The result of the configuration is one of three cases:
1291
 
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
1292
 
dnl    and used.
1293
 
dnl    Catalog format: GNU --> install in $(datadir)
1294
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
1295
 
dnl 2) GNU gettext has been found in the system's C library.
1296
 
dnl    Catalog format: GNU --> install in $(datadir)
1297
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
1298
 
dnl 3) No internationalization, always use English msgid.
1299
 
dnl    Catalog format: none
1300
 
dnl    Catalog extension: none
1301
 
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
1302
 
dnl The use of .gmo is historical (it was needed to avoid overwriting the
1303
 
dnl GNU format catalogs when building on a platform with an X/Open gettext),
1304
 
dnl but we keep it in order not to force irrelevant filename changes on the
1305
 
dnl maintainers.
1306
 
dnl
1307
 
AC_DEFUN([AM_GNU_GETTEXT],
1308
 
[
1309
 
  dnl Argument checking.
1310
 
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
1311
 
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
1312
 
])])])])])
1313
 
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
1314
 
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
1315
 
])])])])
1316
 
  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
1317
 
  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
1318
 
 
1319
 
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
1320
 
  ifelse(gt_included_intl, yes, [
1321
 
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
1322
 
  ])
1323
 
 
1324
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1325
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1326
 
  AC_REQUIRE([AC_LIB_RPATH])
1327
 
 
1328
 
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
1329
 
  dnl Ideally we would do this search only after the
1330
 
  dnl      if test "$USE_NLS" = "yes"; then
1331
 
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1332
 
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
1333
 
  dnl the configure script would need to contain the same shell code
1334
 
  dnl again, outside any 'if'. There are two solutions:
1335
 
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
1336
 
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
1337
 
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
1338
 
  dnl documented, we avoid it.
1339
 
  ifelse(gt_included_intl, yes, , [
1340
 
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1341
 
  ])
1342
 
 
1343
 
  AC_MSG_CHECKING([whether NLS is requested])
1344
 
  dnl Default is enabled NLS
1345
 
  AC_ARG_ENABLE(nls,
1346
 
    [  --disable-nls           do not use Native Language Support],
1347
 
    USE_NLS=$enableval, USE_NLS=yes)
1348
 
  AC_MSG_RESULT($USE_NLS)
1349
 
  AC_SUBST(USE_NLS)
1350
 
 
1351
 
  ifelse(gt_included_intl, yes, [
1352
 
    BUILD_INCLUDED_LIBINTL=no
1353
 
    USE_INCLUDED_LIBINTL=no
1354
 
  ])
1355
 
  LIBINTL=
1356
 
  LTLIBINTL=
1357
 
  POSUB=
1358
 
 
1359
 
  dnl If we use NLS figure out what method
1360
 
  if test "$USE_NLS" = "yes"; then
1361
 
    gt_use_preinstalled_gnugettext=no
1362
 
    ifelse(gt_included_intl, yes, [
1363
 
      AC_MSG_CHECKING([whether included gettext is requested])
1364
 
      AC_ARG_WITH(included-gettext,
1365
 
        [  --with-included-gettext use the GNU gettext library included here],
1366
 
        nls_cv_force_use_gnu_gettext=$withval,
1367
 
        nls_cv_force_use_gnu_gettext=no)
1368
 
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
1369
 
 
1370
 
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1371
 
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1372
 
    ])
1373
 
        dnl User does not insist on using GNU NLS library.  Figure out what
1374
 
        dnl to use.  If GNU gettext is available we use this.  Else we have
1375
 
        dnl to fall back to GNU NLS library.
1376
 
 
1377
 
        dnl Add a version number to the cache macros.
1378
 
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
1379
 
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
1380
 
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
1381
 
 
1382
 
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
1383
 
         [AC_TRY_LINK([#include <libintl.h>
1384
 
]ifelse([$2], [need-formatstring-macros],
1385
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1386
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1387
 
#endif
1388
 
changequote(,)dnl
1389
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1390
 
changequote([,])dnl
1391
 
], [])[extern int _nl_msg_cat_cntr;
1392
 
extern int *_nl_domain_bindings;],
1393
 
            [bindtextdomain ("", "");
1394
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
1395
 
            gt_cv_func_gnugettext_libc=yes,
1396
 
            gt_cv_func_gnugettext_libc=no)])
1397
 
 
1398
 
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1399
 
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
1400
 
          ifelse(gt_included_intl, yes, , [
1401
 
            AM_ICONV_LINK
1402
 
          ])
1403
 
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1404
 
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1405
 
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1406
 
          dnl even if libiconv doesn't exist.
1407
 
          AC_LIB_LINKFLAGS_BODY([intl])
1408
 
          AC_CACHE_CHECK([for GNU gettext in libintl],
1409
 
            gt_cv_func_gnugettext_libintl,
1410
 
           [gt_save_CPPFLAGS="$CPPFLAGS"
1411
 
            CPPFLAGS="$CPPFLAGS $INCINTL"
1412
 
            gt_save_LIBS="$LIBS"
1413
 
            LIBS="$LIBS $LIBINTL"
1414
 
            dnl Now see whether libintl exists and does not depend on libiconv.
1415
 
            AC_TRY_LINK([#include <libintl.h>
1416
 
]ifelse([$2], [need-formatstring-macros],
1417
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1418
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1419
 
#endif
1420
 
changequote(,)dnl
1421
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1422
 
changequote([,])dnl
1423
 
], [])[extern int _nl_msg_cat_cntr;
1424
 
extern
1425
 
#ifdef __cplusplus
1426
 
"C"
1427
 
#endif
1428
 
const char *_nl_expand_alias ();],
1429
 
              [bindtextdomain ("", "");
1430
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1431
 
              gt_cv_func_gnugettext_libintl=yes,
1432
 
              gt_cv_func_gnugettext_libintl=no)
1433
 
            dnl Now see whether libintl exists and depends on libiconv.
1434
 
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1435
 
              LIBS="$LIBS $LIBICONV"
1436
 
              AC_TRY_LINK([#include <libintl.h>
1437
 
]ifelse([$2], [need-formatstring-macros],
1438
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1439
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1440
 
#endif
1441
 
changequote(,)dnl
1442
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1443
 
changequote([,])dnl
1444
 
], [])[extern int _nl_msg_cat_cntr;
1445
 
extern
1446
 
#ifdef __cplusplus
1447
 
"C"
1448
 
#endif
1449
 
const char *_nl_expand_alias ();],
1450
 
                [bindtextdomain ("", "");
1451
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1452
 
               [LIBINTL="$LIBINTL $LIBICONV"
1453
 
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1454
 
                gt_cv_func_gnugettext_libintl=yes
1455
 
               ])
1456
 
            fi
1457
 
            CPPFLAGS="$gt_save_CPPFLAGS"
1458
 
            LIBS="$gt_save_LIBS"])
1459
 
        fi
1460
 
 
1461
 
        dnl If an already present or preinstalled GNU gettext() is found,
1462
 
        dnl use it.  But if this macro is used in GNU gettext, and GNU
1463
 
        dnl gettext is already preinstalled in libintl, we update this
1464
 
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
1465
 
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
1466
 
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1467
 
                && test "$PACKAGE" != gettext; }; then
1468
 
          gt_use_preinstalled_gnugettext=yes
1469
 
        else
1470
 
          dnl Reset the values set by searching for libintl.
1471
 
          LIBINTL=
1472
 
          LTLIBINTL=
1473
 
          INCINTL=
1474
 
        fi
1475
 
 
1476
 
    ifelse(gt_included_intl, yes, [
1477
 
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1478
 
          dnl GNU gettext is not found in the C library.
1479
 
          dnl Fall back on included GNU gettext library.
1480
 
          nls_cv_use_gnu_gettext=yes
1481
 
        fi
1482
 
      fi
1483
 
 
1484
 
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
1485
 
        dnl Mark actions used to generate GNU NLS library.
1486
 
        INTLOBJS="\$(GETTOBJS)"
1487
 
        BUILD_INCLUDED_LIBINTL=yes
1488
 
        USE_INCLUDED_LIBINTL=yes
1489
 
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1490
 
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1491
 
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1492
 
      fi
1493
 
 
1494
 
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
1495
 
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
1496
 
        dnl Mark actions to use GNU gettext tools.
1497
 
        CATOBJEXT=.gmo
1498
 
      fi
1499
 
    ])
1500
 
 
1501
 
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
1502
 
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
1503
 
      AC_DEFINE(ENABLE_NLS, 1,
1504
 
        [Define to 1 if translation of program messages to the user's native language
1505
 
   is requested.])
1506
 
    else
1507
 
      USE_NLS=no
1508
 
    fi
1509
 
  fi
1510
 
 
1511
 
  if test "$USE_NLS" = "yes"; then
1512
 
 
1513
 
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1514
 
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1515
 
        AC_MSG_CHECKING([how to link with libintl])
1516
 
        AC_MSG_RESULT([$LIBINTL])
1517
 
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1518
 
      fi
1519
 
 
1520
 
      dnl For backward compatibility. Some packages may be using this.
1521
 
      AC_DEFINE(HAVE_GETTEXT, 1,
1522
 
       [Define if the GNU gettext() function is already present or preinstalled.])
1523
 
      AC_DEFINE(HAVE_DCGETTEXT, 1,
1524
 
       [Define if the GNU dcgettext() function is already present or preinstalled.])
1525
 
    fi
1526
 
 
1527
 
    dnl We need to process the po/ directory.
1528
 
    POSUB=po
1529
 
  fi
1530
 
 
1531
 
  ifelse(gt_included_intl, yes, [
1532
 
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1533
 
    dnl to 'yes' because some of the testsuite requires it.
1534
 
    if test "$PACKAGE" = gettext; then
1535
 
      BUILD_INCLUDED_LIBINTL=yes
1536
 
    fi
1537
 
 
1538
 
    dnl Make all variables we use known to autoconf.
1539
 
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
1540
 
    AC_SUBST(USE_INCLUDED_LIBINTL)
1541
 
    AC_SUBST(CATOBJEXT)
1542
 
    AC_SUBST(INTLOBJS)
1543
 
 
1544
 
    dnl For backward compatibility. Some configure.ins may be using this.
1545
 
    nls_cv_header_intl=
1546
 
    nls_cv_header_libgt=
1547
 
 
1548
 
    dnl For backward compatibility. Some Makefiles may be using this.
1549
 
    DATADIRNAME=share
1550
 
    AC_SUBST(DATADIRNAME)
1551
 
 
1552
 
    dnl For backward compatibility. Some Makefiles may be using this.
1553
 
    INSTOBJEXT=.mo
1554
 
    AC_SUBST(INSTOBJEXT)
1555
 
 
1556
 
    dnl For backward compatibility. Some Makefiles may be using this.
1557
 
    GENCAT=gencat
1558
 
    AC_SUBST(GENCAT)
1559
 
 
1560
 
    dnl Enable libtool support if the surrounding package wishes it.
1561
 
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1562
 
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1563
 
  ])
1564
 
 
1565
 
  dnl For backward compatibility. Some Makefiles may be using this.
1566
 
  INTLLIBS="$LIBINTL"
1567
 
  AC_SUBST(INTLLIBS)
1568
 
 
1569
 
  dnl Make all documented variables known to autoconf.
1570
 
  AC_SUBST(LIBINTL)
1571
 
  AC_SUBST(LTLIBINTL)
1572
 
  AC_SUBST(POSUB)
1573
 
])
1574
 
 
1575
 
 
1576
 
dnl Checks for all prerequisites of the po subdirectory,
1577
 
dnl except for USE_NLS.
1578
 
AC_DEFUN([AM_PO_SUBDIRS],
1579
 
[
1580
 
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1581
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
1582
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1583
 
 
1584
 
  dnl Perform the following tests also if --disable-nls has been given,
1585
 
  dnl because they are needed for "make dist" to work.
1586
 
 
1587
 
  dnl Search for GNU msgfmt in the PATH.
1588
 
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1589
 
  dnl The second test excludes FreeBSD msgfmt.
1590
 
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1591
 
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1592
 
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1593
 
    :)
1594
 
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1595
 
 
1596
 
  dnl Search for GNU xgettext 0.11 or newer in the PATH.
1597
 
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1598
 
  dnl The second test excludes FreeBSD xgettext.
1599
 
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1600
 
    [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1601
 
     (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)],
1602
 
    :)
1603
 
  dnl Remove leftover from FreeBSD xgettext call.
1604
 
  rm -f messages.po
1605
 
 
1606
 
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1607
 
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1608
 
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1609
 
 
1610
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1611
 
  dnl Test whether we really found GNU msgfmt.
1612
 
  if test "$GMSGFMT" != ":"; then
1613
 
    dnl If it is no GNU msgfmt we define it as : so that the
1614
 
    dnl Makefiles still can work.
1615
 
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1616
 
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1617
 
      : ;
1618
 
    else
1619
 
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1620
 
      AC_MSG_RESULT(
1621
 
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
1622
 
      GMSGFMT=":"
1623
 
    fi
1624
 
  fi
1625
 
 
1626
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1627
 
  dnl Test whether we really found GNU xgettext.
1628
 
  if test "$XGETTEXT" != ":"; then
1629
 
    dnl If it is no GNU xgettext we define it as : so that the
1630
 
    dnl Makefiles still can work.
1631
 
    if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1632
 
       (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1633
 
      : ;
1634
 
    else
1635
 
      AC_MSG_RESULT(
1636
 
        [found xgettext program is not GNU xgettext; ignore it])
1637
 
      XGETTEXT=":"
1638
 
    fi
1639
 
    dnl Remove leftover from FreeBSD xgettext call.
1640
 
    rm -f messages.po
1641
 
  fi
1642
 
 
1643
 
  AC_OUTPUT_COMMANDS([
1644
 
    for ac_file in $CONFIG_FILES; do
1645
 
      # Support "outfile[:infile[:infile...]]"
1646
 
      case "$ac_file" in
1647
 
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1648
 
      esac
1649
 
      # PO directories have a Makefile.in generated from Makefile.in.in.
1650
 
      case "$ac_file" in */Makefile.in)
1651
 
        # Adjust a relative srcdir.
1652
 
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1653
 
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1654
 
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1655
 
        # In autoconf-2.13 it is called $ac_given_srcdir.
1656
 
        # In autoconf-2.50 it is called $srcdir.
1657
 
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1658
 
        case "$ac_given_srcdir" in
1659
 
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1660
 
          /*) top_srcdir="$ac_given_srcdir" ;;
1661
 
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
1662
 
        esac
1663
 
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1664
 
          rm -f "$ac_dir/POTFILES"
1665
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1666
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1667
 
          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1668
 
          # on $ac_dir but don't depend on user-specified configuration
1669
 
          # parameters.
1670
 
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1671
 
            # The LINGUAS file contains the set of available languages.
1672
 
            if test -n "$ALL_LINGUAS"; then
1673
 
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1674
 
            fi
1675
 
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1676
 
            # Hide the ALL_LINGUAS assigment from automake.
1677
 
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1678
 
          fi
1679
 
          case "$ac_given_srcdir" in
1680
 
            .) srcdirpre= ;;
1681
 
            *) srcdirpre='$(srcdir)/' ;;
1682
 
          esac
1683
 
          POFILES=
1684
 
          GMOFILES=
1685
 
          UPDATEPOFILES=
1686
 
          DUMMYPOFILES=
1687
 
          for lang in $ALL_LINGUAS; do
1688
 
            POFILES="$POFILES $srcdirpre$lang.po"
1689
 
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1690
 
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1691
 
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1692
 
          done
1693
 
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
1694
 
          # environment variable.
1695
 
          INST_LINGUAS=
1696
 
          if test -n "$ALL_LINGUAS"; then
1697
 
            for presentlang in $ALL_LINGUAS; do
1698
 
              useit=no
1699
 
              if test "%UNSET%" != "$LINGUAS"; then
1700
 
                desiredlanguages="$LINGUAS"
1701
 
              else
1702
 
                desiredlanguages="$ALL_LINGUAS"
1703
 
              fi
1704
 
              for desiredlang in $desiredlanguages; do
1705
 
                # Use the presentlang catalog if desiredlang is
1706
 
                #   a. equal to presentlang, or
1707
 
                #   b. a variant of presentlang (because in this case,
1708
 
                #      presentlang can be used as a fallback for messages
1709
 
                #      which are not translated in the desiredlang catalog).
1710
 
                case "$desiredlang" in
1711
 
                  "$presentlang"*) useit=yes;;
1712
 
                esac
1713
 
              done
1714
 
              if test $useit = yes; then
1715
 
                INST_LINGUAS="$INST_LINGUAS $presentlang"
1716
 
              fi
1717
 
            done
1718
 
          fi
1719
 
          CATALOGS=
1720
 
          if test -n "$INST_LINGUAS"; then
1721
 
            for lang in $INST_LINGUAS; do
1722
 
              CATALOGS="$CATALOGS $lang.gmo"
1723
 
            done
1724
 
          fi
1725
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1726
 
          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"
1727
 
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1728
 
            if test -f "$f"; then
1729
 
              case "$f" in
1730
 
                *.orig | *.bak | *~) ;;
1731
 
                *) cat "$f" >> "$ac_dir/Makefile" ;;
1732
 
              esac
1733
 
            fi
1734
 
          done
1735
 
        fi
1736
 
        ;;
1737
 
      esac
1738
 
    done],
1739
 
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1740
 
    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1741
 
    # from automake.
1742
 
    eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1743
 
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
1744
 
    LINGUAS="${LINGUAS-%UNSET%}"
1745
 
   ])
1746
 
])
1747
 
 
1748
 
 
1749
 
dnl Checks for all prerequisites of the intl subdirectory,
1750
 
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1751
 
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1752
 
AC_DEFUN([AM_INTL_SUBDIR],
1753
 
[
1754
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
1755
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1756
 
  AC_REQUIRE([AC_PROG_CC])dnl
1757
 
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
1758
 
  AC_REQUIRE([AC_PROG_RANLIB])dnl
1759
 
  AC_REQUIRE([AC_ISC_POSIX])dnl
1760
 
  AC_REQUIRE([AC_HEADER_STDC])dnl
1761
 
  AC_REQUIRE([AC_C_CONST])dnl
1762
 
  AC_REQUIRE([AC_C_INLINE])dnl
1763
 
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
1764
 
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1765
 
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1766
 
  AC_REQUIRE([AC_FUNC_MMAP])dnl
1767
 
  AC_REQUIRE([jm_GLIBC21])dnl
1768
 
  AC_REQUIRE([gt_INTDIV0])dnl
1769
 
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1770
 
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1771
 
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
1772
 
 
1773
 
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1774
 
stdlib.h string.h unistd.h sys/param.h])
1775
 
  AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1776
 
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1777
 
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1778
 
 
1779
 
  AM_ICONV
1780
 
  AM_LANGINFO_CODESET
1781
 
  if test $ac_cv_header_locale_h = yes; then
1782
 
    AM_LC_MESSAGES
1783
 
  fi
1784
 
 
1785
 
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1786
 
  dnl because plural.y uses bison specific features. It requires at least
1787
 
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1788
 
  dnl compile.
1789
 
  dnl bison is only needed for the maintainer (who touches plural.y). But in
1790
 
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1791
 
  dnl the rule in general Makefile. Now, some people carelessly touch the
1792
 
  dnl files or have a broken "make" program, hence the plural.c rule will
1793
 
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1794
 
  dnl present or too old.
1795
 
  AC_CHECK_PROGS([INTLBISON], [bison])
1796
 
  if test -z "$INTLBISON"; then
1797
 
    ac_verc_fail=yes
1798
 
  else
1799
 
    dnl Found it, now check the version.
1800
 
    AC_MSG_CHECKING([version of bison])
1801
 
changequote(<<,>>)dnl
1802
 
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1803
 
    case $ac_prog_version in
1804
 
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1805
 
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1806
 
changequote([,])dnl
1807
 
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1808
 
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1809
 
    esac
1810
 
    AC_MSG_RESULT([$ac_prog_version])
1811
 
  fi
1812
 
  if test $ac_verc_fail = yes; then
1813
 
    INTLBISON=:
1814
 
  fi
1815
 
])
1816
 
 
1817
 
 
1818
 
AC_DEFUN([AM_MKINSTALLDIRS],
1819
 
[
1820
 
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1821
 
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1822
 
  dnl Try to locate is.
1823
 
  MKINSTALLDIRS=
1824
 
  if test -n "$ac_aux_dir"; then
1825
 
    MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1826
 
  fi
1827
 
  if test -z "$MKINSTALLDIRS"; then
1828
 
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1829
 
  fi
1830
 
  AC_SUBST(MKINSTALLDIRS)
1831
 
])
1832
 
 
1833
 
 
1834
 
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1835
 
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1836
 
 
1837
 
# lib-prefix.m4 serial 1 (gettext-0.11)
1838
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1839
 
dnl This file is free software, distributed under the terms of the GNU
1840
 
dnl General Public License.  As a special exception to the GNU General
1841
 
dnl Public License, this file may be distributed as part of a program
1842
 
dnl that contains a configuration script generated by Autoconf, under
1843
 
dnl the same distribution terms as the rest of that program.
1844
 
 
1845
 
dnl From Bruno Haible.
1846
 
 
1847
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1848
 
dnl to access previously installed libraries. The basic assumption is that
1849
 
dnl a user will want packages to use other packages he previously installed
1850
 
dnl with the same --prefix option.
1851
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1852
 
dnl libraries, but is otherwise very convenient.
1853
 
AC_DEFUN([AC_LIB_PREFIX],
1854
 
[
1855
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1856
 
  AC_REQUIRE([AC_PROG_CC])
1857
 
  AC_REQUIRE([AC_CANONICAL_HOST])
1858
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1859
 
  dnl By default, look in $includedir and $libdir.
1860
 
  use_additional=yes
1861
 
  AC_LIB_WITH_FINAL_PREFIX([
1862
 
    eval additional_includedir=\"$includedir\"
1863
 
    eval additional_libdir=\"$libdir\"
1864
 
  ])
1865
 
  AC_ARG_WITH([lib-prefix],
1866
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1867
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
1868
 
[
1869
 
    if test "X$withval" = "Xno"; then
1870
 
      use_additional=no
1871
 
    else
1872
 
      if test "X$withval" = "X"; then
1873
 
        AC_LIB_WITH_FINAL_PREFIX([
1874
 
          eval additional_includedir=\"$includedir\"
1875
 
          eval additional_libdir=\"$libdir\"
1876
 
        ])
1877
 
      else
1878
 
        additional_includedir="$withval/include"
1879
 
        additional_libdir="$withval/lib"
1880
 
      fi
1881
 
    fi
1882
 
])
1883
 
  if test $use_additional = yes; then
1884
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
1885
 
    dnl But don't add it
1886
 
    dnl   1. if it's the standard /usr/include,
1887
 
    dnl   2. if it's already present in $CPPFLAGS,
1888
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1889
 
    dnl   4. if it doesn't exist as a directory.
1890
 
    if test "X$additional_includedir" != "X/usr/include"; then
1891
 
      haveit=
1892
 
      for x in $CPPFLAGS; do
1893
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1894
 
        if test "X$x" = "X-I$additional_includedir"; then
1895
 
          haveit=yes
1896
 
          break
1897
 
        fi
1898
 
      done
1899
 
      if test -z "$haveit"; then
1900
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
1901
 
          if test -n "$GCC"; then
1902
 
            case $host_os in
1903
 
              linux*) haveit=yes;;
1904
 
            esac
1905
 
          fi
1906
 
        fi
1907
 
        if test -z "$haveit"; then
1908
 
          if test -d "$additional_includedir"; then
1909
 
            dnl Really add $additional_includedir to $CPPFLAGS.
1910
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1911
 
          fi
1912
 
        fi
1913
 
      fi
1914
 
    fi
1915
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
1916
 
    dnl But don't add it
1917
 
    dnl   1. if it's the standard /usr/lib,
1918
 
    dnl   2. if it's already present in $LDFLAGS,
1919
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1920
 
    dnl   4. if it doesn't exist as a directory.
1921
 
    if test "X$additional_libdir" != "X/usr/lib"; then
1922
 
      haveit=
1923
 
      for x in $LDFLAGS; do
1924
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1925
 
        if test "X$x" = "X-L$additional_libdir"; then
1926
 
          haveit=yes
1927
 
          break
1928
 
        fi
1929
 
      done
1930
 
      if test -z "$haveit"; then
1931
 
        if test "X$additional_libdir" = "X/usr/local/lib"; then
1932
 
          if test -n "$GCC"; then
1933
 
            case $host_os in
1934
 
              linux*) haveit=yes;;
1935
 
            esac
1936
 
          fi
1937
 
        fi
1938
 
        if test -z "$haveit"; then
1939
 
          if test -d "$additional_libdir"; then
1940
 
            dnl Really add $additional_libdir to $LDFLAGS.
1941
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1942
 
          fi
1943
 
        fi
1944
 
      fi
1945
 
    fi
1946
 
  fi
1947
 
])
1948
 
 
1949
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1950
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
1951
 
dnl $exec_prefix will expand at the end of the configure script.
1952
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1953
 
[
1954
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
1955
 
  dnl at the end of configure.
1956
 
  if test "X$prefix" = "XNONE"; then
1957
 
    acl_final_prefix="$ac_default_prefix"
1958
 
  else
1959
 
    acl_final_prefix="$prefix"
1960
 
  fi
1961
 
  if test "X$exec_prefix" = "XNONE"; then
1962
 
    acl_final_exec_prefix='${prefix}'
1963
 
  else
1964
 
    acl_final_exec_prefix="$exec_prefix"
1965
 
  fi
1966
 
  acl_save_prefix="$prefix"
1967
 
  prefix="$acl_final_prefix"
1968
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1969
 
  prefix="$acl_save_prefix"
1970
 
])
1971
 
 
1972
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1973
 
dnl variables prefix and exec_prefix bound to the values they will have
1974
 
dnl at the end of the configure script.
1975
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1976
 
[
1977
 
  acl_save_prefix="$prefix"
1978
 
  prefix="$acl_final_prefix"
1979
 
  acl_save_exec_prefix="$exec_prefix"
1980
 
  exec_prefix="$acl_final_exec_prefix"
1981
 
  $1
1982
 
  exec_prefix="$acl_save_exec_prefix"
1983
 
  prefix="$acl_save_prefix"
1984
 
])
1985
 
 
1986
 
# lib-link.m4 serial 3 (gettext-0.11.3)
1987
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1988
 
dnl This file is free software, distributed under the terms of the GNU
1989
 
dnl General Public License.  As a special exception to the GNU General
1990
 
dnl Public License, this file may be distributed as part of a program
1991
 
dnl that contains a configuration script generated by Autoconf, under
1992
 
dnl the same distribution terms as the rest of that program.
1993
 
 
1994
 
dnl From Bruno Haible.
1995
 
 
1996
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1997
 
dnl the libraries corresponding to explicit and implicit dependencies.
1998
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1999
 
dnl augments the CPPFLAGS variable.
2000
 
AC_DEFUN([AC_LIB_LINKFLAGS],
2001
 
[
2002
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2003
 
  AC_REQUIRE([AC_LIB_RPATH])
2004
 
  define([Name],[translit([$1],[./-], [___])])
2005
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
2006
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
2007
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
2008
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
2009
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
2010
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
2011
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
2012
 
  ])
2013
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
2014
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
2015
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
2016
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
2017
 
  AC_SUBST([LIB]NAME)
2018
 
  AC_SUBST([LTLIB]NAME)
2019
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
2020
 
  dnl results of this search when this library appears as a dependency.
2021
 
  HAVE_LIB[]NAME=yes
2022
 
  undefine([Name])
2023
 
  undefine([NAME])
2024
 
])
2025
 
 
2026
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
2027
 
dnl searches for libname and the libraries corresponding to explicit and
2028
 
dnl implicit dependencies, together with the specified include files and
2029
 
dnl the ability to compile and link the specified testcode. If found, it
2030
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
2031
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
2032
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
2033
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
2034
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
2035
 
[
2036
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2037
 
  AC_REQUIRE([AC_LIB_RPATH])
2038
 
  define([Name],[translit([$1],[./-], [___])])
2039
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
2040
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
2041
 
 
2042
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
2043
 
  dnl accordingly.
2044
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
2045
 
 
2046
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
2047
 
  dnl because if the user has installed lib[]Name and not disabled its use
2048
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
2049
 
  ac_save_CPPFLAGS="$CPPFLAGS"
2050
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
2051
 
 
2052
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
2053
 
    ac_save_LIBS="$LIBS"
2054
 
    LIBS="$LIBS $LIB[]NAME"
2055
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
2056
 
    LIBS="$ac_save_LIBS"
2057
 
  ])
2058
 
  if test "$ac_cv_lib[]Name" = yes; then
2059
 
    HAVE_LIB[]NAME=yes
2060
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
2061
 
    AC_MSG_CHECKING([how to link with lib[]$1])
2062
 
    AC_MSG_RESULT([$LIB[]NAME])
2063
 
  else
2064
 
    HAVE_LIB[]NAME=no
2065
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
2066
 
    dnl $INC[]NAME either.
2067
 
    CPPFLAGS="$ac_save_CPPFLAGS"
2068
 
    LIB[]NAME=
2069
 
    LTLIB[]NAME=
2070
 
  fi
2071
 
  AC_SUBST([HAVE_LIB]NAME)
2072
 
  AC_SUBST([LIB]NAME)
2073
 
  AC_SUBST([LTLIB]NAME)
2074
 
  undefine([Name])
2075
 
  undefine([NAME])
2076
 
])
2077
 
 
2078
 
dnl Determine the platform dependent parameters needed to use rpath:
2079
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
2080
 
dnl hardcode_direct, hardcode_minus_L,
2081
 
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
2082
 
AC_DEFUN([AC_LIB_RPATH],
2083
 
[
2084
 
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
2085
 
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
2086
 
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
2087
 
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
2088
 
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
2089
 
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
2090
 
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
2091
 
    . ./conftest.sh
2092
 
    rm -f ./conftest.sh
2093
 
    acl_cv_rpath=done
2094
 
  ])
2095
 
  wl="$acl_cv_wl"
2096
 
  libext="$acl_cv_libext"
2097
 
  shlibext="$acl_cv_shlibext"
2098
 
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
2099
 
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
2100
 
  hardcode_direct="$acl_cv_hardcode_direct"
2101
 
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
2102
 
  sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
2103
 
  sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
2104
 
  dnl Determine whether the user wants rpath handling at all.
2105
 
  AC_ARG_ENABLE(rpath,
2106
 
    [  --disable-rpath         do not hardcode runtime library paths],
2107
 
    :, enable_rpath=yes)
2108
 
])
2109
 
 
2110
 
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
2111
 
dnl the libraries corresponding to explicit and implicit dependencies.
2112
 
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
2113
 
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
2114
 
[
2115
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
2116
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
2117
 
  dnl By default, look in $includedir and $libdir.
2118
 
  use_additional=yes
2119
 
  AC_LIB_WITH_FINAL_PREFIX([
2120
 
    eval additional_includedir=\"$includedir\"
2121
 
    eval additional_libdir=\"$libdir\"
2122
 
  ])
2123
 
  AC_ARG_WITH([lib$1-prefix],
2124
 
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
2125
 
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
2126
 
[
2127
 
    if test "X$withval" = "Xno"; then
2128
 
      use_additional=no
2129
 
    else
2130
 
      if test "X$withval" = "X"; then
2131
 
        AC_LIB_WITH_FINAL_PREFIX([
2132
 
          eval additional_includedir=\"$includedir\"
2133
 
          eval additional_libdir=\"$libdir\"
2134
 
        ])
2135
 
      else
2136
 
        additional_includedir="$withval/include"
2137
 
        additional_libdir="$withval/lib"
2138
 
      fi
2139
 
    fi
2140
 
])
2141
 
  dnl Search the library and its dependencies in $additional_libdir and
2142
 
  dnl $LDFLAGS. Using breadth-first-seach.
2143
 
  LIB[]NAME=
2144
 
  LTLIB[]NAME=
2145
 
  INC[]NAME=
2146
 
  rpathdirs=
2147
 
  ltrpathdirs=
2148
 
  names_already_handled=
2149
 
  names_next_round='$1 $2'
2150
 
  while test -n "$names_next_round"; do
2151
 
    names_this_round="$names_next_round"
2152
 
    names_next_round=
2153
 
    for name in $names_this_round; do
2154
 
      already_handled=
2155
 
      for n in $names_already_handled; do
2156
 
        if test "$n" = "$name"; then
2157
 
          already_handled=yes
2158
 
          break
2159
 
        fi
2160
 
      done
2161
 
      if test -z "$already_handled"; then
2162
 
        names_already_handled="$names_already_handled $name"
2163
 
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
2164
 
        dnl or AC_LIB_HAVE_LINKFLAGS call.
2165
 
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
2166
 
        eval value=\"\$HAVE_LIB$uppername\"
2167
 
        if test -n "$value"; then
2168
 
          if test "$value" = yes; then
2169
 
            eval value=\"\$LIB$uppername\"
2170
 
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
2171
 
            eval value=\"\$LTLIB$uppername\"
2172
 
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
2173
 
          else
2174
 
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
2175
 
            dnl that this library doesn't exist. So just drop it.
2176
 
            :
2177
 
          fi
2178
 
        else
2179
 
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
2180
 
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
2181
 
          found_dir=
2182
 
          found_la=
2183
 
          found_so=
2184
 
          found_a=
2185
 
          if test $use_additional = yes; then
2186
 
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
2187
 
              found_dir="$additional_libdir"
2188
 
              found_so="$additional_libdir/lib$name.$shlibext"
2189
 
              if test -f "$additional_libdir/lib$name.la"; then
2190
 
                found_la="$additional_libdir/lib$name.la"
2191
 
              fi
2192
 
            else
2193
 
              if test -f "$additional_libdir/lib$name.$libext"; then
2194
 
                found_dir="$additional_libdir"
2195
 
                found_a="$additional_libdir/lib$name.$libext"
2196
 
                if test -f "$additional_libdir/lib$name.la"; then
2197
 
                  found_la="$additional_libdir/lib$name.la"
2198
 
                fi
2199
 
              fi
2200
 
            fi
2201
 
          fi
2202
 
          if test "X$found_dir" = "X"; then
2203
 
            for x in $LDFLAGS $LTLIB[]NAME; do
2204
 
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2205
 
              case "$x" in
2206
 
                -L*)
2207
 
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
2208
 
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
2209
 
                    found_dir="$dir"
2210
 
                    found_so="$dir/lib$name.$shlibext"
2211
 
                    if test -f "$dir/lib$name.la"; then
2212
 
                      found_la="$dir/lib$name.la"
2213
 
                    fi
2214
 
                  else
2215
 
                    if test -f "$dir/lib$name.$libext"; then
2216
 
                      found_dir="$dir"
2217
 
                      found_a="$dir/lib$name.$libext"
2218
 
                      if test -f "$dir/lib$name.la"; then
2219
 
                        found_la="$dir/lib$name.la"
2220
 
                      fi
2221
 
                    fi
2222
 
                  fi
2223
 
                  ;;
2224
 
              esac
2225
 
              if test "X$found_dir" != "X"; then
2226
 
                break
2227
 
              fi
2228
 
            done
2229
 
          fi
2230
 
          if test "X$found_dir" != "X"; then
2231
 
            dnl Found the library.
2232
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
2233
 
            if test "X$found_so" != "X"; then
2234
 
              dnl Linking with a shared library. We attempt to hardcode its
2235
 
              dnl directory into the executable's runpath, unless it's the
2236
 
              dnl standard /usr/lib.
2237
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
2238
 
                dnl No hardcoding is needed.
2239
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2240
 
              else
2241
 
                dnl Use an explicit option to hardcode DIR into the resulting
2242
 
                dnl binary.
2243
 
                dnl Potentially add DIR to ltrpathdirs.
2244
 
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2245
 
                haveit=
2246
 
                for x in $ltrpathdirs; do
2247
 
                  if test "X$x" = "X$found_dir"; then
2248
 
                    haveit=yes
2249
 
                    break
2250
 
                  fi
2251
 
                done
2252
 
                if test -z "$haveit"; then
2253
 
                  ltrpathdirs="$ltrpathdirs $found_dir"
2254
 
                fi
2255
 
                dnl The hardcoding into $LIBNAME is system dependent.
2256
 
                if test "$hardcode_direct" = yes; then
2257
 
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2258
 
                  dnl resulting binary.
2259
 
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2260
 
                else
2261
 
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
2262
 
                    dnl Use an explicit option to hardcode DIR into the resulting
2263
 
                    dnl binary.
2264
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2265
 
                    dnl Potentially add DIR to rpathdirs.
2266
 
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
2267
 
                    haveit=
2268
 
                    for x in $rpathdirs; do
2269
 
                      if test "X$x" = "X$found_dir"; then
2270
 
                        haveit=yes
2271
 
                        break
2272
 
                      fi
2273
 
                    done
2274
 
                    if test -z "$haveit"; then
2275
 
                      rpathdirs="$rpathdirs $found_dir"
2276
 
                    fi
2277
 
                  else
2278
 
                    dnl Rely on "-L$found_dir".
2279
 
                    dnl But don't add it if it's already contained in the LDFLAGS
2280
 
                    dnl or the already constructed $LIBNAME
2281
 
                    haveit=
2282
 
                    for x in $LDFLAGS $LIB[]NAME; do
2283
 
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2284
 
                      if test "X$x" = "X-L$found_dir"; then
2285
 
                        haveit=yes
2286
 
                        break
2287
 
                      fi
2288
 
                    done
2289
 
                    if test -z "$haveit"; then
2290
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2291
 
                    fi
2292
 
                    if test "$hardcode_minus_L" != no; then
2293
 
                      dnl FIXME: Not sure whether we should use
2294
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2295
 
                      dnl here.
2296
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2297
 
                    else
2298
 
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
2299
 
                      dnl here, because this doesn't fit in flags passed to the
2300
 
                      dnl compiler. So give up. No hardcoding. This affects only
2301
 
                      dnl very old systems.
2302
 
                      dnl FIXME: Not sure whether we should use
2303
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2304
 
                      dnl here.
2305
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2306
 
                    fi
2307
 
                  fi
2308
 
                fi
2309
 
              fi
2310
 
            else
2311
 
              if test "X$found_a" != "X"; then
2312
 
                dnl Linking with a static library.
2313
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2314
 
              else
2315
 
                dnl We shouldn't come here, but anyway it's good to have a
2316
 
                dnl fallback.
2317
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2318
 
              fi
2319
 
            fi
2320
 
            dnl Assume the include files are nearby.
2321
 
            additional_includedir=
2322
 
            case "$found_dir" in
2323
 
              */lib | */lib/)
2324
 
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
2325
 
                additional_includedir="$basedir/include"
2326
 
                ;;
2327
 
            esac
2328
 
            if test "X$additional_includedir" != "X"; then
2329
 
              dnl Potentially add $additional_includedir to $INCNAME.
2330
 
              dnl But don't add it
2331
 
              dnl   1. if it's the standard /usr/include,
2332
 
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
2333
 
              dnl   3. if it's already present in $CPPFLAGS or the already
2334
 
              dnl      constructed $INCNAME,
2335
 
              dnl   4. if it doesn't exist as a directory.
2336
 
              if test "X$additional_includedir" != "X/usr/include"; then
2337
 
                haveit=
2338
 
                if test "X$additional_includedir" = "X/usr/local/include"; then
2339
 
                  if test -n "$GCC"; then
2340
 
                    case $host_os in
2341
 
                      linux*) haveit=yes;;
2342
 
                    esac
2343
 
                  fi
2344
 
                fi
2345
 
                if test -z "$haveit"; then
2346
 
                  for x in $CPPFLAGS $INC[]NAME; do
2347
 
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2348
 
                    if test "X$x" = "X-I$additional_includedir"; then
2349
 
                      haveit=yes
2350
 
                      break
2351
 
                    fi
2352
 
                  done
2353
 
                  if test -z "$haveit"; then
2354
 
                    if test -d "$additional_includedir"; then
2355
 
                      dnl Really add $additional_includedir to $INCNAME.
2356
 
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2357
 
                    fi
2358
 
                  fi
2359
 
                fi
2360
 
              fi
2361
 
            fi
2362
 
            dnl Look for dependencies.
2363
 
            if test -n "$found_la"; then
2364
 
              dnl Read the .la file. It defines the variables
2365
 
              dnl dlname, library_names, old_library, dependency_libs, current,
2366
 
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
2367
 
              save_libdir="$libdir"
2368
 
              case "$found_la" in
2369
 
                */* | *\\*) . "$found_la" ;;
2370
 
                *) . "./$found_la" ;;
2371
 
              esac
2372
 
              libdir="$save_libdir"
2373
 
              dnl We use only dependency_libs.
2374
 
              for dep in $dependency_libs; do
2375
 
                case "$dep" in
2376
 
                  -L*)
2377
 
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2378
 
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2379
 
                    dnl But don't add it
2380
 
                    dnl   1. if it's the standard /usr/lib,
2381
 
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
2382
 
                    dnl   3. if it's already present in $LDFLAGS or the already
2383
 
                    dnl      constructed $LIBNAME,
2384
 
                    dnl   4. if it doesn't exist as a directory.
2385
 
                    if test "X$additional_libdir" != "X/usr/lib"; then
2386
 
                      haveit=
2387
 
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
2388
 
                        if test -n "$GCC"; then
2389
 
                          case $host_os in
2390
 
                            linux*) haveit=yes;;
2391
 
                          esac
2392
 
                        fi
2393
 
                      fi
2394
 
                      if test -z "$haveit"; then
2395
 
                        haveit=
2396
 
                        for x in $LDFLAGS $LIB[]NAME; do
2397
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2398
 
                          if test "X$x" = "X-L$additional_libdir"; then
2399
 
                            haveit=yes
2400
 
                            break
2401
 
                          fi
2402
 
                        done
2403
 
                        if test -z "$haveit"; then
2404
 
                          if test -d "$additional_libdir"; then
2405
 
                            dnl Really add $additional_libdir to $LIBNAME.
2406
 
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2407
 
                          fi
2408
 
                        fi
2409
 
                        haveit=
2410
 
                        for x in $LDFLAGS $LTLIB[]NAME; do
2411
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2412
 
                          if test "X$x" = "X-L$additional_libdir"; then
2413
 
                            haveit=yes
2414
 
                            break
2415
 
                          fi
2416
 
                        done
2417
 
                        if test -z "$haveit"; then
2418
 
                          if test -d "$additional_libdir"; then
2419
 
                            dnl Really add $additional_libdir to $LTLIBNAME.
2420
 
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2421
 
                          fi
2422
 
                        fi
2423
 
                      fi
2424
 
                    fi
2425
 
                    ;;
2426
 
                  -R*)
2427
 
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
2428
 
                    if test "$enable_rpath" != no; then
2429
 
                      dnl Potentially add DIR to rpathdirs.
2430
 
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
2431
 
                      haveit=
2432
 
                      for x in $rpathdirs; do
2433
 
                        if test "X$x" = "X$dir"; then
2434
 
                          haveit=yes
2435
 
                          break
2436
 
                        fi
2437
 
                      done
2438
 
                      if test -z "$haveit"; then
2439
 
                        rpathdirs="$rpathdirs $dir"
2440
 
                      fi
2441
 
                      dnl Potentially add DIR to ltrpathdirs.
2442
 
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2443
 
                      haveit=
2444
 
                      for x in $ltrpathdirs; do
2445
 
                        if test "X$x" = "X$dir"; then
2446
 
                          haveit=yes
2447
 
                          break
2448
 
                        fi
2449
 
                      done
2450
 
                      if test -z "$haveit"; then
2451
 
                        ltrpathdirs="$ltrpathdirs $dir"
2452
 
                      fi
2453
 
                    fi
2454
 
                    ;;
2455
 
                  -l*)
2456
 
                    dnl Handle this in the next round.
2457
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2458
 
                    ;;
2459
 
                  *.la)
2460
 
                    dnl Handle this in the next round. Throw away the .la's
2461
 
                    dnl directory; it is already contained in a preceding -L
2462
 
                    dnl option.
2463
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2464
 
                    ;;
2465
 
                  *)
2466
 
                    dnl Most likely an immediate library name.
2467
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2468
 
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2469
 
                    ;;
2470
 
                esac
2471
 
              done
2472
 
            fi
2473
 
          else
2474
 
            dnl Didn't find the library; assume it is in the system directories
2475
 
            dnl known to the linker and runtime loader. (All the system
2476
 
            dnl directories known to the linker should also be known to the
2477
 
            dnl runtime loader, otherwise the system is severely misconfigured.)
2478
 
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2479
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2480
 
          fi
2481
 
        fi
2482
 
      fi
2483
 
    done
2484
 
  done
2485
 
  if test "X$rpathdirs" != "X"; then
2486
 
    if test -n "$hardcode_libdir_separator"; then
2487
 
      dnl Weird platform: only the last -rpath option counts, the user must
2488
 
      dnl pass all path elements in one option. We can arrange that for a
2489
 
      dnl single library, but not when more than one $LIBNAMEs are used.
2490
 
      alldirs=
2491
 
      for found_dir in $rpathdirs; do
2492
 
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2493
 
      done
2494
 
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2495
 
      acl_save_libdir="$libdir"
2496
 
      libdir="$alldirs"
2497
 
      eval flag=\"$hardcode_libdir_flag_spec\"
2498
 
      libdir="$acl_save_libdir"
2499
 
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2500
 
    else
2501
 
      dnl The -rpath options are cumulative.
2502
 
      for found_dir in $rpathdirs; do
2503
 
        acl_save_libdir="$libdir"
2504
 
        libdir="$found_dir"
2505
 
        eval flag=\"$hardcode_libdir_flag_spec\"
2506
 
        libdir="$acl_save_libdir"
2507
 
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2508
 
      done
2509
 
    fi
2510
 
  fi
2511
 
  if test "X$ltrpathdirs" != "X"; then
2512
 
    dnl When using libtool, the option that works for both libraries and
2513
 
    dnl executables is -R. The -R options are cumulative.
2514
 
    for found_dir in $ltrpathdirs; do
2515
 
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2516
 
    done
2517
 
  fi
2518
 
])
2519
 
 
2520
 
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2521
 
dnl unless already present in VAR.
2522
 
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2523
 
dnl contains two or three consecutive elements that belong together.
2524
 
AC_DEFUN([AC_LIB_APPENDTOVAR],
2525
 
[
2526
 
  for element in [$2]; do
2527
 
    haveit=
2528
 
    for x in $[$1]; do
2529
 
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2530
 
      if test "X$x" = "X$element"; then
2531
 
        haveit=yes
2532
 
        break
2533
 
      fi
2534
 
    done
2535
 
    if test -z "$haveit"; then
2536
 
      [$1]="${[$1]}${[$1]:+ }$element"
2537
 
    fi
2538
 
  done
2539
 
])
2540
 
 
2541
 
# lib-ld.m4 serial 1 (gettext-0.11)
2542
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2543
 
dnl This file is free software, distributed under the terms of the GNU
2544
 
dnl General Public License.  As a special exception to the GNU General
2545
 
dnl Public License, this file may be distributed as part of a program
2546
 
dnl that contains a configuration script generated by Autoconf, under
2547
 
dnl the same distribution terms as the rest of that program.
2548
 
 
2549
 
dnl Subroutines of libtool.m4,
2550
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2551
 
dnl with libtool.m4.
2552
 
 
2553
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2554
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
2555
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2556
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2557
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2558
 
  acl_cv_prog_gnu_ld=yes
2559
 
else
2560
 
  acl_cv_prog_gnu_ld=no
2561
 
fi])
2562
 
with_gnu_ld=$acl_cv_prog_gnu_ld
2563
 
])
2564
 
 
2565
 
dnl From libtool-1.4. Sets the variable LD.
2566
 
AC_DEFUN([AC_LIB_PROG_LD],
2567
 
[AC_ARG_WITH(gnu-ld,
2568
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
2569
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2570
 
AC_REQUIRE([AC_PROG_CC])dnl
2571
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2572
 
ac_prog=ld
2573
 
if test "$GCC" = yes; then
2574
 
  # Check if gcc -print-prog-name=ld gives a path.
2575
 
  AC_MSG_CHECKING([for ld used by GCC])
2576
 
  case $host in
2577
 
  *-*-mingw*)
2578
 
    # gcc leaves a trailing carriage return which upsets mingw
2579
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2580
 
  *)
2581
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2582
 
  esac
2583
 
  case $ac_prog in
2584
 
    # Accept absolute paths.
2585
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
2586
 
      [re_direlt='/[^/][^/]*/\.\./']
2587
 
      # Canonicalize the path of ld
2588
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2589
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2590
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2591
 
      done
2592
 
      test -z "$LD" && LD="$ac_prog"
2593
 
      ;;
2594
 
  "")
2595
 
    # If it fails, then pretend we aren't using GCC.
2596
 
    ac_prog=ld
2597
 
    ;;
2598
 
  *)
2599
 
    # If it is relative, then search for the first ld in PATH.
2600
 
    with_gnu_ld=unknown
2601
 
    ;;
2602
 
  esac
2603
 
elif test "$with_gnu_ld" = yes; then
2604
 
  AC_MSG_CHECKING([for GNU ld])
2605
 
else
2606
 
  AC_MSG_CHECKING([for non-GNU ld])
2607
 
fi
2608
 
AC_CACHE_VAL(acl_cv_path_LD,
2609
 
[if test -z "$LD"; then
2610
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2611
 
  for ac_dir in $PATH; do
2612
 
    test -z "$ac_dir" && ac_dir=.
2613
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2614
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
2615
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
2616
 
      # but apparently some GNU ld's only accept -v.
2617
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
2618
 
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2619
 
        test "$with_gnu_ld" != no && break
2620
 
      else
2621
 
        test "$with_gnu_ld" != yes && break
2622
 
      fi
2623
 
    fi
2624
 
  done
2625
 
  IFS="$ac_save_ifs"
2626
 
else
2627
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
2628
 
fi])
2629
 
LD="$acl_cv_path_LD"
2630
 
if test -n "$LD"; then
2631
 
  AC_MSG_RESULT($LD)
2632
 
else
2633
 
  AC_MSG_RESULT(no)
2634
 
fi
2635
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2636
 
AC_LIB_PROG_LD_GNU
2637
 
])
2638
 
 
2639
 
# iconv.m4 serial AM4 (gettext-0.11.3)
2640
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2641
 
dnl This file is free software, distributed under the terms of the GNU
2642
 
dnl General Public License.  As a special exception to the GNU General
2643
 
dnl Public License, this file may be distributed as part of a program
2644
 
dnl that contains a configuration script generated by Autoconf, under
2645
 
dnl the same distribution terms as the rest of that program.
2646
 
 
2647
 
dnl From Bruno Haible.
2648
 
 
2649
 
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2650
 
[
2651
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2652
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2653
 
  AC_REQUIRE([AC_LIB_RPATH])
2654
 
 
2655
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2656
 
  dnl accordingly.
2657
 
  AC_LIB_LINKFLAGS_BODY([iconv])
2658
 
])
2659
 
 
2660
 
AC_DEFUN([AM_ICONV_LINK],
2661
 
[
2662
 
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2663
 
  dnl those with the standalone portable GNU libiconv installed).
2664
 
 
2665
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2666
 
  dnl accordingly.
2667
 
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2668
 
 
2669
 
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2670
 
  dnl because if the user has installed libiconv and not disabled its use
2671
 
  dnl via --without-libiconv-prefix, he wants to use it. The first
2672
 
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2673
 
  am_save_CPPFLAGS="$CPPFLAGS"
2674
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2675
 
 
2676
 
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2677
 
    am_cv_func_iconv="no, consider installing GNU libiconv"
2678
 
    am_cv_lib_iconv=no
2679
 
    AC_TRY_LINK([#include <stdlib.h>
2680
 
#include <iconv.h>],
2681
 
      [iconv_t cd = iconv_open("","");
2682
 
       iconv(cd,NULL,NULL,NULL,NULL);
2683
 
       iconv_close(cd);],
2684
 
      am_cv_func_iconv=yes)
2685
 
    if test "$am_cv_func_iconv" != yes; then
2686
 
      am_save_LIBS="$LIBS"
2687
 
      LIBS="$LIBS $LIBICONV"
2688
 
      AC_TRY_LINK([#include <stdlib.h>
2689
 
#include <iconv.h>],
2690
 
        [iconv_t cd = iconv_open("","");
2691
 
         iconv(cd,NULL,NULL,NULL,NULL);
2692
 
         iconv_close(cd);],
2693
 
        am_cv_lib_iconv=yes
2694
 
        am_cv_func_iconv=yes)
2695
 
      LIBS="$am_save_LIBS"
2696
 
    fi
2697
 
  ])
2698
 
  if test "$am_cv_func_iconv" = yes; then
2699
 
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2700
 
  fi
2701
 
  if test "$am_cv_lib_iconv" = yes; then
2702
 
    AC_MSG_CHECKING([how to link with libiconv])
2703
 
    AC_MSG_RESULT([$LIBICONV])
2704
 
  else
2705
 
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2706
 
    dnl either.
2707
 
    CPPFLAGS="$am_save_CPPFLAGS"
2708
 
    LIBICONV=
2709
 
    LTLIBICONV=
2710
 
  fi
2711
 
  AC_SUBST(LIBICONV)
2712
 
  AC_SUBST(LTLIBICONV)
2713
 
])
2714
 
 
2715
 
AC_DEFUN([AM_ICONV],
2716
 
[
2717
 
  AM_ICONV_LINK
2718
 
  if test "$am_cv_func_iconv" = yes; then
2719
 
    AC_MSG_CHECKING([for iconv declaration])
2720
 
    AC_CACHE_VAL(am_cv_proto_iconv, [
2721
 
      AC_TRY_COMPILE([
2722
 
#include <stdlib.h>
2723
 
#include <iconv.h>
2724
 
extern
2725
 
#ifdef __cplusplus
2726
 
"C"
2727
 
#endif
2728
 
#if defined(__STDC__) || defined(__cplusplus)
2729
 
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2730
 
#else
2731
 
size_t iconv();
2732
 
#endif
2733
 
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2734
 
      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);"])
2735
 
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2736
 
    AC_MSG_RESULT([$]{ac_t:-
2737
 
         }[$]am_cv_proto_iconv)
2738
 
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2739
 
      [Define as const if the declaration of iconv() needs const.])
2740
 
  fi
2741
 
])
2742
 
 
2743
 
# progtest.m4 serial 2 (gettext-0.10.40)
2744
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2745
 
dnl This file is free software, distributed under the terms of the GNU
2746
 
dnl General Public License.  As a special exception to the GNU General
2747
 
dnl Public License, this file may be distributed as part of a program
2748
 
dnl that contains a configuration script generated by Autoconf, under
2749
 
dnl the same distribution terms as the rest of that program.
2750
 
dnl
2751
 
dnl This file can can be used in projects which are not available under
2752
 
dnl the GNU General Public License or the GNU Library General Public
2753
 
dnl License but which still want to provide support for the GNU gettext
2754
 
dnl functionality.
2755
 
dnl Please note that the actual code of the GNU gettext library is covered
2756
 
dnl by the GNU Library General Public License, and the rest of the GNU
2757
 
dnl gettext package package is covered by the GNU General Public License.
2758
 
dnl They are *not* in the public domain.
2759
 
 
2760
 
dnl Authors:
2761
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
2762
 
 
2763
 
# Search path for a program which passes the given test.
2764
 
 
2765
 
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2766
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2767
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2768
 
[# Extract the first word of "$2", so it can be a program name with args.
2769
 
set dummy $2; ac_word=[$]2
2770
 
AC_MSG_CHECKING([for $ac_word])
2771
 
AC_CACHE_VAL(ac_cv_path_$1,
2772
 
[case "[$]$1" in
2773
 
  /*)
2774
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2775
 
  ;;
2776
 
  *)
2777
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2778
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
2779
 
    test -z "$ac_dir" && ac_dir=.
2780
 
    if test -f $ac_dir/$ac_word; then
2781
 
      if [$3]; then
2782
 
        ac_cv_path_$1="$ac_dir/$ac_word"
2783
 
        break
2784
 
      fi
2785
 
    fi
2786
 
  done
2787
 
  IFS="$ac_save_ifs"
2788
 
dnl If no 4th arg is given, leave the cache variable unset,
2789
 
dnl so AC_PATH_PROGS will keep looking.
2790
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2791
 
])dnl
2792
 
  ;;
2793
 
esac])dnl
2794
 
$1="$ac_cv_path_$1"
2795
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2796
 
  AC_MSG_RESULT([$]$1)
2797
 
else
2798
 
  AC_MSG_RESULT(no)
2799
 
fi
2800
 
AC_SUBST($1)dnl
2801
 
])
2802
 
 
2803
 
# isc-posix.m4 serial 2 (gettext-0.11.2)
2804
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2805
 
dnl This file is free software, distributed under the terms of the GNU
2806
 
dnl General Public License.  As a special exception to the GNU General
2807
 
dnl Public License, this file may be distributed as part of a program
2808
 
dnl that contains a configuration script generated by Autoconf, under
2809
 
dnl the same distribution terms as the rest of that program.
2810
 
 
2811
 
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
2812
 
 
2813
 
# This test replaces the one in autoconf.
2814
 
# Currently this macro should have the same name as the autoconf macro
2815
 
# because gettext's gettext.m4 (distributed in the automake package)
2816
 
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
2817
 
# give these diagnostics:
2818
 
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2819
 
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2820
 
 
2821
 
undefine([AC_ISC_POSIX])
2822
 
 
2823
 
AC_DEFUN([AC_ISC_POSIX],
2824
 
  [
2825
 
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2826
 
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2827
 
  ]
2828
 
)
2829
 
 
2830
 
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2831
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2832
 
dnl This file is free software, distributed under the terms of the GNU
2833
 
dnl General Public License.  As a special exception to the GNU General
2834
 
dnl Public License, this file may be distributed as part of a program
2835
 
dnl that contains a configuration script generated by Autoconf, under
2836
 
dnl the same distribution terms as the rest of that program.
2837
 
 
2838
 
# Test for the GNU C Library, version 2.1 or newer.
2839
 
# From Bruno Haible.
2840
 
 
2841
 
AC_DEFUN([jm_GLIBC21],
2842
 
  [
2843
 
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2844
 
      ac_cv_gnu_library_2_1,
2845
 
      [AC_EGREP_CPP([Lucky GNU user],
2846
 
        [
2847
 
#include <features.h>
2848
 
#ifdef __GNU_LIBRARY__
2849
 
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2850
 
  Lucky GNU user
2851
 
 #endif
2852
 
#endif
2853
 
        ],
2854
 
        ac_cv_gnu_library_2_1=yes,
2855
 
        ac_cv_gnu_library_2_1=no)
2856
 
      ]
2857
 
    )
2858
 
    AC_SUBST(GLIBC21)
2859
 
    GLIBC21="$ac_cv_gnu_library_2_1"
2860
 
  ]
2861
 
)
2862
 
 
2863
 
# intdiv0.m4 serial 1 (gettext-0.11.3)
2864
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
2865
 
dnl This file is free software, distributed under the terms of the GNU
2866
 
dnl General Public License.  As a special exception to the GNU General
2867
 
dnl Public License, this file may be distributed as part of a program
2868
 
dnl that contains a configuration script generated by Autoconf, under
2869
 
dnl the same distribution terms as the rest of that program.
2870
 
 
2871
 
dnl From Bruno Haible.
2872
 
 
2873
 
AC_DEFUN([gt_INTDIV0],
2874
 
[
2875
 
  AC_REQUIRE([AC_PROG_CC])dnl
2876
 
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
2877
 
 
2878
 
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2879
 
    gt_cv_int_divbyzero_sigfpe,
2880
 
    [
2881
 
      AC_TRY_RUN([
2882
 
#include <stdlib.h>
2883
 
#include <signal.h>
2884
 
 
2885
 
static void
2886
 
#ifdef __cplusplus
2887
 
sigfpe_handler (int sig)
2888
 
#else
2889
 
sigfpe_handler (sig) int sig;
2890
 
#endif
2891
 
{
2892
 
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
2893
 
  exit (sig != SIGFPE);
2894
 
}
2895
 
 
2896
 
int x = 1;
2897
 
int y = 0;
2898
 
int z;
2899
 
int nan;
2900
 
 
2901
 
int main ()
2902
 
{
2903
 
  signal (SIGFPE, sigfpe_handler);
2904
 
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
2905
 
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2906
 
  signal (SIGTRAP, sigfpe_handler);
2907
 
#endif
2908
 
/* Linux/SPARC yields signal SIGILL.  */
2909
 
#if defined (__sparc__) && defined (__linux__)
2910
 
  signal (SIGILL, sigfpe_handler);
2911
 
#endif
2912
 
 
2913
 
  z = x / y;
2914
 
  nan = y / y;
2915
 
  exit (1);
2916
 
}
2917
 
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2918
 
        [
2919
 
          # Guess based on the CPU.
2920
 
          case "$host_cpu" in
2921
 
            alpha* | i[34567]86 | m68k | s390*)
2922
 
              gt_cv_int_divbyzero_sigfpe="guessing yes";;
2923
 
            *)
2924
 
              gt_cv_int_divbyzero_sigfpe="guessing no";;
2925
 
          esac
2926
 
        ])
2927
 
    ])
2928
 
  case "$gt_cv_int_divbyzero_sigfpe" in
2929
 
    *yes) value=1;;
2930
 
    *) value=0;;
2931
 
  esac
2932
 
  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2933
 
    [Define if integer division by zero raises signal SIGFPE.])
2934
 
])
2935
 
 
2936
 
# uintmax_t.m4 serial 7 (gettext-0.11.6)
2937
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2938
 
dnl This file is free software, distributed under the terms of the GNU
2939
 
dnl General Public License.  As a special exception to the GNU General
2940
 
dnl Public License, this file may be distributed as part of a program
2941
 
dnl that contains a configuration script generated by Autoconf, under
2942
 
dnl the same distribution terms as the rest of that program.
2943
 
 
2944
 
dnl From Paul Eggert.
2945
 
 
2946
 
AC_PREREQ(2.13)
2947
 
 
2948
 
# Define uintmax_t to 'unsigned long' or 'unsigned long long'
2949
 
# if it is not already defined in <stdint.h> or <inttypes.h>.
2950
 
 
2951
 
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2952
 
[
2953
 
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2954
 
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2955
 
  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2956
 
    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2957
 
    test $ac_cv_type_unsigned_long_long = yes \
2958
 
      && ac_type='unsigned long long' \
2959
 
      || ac_type='unsigned long'
2960
 
    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2961
 
      [Define to unsigned long or unsigned long long
2962
 
       if <stdint.h> and <inttypes.h> don't define.])
2963
 
  else
2964
 
    AC_DEFINE(HAVE_UINTMAX_T, 1,
2965
 
      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
2966
 
  fi
2967
 
])
2968
 
 
2969
 
# inttypes_h.m4 serial 5 (gettext-0.11.6)
2970
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2971
 
dnl This file is free software, distributed under the terms of the GNU
2972
 
dnl General Public License.  As a special exception to the GNU General
2973
 
dnl Public License, this file may be distributed as part of a program
2974
 
dnl that contains a configuration script generated by Autoconf, under
2975
 
dnl the same distribution terms as the rest of that program.
2976
 
 
2977
 
dnl From Paul Eggert.
2978
 
 
2979
 
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2980
 
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2981
 
 
2982
 
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2983
 
[
2984
 
  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2985
 
  [AC_TRY_COMPILE(
2986
 
    [#include <sys/types.h>
2987
 
#include <inttypes.h>],
2988
 
    [uintmax_t i = (uintmax_t) -1;],
2989
 
    jm_ac_cv_header_inttypes_h=yes,
2990
 
    jm_ac_cv_header_inttypes_h=no)])
2991
 
  if test $jm_ac_cv_header_inttypes_h = yes; then
2992
 
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2993
 
      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2994
 
       and declares uintmax_t. ])
2995
 
  fi
2996
 
])
2997
 
 
2998
 
# stdint_h.m4 serial 3 (gettext-0.11.6)
2999
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3000
 
dnl This file is free software, distributed under the terms of the GNU
3001
 
dnl General Public License.  As a special exception to the GNU General
3002
 
dnl Public License, this file may be distributed as part of a program
3003
 
dnl that contains a configuration script generated by Autoconf, under
3004
 
dnl the same distribution terms as the rest of that program.
3005
 
 
3006
 
dnl From Paul Eggert.
3007
 
 
3008
 
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
3009
 
# doesn't clash with <sys/types.h>, and declares uintmax_t.
3010
 
 
3011
 
AC_DEFUN([jm_AC_HEADER_STDINT_H],
3012
 
[
3013
 
  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
3014
 
  [AC_TRY_COMPILE(
3015
 
    [#include <sys/types.h>
3016
 
#include <stdint.h>],
3017
 
    [uintmax_t i = (uintmax_t) -1;],
3018
 
    jm_ac_cv_header_stdint_h=yes,
3019
 
    jm_ac_cv_header_stdint_h=no)])
3020
 
  if test $jm_ac_cv_header_stdint_h = yes; then
3021
 
    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
3022
 
      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
3023
 
       and declares uintmax_t. ])
3024
 
  fi
3025
 
])
3026
 
 
3027
 
# ulonglong.m4 serial 3
3028
 
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
3029
 
dnl This file is free software, distributed under the terms of the GNU
3030
 
dnl General Public License.  As a special exception to the GNU General
3031
 
dnl Public License, this file may be distributed as part of a program
3032
 
dnl that contains a configuration script generated by Autoconf, under
3033
 
dnl the same distribution terms as the rest of that program.
3034
 
 
3035
 
dnl From Paul Eggert.
3036
 
 
3037
 
# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
3038
 
 
3039
 
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
3040
 
[
3041
 
  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
3042
 
  [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
3043
 
    [unsigned long long ullmax = (unsigned long long) -1;
3044
 
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
3045
 
    ac_cv_type_unsigned_long_long=yes,
3046
 
    ac_cv_type_unsigned_long_long=no)])
3047
 
  if test $ac_cv_type_unsigned_long_long = yes; then
3048
 
    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
3049
 
      [Define if you have the 'unsigned long long' type.])
3050
 
  fi
3051
 
])
3052
 
 
3053
 
# inttypes.m4 serial 1 (gettext-0.11.4)
3054
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3055
 
dnl This file is free software, distributed under the terms of the GNU
3056
 
dnl General Public License.  As a special exception to the GNU General
3057
 
dnl Public License, this file may be distributed as part of a program
3058
 
dnl that contains a configuration script generated by Autoconf, under
3059
 
dnl the same distribution terms as the rest of that program.
3060
 
 
3061
 
dnl From Paul Eggert.
3062
 
 
3063
 
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
3064
 
# <sys/types.h>.
3065
 
 
3066
 
AC_DEFUN([gt_HEADER_INTTYPES_H],
3067
 
[
3068
 
  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
3069
 
  [
3070
 
    AC_TRY_COMPILE(
3071
 
      [#include <sys/types.h>
3072
 
#include <inttypes.h>],
3073
 
      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
3074
 
  ])
3075
 
  if test $gt_cv_header_inttypes_h = yes; then
3076
 
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
3077
 
      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
3078
 
  fi
3079
 
])
3080
 
 
3081
 
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
3082
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3083
 
dnl This file is free software, distributed under the terms of the GNU
3084
 
dnl General Public License.  As a special exception to the GNU General
3085
 
dnl Public License, this file may be distributed as part of a program
3086
 
dnl that contains a configuration script generated by Autoconf, under
3087
 
dnl the same distribution terms as the rest of that program.
3088
 
 
3089
 
dnl From Bruno Haible.
3090
 
 
3091
 
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
3092
 
# macros to non-string values.  This is the case on AIX 4.3.3.
3093
 
 
3094
 
AC_DEFUN([gt_INTTYPES_PRI],
3095
 
[
3096
 
  AC_REQUIRE([gt_HEADER_INTTYPES_H])
3097
 
  if test $gt_cv_header_inttypes_h = yes; then
3098
 
    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
3099
 
      gt_cv_inttypes_pri_broken,
3100
 
      [
3101
 
        AC_TRY_COMPILE([#include <inttypes.h>
3102
 
#ifdef PRId32
3103
 
char *p = PRId32;
3104
 
#endif
3105
 
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
3106
 
      ])
3107
 
  fi
3108
 
  if test "$gt_cv_inttypes_pri_broken" = yes; then
3109
 
    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
3110
 
      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
3111
 
  fi
3112
 
])
3113
 
 
3114
 
# codeset.m4 serial AM1 (gettext-0.10.40)
3115
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3116
 
dnl This file is free software, distributed under the terms of the GNU
3117
 
dnl General Public License.  As a special exception to the GNU General
3118
 
dnl Public License, this file may be distributed as part of a program
3119
 
dnl that contains a configuration script generated by Autoconf, under
3120
 
dnl the same distribution terms as the rest of that program.
3121
 
 
3122
 
dnl From Bruno Haible.
3123
 
 
3124
 
AC_DEFUN([AM_LANGINFO_CODESET],
3125
 
[
3126
 
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
3127
 
    [AC_TRY_LINK([#include <langinfo.h>],
3128
 
      [char* cs = nl_langinfo(CODESET);],
3129
 
      am_cv_langinfo_codeset=yes,
3130
 
      am_cv_langinfo_codeset=no)
3131
 
    ])
3132
 
  if test $am_cv_langinfo_codeset = yes; then
3133
 
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
3134
 
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
3135
 
  fi
3136
 
])
3137
 
 
3138
 
# lcmessage.m4 serial 3 (gettext-0.11.3)
3139
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
3140
 
dnl This file is free software, distributed under the terms of the GNU
3141
 
dnl General Public License.  As a special exception to the GNU General
3142
 
dnl Public License, this file may be distributed as part of a program
3143
 
dnl that contains a configuration script generated by Autoconf, under
3144
 
dnl the same distribution terms as the rest of that program.
3145
 
dnl
3146
 
dnl This file can can be used in projects which are not available under
3147
 
dnl the GNU General Public License or the GNU Library General Public
3148
 
dnl License but which still want to provide support for the GNU gettext
3149
 
dnl functionality.
3150
 
dnl Please note that the actual code of the GNU gettext library is covered
3151
 
dnl by the GNU Library General Public License, and the rest of the GNU
3152
 
dnl gettext package package is covered by the GNU General Public License.
3153
 
dnl They are *not* in the public domain.
3154
 
 
3155
 
dnl Authors:
3156
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
3157
 
 
3158
 
# Check whether LC_MESSAGES is available in <locale.h>.
3159
 
 
3160
 
AC_DEFUN([AM_LC_MESSAGES],
3161
 
[
3162
 
  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3163
 
    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3164
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3165
 
  if test $am_cv_val_LC_MESSAGES = yes; then
3166
 
    AC_DEFINE(HAVE_LC_MESSAGES, 1,
3167
 
      [Define if your <locale.h> file defines LC_MESSAGES.])
3168
 
  fi
3169
 
])
3170
 
 
3171
 
# human.m4 serial 1
3172
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3173
 
dnl This file is free software, distributed under the terms of the GNU
3174
 
dnl General Public License.  As a special exception to the GNU General
3175
 
dnl Public License, this file may be distributed as part of a program
3176
 
dnl that contains a configuration script generated by Autoconf, under
3177
 
dnl the same distribution terms as the rest of that program.
3178
 
 
3179
 
AC_DEFUN([gl_HUMAN],
3180
 
[
3181
 
  dnl Prerequisites of lib/human.h.
3182
 
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
3183
 
 
3184
 
  dnl Prerequisites of lib/human.c.
3185
 
  AC_CHECK_HEADERS_ONCE(limits.h stdlib.h string.h)
3186
 
  AC_CHECK_DECLS_ONCE([getenv])
3187
 
])
3188
 
 
3189
 
# idcache.m4 serial 1
3190
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3191
 
dnl This file is free software, distributed under the terms of the GNU
3192
 
dnl General Public License.  As a special exception to the GNU General
3193
 
dnl Public License, this file may be distributed as part of a program
3194
 
dnl that contains a configuration script generated by Autoconf, under
3195
 
dnl the same distribution terms as the rest of that program.
3196
 
 
3197
 
AC_DEFUN([gl_IDCACHE],
3198
 
[
3199
 
  dnl Prerequisites of lib/idcache.c.
3200
 
  AC_REQUIRE([AC_HEADER_STDC])
3201
 
  AC_CHECK_HEADERS_ONCE(string.h unistd.h)
3202
 
])
3203
 
 
3204
 
#serial 8
3205
 
 
3206
 
dnl From Jim Meyering.
3207
 
dnl Determine whether lstat has the bug that it succeeds when given the
3208
 
dnl zero-length file name argument.  The lstat from SunOS4.1.4 and the Hurd
3209
 
dnl (as of 1998-11-01) do this.
3210
 
dnl
3211
 
dnl If it does, then define HAVE_LSTAT_EMPTY_STRING_BUG and arrange to
3212
 
dnl compile the wrapper function.
3213
 
dnl
3214
 
 
3215
 
AC_DEFUN([jm_FUNC_LSTAT],
3216
 
[
3217
 
  AC_FUNC_LSTAT
3218
 
  dnl Note: AC_FUNC_LSTAT does AC_LIBOBJ(lstat).
3219
 
  if test $ac_cv_func_lstat_empty_string_bug = yes; then
3220
 
    gl_PREREQ_LSTAT
3221
 
  fi
3222
 
])
3223
 
 
3224
 
# Prerequisites of lib/lstat.c.
3225
 
AC_DEFUN([gl_PREREQ_LSTAT],
3226
 
[
3227
 
  AC_REQUIRE([AC_HEADER_STAT])
3228
 
  AC_CHECK_HEADERS_ONCE(stdlib.h)
3229
 
  AC_CHECK_DECLS_ONCE(free)
3230
 
])
3231
 
 
3232
 
# malloc.m4 serial 7
3233
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3234
 
dnl This file is free software, distributed under the terms of the GNU
3235
 
dnl General Public License.  As a special exception to the GNU General
3236
 
dnl Public License, this file may be distributed as part of a program
3237
 
dnl that contains a configuration script generated by Autoconf, under
3238
 
dnl the same distribution terms as the rest of that program.
3239
 
 
3240
 
dnl From Jim Meyering.
3241
 
dnl Determine whether malloc accepts 0 as its argument.
3242
 
dnl If it doesn't, arrange to use the replacement function.
3243
 
 
3244
 
AC_DEFUN([jm_FUNC_MALLOC],
3245
 
[
3246
 
  AC_REQUIRE([AC_FUNC_MALLOC])
3247
 
  dnl autoconf < 2.57 used the symbol ac_cv_func_malloc_works.
3248
 
  if test X"$ac_cv_func_malloc_0_nonnull" = Xno || test X"$ac_cv_func_malloc_works" = Xno; then
3249
 
    gl_PREREQ_MALLOC
3250
 
  fi
3251
 
])
3252
 
 
3253
 
# Prerequisites of lib/malloc.c.
3254
 
AC_DEFUN([gl_PREREQ_MALLOC], [
3255
 
  :
3256
 
])
3257
 
 
3258
 
# memcmp.m4 serial 8
3259
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3260
 
dnl This file is free software, distributed under the terms of the GNU
3261
 
dnl General Public License.  As a special exception to the GNU General
3262
 
dnl Public License, this file may be distributed as part of a program
3263
 
dnl that contains a configuration script generated by Autoconf, under
3264
 
dnl the same distribution terms as the rest of that program.
3265
 
 
3266
 
AC_DEFUN([jm_FUNC_MEMCMP],
3267
 
[
3268
 
  AC_REQUIRE([AC_FUNC_MEMCMP])
3269
 
  if test $ac_cv_func_memcmp_working = no; then
3270
 
    AC_DEFINE(memcmp, rpl_memcmp,
3271
 
      [Define to rpl_memcmp if the replacement function should be used.])
3272
 
    gl_PREREQ_MEMCMP
3273
 
  fi
3274
 
])
3275
 
 
3276
 
# Prerequisites of lib/memcmp.c.
3277
 
AC_DEFUN([gl_PREREQ_MEMCMP], [
3278
 
  AC_CHECK_HEADERS_ONCE(string.h)
3279
 
])
3280
 
 
3281
 
# memset.m4 serial 1
3282
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3283
 
dnl This file is free software, distributed under the terms of the GNU
3284
 
dnl General Public License.  As a special exception to the GNU General
3285
 
dnl Public License, this file may be distributed as part of a program
3286
 
dnl that contains a configuration script generated by Autoconf, under
3287
 
dnl the same distribution terms as the rest of that program.
3288
 
 
3289
 
AC_DEFUN([gl_FUNC_MEMSET],
3290
 
[
3291
 
  AC_REPLACE_FUNCS(memset)
3292
 
  if test $ac_cv_func_memset = no; then
3293
 
    gl_PREREQ_MEMSET
3294
 
  fi
3295
 
])
3296
 
 
3297
 
# Prerequisites of lib/memset.c.
3298
 
AC_DEFUN([gl_PREREQ_MEMSET], [
3299
 
  :
3300
 
])
3301
 
 
3302
 
# mktime.m4 serial 1
3303
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3304
 
dnl This file is free software, distributed under the terms of the GNU
3305
 
dnl General Public License.  As a special exception to the GNU General
3306
 
dnl Public License, this file may be distributed as part of a program
3307
 
dnl that contains a configuration script generated by Autoconf, under
3308
 
dnl the same distribution terms as the rest of that program.
3309
 
 
3310
 
dnl From Jim Meyering.
3311
 
 
3312
 
AC_DEFUN([gl_FUNC_MKTIME],
3313
 
[
3314
 
  AC_REQUIRE([AC_FUNC_MKTIME])
3315
 
  if test $ac_cv_func_working_mktime = no; then
3316
 
    AC_DEFINE(mktime, rpl_mktime,
3317
 
      [Define to rpl_mktime if the replacement function should be used.])
3318
 
    gl_PREREQ_MKTIME
3319
 
  fi
3320
 
])
3321
 
 
3322
 
# Prerequisites of lib/mktime.c.
3323
 
AC_DEFUN([gl_PREREQ_MKTIME], [
3324
 
  AC_REQUIRE([AC_HEADER_STDC])
3325
 
  AC_CHECK_HEADERS_ONCE(limits.h)
3326
 
])
3327
 
 
3328
 
# modechange.m4 serial 1
3329
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3330
 
dnl This file is free software, distributed under the terms of the GNU
3331
 
dnl General Public License.  As a special exception to the GNU General
3332
 
dnl Public License, this file may be distributed as part of a program
3333
 
dnl that contains a configuration script generated by Autoconf, under
3334
 
dnl the same distribution terms as the rest of that program.
3335
 
 
3336
 
AC_DEFUN([gl_MODECHANGE],
3337
 
[
3338
 
  AC_REQUIRE([AC_HEADER_STDC])
3339
 
  AC_REQUIRE([AC_HEADER_STAT])
3340
 
])
3341
 
 
3342
 
# pathmax.m4 serial 1
3343
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3344
 
dnl This file is free software, distributed under the terms of the GNU
3345
 
dnl General Public License.  As a special exception to the GNU General
3346
 
dnl Public License, this file may be distributed as part of a program
3347
 
dnl that contains a configuration script generated by Autoconf, under
3348
 
dnl the same distribution terms as the rest of that program.
3349
 
 
3350
 
AC_DEFUN([gl_PATHMAX],
3351
 
[
3352
 
  dnl Prerequisites of lib/pathmax.h.
3353
 
  AC_CHECK_HEADERS_ONCE(limits.h sys/param.h unistd.h)
3354
 
])
3355
 
 
3356
 
# quote.m4 serial 1
3357
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3358
 
dnl This file is free software, distributed under the terms of the GNU
3359
 
dnl General Public License.  As a special exception to the GNU General
3360
 
dnl Public License, this file may be distributed as part of a program
3361
 
dnl that contains a configuration script generated by Autoconf, under
3362
 
dnl the same distribution terms as the rest of that program.
3363
 
 
3364
 
AC_DEFUN([gl_QUOTE],
3365
 
[
3366
 
  dnl Prerequisites of lib/quote.c.
3367
 
  AC_CHECK_HEADERS_ONCE(stddef.h)
3368
 
])
3369
 
 
3370
 
# quotearg.m4 serial 1
3371
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3372
 
dnl This file is free software, distributed under the terms of the GNU
3373
 
dnl General Public License.  As a special exception to the GNU General
3374
 
dnl Public License, this file may be distributed as part of a program
3375
 
dnl that contains a configuration script generated by Autoconf, under
3376
 
dnl the same distribution terms as the rest of that program.
3377
 
 
3378
 
AC_DEFUN([gl_QUOTEARG],
3379
 
[
3380
 
  dnl Prerequisites of lib/quotearg.c.
3381
 
  AC_CHECK_HEADERS_ONCE(wchar.h wctype.h)
3382
 
  AC_CHECK_FUNCS_ONCE(iswprint mbsinit)
3383
 
  AC_TYPE_MBSTATE_T
3384
 
  jm_FUNC_MBRTOWC
3385
 
])
3386
 
 
3387
 
# mbstate_t.m4 serial 9
3388
 
dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3389
 
dnl This file is free software, distributed under the terms of the GNU
3390
 
dnl General Public License.  As a special exception to the GNU General
3391
 
dnl Public License, this file may be distributed as part of a program
3392
 
dnl that contains a configuration script generated by Autoconf, under
3393
 
dnl the same distribution terms as the rest of that program.
3394
 
 
3395
 
# From Paul Eggert.
3396
 
 
3397
 
# BeOS 5 has <wchar.h> but does not define mbstate_t,
3398
 
# so you can't declare an object of that type.
3399
 
# Check for this incompatibility with Standard C.
3400
 
 
3401
 
# AC_TYPE_MBSTATE_T
3402
 
# -----------------
3403
 
AC_DEFUN([AC_TYPE_MBSTATE_T],
3404
 
  [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
3405
 
     [AC_COMPILE_IFELSE(
3406
 
        [AC_LANG_PROGRAM(
3407
 
           [AC_INCLUDES_DEFAULT
3408
 
#           include <wchar.h>],
3409
 
           [mbstate_t x; return sizeof x;])],
3410
 
        [ac_cv_type_mbstate_t=yes],
3411
 
        [ac_cv_type_mbstate_t=no])])
3412
 
   if test $ac_cv_type_mbstate_t = yes; then
3413
 
     AC_DEFINE([HAVE_MBSTATE_T], 1,
3414
 
               [Define to 1 if <wchar.h> declares mbstate_t.])
3415
 
   else
3416
 
     AC_DEFINE([mbstate_t], int,
3417
 
               [Define to a type if <wchar.h> does not define.])
3418
 
   fi])
3419
 
 
3420
 
# mbrtowc.m4 serial 5
3421
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
3422
 
dnl This file is free software, distributed under the terms of the GNU
3423
 
dnl General Public License.  As a special exception to the GNU General
3424
 
dnl Public License, this file may be distributed as part of a program
3425
 
dnl that contains a configuration script generated by Autoconf, under
3426
 
dnl the same distribution terms as the rest of that program.
3427
 
 
3428
 
dnl From Paul Eggert
3429
 
 
3430
 
dnl This file can be removed, and jm_FUNC_MBRTOWC replaced with
3431
 
dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
3432
 
 
3433
 
AC_DEFUN([jm_FUNC_MBRTOWC],
3434
 
[
3435
 
  AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
3436
 
    jm_cv_func_mbrtowc,
3437
 
    [AC_TRY_LINK(
3438
 
       [#include <wchar.h>],
3439
 
       [mbstate_t state; return ! (sizeof state && mbrtowc);],
3440
 
       jm_cv_func_mbrtowc=yes,
3441
 
       jm_cv_func_mbrtowc=no)])
3442
 
  if test $jm_cv_func_mbrtowc = yes; then
3443
 
    AC_DEFINE(HAVE_MBRTOWC, 1,
3444
 
      [Define to 1 if mbrtowc and mbstate_t are properly declared.])
3445
 
  fi
3446
 
])
3447
 
 
3448
 
# realloc.m4 serial 7
3449
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3450
 
dnl This file is free software, distributed under the terms of the GNU
3451
 
dnl General Public License.  As a special exception to the GNU General
3452
 
dnl Public License, this file may be distributed as part of a program
3453
 
dnl that contains a configuration script generated by Autoconf, under
3454
 
dnl the same distribution terms as the rest of that program.
3455
 
 
3456
 
dnl From Jim Meyering.
3457
 
dnl Determine whether realloc works when both arguments are 0.
3458
 
dnl If it doesn't, arrange to use the replacement function.
3459
 
 
3460
 
AC_DEFUN([jm_FUNC_REALLOC],
3461
 
[
3462
 
  AC_REQUIRE([AC_FUNC_REALLOC])
3463
 
  dnl autoconf < 2.57 used the symbol ac_cv_func_realloc_works.
3464
 
  if test X"$ac_cv_func_realloc_0_nonnull" = Xno || test X"$ac_cv_func_realloc_works" = Xno; then
3465
 
    gl_PREREQ_REALLOC
3466
 
  fi
3467
 
])
3468
 
 
3469
 
# Prerequisites of lib/realloc.c.
3470
 
AC_DEFUN([gl_PREREQ_REALLOC], [
3471
 
  :
3472
 
])
3473
 
 
3474
 
#serial 15
3475
 
 
3476
 
dnl Initially derived from code in GNU grep.
3477
 
dnl Mostly written by Jim Meyering.
3478
 
 
3479
 
AC_DEFUN([gl_REGEX],
3480
 
[
3481
 
  jm_INCLUDED_REGEX([lib/regex.c])
3482
 
])
3483
 
 
3484
 
dnl Usage: jm_INCLUDED_REGEX([lib/regex.c])
3485
 
dnl
3486
 
AC_DEFUN([jm_INCLUDED_REGEX],
3487
 
  [
3488
 
    dnl Even packages that don't use regex.c can use this macro.
3489
 
    dnl Of course, for them it doesn't do anything.
3490
 
 
3491
 
    # Assume we'll default to using the included regex.c.
3492
 
    ac_use_included_regex=yes
3493
 
 
3494
 
    # However, if the system regex support is good enough that it passes the
3495
 
    # the following run test, then default to *not* using the included regex.c.
3496
 
    # If cross compiling, assume the test would fail and use the included
3497
 
    # regex.c.  The first failing regular expression is from `Spencer ere
3498
 
    # test #75' in grep-2.3.
3499
 
    AC_CACHE_CHECK([for working re_compile_pattern],
3500
 
                   jm_cv_func_working_re_compile_pattern,
3501
 
      AC_TRY_RUN(
3502
 
[#include <stdio.h>
3503
 
#include <string.h>
3504
 
#include <regex.h>
3505
 
          int
3506
 
          main ()
3507
 
          {
3508
 
            static struct re_pattern_buffer regex;
3509
 
            const char *s;
3510
 
            struct re_registers regs;
3511
 
            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
3512
 
            memset (&regex, 0, sizeof (regex));
3513
 
            [s = re_compile_pattern ("a[[:@:>@:]]b\n", 9, &regex);]
3514
 
            /* This should fail with _Invalid character class name_ error.  */
3515
 
            if (!s)
3516
 
              exit (1);
3517
 
 
3518
 
            /* This should succeed, but doesn't for e.g. glibc-2.1.3.  */
3519
 
            memset (&regex, 0, sizeof (regex));
3520
 
            s = re_compile_pattern ("{1", 2, &regex);
3521
 
 
3522
 
            if (s)
3523
 
              exit (1);
3524
 
 
3525
 
            /* The following example is derived from a problem report
3526
 
               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
3527
 
            memset (&regex, 0, sizeof (regex));
3528
 
            s = re_compile_pattern ("[[anļæ½]]*n", 7, &regex);
3529
 
            if (s)
3530
 
              exit (1);
3531
 
 
3532
 
            /* This should match, but doesn't for e.g. glibc-2.2.1.  */
3533
 
            if (re_match (&regex, "an", 2, 0, &regs) != 2)
3534
 
              exit (1);
3535
 
 
3536
 
            memset (&regex, 0, sizeof (regex));
3537
 
            s = re_compile_pattern ("x", 1, &regex);
3538
 
            if (s)
3539
 
              exit (1);
3540
 
 
3541
 
            /* The version of regex.c in e.g. GNU libc-2.2.93 didn't
3542
 
               work with a negative RANGE argument.  */
3543
 
            if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
3544
 
              exit (1);
3545
 
 
3546
 
            exit (0);
3547
 
          }
3548
 
        ],
3549
 
               jm_cv_func_working_re_compile_pattern=yes,
3550
 
               jm_cv_func_working_re_compile_pattern=no,
3551
 
               dnl When crosscompiling, assume it's broken.
3552
 
               jm_cv_func_working_re_compile_pattern=no))
3553
 
    if test $jm_cv_func_working_re_compile_pattern = yes; then
3554
 
      ac_use_included_regex=no
3555
 
    fi
3556
 
 
3557
 
    test -n "$1" || AC_MSG_ERROR([missing argument])
3558
 
    m4_syscmd([test -f $1])
3559
 
    ifelse(m4_sysval, 0,
3560
 
      [
3561
 
        AC_ARG_WITH(included-regex,
3562
 
        [  --without-included-regex don't compile regex; this is the default on
3563
 
                          systems with version 2 of the GNU C library
3564
 
                          (use with caution on other system)],
3565
 
                    jm_with_regex=$withval,
3566
 
                    jm_with_regex=$ac_use_included_regex)
3567
 
        if test "$jm_with_regex" = yes; then
3568
 
          AC_LIBOBJ(regex)
3569
 
          jm_PREREQ_REGEX
3570
 
        fi
3571
 
      ],
3572
 
    )
3573
 
  ]
3574
 
)
3575
 
 
3576
 
# Prerequisites of lib/regex.c.
3577
 
AC_DEFUN([jm_PREREQ_REGEX],
3578
 
[
3579
 
  dnl FIXME: Maybe provide a btowc replacement someday: solaris-2.5.1 lacks it.
3580
 
  dnl FIXME: Check for wctype and iswctype, and and add -lw if necessary
3581
 
  dnl to get them.
3582
 
 
3583
 
  dnl Persuade glibc <string.h> to declare mempcpy().
3584
 
  AC_REQUIRE([AC_GNU_SOURCE])
3585
 
 
3586
 
  AC_REQUIRE([AC_FUNC_ALLOCA])
3587
 
  AC_REQUIRE([AC_HEADER_STDC])
3588
 
  AC_CHECK_HEADERS_ONCE(limits.h string.h wchar.h wctype.h)
3589
 
  AC_CHECK_FUNCS_ONCE(isascii mempcpy)
3590
 
  AC_CHECK_FUNCS(btowc)
3591
 
])
3592
 
 
3593
 
# rpmatch.m4 serial 1
3594
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3595
 
dnl This file is free software, distributed under the terms of the GNU
3596
 
dnl General Public License.  As a special exception to the GNU General
3597
 
dnl Public License, this file may be distributed as part of a program
3598
 
dnl that contains a configuration script generated by Autoconf, under
3599
 
dnl the same distribution terms as the rest of that program.
3600
 
 
3601
 
AC_DEFUN([gl_FUNC_RPMATCH],
3602
 
[
3603
 
  AC_REPLACE_FUNCS(rpmatch)
3604
 
  if test $ac_cv_func_rpmatch = no; then
3605
 
    gl_PREREQ_RPMATCH
3606
 
  fi
3607
 
])
3608
 
 
3609
 
# Prerequisites of lib/rpmatch.c.
3610
 
AC_DEFUN([gl_PREREQ_RPMATCH], [
3611
 
  AC_REQUIRE([AC_HEADER_STDC])
3612
 
  AC_CHECK_HEADERS_ONCE(limits.h)
3613
 
])
3614
 
 
3615
 
 
3616
 
# savedir.m4 serial 1
3617
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3618
 
dnl This file is free software, distributed under the terms of the GNU
3619
 
dnl General Public License.  As a special exception to the GNU General
3620
 
dnl Public License, this file may be distributed as part of a program
3621
 
dnl that contains a configuration script generated by Autoconf, under
3622
 
dnl the same distribution terms as the rest of that program.
3623
 
 
3624
 
AC_DEFUN([gl_SAVEDIR],
3625
 
[
3626
 
  dnl Prerequisites of lib/savedir.c.
3627
 
  AC_REQUIRE([AC_HEADER_STDC])
3628
 
  AC_REQUIRE([AC_HEADER_DIRENT])
3629
 
  AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
3630
 
])
3631
 
 
3632
 
#serial 8
3633
 
 
3634
 
dnl From Jim Meyering.
3635
 
dnl Determine whether stat has the bug that it succeeds when given the
3636
 
dnl zero-length file name argument.  The stat from SunOS4.1.4 and the Hurd
3637
 
dnl (as of 1998-11-01) do this.
3638
 
dnl
3639
 
dnl If it does, then define HAVE_STAT_EMPTY_STRING_BUG and arrange to
3640
 
dnl compile the wrapper function.
3641
 
dnl
3642
 
 
3643
 
AC_DEFUN([jm_FUNC_STAT],
3644
 
[
3645
 
  AC_FUNC_STAT
3646
 
  dnl Note: AC_FUNC_STAT does AC_LIBOBJ(stat).
3647
 
  if test $ac_cv_func_stat_empty_string_bug = yes; then
3648
 
    gl_PREREQ_STAT
3649
 
  fi
3650
 
])
3651
 
 
3652
 
# Prerequisites of lib/stat.c.
3653
 
AC_DEFUN([gl_PREREQ_STAT],
3654
 
[
3655
 
  :
3656
 
])
3657
 
 
3658
 
# stpcpy.m4 serial 1
3659
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3660
 
dnl This file is free software, distributed under the terms of the GNU
3661
 
dnl General Public License.  As a special exception to the GNU General
3662
 
dnl Public License, this file may be distributed as part of a program
3663
 
dnl that contains a configuration script generated by Autoconf, under
3664
 
dnl the same distribution terms as the rest of that program.
3665
 
 
3666
 
AC_DEFUN([gl_FUNC_STPCPY],
3667
 
[
3668
 
  dnl Persuade glibc <string.h> to declare stpcpy().
3669
 
  AC_REQUIRE([AC_GNU_SOURCE])
3670
 
 
3671
 
  AC_REPLACE_FUNCS(stpcpy)
3672
 
  if test $ac_cv_func_stpcpy = no; then
3673
 
    gl_PREREQ_STPCPY
3674
 
  fi
3675
 
])
3676
 
 
3677
 
# Prerequisites of lib/stpcpy.c.
3678
 
AC_DEFUN([gl_PREREQ_STPCPY], [
3679
 
  :
3680
 
])
3681
 
 
3682
 
 
3683
 
# strdup.m4 serial 1
3684
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3685
 
dnl This file is free software, distributed under the terms of the GNU
3686
 
dnl General Public License.  As a special exception to the GNU General
3687
 
dnl Public License, this file may be distributed as part of a program
3688
 
dnl that contains a configuration script generated by Autoconf, under
3689
 
dnl the same distribution terms as the rest of that program.
3690
 
 
3691
 
AC_DEFUN([gl_FUNC_STRDUP],
3692
 
[
3693
 
  AC_REPLACE_FUNCS(strdup)
3694
 
  if test $ac_cv_func_strdup = no; then
3695
 
    gl_PREREQ_STRDUP
3696
 
  fi
3697
 
])
3698
 
 
3699
 
# Prerequisites of lib/strdup.c.
3700
 
AC_DEFUN([gl_PREREQ_STRDUP], [
3701
 
  AC_REQUIRE([AC_HEADER_STDC])
3702
 
  :
3703
 
])
3704
 
 
3705
 
 
3706
 
#serial 19
3707
 
 
3708
 
dnl This macro is intended to be used solely in this file.
3709
 
dnl These are the prerequisite macros for GNU's strftime.c replacement.
3710
 
AC_DEFUN([_jm_STRFTIME_PREREQS],
3711
 
[
3712
 
 dnl strftime.c uses the underyling system strftime if it exists.
3713
 
 AC_FUNC_STRFTIME
3714
 
 
3715
 
 AC_CHECK_HEADERS_ONCE(limits.h)
3716
 
 AC_CHECK_FUNCS_ONCE(memcpy mempcpy)
3717
 
 AC_CHECK_FUNCS(tzset memset)
3718
 
 
3719
 
 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
3720
 
 AC_STRUCT_TIMEZONE
3721
 
 
3722
 
 AC_CHECK_FUNCS(mblen mbrlen)
3723
 
 AC_TYPE_MBSTATE_T
3724
 
 
3725
 
 AC_REQUIRE([gl_TM_GMTOFF])
3726
 
])
3727
 
 
3728
 
dnl From Jim Meyering.
3729
 
dnl
3730
 
AC_DEFUN([jm_FUNC_GNU_STRFTIME],
3731
 
[AC_REQUIRE([AC_HEADER_TIME])dnl
3732
 
 
3733
 
 _jm_STRFTIME_PREREQS
3734
 
 
3735
 
 AC_REQUIRE([AC_C_CONST])dnl
3736
 
 AC_REQUIRE([AC_HEADER_STDC])dnl
3737
 
 AC_CHECK_HEADERS_ONCE(sys/time.h)
3738
 
 AC_DEFINE([my_strftime], [nstrftime],
3739
 
   [Define to the name of the strftime replacement function.])
3740
 
])
3741
 
 
3742
 
AC_DEFUN([jm_FUNC_STRFTIME],
3743
 
[
3744
 
  _jm_STRFTIME_PREREQS
3745
 
])
3746
 
 
3747
 
# tm_gmtoff.m4 serial 1
3748
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3749
 
dnl This file is free software, distributed under the terms of the GNU
3750
 
dnl General Public License.  As a special exception to the GNU General
3751
 
dnl Public License, this file may be distributed as part of a program
3752
 
dnl that contains a configuration script generated by Autoconf, under
3753
 
dnl the same distribution terms as the rest of that program.
3754
 
 
3755
 
AC_DEFUN([gl_TM_GMTOFF],
3756
 
[
3757
 
 AC_CHECK_MEMBER([struct tm.tm_gmtoff],
3758
 
                 [AC_DEFINE(HAVE_TM_GMTOFF, 1,
3759
 
                            [Define if struct tm has the tm_gmtoff member.])],
3760
 
                 ,
3761
 
                 [#include <time.h>])
3762
 
])
3763
 
 
3764
 
# strstr.m4 serial 1
3765
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3766
 
dnl This file is free software, distributed under the terms of the GNU
3767
 
dnl General Public License.  As a special exception to the GNU General
3768
 
dnl Public License, this file may be distributed as part of a program
3769
 
dnl that contains a configuration script generated by Autoconf, under
3770
 
dnl the same distribution terms as the rest of that program.
3771
 
 
3772
 
AC_DEFUN([gl_FUNC_STRSTR],
3773
 
[
3774
 
  AC_REPLACE_FUNCS(strstr)
3775
 
  if test $ac_cv_func_strstr = no; then
3776
 
    gl_PREREQ_STRSTR
3777
 
  fi
3778
 
])
3779
 
 
3780
 
# Prerequisites of lib/strstr.c.
3781
 
AC_DEFUN([gl_PREREQ_STRSTR], [
3782
 
  AC_CHECK_HEADERS_ONCE(string.h)
3783
 
])
3784
 
 
3785
 
# strtoimax.m4 serial 2
3786
 
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
3787
 
dnl This file is free software, distributed under the terms of the GNU
3788
 
dnl General Public License.  As a special exception to the GNU General
3789
 
dnl Public License, this file may be distributed as part of a program
3790
 
dnl that contains a configuration script generated by Autoconf, under
3791
 
dnl the same distribution terms as the rest of that program.
3792
 
 
3793
 
AC_DEFUN([gl_FUNC_STRTOIMAX],
3794
 
[
3795
 
  dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
3796
 
  AC_REQUIRE([AC_PROG_CPP])
3797
 
  AC_REQUIRE([AC_PROG_EGREP])
3798
 
 
3799
 
  AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro],
3800
 
    jm_cv_func_strtoimax_macro,
3801
 
    [AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h>
3802
 
#ifdef strtoimax
3803
 
 inttypes_h_defines_strtoimax
3804
 
#endif],
3805
 
       jm_cv_func_strtoimax_macro=yes,
3806
 
       jm_cv_func_strtoimax_macro=no)])
3807
 
 
3808
 
  if test "$jm_cv_func_strtoimax_macro" != yes; then
3809
 
    AC_REPLACE_FUNCS(strtoimax)
3810
 
    if test $ac_cv_func_strtoimax = no; then
3811
 
      gl_PREREQ_STRTOIMAX
3812
 
    fi
3813
 
  fi
3814
 
])
3815
 
 
3816
 
# Prerequisites of lib/strtoimax.c.
3817
 
AC_DEFUN([gl_PREREQ_STRTOIMAX], [
3818
 
  jm_AC_TYPE_INTMAX_T
3819
 
  AC_CHECK_HEADERS_ONCE(stdlib.h)
3820
 
  AC_CHECK_DECLS_ONCE(strtol)
3821
 
  AC_CHECK_DECLS(strtoll)
3822
 
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3823
 
])
3824
 
 
3825
 
# intmax_t.m4 serial 1
3826
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
3827
 
dnl This file is free software, distributed under the terms of the GNU
3828
 
dnl General Public License.  As a special exception to the GNU General
3829
 
dnl Public License, this file may be distributed as part of a program
3830
 
dnl that contains a configuration script generated by Autoconf, under
3831
 
dnl the same distribution terms as the rest of that program.
3832
 
 
3833
 
dnl From Paul Eggert.
3834
 
 
3835
 
AC_PREREQ(2.13)
3836
 
 
3837
 
# Define intmax_t to 'long' or 'long long'
3838
 
# if it is not already defined in <stdint.h> or <inttypes.h>.
3839
 
 
3840
 
AC_DEFUN([jm_AC_TYPE_INTMAX_T],
3841
 
[
3842
 
  dnl For simplicity, we assume that a header file defines 'intmax_t' if and
3843
 
  dnl only if it defines 'uintmax_t'.
3844
 
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
3845
 
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
3846
 
  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
3847
 
    AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3848
 
    test $ac_cv_type_long_long = yes \
3849
 
      && ac_type='long long' \
3850
 
      || ac_type='long'
3851
 
    AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
3852
 
     [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
3853
 
  else
3854
 
    AC_DEFINE(HAVE_INTMAX_T, 1,
3855
 
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
3856
 
  fi
3857
 
])
3858
 
 
3859
 
dnl An alternative would be to explicitly test for 'intmax_t'.
3860
 
 
3861
 
AC_DEFUN([gt_AC_TYPE_INTMAX_T],
3862
 
[
3863
 
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
3864
 
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
3865
 
  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
3866
 
    [AC_TRY_COMPILE([
3867
 
#include <stddef.h> 
3868
 
#include <stdlib.h>
3869
 
#if HAVE_STDINT_H_WITH_UINTMAX
3870
 
#include <stdint.h>
3871
 
#endif
3872
 
#if HAVE_INTTYPES_H_WITH_UINTMAX
3873
 
#include <inttypes.h>
3874
 
#endif
3875
 
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
3876
 
  if test $gt_cv_c_intmax_t = yes; then
3877
 
    AC_DEFINE(HAVE_INTMAX_T, 1,
3878
 
      [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
3879
 
  else
3880
 
    AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3881
 
    test $ac_cv_type_long_long = yes \
3882
 
      && ac_type='long long' \
3883
 
      || ac_type='long'
3884
 
    AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
3885
 
     [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
3886
 
  fi
3887
 
])
3888
 
 
3889
 
# longlong.m4 serial 4
3890
 
dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
3891
 
dnl This file is free software, distributed under the terms of the GNU
3892
 
dnl General Public License.  As a special exception to the GNU General
3893
 
dnl Public License, this file may be distributed as part of a program
3894
 
dnl that contains a configuration script generated by Autoconf, under
3895
 
dnl the same distribution terms as the rest of that program.
3896
 
 
3897
 
dnl From Paul Eggert.
3898
 
 
3899
 
# Define HAVE_LONG_LONG if 'long long' works.
3900
 
 
3901
 
AC_DEFUN([jm_AC_TYPE_LONG_LONG],
3902
 
[
3903
 
  AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
3904
 
  [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
3905
 
    [long long llmax = (long long) -1;
3906
 
     return ll << i | ll >> i | llmax / ll | llmax % ll;],
3907
 
    ac_cv_type_long_long=yes,
3908
 
    ac_cv_type_long_long=no)])
3909
 
  if test $ac_cv_type_long_long = yes; then
3910
 
    AC_DEFINE(HAVE_LONG_LONG, 1,
3911
 
      [Define if you have the 'long long' type.])
3912
 
  fi
3913
 
])
3914
 
 
3915
 
# strtol.m4 serial 1
3916
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3917
 
dnl This file is free software, distributed under the terms of the GNU
3918
 
dnl General Public License.  As a special exception to the GNU General
3919
 
dnl Public License, this file may be distributed as part of a program
3920
 
dnl that contains a configuration script generated by Autoconf, under
3921
 
dnl the same distribution terms as the rest of that program.
3922
 
 
3923
 
AC_DEFUN([gl_FUNC_STRTOL],
3924
 
[
3925
 
  AC_REPLACE_FUNCS(strtol)
3926
 
  if test $ac_cv_func_strtol = no; then
3927
 
    gl_PREREQ_STRTOL
3928
 
  fi
3929
 
])
3930
 
 
3931
 
# Prerequisites of lib/strtol.c.
3932
 
AC_DEFUN([gl_PREREQ_STRTOL], [
3933
 
  AC_REQUIRE([AC_HEADER_STDC])
3934
 
  AC_CHECK_HEADERS_ONCE(limits.h)
3935
 
  AC_CHECK_FUNCS_ONCE(isascii)
3936
 
])
3937
 
 
3938
 
# strtoll.m4 serial 1
3939
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3940
 
dnl This file is free software, distributed under the terms of the GNU
3941
 
dnl General Public License.  As a special exception to the GNU General
3942
 
dnl Public License, this file may be distributed as part of a program
3943
 
dnl that contains a configuration script generated by Autoconf, under
3944
 
dnl the same distribution terms as the rest of that program.
3945
 
 
3946
 
AC_DEFUN([gl_FUNC_STRTOLL],
3947
 
[
3948
 
  dnl We don't need (and can't compile) the replacement strtoll
3949
 
  dnl unless the type 'long long' exists.
3950
 
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
3951
 
  if test "$ac_cv_type_long_long" = yes; then
3952
 
    AC_REPLACE_FUNCS(strtoll)
3953
 
    if test $ac_cv_func_strtoll = no; then
3954
 
      gl_PREREQ_STRTOLL
3955
 
    fi
3956
 
  fi
3957
 
])
3958
 
 
3959
 
# Prerequisites of lib/strtoll.c.
3960
 
AC_DEFUN([gl_PREREQ_STRTOLL], [
3961
 
  :
3962
 
])
3963
 
 
3964
 
 
3965
 
# strtoul.m4 serial 1
3966
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3967
 
dnl This file is free software, distributed under the terms of the GNU
3968
 
dnl General Public License.  As a special exception to the GNU General
3969
 
dnl Public License, this file may be distributed as part of a program
3970
 
dnl that contains a configuration script generated by Autoconf, under
3971
 
dnl the same distribution terms as the rest of that program.
3972
 
 
3973
 
AC_DEFUN([gl_FUNC_STRTOUL],
3974
 
[
3975
 
  AC_REPLACE_FUNCS(strtoul)
3976
 
  if test $ac_cv_func_strtoul = no; then
3977
 
    gl_PREREQ_STRTOUL
3978
 
  fi
3979
 
])
3980
 
 
3981
 
# Prerequisites of lib/strtoul.c.
3982
 
AC_DEFUN([gl_PREREQ_STRTOUL], [
3983
 
  gl_PREREQ_STRTOL
3984
 
])
3985
 
 
3986
 
# strtoull.m4 serial 1
3987
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
3988
 
dnl This file is free software, distributed under the terms of the GNU
3989
 
dnl General Public License.  As a special exception to the GNU General
3990
 
dnl Public License, this file may be distributed as part of a program
3991
 
dnl that contains a configuration script generated by Autoconf, under
3992
 
dnl the same distribution terms as the rest of that program.
3993
 
 
3994
 
AC_DEFUN([gl_FUNC_STRTOULL],
3995
 
[
3996
 
  dnl We don't need (and can't compile) the replacement strtoull
3997
 
  dnl unless the type 'unsigned long long' exists.
3998
 
  AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
3999
 
  if test "$ac_cv_type_unsigned_long_long" = yes; then
4000
 
    AC_REPLACE_FUNCS(strtoull)
4001
 
    if test $ac_cv_func_strtoull = no; then
4002
 
      gl_PREREQ_STRTOULL
4003
 
    fi
4004
 
  fi
4005
 
])
4006
 
 
4007
 
# Prerequisites of lib/strtoull.c.
4008
 
AC_DEFUN([gl_PREREQ_STRTOULL], [
4009
 
  :
4010
 
])
4011
 
 
4012
 
 
4013
 
# strtoumax.m4 serial 2
4014
 
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
4015
 
dnl This file is free software, distributed under the terms of the GNU
4016
 
dnl General Public License.  As a special exception to the GNU General
4017
 
dnl Public License, this file may be distributed as part of a program
4018
 
dnl that contains a configuration script generated by Autoconf, under
4019
 
dnl the same distribution terms as the rest of that program.
4020
 
 
4021
 
AC_DEFUN([gl_FUNC_STRTOUMAX],
4022
 
[
4023
 
  dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
4024
 
  AC_REQUIRE([AC_PROG_CPP])
4025
 
  AC_REQUIRE([AC_PROG_EGREP])
4026
 
 
4027
 
  AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro],
4028
 
    jm_cv_func_strtoumax_macro,
4029
 
    [AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include <inttypes.h>
4030
 
#ifdef strtoumax
4031
 
 inttypes_h_defines_strtoumax
4032
 
#endif],
4033
 
       jm_cv_func_strtoumax_macro=yes,
4034
 
       jm_cv_func_strtoumax_macro=no)])
4035
 
 
4036
 
  if test "$jm_cv_func_strtoumax_macro" != yes; then
4037
 
    AC_REPLACE_FUNCS(strtoumax)
4038
 
    if test $ac_cv_func_strtoumax = no; then
4039
 
      gl_PREREQ_STRTOUMAX
4040
 
    fi
4041
 
  fi
4042
 
])
4043
 
 
4044
 
# Prerequisites of lib/strtoumax.c.
4045
 
AC_DEFUN([gl_PREREQ_STRTOUMAX], [
4046
 
  jm_AC_TYPE_UINTMAX_T
4047
 
  AC_CHECK_HEADERS_ONCE(stdlib.h)
4048
 
  AC_CHECK_DECLS_ONCE(strtoul)
4049
 
  AC_CHECK_DECLS(strtoull)
4050
 
  AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
4051
 
])
4052
 
 
4053
 
#serial 7 -*- autoconf -*-
4054
 
 
4055
 
dnl From Jim Meyering.
4056
 
dnl
4057
 
dnl See if the glibc *_unlocked I/O macros or functions are available.
4058
 
dnl Use only those *_unlocked macros or functions that are declared
4059
 
dnl (because some of them were declared in Solaris 2.5.1 but were removed
4060
 
dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
4061
 
dnl on Solaris 2.6).
4062
 
 
4063
 
AC_DEFUN([jm_FUNC_GLIBC_UNLOCKED_IO],
4064
 
[
4065
 
  dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
4066
 
  dnl etc.
4067
 
  AC_REQUIRE([AC_GNU_SOURCE])
4068
 
 
4069
 
  AC_CHECK_DECLS_ONCE(
4070
 
     [clearerr_unlocked feof_unlocked ferror_unlocked
4071
 
      fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
4072
 
      fread_unlocked fwrite_unlocked getc_unlocked
4073
 
      getchar_unlocked putc_unlocked putchar_unlocked])
4074
 
])
4075
 
 
4076
 
# xalloc.m4 serial 1
4077
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4078
 
dnl This file is free software, distributed under the terms of the GNU
4079
 
dnl General Public License.  As a special exception to the GNU General
4080
 
dnl Public License, this file may be distributed as part of a program
4081
 
dnl that contains a configuration script generated by Autoconf, under
4082
 
dnl the same distribution terms as the rest of that program.
4083
 
 
4084
 
AC_DEFUN([gl_XALLOC],
4085
 
[
4086
 
  gl_PREREQ_XMALLOC
4087
 
  gl_PREREQ_XSTRDUP
4088
 
])
4089
 
 
4090
 
# Prerequisites of lib/xmalloc.c.
4091
 
AC_DEFUN([gl_PREREQ_XMALLOC], [
4092
 
  AC_REQUIRE([AC_HEADER_STDC])
4093
 
  AC_REQUIRE([jm_FUNC_MALLOC])
4094
 
  AC_REQUIRE([jm_FUNC_REALLOC])
4095
 
])
4096
 
 
4097
 
# Prerequisites of lib/xstrdup.c.
4098
 
AC_DEFUN([gl_PREREQ_XSTRDUP], [
4099
 
  AC_REQUIRE([AC_HEADER_STDC])
4100
 
  AC_CHECK_HEADERS_ONCE(string.h)
4101
 
])
4102
 
 
4103
 
# xgetcwd.m4 serial 1
4104
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4105
 
dnl This file is free software, distributed under the terms of the GNU
4106
 
dnl General Public License.  As a special exception to the GNU General
4107
 
dnl Public License, this file may be distributed as part of a program
4108
 
dnl that contains a configuration script generated by Autoconf, under
4109
 
dnl the same distribution terms as the rest of that program.
4110
 
 
4111
 
AC_DEFUN([gl_XGETCWD],
4112
 
[
4113
 
  dnl Prerequisites of lib/xgetcwd.c.
4114
 
  AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
4115
 
  AC_CHECK_FUNCS(getcwd)
4116
 
  AC_FUNC_GETCWD_NULL
4117
 
])
4118
 
 
4119
 
# getcwd.m4 - check whether getcwd (NULL, 0) allocates memory for result
4120
 
 
4121
 
# Copyright 2001 Free Software Foundation, Inc.
4122
 
 
4123
 
# This program is free software; you can redistribute it and/or modify
4124
 
# it under the terms of the GNU General Public License as published by
4125
 
# the Free Software Foundation; either version 2, or (at your option)
4126
 
# any later version.
4127
 
 
4128
 
# This program is distributed in the hope that it will be useful,
4129
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4130
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4131
 
# GNU General Public License for more details.
4132
 
 
4133
 
# You should have received a copy of the GNU General Public License
4134
 
# along with this program; if not, write to the Free Software Foundation,
4135
 
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
4136
 
 
4137
 
# Written by Paul Eggert.
4138
 
 
4139
 
AC_DEFUN([AC_FUNC_GETCWD_NULL],
4140
 
  [
4141
 
   AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
4142
 
   AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
4143
 
     [ac_cv_func_getcwd_null],
4144
 
     [AC_TRY_RUN(
4145
 
        [
4146
 
#        ifdef HAVE_STDLIB_H
4147
 
#         include <stdlib.h>
4148
 
#        endif
4149
 
#        ifdef HAVE_UNISTD_H
4150
 
#         include <unistd.h>
4151
 
#        endif
4152
 
#        ifndef getcwd
4153
 
         char *getcwd ();
4154
 
#        endif
4155
 
         int
4156
 
         main ()
4157
 
         {
4158
 
           if (chdir ("/") != 0)
4159
 
             exit (1);
4160
 
           else
4161
 
             {
4162
 
               char *f = getcwd (NULL, 0);
4163
 
               exit (! (f && f[0] == '/' && !f[1]));
4164
 
             }
4165
 
         }],
4166
 
        [ac_cv_func_getcwd_null=yes],
4167
 
        [ac_cv_func_getcwd_null=no],
4168
 
        [ac_cv_func_getcwd_null=no])])
4169
 
   if test $ac_cv_func_getcwd_null = yes; then
4170
 
     AC_DEFINE(HAVE_GETCWD_NULL, 1,
4171
 
               [Define if getcwd (NULL, 0) allocates memory for result.])
4172
 
   fi])
4173
 
 
4174
 
# xstrtol.m4 serial 1
4175
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4176
 
dnl This file is free software, distributed under the terms of the GNU
4177
 
dnl General Public License.  As a special exception to the GNU General
4178
 
dnl Public License, this file may be distributed as part of a program
4179
 
dnl that contains a configuration script generated by Autoconf, under
4180
 
dnl the same distribution terms as the rest of that program.
4181
 
 
4182
 
AC_DEFUN([gl_XSTRTOL],
4183
 
[
4184
 
  AC_REQUIRE([gl_PREREQ_XSTRTOL])
4185
 
  AC_REQUIRE([gl_PREREQ_XSTRTOUL])
4186
 
])
4187
 
 
4188
 
# Prerequisites of lib/xstrtol.h.
4189
 
AC_DEFUN([gl_PREREQ_XSTRTOL_H],
4190
 
[
4191
 
  AC_REQUIRE([jm_AC_TYPE_INTMAX_T])
4192
 
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
4193
 
])
4194
 
 
4195
 
# Prerequisites of lib/xstrtol.c.
4196
 
AC_DEFUN([gl_PREREQ_XSTRTOL],
4197
 
[
4198
 
  AC_REQUIRE([gl_PREREQ_XSTRTOL_H])
4199
 
  AC_REQUIRE([AC_HEADER_STDC])
4200
 
  AC_CHECK_HEADERS_ONCE(limits.h string.h)
4201
 
  AC_CHECK_FUNCS_ONCE(isascii)
4202
 
  AC_CHECK_DECLS_ONCE(strtol strtoul)
4203
 
  AC_CHECK_DECLS([strtoimax, strtoumax])
4204
 
])
4205
 
 
4206
 
# Prerequisites of lib/xstrtoul.c.
4207
 
AC_DEFUN([gl_PREREQ_XSTRTOUL],
4208
 
[
4209
 
  AC_REQUIRE([gl_PREREQ_XSTRTOL])
4210
 
])
4211
 
 
4212
 
#serial 5
4213
 
dnl Cloned from xstrtoimax.m4.  Keep these files in sync.
4214
 
 
4215
 
AC_DEFUN([jm_XSTRTOUMAX],
4216
 
[
4217
 
  dnl Prerequisites of lib/xstrtoumax.c.
4218
 
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
4219
 
  AC_REQUIRE([gl_PREREQ_XSTRTOL])
4220
 
])
4221
 
 
4222
 
# yesno.m4 serial 1
4223
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
4224
 
dnl This file is free software, distributed under the terms of the GNU
4225
 
dnl General Public License.  As a special exception to the GNU General
4226
 
dnl Public License, this file may be distributed as part of a program
4227
 
dnl that contains a configuration script generated by Autoconf, under
4228
 
dnl the same distribution terms as the rest of that program.
4229
 
 
4230
 
AC_DEFUN([gl_YESNO],
4231
 
[
4232
 
  dnl Prerequisites of lib/yesno.c.
4233
 
  AC_CHECK_HEADERS_ONCE(stdlib.h)
4234
 
])
4235