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

« back to all changes in this revision

Viewing changes to 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 -*-
 
1
# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
2
2
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
 
# Free Software Foundation, Inc.
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005  Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
7
7
# with or without modifications, as long as this notice is preserved.
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
13
 
14
 
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
15
 
 
16
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
17
 
 
18
 
# This program is free software; you can redistribute it and/or modify
19
 
# it under the terms of the GNU General Public License as published by
20
 
# the Free Software Foundation; either version 2, or (at your option)
21
 
# any later version.
22
 
 
23
 
# This program is distributed in the hope that it will be useful,
24
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
 
# GNU General Public License for more details.
27
 
 
28
 
# You should have received a copy of the GNU General Public License
29
 
# along with this program; if not, write to the Free Software
30
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31
 
# 02111-1307, USA.
32
 
 
33
 
AC_PREREQ([2.52])
34
 
 
35
 
# serial 6
36
 
 
37
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
38
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
39
 
 
40
 
# Do all the work for Automake.                            -*- Autoconf -*-
41
 
 
42
 
# This macro actually does too much some checks are only needed if
43
 
# your package does certain things.  But this isn't really a big deal.
44
 
 
45
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
46
 
# Free Software Foundation, Inc.
47
 
 
48
 
# This program is free software; you can redistribute it and/or modify
49
 
# it under the terms of the GNU General Public License as published by
50
 
# the Free Software Foundation; either version 2, or (at your option)
51
 
# any later version.
52
 
 
53
 
# This program is distributed in the hope that it will be useful,
54
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
55
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
56
 
# GNU General Public License for more details.
57
 
 
58
 
# You should have received a copy of the GNU General Public License
59
 
# along with this program; if not, write to the Free Software
60
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
61
 
# 02111-1307, USA.
62
 
 
63
 
# serial 10
64
 
 
65
 
AC_PREREQ([2.54])
66
 
 
67
 
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
68
 
# the ones we care about.
69
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
70
 
 
71
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
72
 
# AM_INIT_AUTOMAKE([OPTIONS])
73
 
# -----------------------------------------------
74
 
# The call with PACKAGE and VERSION arguments is the old style
75
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
76
 
# and VERSION should now be passed to AC_INIT and removed from
77
 
# the call to AM_INIT_AUTOMAKE.
78
 
# We support both call styles for the transition.  After
79
 
# the next Automake release, Autoconf can make the AC_INIT
80
 
# arguments mandatory, and then we can depend on a new Autoconf
81
 
# release and drop the old call support.
82
 
AC_DEFUN([AM_INIT_AUTOMAKE],
83
 
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
84
 
 AC_REQUIRE([AC_PROG_INSTALL])dnl
85
 
# test to see if srcdir already configured
86
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
87
 
   test -f $srcdir/config.status; then
88
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
89
 
fi
90
 
 
91
 
# test whether we have cygpath
92
 
if test -z "$CYGPATH_W"; then
93
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
94
 
    CYGPATH_W='cygpath -w'
95
 
  else
96
 
    CYGPATH_W=echo
97
 
  fi
98
 
fi
99
 
AC_SUBST([CYGPATH_W])
100
 
 
101
 
# Define the identity of the package.
102
 
dnl Distinguish between old-style and new-style calls.
103
 
m4_ifval([$2],
104
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
105
 
 AC_SUBST([PACKAGE], [$1])dnl
106
 
 AC_SUBST([VERSION], [$2])],
107
 
[_AM_SET_OPTIONS([$1])dnl
108
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
109
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
110
 
 
111
 
_AM_IF_OPTION([no-define],,
112
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
113
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
114
 
 
115
 
# Some tools Automake needs.
116
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
117
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
118
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
119
 
AM_MISSING_PROG(AUTOCONF, autoconf)
120
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
121
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
122
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
123
 
AM_MISSING_PROG(AMTAR, tar)
124
 
AM_PROG_INSTALL_SH
125
 
AM_PROG_INSTALL_STRIP
126
 
# We need awk for the "check" target.  The system "awk" is bad on
127
 
# some platforms.
128
 
AC_REQUIRE([AC_PROG_AWK])dnl
129
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
130
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
131
 
 
132
 
_AM_IF_OPTION([no-dependencies],,
133
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
134
 
                  [_AM_DEPENDENCIES(CC)],
135
 
                  [define([AC_PROG_CC],
136
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
137
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
138
 
                  [_AM_DEPENDENCIES(CXX)],
139
 
                  [define([AC_PROG_CXX],
140
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
141
 
])
142
 
])
143
 
 
144
 
 
145
 
# When config.status generates a header, we must update the stamp-h file.
146
 
# This file resides in the same directory as the config header
147
 
# that is generated.  The stamp files are numbered to have different names.
148
 
 
149
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
150
 
# loop where config.status creates the headers, so we can generate
151
 
# our stamp files there.
152
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
153
 
[# Compute $1's index in $config_headers.
154
 
_am_stamp_count=1
155
 
for _am_header in $config_headers :; do
156
 
  case $_am_header in
157
 
    $1 | $1:* )
158
 
      break ;;
159
 
    * )
160
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
161
 
  esac
162
 
done
163
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
164
 
 
165
 
# Copyright 2002  Free Software Foundation, Inc.
166
 
 
167
 
# This program is free software; you can redistribute it and/or modify
168
 
# it under the terms of the GNU General Public License as published by
169
 
# the Free Software Foundation; either version 2, or (at your option)
170
 
# any later version.
171
 
 
172
 
# This program is distributed in the hope that it will be useful,
173
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
174
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
175
 
# GNU General Public License for more details.
176
 
 
177
 
# You should have received a copy of the GNU General Public License
178
 
# along with this program; if not, write to the Free Software
179
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
14
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
15
#
 
16
# This file is free software; the Free Software Foundation
 
17
# gives unlimited permission to copy and/or distribute it,
 
18
# with or without modifications, as long as this notice is preserved.
180
19
 
181
20
# AM_AUTOMAKE_VERSION(VERSION)
182
21
# ----------------------------
183
22
# Automake X.Y traces this macro to ensure aclocal.m4 has been
184
23
# generated from the m4 files accompanying Automake X.Y.
185
 
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
 
24
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
186
25
 
187
26
# AM_SET_CURRENT_AUTOMAKE_VERSION
188
27
# -------------------------------
189
28
# Call AM_AUTOMAKE_VERSION so it can be traced.
190
29
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
191
30
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
192
 
         [AM_AUTOMAKE_VERSION([1.7.5])])
193
 
 
194
 
# Helper functions for option handling.                    -*- Autoconf -*-
195
 
 
196
 
# Copyright 2001, 2002  Free Software Foundation, Inc.
197
 
 
198
 
# This program is free software; you can redistribute it and/or modify
199
 
# it under the terms of the GNU General Public License as published by
200
 
# the Free Software Foundation; either version 2, or (at your option)
201
 
# any later version.
202
 
 
203
 
# This program is distributed in the hope that it will be useful,
204
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
205
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
206
 
# GNU General Public License for more details.
207
 
 
208
 
# You should have received a copy of the GNU General Public License
209
 
# along with this program; if not, write to the Free Software
210
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
211
 
# 02111-1307, USA.
212
 
 
213
 
# serial 2
214
 
 
215
 
# _AM_MANGLE_OPTION(NAME)
216
 
# -----------------------
217
 
AC_DEFUN([_AM_MANGLE_OPTION],
218
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
219
 
 
220
 
# _AM_SET_OPTION(NAME)
221
 
# ------------------------------
222
 
# Set option NAME.  Presently that only means defining a flag for this option.
223
 
AC_DEFUN([_AM_SET_OPTION],
224
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
225
 
 
226
 
# _AM_SET_OPTIONS(OPTIONS)
227
 
# ----------------------------------
228
 
# OPTIONS is a space-separated list of Automake options.
229
 
AC_DEFUN([_AM_SET_OPTIONS],
230
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
231
 
 
232
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
233
 
# -------------------------------------------
234
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
235
 
AC_DEFUN([_AM_IF_OPTION],
236
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
237
 
 
238
 
#
239
 
# Check to make sure that the build environment is sane.
240
 
#
241
 
 
242
 
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
243
 
 
244
 
# This program is free software; you can redistribute it and/or modify
245
 
# it under the terms of the GNU General Public License as published by
246
 
# the Free Software Foundation; either version 2, or (at your option)
247
 
# any later version.
248
 
 
249
 
# This program is distributed in the hope that it will be useful,
250
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
251
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
252
 
# GNU General Public License for more details.
253
 
 
254
 
# You should have received a copy of the GNU General Public License
255
 
# along with this program; if not, write to the Free Software
256
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
257
 
# 02111-1307, USA.
258
 
 
259
 
# serial 3
260
 
 
261
 
# AM_SANITY_CHECK
262
 
# ---------------
263
 
AC_DEFUN([AM_SANITY_CHECK],
264
 
[AC_MSG_CHECKING([whether build environment is sane])
265
 
# Just in case
266
 
sleep 1
267
 
echo timestamp > conftest.file
268
 
# Do `set' in a subshell so we don't clobber the current shell's
269
 
# arguments.  Must try -L first in case configure is actually a
270
 
# symlink; some systems play weird games with the mod time of symlinks
271
 
# (eg FreeBSD returns the mod time of the symlink's containing
272
 
# directory).
273
 
if (
274
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
275
 
   if test "$[*]" = "X"; then
276
 
      # -L didn't work.
277
 
      set X `ls -t $srcdir/configure conftest.file`
278
 
   fi
279
 
   rm -f conftest.file
280
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
281
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
282
 
 
283
 
      # If neither matched, then we have a broken ls.  This can happen
284
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
285
 
      # broken ls alias from the environment.  This has actually
286
 
      # happened.  Such a system could not be considered "sane".
287
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
288
 
alias in your environment])
289
 
   fi
290
 
 
291
 
   test "$[2]" = conftest.file
292
 
   )
293
 
then
294
 
   # Ok.
295
 
   :
296
 
else
297
 
   AC_MSG_ERROR([newly created file is older than distributed files!
298
 
Check your system clock])
299
 
fi
300
 
AC_MSG_RESULT(yes)])
301
 
 
302
 
#  -*- Autoconf -*-
303
 
 
304
 
 
305
 
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
306
 
 
307
 
# This program is free software; you can redistribute it and/or modify
308
 
# it under the terms of the GNU General Public License as published by
309
 
# the Free Software Foundation; either version 2, or (at your option)
310
 
# any later version.
311
 
 
312
 
# This program is distributed in the hope that it will be useful,
313
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
314
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
315
 
# GNU General Public License for more details.
316
 
 
317
 
# You should have received a copy of the GNU General Public License
318
 
# along with this program; if not, write to the Free Software
319
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
320
 
# 02111-1307, USA.
321
 
 
322
 
# serial 3
323
 
 
324
 
# AM_MISSING_PROG(NAME, PROGRAM)
325
 
# ------------------------------
326
 
AC_DEFUN([AM_MISSING_PROG],
327
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
328
 
$1=${$1-"${am_missing_run}$2"}
329
 
AC_SUBST($1)])
330
 
 
331
 
 
332
 
# AM_MISSING_HAS_RUN
333
 
# ------------------
334
 
# Define MISSING if not defined so far and test if it supports --run.
335
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
336
 
AC_DEFUN([AM_MISSING_HAS_RUN],
337
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
338
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
339
 
# Use eval to expand $SHELL
340
 
if eval "$MISSING --run true"; then
341
 
  am_missing_run="$MISSING --run "
342
 
else
343
 
  am_missing_run=
344
 
  AC_MSG_WARN([`missing' script is too old or missing])
345
 
fi
346
 
])
347
 
 
348
 
# AM_AUX_DIR_EXPAND
349
 
 
350
 
# Copyright 2001 Free Software Foundation, Inc.
351
 
 
352
 
# This program is free software; you can redistribute it and/or modify
353
 
# it under the terms of the GNU General Public License as published by
354
 
# the Free Software Foundation; either version 2, or (at your option)
355
 
# any later version.
356
 
 
357
 
# This program is distributed in the hope that it will be useful,
358
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
359
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
360
 
# GNU General Public License for more details.
361
 
 
362
 
# You should have received a copy of the GNU General Public License
363
 
# along with this program; if not, write to the Free Software
364
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
365
 
# 02111-1307, USA.
 
31
         [AM_AUTOMAKE_VERSION([1.9.5])])
 
32
 
 
33
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
34
 
 
35
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
36
#
 
37
# This file is free software; the Free Software Foundation
 
38
# gives unlimited permission to copy and/or distribute it,
 
39
# with or without modifications, as long as this notice is preserved.
366
40
 
367
41
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
368
42
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
402
76
# absolute PATH.  The drawback is that using absolute paths prevent a
403
77
# configured tree to be moved without reconfiguration.
404
78
 
405
 
# Rely on autoconf to set up CDPATH properly.
406
 
AC_PREREQ([2.50])
407
 
 
408
 
AC_DEFUN([AM_AUX_DIR_EXPAND], [
 
79
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
80
[dnl Rely on autoconf to set up CDPATH properly.
 
81
AC_PREREQ([2.50])dnl
409
82
# expand $ac_aux_dir to an absolute path
410
83
am_aux_dir=`cd $ac_aux_dir && pwd`
411
84
])
412
85
 
413
 
# AM_PROG_INSTALL_SH
414
 
# ------------------
415
 
# Define $install_sh.
416
 
 
417
 
# Copyright 2001 Free Software Foundation, Inc.
418
 
 
419
 
# This program is free software; you can redistribute it and/or modify
420
 
# it under the terms of the GNU General Public License as published by
421
 
# the Free Software Foundation; either version 2, or (at your option)
422
 
# any later version.
423
 
 
424
 
# This program is distributed in the hope that it will be useful,
425
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
426
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
427
 
# GNU General Public License for more details.
428
 
 
429
 
# You should have received a copy of the GNU General Public License
430
 
# along with this program; if not, write to the Free Software
431
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432
 
# 02111-1307, USA.
433
 
 
434
 
AC_DEFUN([AM_PROG_INSTALL_SH],
435
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
436
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
437
 
AC_SUBST(install_sh)])
438
 
 
439
 
# AM_PROG_INSTALL_STRIP
440
 
 
441
 
# Copyright 2001 Free Software Foundation, Inc.
442
 
 
443
 
# This program is free software; you can redistribute it and/or modify
444
 
# it under the terms of the GNU General Public License as published by
445
 
# the Free Software Foundation; either version 2, or (at your option)
446
 
# any later version.
447
 
 
448
 
# This program is distributed in the hope that it will be useful,
449
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
450
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
451
 
# GNU General Public License for more details.
452
 
 
453
 
# You should have received a copy of the GNU General Public License
454
 
# along with this program; if not, write to the Free Software
455
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
456
 
# 02111-1307, USA.
457
 
 
458
 
# One issue with vendor `install' (even GNU) is that you can't
459
 
# specify the program used to strip binaries.  This is especially
460
 
# annoying in cross-compiling environments, where the build's strip
461
 
# is unlikely to handle the host's binaries.
462
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
463
 
# always use install-sh in `make install-strip', and initialize
464
 
# STRIPPROG with the value of the STRIP variable (set by the user).
465
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
466
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
467
 
# Installed binaries are usually stripped using `strip' when the user
468
 
# run `make install-strip'.  However `strip' might not be the right
469
 
# tool to use in cross-compilation environments, therefore Automake
470
 
# will honor the `STRIP' environment variable to overrule this program.
471
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
472
 
if test "$cross_compiling" != no; then
473
 
  AC_CHECK_TOOL([STRIP], [strip], :)
474
 
fi
475
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
476
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
477
 
 
478
 
#                                                          -*- Autoconf -*-
479
 
# Copyright (C) 2003  Free Software Foundation, Inc.
480
 
 
481
 
# This program is free software; you can redistribute it and/or modify
482
 
# it under the terms of the GNU General Public License as published by
483
 
# the Free Software Foundation; either version 2, or (at your option)
484
 
# any later version.
485
 
 
486
 
# This program is distributed in the hope that it will be useful,
487
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
488
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
489
 
# GNU General Public License for more details.
490
 
 
491
 
# You should have received a copy of the GNU General Public License
492
 
# along with this program; if not, write to the Free Software
493
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
494
 
# 02111-1307, USA.
495
 
 
496
 
# serial 1
497
 
 
498
 
# Check whether the underlying file-system supports filenames
499
 
# with a leading dot.  For instance MS-DOS doesn't.
500
 
AC_DEFUN([AM_SET_LEADING_DOT],
501
 
[rm -rf .tst 2>/dev/null
502
 
mkdir .tst 2>/dev/null
503
 
if test -d .tst; then
504
 
  am__leading_dot=.
 
86
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
87
 
 
88
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
89
# Free Software Foundation, Inc.
 
90
#
 
91
# This file is free software; the Free Software Foundation
 
92
# gives unlimited permission to copy and/or distribute it,
 
93
# with or without modifications, as long as this notice is preserved.
 
94
 
 
95
# serial 7
 
96
 
 
97
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
98
# -------------------------------------
 
99
# Define a conditional.
 
100
AC_DEFUN([AM_CONDITIONAL],
 
101
[AC_PREREQ(2.52)dnl
 
102
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
103
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
104
AC_SUBST([$1_TRUE])
 
105
AC_SUBST([$1_FALSE])
 
106
if $2; then
 
107
  $1_TRUE=
 
108
  $1_FALSE='#'
505
109
else
506
 
  am__leading_dot=_
 
110
  $1_TRUE='#'
 
111
  $1_FALSE=
507
112
fi
508
 
rmdir .tst 2>/dev/null
509
 
AC_SUBST([am__leading_dot])])
510
 
 
511
 
# serial 5                                              -*- Autoconf -*-
512
 
 
513
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
514
 
 
515
 
# This program is free software; you can redistribute it and/or modify
516
 
# it under the terms of the GNU General Public License as published by
517
 
# the Free Software Foundation; either version 2, or (at your option)
518
 
# any later version.
519
 
 
520
 
# This program is distributed in the hope that it will be useful,
521
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
522
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
523
 
# GNU General Public License for more details.
524
 
 
525
 
# You should have received a copy of the GNU General Public License
526
 
# along with this program; if not, write to the Free Software
527
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
528
 
# 02111-1307, USA.
529
 
 
 
113
AC_CONFIG_COMMANDS_PRE(
 
114
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
115
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
116
Usually this means the macro was only invoked conditionally.]])
 
117
fi])])
 
118
 
 
119
 
 
120
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
121
# Free Software Foundation, Inc.
 
122
#
 
123
# This file is free software; the Free Software Foundation
 
124
# gives unlimited permission to copy and/or distribute it,
 
125
# with or without modifications, as long as this notice is preserved.
 
126
 
 
127
# serial 8
530
128
 
531
129
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
532
130
# written in clear, in which case automake, when reading aclocal.m4,
535
133
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
536
134
 
537
135
 
538
 
 
539
136
# _AM_DEPENDENCIES(NAME)
540
137
# ----------------------
541
138
# See how the compiler implements dependency checking.
571
168
  # using a relative directory.
572
169
  cp "$am_depcomp" conftest.dir
573
170
  cd conftest.dir
 
171
  # We will build objects and dependencies in a subdirectory because
 
172
  # it helps to detect inapplicable dependency modes.  For instance
 
173
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
174
  # side effect of compilation, but ICC will put the dependencies in
 
175
  # the current directory while Tru64 will put them in the object
 
176
  # directory.
 
177
  mkdir sub
574
178
 
575
179
  am_cv_$1_dependencies_compiler_type=none
576
180
  if test "$am_compiler_list" = ""; then
577
181
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
578
182
  fi
579
183
  for depmode in $am_compiler_list; do
 
184
    # Setup a source with many dependencies, because some compilers
 
185
    # like to wrap large dependency lists on column 80 (with \), and
 
186
    # we should not choose a depcomp mode which is confused by this.
 
187
    #
580
188
    # We need to recreate these files for each test, as the compiler may
581
189
    # overwrite some of them when testing with obscure command lines.
582
190
    # This happens at least with the AIX C compiler.
583
 
    echo '#include "conftest.h"' > conftest.c
584
 
    echo 'int i;' > conftest.h
585
 
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
 
191
    : > sub/conftest.c
 
192
    for i in 1 2 3 4 5 6; do
 
193
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
194
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
195
      # Solaris 8's {/usr,}/bin/sh.
 
196
      touch sub/conftst$i.h
 
197
    done
 
198
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
586
199
 
587
200
    case $depmode in
588
201
    nosideeffect)
600
213
    # mode.  It turns out that the SunPro C++ compiler does not properly
601
214
    # handle `-M -o', and we need to detect this.
602
215
    if depmode=$depmode \
603
 
       source=conftest.c object=conftest.o \
604
 
       depfile=conftest.Po tmpdepfile=conftest.TPo \
605
 
       $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
 
216
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
217
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
218
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
606
219
         >/dev/null 2>conftest.err &&
607
 
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
 
220
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
221
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
608
222
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
609
223
      # icc doesn't choke on unknown options, it will just issue warnings
610
 
      # (even with -Werror).  So we grep stderr for any message
611
 
      # that says an option was ignored.
612
 
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
 
224
      # or remarks (even with -Werror).  So we grep stderr for any message
 
225
      # that says an option was ignored or not supported.
 
226
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
227
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
228
      # The diagnosis changed in icc 8.0:
 
229
      #   icc: Command line remark: option '-MP' not supported
 
230
      if (grep 'ignoring option' conftest.err ||
 
231
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
613
232
        am_cv_$1_dependencies_compiler_type=$depmode
614
233
        break
615
234
      fi
643
262
# ------------
644
263
AC_DEFUN([AM_DEP_TRACK],
645
264
[AC_ARG_ENABLE(dependency-tracking,
646
 
[  --disable-dependency-tracking Speeds up one-time builds
647
 
  --enable-dependency-tracking  Do not reject slow dependency extractors])
 
265
[  --disable-dependency-tracking  speeds up one-time build
 
266
  --enable-dependency-tracking   do not reject slow dependency extractors])
648
267
if test "x$enable_dependency_tracking" != xno; then
649
268
  am_depcomp="$ac_aux_dir/depcomp"
650
269
  AMDEPBACKSLASH='\'
653
272
AC_SUBST([AMDEPBACKSLASH])
654
273
])
655
274
 
656
 
# Generate code to set up dependency tracking.   -*- Autoconf -*-
657
 
 
658
 
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
659
 
 
660
 
# This program is free software; you can redistribute it and/or modify
661
 
# it under the terms of the GNU General Public License as published by
662
 
# the Free Software Foundation; either version 2, or (at your option)
663
 
# any later version.
664
 
 
665
 
# This program is distributed in the hope that it will be useful,
666
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
667
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
668
 
# GNU General Public License for more details.
669
 
 
670
 
# You should have received a copy of the GNU General Public License
671
 
# along with this program; if not, write to the Free Software
672
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
673
 
# 02111-1307, USA.
674
 
 
675
 
#serial 2
 
275
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
276
 
 
277
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
278
# Free Software Foundation, Inc.
 
279
#
 
280
# This file is free software; the Free Software Foundation
 
281
# gives unlimited permission to copy and/or distribute it,
 
282
# with or without modifications, as long as this notice is preserved.
 
283
 
 
284
#serial 3
676
285
 
677
286
# _AM_OUTPUT_DEPENDENCY_COMMANDS
678
287
# ------------------------------
691
300
  else
692
301
    continue
693
302
  fi
694
 
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
695
 
  # Extract the definition of DEP_FILES from the Makefile without
696
 
  # running `make'.
697
 
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
 
303
  # Extract the definition of DEPDIR, am__include, and am__quote
 
304
  # from the Makefile without running `make'.
 
305
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
698
306
  test -z "$DEPDIR" && continue
 
307
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
308
  test -z "am__include" && continue
 
309
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
699
310
  # When using ansi2knr, U may be empty or an underscore; expand it
700
 
  U=`sed -n -e '/^U = / s///p' < "$mf"`
701
 
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
702
 
  # We invoke sed twice because it is the simplest approach to
703
 
  # changing $(DEPDIR) to its actual value in the expansion.
704
 
  for file in `sed -n -e '
705
 
    /^DEP_FILES = .*\\\\$/ {
706
 
      s/^DEP_FILES = //
707
 
      :loop
708
 
        s/\\\\$//
709
 
        p
710
 
        n
711
 
        /\\\\$/ b loop
712
 
      p
713
 
    }
714
 
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
 
311
  U=`sed -n 's/^U = //p' < "$mf"`
 
312
  # Find all dependency output files, they are included files with
 
313
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
314
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
315
  # expansion.
 
316
  for file in `sed -n "
 
317
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
715
318
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
716
319
    # Make sure the directory exists.
717
320
    test -f "$dirpart/$file" && continue
737
340
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
738
341
])
739
342
 
740
 
# Check to see how 'make' treats includes.      -*- Autoconf -*-
741
 
 
742
 
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
743
 
 
744
 
# This program is free software; you can redistribute it and/or modify
745
 
# it under the terms of the GNU General Public License as published by
746
 
# the Free Software Foundation; either version 2, or (at your option)
747
 
# any later version.
748
 
 
749
 
# This program is distributed in the hope that it will be useful,
750
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
751
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
752
 
# GNU General Public License for more details.
753
 
 
754
 
# You should have received a copy of the GNU General Public License
755
 
# along with this program; if not, write to the Free Software
756
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
757
 
# 02111-1307, USA.
 
343
# Do all the work for Automake.                             -*- Autoconf -*-
 
344
 
 
345
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
346
# Free Software Foundation, Inc.
 
347
#
 
348
# This file is free software; the Free Software Foundation
 
349
# gives unlimited permission to copy and/or distribute it,
 
350
# with or without modifications, as long as this notice is preserved.
 
351
 
 
352
# serial 12
 
353
 
 
354
# This macro actually does too much.  Some checks are only needed if
 
355
# your package does certain things.  But this isn't really a big deal.
 
356
 
 
357
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
358
# AM_INIT_AUTOMAKE([OPTIONS])
 
359
# -----------------------------------------------
 
360
# The call with PACKAGE and VERSION arguments is the old style
 
361
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
362
# and VERSION should now be passed to AC_INIT and removed from
 
363
# the call to AM_INIT_AUTOMAKE.
 
364
# We support both call styles for the transition.  After
 
365
# the next Automake release, Autoconf can make the AC_INIT
 
366
# arguments mandatory, and then we can depend on a new Autoconf
 
367
# release and drop the old call support.
 
368
AC_DEFUN([AM_INIT_AUTOMAKE],
 
369
[AC_PREREQ([2.58])dnl
 
370
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
371
dnl the ones we care about.
 
372
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
373
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
374
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
375
# test to see if srcdir already configured
 
376
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
377
   test -f $srcdir/config.status; then
 
378
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
379
fi
 
380
 
 
381
# test whether we have cygpath
 
382
if test -z "$CYGPATH_W"; then
 
383
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
384
    CYGPATH_W='cygpath -w'
 
385
  else
 
386
    CYGPATH_W=echo
 
387
  fi
 
388
fi
 
389
AC_SUBST([CYGPATH_W])
 
390
 
 
391
# Define the identity of the package.
 
392
dnl Distinguish between old-style and new-style calls.
 
393
m4_ifval([$2],
 
394
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
395
 AC_SUBST([PACKAGE], [$1])dnl
 
396
 AC_SUBST([VERSION], [$2])],
 
397
[_AM_SET_OPTIONS([$1])dnl
 
398
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
399
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
400
 
 
401
_AM_IF_OPTION([no-define],,
 
402
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
403
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
404
 
 
405
# Some tools Automake needs.
 
406
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
407
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
408
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
409
AM_MISSING_PROG(AUTOCONF, autoconf)
 
410
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
411
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
412
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
413
AM_PROG_INSTALL_SH
 
414
AM_PROG_INSTALL_STRIP
 
415
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
416
# We need awk for the "check" target.  The system "awk" is bad on
 
417
# some platforms.
 
418
AC_REQUIRE([AC_PROG_AWK])dnl
 
419
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
420
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
421
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
422
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
423
                             [_AM_PROG_TAR([v7])])])
 
424
_AM_IF_OPTION([no-dependencies],,
 
425
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
426
                  [_AM_DEPENDENCIES(CC)],
 
427
                  [define([AC_PROG_CC],
 
428
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
429
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
430
                  [_AM_DEPENDENCIES(CXX)],
 
431
                  [define([AC_PROG_CXX],
 
432
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
433
])
 
434
])
 
435
 
 
436
 
 
437
# When config.status generates a header, we must update the stamp-h file.
 
438
# This file resides in the same directory as the config header
 
439
# that is generated.  The stamp files are numbered to have different names.
 
440
 
 
441
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
442
# loop where config.status creates the headers, so we can generate
 
443
# our stamp files there.
 
444
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
445
[# Compute $1's index in $config_headers.
 
446
_am_stamp_count=1
 
447
for _am_header in $config_headers :; do
 
448
  case $_am_header in
 
449
    $1 | $1:* )
 
450
      break ;;
 
451
    * )
 
452
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
453
  esac
 
454
done
 
455
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
456
 
 
457
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
458
#
 
459
# This file is free software; the Free Software Foundation
 
460
# gives unlimited permission to copy and/or distribute it,
 
461
# with or without modifications, as long as this notice is preserved.
 
462
 
 
463
# AM_PROG_INSTALL_SH
 
464
# ------------------
 
465
# Define $install_sh.
 
466
AC_DEFUN([AM_PROG_INSTALL_SH],
 
467
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
468
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
469
AC_SUBST(install_sh)])
 
470
 
 
471
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
472
#
 
473
# This file is free software; the Free Software Foundation
 
474
# gives unlimited permission to copy and/or distribute it,
 
475
# with or without modifications, as long as this notice is preserved.
758
476
 
759
477
# serial 2
760
478
 
 
479
# Check whether the underlying file-system supports filenames
 
480
# with a leading dot.  For instance MS-DOS doesn't.
 
481
AC_DEFUN([AM_SET_LEADING_DOT],
 
482
[rm -rf .tst 2>/dev/null
 
483
mkdir .tst 2>/dev/null
 
484
if test -d .tst; then
 
485
  am__leading_dot=.
 
486
else
 
487
  am__leading_dot=_
 
488
fi
 
489
rmdir .tst 2>/dev/null
 
490
AC_SUBST([am__leading_dot])])
 
491
 
 
492
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
493
 
 
494
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
495
#
 
496
# This file is free software; the Free Software Foundation
 
497
# gives unlimited permission to copy and/or distribute it,
 
498
# with or without modifications, as long as this notice is preserved.
 
499
 
 
500
# serial 3
 
501
 
761
502
# AM_MAKE_INCLUDE()
762
503
# -----------------
763
504
# Check to see how make treats includes.
800
541
rm -f confinc confmf
801
542
])
802
543
 
803
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
804
 
 
805
 
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
806
 
 
807
 
# This program is free software; you can redistribute it and/or modify
808
 
# it under the terms of the GNU General Public License as published by
809
 
# the Free Software Foundation; either version 2, or (at your option)
810
 
# any later version.
811
 
 
812
 
# This program is distributed in the hope that it will be useful,
813
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
814
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
815
 
# GNU General Public License for more details.
816
 
 
817
 
# You should have received a copy of the GNU General Public License
818
 
# along with this program; if not, write to the Free Software
819
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
820
 
# 02111-1307, USA.
821
 
 
822
 
# serial 5
823
 
 
824
 
AC_PREREQ(2.52)
825
 
 
826
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
827
 
# -------------------------------------
828
 
# Define a conditional.
829
 
AC_DEFUN([AM_CONDITIONAL],
830
 
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
831
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
832
 
AC_SUBST([$1_TRUE])
833
 
AC_SUBST([$1_FALSE])
834
 
if $2; then
835
 
  $1_TRUE=
836
 
  $1_FALSE='#'
837
 
else
838
 
  $1_TRUE='#'
839
 
  $1_FALSE=
840
 
fi
841
 
AC_CONFIG_COMMANDS_PRE(
842
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
843
 
  AC_MSG_ERROR([conditional "$1" was never defined.
844
 
Usually this means the macro was only invoked conditionally.])
845
 
fi])])
846
 
 
847
 
# isc-posix.m4 serial 2 (gettext-0.11.2)
848
 
dnl Copyright (C) 1995-2002 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
 
# This file is not needed with autoconf-2.53 and newer.  Remove it in 2005.
856
 
 
857
 
# This test replaces the one in autoconf.
858
 
# Currently this macro should have the same name as the autoconf macro
859
 
# because gettext's gettext.m4 (distributed in the automake package)
860
 
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
861
 
# give these diagnostics:
862
 
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
863
 
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
864
 
 
865
 
undefine([AC_ISC_POSIX])
866
 
 
867
 
AC_DEFUN([AC_ISC_POSIX],
868
 
  [
869
 
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
870
 
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
871
 
  ]
872
 
)
873
 
 
874
 
 
875
 
# Copyright 1996, 1997, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
876
 
 
877
 
# This program is free software; you can redistribute it and/or modify
878
 
# it under the terms of the GNU General Public License as published by
879
 
# the Free Software Foundation; either version 2, or (at your option)
880
 
# any later version.
881
 
 
882
 
# This program is distributed in the hope that it will be useful,
883
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
884
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
885
 
# GNU General Public License for more details.
886
 
 
887
 
# You should have received a copy of the GNU General Public License
888
 
# along with this program; if not, write to the Free Software
889
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
890
 
# 02111-1307, USA.
891
 
 
892
 
# serial 2
 
544
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
545
 
 
546
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
547
# Free Software Foundation, Inc.
 
548
#
 
549
# This file is free software; the Free Software Foundation
 
550
# gives unlimited permission to copy and/or distribute it,
 
551
# with or without modifications, as long as this notice is preserved.
 
552
 
 
553
# serial 4
 
554
 
 
555
# AM_MISSING_PROG(NAME, PROGRAM)
 
556
# ------------------------------
 
557
AC_DEFUN([AM_MISSING_PROG],
 
558
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
559
$1=${$1-"${am_missing_run}$2"}
 
560
AC_SUBST($1)])
 
561
 
 
562
 
 
563
# AM_MISSING_HAS_RUN
 
564
# ------------------
 
565
# Define MISSING if not defined so far and test if it supports --run.
 
566
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
567
AC_DEFUN([AM_MISSING_HAS_RUN],
 
568
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
569
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
570
# Use eval to expand $SHELL
 
571
if eval "$MISSING --run true"; then
 
572
  am_missing_run="$MISSING --run "
 
573
else
 
574
  am_missing_run=
 
575
  AC_MSG_WARN([`missing' script is too old or missing])
 
576
fi
 
577
])
 
578
 
 
579
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
580
#
 
581
# This file is free software; the Free Software Foundation
 
582
# gives unlimited permission to copy and/or distribute it,
 
583
# with or without modifications, as long as this notice is preserved.
 
584
 
 
585
# AM_PROG_MKDIR_P
 
586
# ---------------
 
587
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
588
#
 
589
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
590
# created by `make install' are always world readable, even if the
 
591
# installer happens to have an overly restrictive umask (e.g. 077).
 
592
# This was a mistake.  There are at least two reasons why we must not
 
593
# use `-m 0755':
 
594
#   - it causes special bits like SGID to be ignored,
 
595
#   - it may be too restrictive (some setups expect 775 directories).
 
596
#
 
597
# Do not use -m 0755 and let people choose whatever they expect by
 
598
# setting umask.
 
599
#
 
600
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
601
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
602
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
603
# concurrently, both version can detect that a/ is missing, but only
 
604
# one can create it and the other will error out.  Consequently we
 
605
# restrict ourselves to GNU make (using the --version option ensures
 
606
# this.)
 
607
AC_DEFUN([AM_PROG_MKDIR_P],
 
608
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
609
  # We used to keeping the `.' as first argument, in order to
 
610
  # allow $(mkdir_p) to be used without argument.  As in
 
611
  #   $(mkdir_p) $(somedir)
 
612
  # where $(somedir) is conditionally defined.  However this is wrong
 
613
  # for two reasons:
 
614
  #  1. if the package is installed by a user who cannot write `.'
 
615
  #     make install will fail,
 
616
  #  2. the above comment should most certainly read
 
617
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
618
  #     so it does not work when $(somedir) is undefined and
 
619
  #     $(DESTDIR) is not.
 
620
  #  To support the latter case, we have to write
 
621
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
622
  #  so the `.' trick is pointless.
 
623
  mkdir_p='mkdir -p --'
 
624
else
 
625
  # On NextStep and OpenStep, the `mkdir' command does not
 
626
  # recognize any option.  It will interpret all options as
 
627
  # directories to create, and then abort because `.' already
 
628
  # exists.
 
629
  for d in ./-p ./--version;
 
630
  do
 
631
    test -d $d && rmdir $d
 
632
  done
 
633
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
634
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
635
    mkdir_p='$(mkinstalldirs)'
 
636
  else
 
637
    mkdir_p='$(install_sh) -d'
 
638
  fi
 
639
fi
 
640
AC_SUBST([mkdir_p])])
 
641
 
 
642
# Helper functions for option handling.                     -*- Autoconf -*-
 
643
 
 
644
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
645
#
 
646
# This file is free software; the Free Software Foundation
 
647
# gives unlimited permission to copy and/or distribute it,
 
648
# with or without modifications, as long as this notice is preserved.
 
649
 
 
650
# serial 3
 
651
 
 
652
# _AM_MANGLE_OPTION(NAME)
 
653
# -----------------------
 
654
AC_DEFUN([_AM_MANGLE_OPTION],
 
655
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
656
 
 
657
# _AM_SET_OPTION(NAME)
 
658
# ------------------------------
 
659
# Set option NAME.  Presently that only means defining a flag for this option.
 
660
AC_DEFUN([_AM_SET_OPTION],
 
661
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
662
 
 
663
# _AM_SET_OPTIONS(OPTIONS)
 
664
# ----------------------------------
 
665
# OPTIONS is a space-separated list of Automake options.
 
666
AC_DEFUN([_AM_SET_OPTIONS],
 
667
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
668
 
 
669
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
670
# -------------------------------------------
 
671
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
672
AC_DEFUN([_AM_IF_OPTION],
 
673
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
674
 
 
675
# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005
 
676
# Free Software Foundation, Inc.
 
677
#
 
678
# This file is free software; the Free Software Foundation
 
679
# gives unlimited permission to copy and/or distribute it,
 
680
# with or without modifications, as long as this notice is preserved.
 
681
 
 
682
# serial 4
893
683
 
894
684
AC_DEFUN([AM_C_PROTOTYPES],
895
 
[AC_REQUIRE([AM_PROG_CC_STDC])
896
 
AC_REQUIRE([AC_PROG_CPP])
897
 
AC_MSG_CHECKING([for function prototypes])
898
 
if test "$am_cv_prog_cc_stdc" != no; then
899
 
  AC_MSG_RESULT(yes)
900
 
  AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
 
685
[AC_REQUIRE([AC_C_PROTOTYPES])
 
686
if test "$ac_cv_prog_cc_stdc" != no; then
901
687
  U= ANSI2KNR=
902
688
else
903
 
  AC_MSG_RESULT(no)
904
689
  U=_ ANSI2KNR=./ansi2knr
905
690
fi
906
691
# Ensure some checks needed by ansi2knr itself.
907
 
AC_HEADER_STDC
 
692
AC_REQUIRE([AC_HEADER_STDC])
908
693
AC_CHECK_HEADERS(string.h)
909
694
AC_SUBST(U)dnl
910
695
AC_SUBST(ANSI2KNR)dnl
912
697
 
913
698
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
914
699
 
915
 
 
916
 
# Copyright 1996, 1997, 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
917
 
 
918
 
# This program is free software; you can redistribute it and/or modify
919
 
# it under the terms of the GNU General Public License as published by
920
 
# the Free Software Foundation; either version 2, or (at your option)
921
 
# any later version.
922
 
 
923
 
# This program is distributed in the hope that it will be useful,
924
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
925
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
926
 
# GNU General Public License for more details.
927
 
 
928
 
# You should have received a copy of the GNU General Public License
929
 
# along with this program; if not, write to the Free Software
930
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
931
 
# 02111-1307, USA.
 
700
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
701
 
 
702
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
703
# Free Software Foundation, Inc.
 
704
#
 
705
# This file is free software; the Free Software Foundation
 
706
# gives unlimited permission to copy and/or distribute it,
 
707
# with or without modifications, as long as this notice is preserved.
 
708
 
 
709
# serial 4
 
710
 
 
711
# AM_SANITY_CHECK
 
712
# ---------------
 
713
AC_DEFUN([AM_SANITY_CHECK],
 
714
[AC_MSG_CHECKING([whether build environment is sane])
 
715
# Just in case
 
716
sleep 1
 
717
echo timestamp > conftest.file
 
718
# Do `set' in a subshell so we don't clobber the current shell's
 
719
# arguments.  Must try -L first in case configure is actually a
 
720
# symlink; some systems play weird games with the mod time of symlinks
 
721
# (eg FreeBSD returns the mod time of the symlink's containing
 
722
# directory).
 
723
if (
 
724
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
725
   if test "$[*]" = "X"; then
 
726
      # -L didn't work.
 
727
      set X `ls -t $srcdir/configure conftest.file`
 
728
   fi
 
729
   rm -f conftest.file
 
730
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
731
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
732
 
 
733
      # If neither matched, then we have a broken ls.  This can happen
 
734
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
735
      # broken ls alias from the environment.  This has actually
 
736
      # happened.  Such a system could not be considered "sane".
 
737
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
738
alias in your environment])
 
739
   fi
 
740
 
 
741
   test "$[2]" = conftest.file
 
742
   )
 
743
then
 
744
   # Ok.
 
745
   :
 
746
else
 
747
   AC_MSG_ERROR([newly created file is older than distributed files!
 
748
Check your system clock])
 
749
fi
 
750
AC_MSG_RESULT(yes)])
 
751
 
 
752
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
753
#
 
754
# This file is free software; the Free Software Foundation
 
755
# gives unlimited permission to copy and/or distribute it,
 
756
# with or without modifications, as long as this notice is preserved.
 
757
 
 
758
# AM_PROG_INSTALL_STRIP
 
759
# ---------------------
 
760
# One issue with vendor `install' (even GNU) is that you can't
 
761
# specify the program used to strip binaries.  This is especially
 
762
# annoying in cross-compiling environments, where the build's strip
 
763
# is unlikely to handle the host's binaries.
 
764
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
765
# always use install-sh in `make install-strip', and initialize
 
766
# STRIPPROG with the value of the STRIP variable (set by the user).
 
767
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
768
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
769
# Installed binaries are usually stripped using `strip' when the user
 
770
# run `make install-strip'.  However `strip' might not be the right
 
771
# tool to use in cross-compilation environments, therefore Automake
 
772
# will honor the `STRIP' environment variable to overrule this program.
 
773
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
774
if test "$cross_compiling" != no; then
 
775
  AC_CHECK_TOOL([STRIP], [strip], :)
 
776
fi
 
777
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
778
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
779
 
 
780
# Check how to create a tarball.                            -*- Autoconf -*-
 
781
 
 
782
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
783
#
 
784
# This file is free software; the Free Software Foundation
 
785
# gives unlimited permission to copy and/or distribute it,
 
786
# with or without modifications, as long as this notice is preserved.
932
787
 
933
788
# serial 2
934
789
 
935
 
# @defmac AC_PROG_CC_STDC
936
 
# @maindex PROG_CC_STDC
937
 
# @ovindex CC
938
 
# If the C compiler in not in ANSI C mode by default, try to add an option
939
 
# to output variable @code{CC} to make it so.  This macro tries various
940
 
# options that select ANSI C on some system or another.  It considers the
941
 
# compiler to be in ANSI C mode if it handles function prototypes correctly.
942
 
#
943
 
# If you use this macro, you should check after calling it whether the C
944
 
# compiler has been set to accept ANSI C; if not, the shell variable
945
 
# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
946
 
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
947
 
# program @code{ansi2knr}, which comes with Ghostscript.
948
 
# @end defmac
949
 
 
950
 
AC_DEFUN([AM_PROG_CC_STDC],
951
 
[AC_REQUIRE([AC_PROG_CC])
952
 
AC_BEFORE([$0], [AC_C_INLINE])
953
 
AC_BEFORE([$0], [AC_C_CONST])
954
 
dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
955
 
dnl a magic option to avoid problems with ANSI preprocessor commands
956
 
dnl like #elif.
957
 
dnl FIXME: can't do this because then AC_AIX won't work due to a
958
 
dnl circular dependency.
959
 
dnl AC_BEFORE([$0], [AC_PROG_CPP])
960
 
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
961
 
AC_CACHE_VAL(am_cv_prog_cc_stdc,
962
 
[am_cv_prog_cc_stdc=no
963
 
ac_save_CC="$CC"
964
 
# Don't try gcc -ansi; that turns off useful extensions and
965
 
# breaks some systems' header files.
966
 
# AIX                   -qlanglvl=ansi
967
 
# Ultrix and OSF/1      -std1
968
 
# HP-UX 10.20 and later -Ae
969
 
# HP-UX older versions  -Aa -D_HPUX_SOURCE
970
 
# SVR4                  -Xc -D__EXTENSIONS__
971
 
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 
790
# _AM_PROG_TAR(FORMAT)
 
791
# --------------------
 
792
# Check how to create a tarball in format FORMAT.
 
793
# FORMAT should be one of `v7', `ustar', or `pax'.
 
794
#
 
795
# Substitute a variable $(am__tar) that is a command
 
796
# writing to stdout a FORMAT-tarball containing the directory
 
797
# $tardir.
 
798
#     tardir=directory && $(am__tar) > result.tar
 
799
#
 
800
# Substitute a variable $(am__untar) that extract such
 
801
# a tarball read from stdin.
 
802
#     $(am__untar) < result.tar
 
803
AC_DEFUN([_AM_PROG_TAR],
 
804
[# Always define AMTAR for backward compatibility.
 
805
AM_MISSING_PROG([AMTAR], [tar])
 
806
m4_if([$1], [v7],
 
807
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
808
     [m4_case([$1], [ustar],, [pax],,
 
809
              [m4_fatal([Unknown tar format])])
 
810
AC_MSG_CHECKING([how to create a $1 tar archive])
 
811
# Loop over all known methods to create a tar archive until one works.
 
812
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
813
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
814
# Do not fold the above two line into one, because Tru64 sh and
 
815
# Solaris sh will not grok spaces in the rhs of `-'.
 
816
for _am_tool in $_am_tools
972
817
do
973
 
  CC="$ac_save_CC $ac_arg"
974
 
  AC_TRY_COMPILE(
975
 
[#include <stdarg.h>
976
 
#include <stdio.h>
977
 
#include <sys/types.h>
978
 
#include <sys/stat.h>
979
 
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
980
 
struct buf { int x; };
981
 
FILE * (*rcsopen) (struct buf *, struct stat *, int);
982
 
static char *e (p, i)
983
 
     char **p;
984
 
     int i;
985
 
{
986
 
  return p[i];
987
 
}
988
 
static char *f (char * (*g) (char **, int), char **p, ...)
989
 
{
990
 
  char *s;
991
 
  va_list v;
992
 
  va_start (v,p);
993
 
  s = g (p, va_arg (v,int));
994
 
  va_end (v);
995
 
  return s;
996
 
}
997
 
int test (int i, double x);
998
 
struct s1 {int (*f) (int a);};
999
 
struct s2 {int (*f) (double a);};
1000
 
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1001
 
int argc;
1002
 
char **argv;
1003
 
], [
1004
 
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1005
 
],
1006
 
[am_cv_prog_cc_stdc="$ac_arg"; break])
 
818
  case $_am_tool in
 
819
  gnutar)
 
820
    for _am_tar in tar gnutar gtar;
 
821
    do
 
822
      AM_RUN_LOG([$_am_tar --version]) && break
 
823
    done
 
824
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
825
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
826
    am__untar="$_am_tar -xf -"
 
827
    ;;
 
828
  plaintar)
 
829
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
830
    # ustar tarball either.
 
831
    (tar --version) >/dev/null 2>&1 && continue
 
832
    am__tar='tar chf - "$$tardir"'
 
833
    am__tar_='tar chf - "$tardir"'
 
834
    am__untar='tar xf -'
 
835
    ;;
 
836
  pax)
 
837
    am__tar='pax -L -x $1 -w "$$tardir"'
 
838
    am__tar_='pax -L -x $1 -w "$tardir"'
 
839
    am__untar='pax -r'
 
840
    ;;
 
841
  cpio)
 
842
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
843
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
844
    am__untar='cpio -i -H $1 -d'
 
845
    ;;
 
846
  none)
 
847
    am__tar=false
 
848
    am__tar_=false
 
849
    am__untar=false
 
850
    ;;
 
851
  esac
 
852
 
 
853
  # If the value was cached, stop now.  We just wanted to have am__tar
 
854
  # and am__untar set.
 
855
  test -n "${am_cv_prog_tar_$1}" && break
 
856
 
 
857
  # tar/untar a dummy directory, and stop if the command works
 
858
  rm -rf conftest.dir
 
859
  mkdir conftest.dir
 
860
  echo GrepMe > conftest.dir/file
 
861
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
862
  rm -rf conftest.dir
 
863
  if test -s conftest.tar; then
 
864
    AM_RUN_LOG([$am__untar <conftest.tar])
 
865
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
866
  fi
1007
867
done
1008
 
CC="$ac_save_CC"
1009
 
])
1010
 
if test -z "$am_cv_prog_cc_stdc"; then
1011
 
  AC_MSG_RESULT([none needed])
1012
 
else
1013
 
  AC_MSG_RESULT([$am_cv_prog_cc_stdc])
1014
 
fi
1015
 
case "x$am_cv_prog_cc_stdc" in
1016
 
  x|xno) ;;
1017
 
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
1018
 
esac
1019
 
])
1020
 
 
1021
 
AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
1022
 
 
1023
 
# gettext.m4 serial 17 (gettext-0.11.5)
1024
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1025
 
dnl This file is free software, distributed under the terms of the GNU
1026
 
dnl General Public License.  As a special exception to the GNU General
1027
 
dnl Public License, this file may be distributed as part of a program
1028
 
dnl that contains a configuration script generated by Autoconf, under
1029
 
dnl the same distribution terms as the rest of that program.
1030
 
dnl
1031
 
dnl This file can can be used in projects which are not available under
1032
 
dnl the GNU General Public License or the GNU Library General Public
1033
 
dnl License but which still want to provide support for the GNU gettext
1034
 
dnl functionality.
1035
 
dnl Please note that the actual code of the GNU gettext library is covered
1036
 
dnl by the GNU Library General Public License, and the rest of the GNU
1037
 
dnl gettext package package is covered by the GNU General Public License.
1038
 
dnl They are *not* in the public domain.
1039
 
 
1040
 
dnl Authors:
1041
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1042
 
dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2002.
1043
 
 
1044
 
dnl Macro to add for using GNU gettext.
1045
 
 
1046
 
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
1047
 
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
1048
 
dnl    default (if it is not specified or empty) is 'no-libtool'.
1049
 
dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
1050
 
dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
1051
 
dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
1052
 
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
1053
 
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
1054
 
dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
1055
 
dnl    $(top_builddir)/intl/libintl.a will be created.
1056
 
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
1057
 
dnl    implementations (in libc or libintl) without the ngettext() function
1058
 
dnl    will be ignored.  If NEEDSYMBOL is specified and is
1059
 
dnl    'need-formatstring-macros', then GNU gettext implementations that don't
1060
 
dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
1061
 
dnl INTLDIR is used to find the intl libraries.  If empty,
1062
 
dnl    the value `$(top_builddir)/intl/' is used.
1063
 
dnl
1064
 
dnl The result of the configuration is one of three cases:
1065
 
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
1066
 
dnl    and used.
1067
 
dnl    Catalog format: GNU --> install in $(datadir)
1068
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
1069
 
dnl 2) GNU gettext has been found in the system's C library.
1070
 
dnl    Catalog format: GNU --> install in $(datadir)
1071
 
dnl    Catalog extension: .mo after installation, .gmo in source tree
1072
 
dnl 3) No internationalization, always use English msgid.
1073
 
dnl    Catalog format: none
1074
 
dnl    Catalog extension: none
1075
 
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
1076
 
dnl The use of .gmo is historical (it was needed to avoid overwriting the
1077
 
dnl GNU format catalogs when building on a platform with an X/Open gettext),
1078
 
dnl but we keep it in order not to force irrelevant filename changes on the
1079
 
dnl maintainers.
1080
 
dnl
1081
 
AC_DEFUN([AM_GNU_GETTEXT],
1082
 
[
1083
 
  dnl Argument checking.
1084
 
  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
1085
 
    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
1086
 
])])])])])
1087
 
  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
1088
 
    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
1089
 
])])])])
1090
 
  define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
1091
 
  define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
1092
 
 
1093
 
  AC_REQUIRE([AM_PO_SUBDIRS])dnl
1094
 
  ifelse(gt_included_intl, yes, [
1095
 
    AC_REQUIRE([AM_INTL_SUBDIR])dnl
1096
 
  ])
1097
 
 
1098
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
1099
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1100
 
  AC_REQUIRE([AC_LIB_RPATH])
1101
 
 
1102
 
  dnl Sometimes libintl requires libiconv, so first search for libiconv.
1103
 
  dnl Ideally we would do this search only after the
1104
 
  dnl      if test "$USE_NLS" = "yes"; then
1105
 
  dnl        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1106
 
  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
1107
 
  dnl the configure script would need to contain the same shell code
1108
 
  dnl again, outside any 'if'. There are two solutions:
1109
 
  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
1110
 
  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
1111
 
  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
1112
 
  dnl documented, we avoid it.
1113
 
  ifelse(gt_included_intl, yes, , [
1114
 
    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
1115
 
  ])
1116
 
 
1117
 
  AC_MSG_CHECKING([whether NLS is requested])
1118
 
  dnl Default is enabled NLS
1119
 
  AC_ARG_ENABLE(nls,
1120
 
    [  --disable-nls           do not use Native Language Support],
1121
 
    USE_NLS=$enableval, USE_NLS=yes)
1122
 
  AC_MSG_RESULT($USE_NLS)
1123
 
  AC_SUBST(USE_NLS)
1124
 
 
1125
 
  ifelse(gt_included_intl, yes, [
1126
 
    BUILD_INCLUDED_LIBINTL=no
1127
 
    USE_INCLUDED_LIBINTL=no
1128
 
  ])
1129
 
  LIBINTL=
1130
 
  LTLIBINTL=
1131
 
  POSUB=
1132
 
 
1133
 
  dnl If we use NLS figure out what method
1134
 
  if test "$USE_NLS" = "yes"; then
1135
 
    gt_use_preinstalled_gnugettext=no
1136
 
    ifelse(gt_included_intl, yes, [
1137
 
      AC_MSG_CHECKING([whether included gettext is requested])
1138
 
      AC_ARG_WITH(included-gettext,
1139
 
        [  --with-included-gettext use the GNU gettext library included here],
1140
 
        nls_cv_force_use_gnu_gettext=$withval,
1141
 
        nls_cv_force_use_gnu_gettext=no)
1142
 
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
1143
 
 
1144
 
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
1145
 
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
1146
 
    ])
1147
 
        dnl User does not insist on using GNU NLS library.  Figure out what
1148
 
        dnl to use.  If GNU gettext is available we use this.  Else we have
1149
 
        dnl to fall back to GNU NLS library.
1150
 
 
1151
 
        dnl Add a version number to the cache macros.
1152
 
        define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
1153
 
        define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
1154
 
        define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
1155
 
 
1156
 
        AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
1157
 
         [AC_TRY_LINK([#include <libintl.h>
1158
 
]ifelse([$2], [need-formatstring-macros],
1159
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1160
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1161
 
#endif
1162
 
changequote(,)dnl
1163
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1164
 
changequote([,])dnl
1165
 
], [])[extern int _nl_msg_cat_cntr;
1166
 
extern int *_nl_domain_bindings;],
1167
 
            [bindtextdomain ("", "");
1168
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
1169
 
            gt_cv_func_gnugettext_libc=yes,
1170
 
            gt_cv_func_gnugettext_libc=no)])
1171
 
 
1172
 
        if test "$gt_cv_func_gnugettext_libc" != "yes"; then
1173
 
          dnl Sometimes libintl requires libiconv, so first search for libiconv.
1174
 
          ifelse(gt_included_intl, yes, , [
1175
 
            AM_ICONV_LINK
1176
 
          ])
1177
 
          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
1178
 
          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
1179
 
          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
1180
 
          dnl even if libiconv doesn't exist.
1181
 
          AC_LIB_LINKFLAGS_BODY([intl])
1182
 
          AC_CACHE_CHECK([for GNU gettext in libintl],
1183
 
            gt_cv_func_gnugettext_libintl,
1184
 
           [gt_save_CPPFLAGS="$CPPFLAGS"
1185
 
            CPPFLAGS="$CPPFLAGS $INCINTL"
1186
 
            gt_save_LIBS="$LIBS"
1187
 
            LIBS="$LIBS $LIBINTL"
1188
 
            dnl Now see whether libintl exists and does not depend on libiconv.
1189
 
            AC_TRY_LINK([#include <libintl.h>
1190
 
]ifelse([$2], [need-formatstring-macros],
1191
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1192
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1193
 
#endif
1194
 
changequote(,)dnl
1195
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1196
 
changequote([,])dnl
1197
 
], [])[extern int _nl_msg_cat_cntr;
1198
 
extern
1199
 
#ifdef __cplusplus
1200
 
"C"
1201
 
#endif
1202
 
const char *_nl_expand_alias ();],
1203
 
              [bindtextdomain ("", "");
1204
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1205
 
              gt_cv_func_gnugettext_libintl=yes,
1206
 
              gt_cv_func_gnugettext_libintl=no)
1207
 
            dnl Now see whether libintl exists and depends on libiconv.
1208
 
            if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
1209
 
              LIBS="$LIBS $LIBICONV"
1210
 
              AC_TRY_LINK([#include <libintl.h>
1211
 
]ifelse([$2], [need-formatstring-macros],
1212
 
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1213
 
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
1214
 
#endif
1215
 
changequote(,)dnl
1216
 
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
1217
 
changequote([,])dnl
1218
 
], [])[extern int _nl_msg_cat_cntr;
1219
 
extern
1220
 
#ifdef __cplusplus
1221
 
"C"
1222
 
#endif
1223
 
const char *_nl_expand_alias ();],
1224
 
                [bindtextdomain ("", "");
1225
 
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
1226
 
               [LIBINTL="$LIBINTL $LIBICONV"
1227
 
                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
1228
 
                gt_cv_func_gnugettext_libintl=yes
1229
 
               ])
1230
 
            fi
1231
 
            CPPFLAGS="$gt_save_CPPFLAGS"
1232
 
            LIBS="$gt_save_LIBS"])
1233
 
        fi
1234
 
 
1235
 
        dnl If an already present or preinstalled GNU gettext() is found,
1236
 
        dnl use it.  But if this macro is used in GNU gettext, and GNU
1237
 
        dnl gettext is already preinstalled in libintl, we update this
1238
 
        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
1239
 
        if test "$gt_cv_func_gnugettext_libc" = "yes" \
1240
 
           || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
1241
 
                && test "$PACKAGE" != gettext; }; then
1242
 
          gt_use_preinstalled_gnugettext=yes
1243
 
        else
1244
 
          dnl Reset the values set by searching for libintl.
1245
 
          LIBINTL=
1246
 
          LTLIBINTL=
1247
 
          INCINTL=
1248
 
        fi
1249
 
 
1250
 
    ifelse(gt_included_intl, yes, [
1251
 
        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
1252
 
          dnl GNU gettext is not found in the C library.
1253
 
          dnl Fall back on included GNU gettext library.
1254
 
          nls_cv_use_gnu_gettext=yes
1255
 
        fi
1256
 
      fi
1257
 
 
1258
 
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
1259
 
        dnl Mark actions used to generate GNU NLS library.
1260
 
        INTLOBJS="\$(GETTOBJS)"
1261
 
        BUILD_INCLUDED_LIBINTL=yes
1262
 
        USE_INCLUDED_LIBINTL=yes
1263
 
        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
1264
 
        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
1265
 
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
1266
 
      fi
1267
 
 
1268
 
      if test "$gt_use_preinstalled_gnugettext" = "yes" \
1269
 
         || test "$nls_cv_use_gnu_gettext" = "yes"; then
1270
 
        dnl Mark actions to use GNU gettext tools.
1271
 
        CATOBJEXT=.gmo
1272
 
      fi
1273
 
    ])
1274
 
 
1275
 
    if test "$gt_use_preinstalled_gnugettext" = "yes" \
1276
 
       || test "$nls_cv_use_gnu_gettext" = "yes"; then
1277
 
      AC_DEFINE(ENABLE_NLS, 1,
1278
 
        [Define to 1 if translation of program messages to the user's native language
1279
 
   is requested.])
1280
 
    else
1281
 
      USE_NLS=no
1282
 
    fi
1283
 
  fi
1284
 
 
1285
 
  if test "$USE_NLS" = "yes"; then
1286
 
 
1287
 
    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
1288
 
      if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
1289
 
        AC_MSG_CHECKING([how to link with libintl])
1290
 
        AC_MSG_RESULT([$LIBINTL])
1291
 
        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
1292
 
      fi
1293
 
 
1294
 
      dnl For backward compatibility. Some packages may be using this.
1295
 
      AC_DEFINE(HAVE_GETTEXT, 1,
1296
 
       [Define if the GNU gettext() function is already present or preinstalled.])
1297
 
      AC_DEFINE(HAVE_DCGETTEXT, 1,
1298
 
       [Define if the GNU dcgettext() function is already present or preinstalled.])
1299
 
    fi
1300
 
 
1301
 
    dnl We need to process the po/ directory.
1302
 
    POSUB=po
1303
 
  fi
1304
 
 
1305
 
  ifelse(gt_included_intl, yes, [
1306
 
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
1307
 
    dnl to 'yes' because some of the testsuite requires it.
1308
 
    if test "$PACKAGE" = gettext; then
1309
 
      BUILD_INCLUDED_LIBINTL=yes
1310
 
    fi
1311
 
 
1312
 
    dnl Make all variables we use known to autoconf.
1313
 
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
1314
 
    AC_SUBST(USE_INCLUDED_LIBINTL)
1315
 
    AC_SUBST(CATOBJEXT)
1316
 
    AC_SUBST(INTLOBJS)
1317
 
 
1318
 
    dnl For backward compatibility. Some configure.ins may be using this.
1319
 
    nls_cv_header_intl=
1320
 
    nls_cv_header_libgt=
1321
 
 
1322
 
    dnl For backward compatibility. Some Makefiles may be using this.
1323
 
    DATADIRNAME=share
1324
 
    AC_SUBST(DATADIRNAME)
1325
 
 
1326
 
    dnl For backward compatibility. Some Makefiles may be using this.
1327
 
    INSTOBJEXT=.mo
1328
 
    AC_SUBST(INSTOBJEXT)
1329
 
 
1330
 
    dnl For backward compatibility. Some Makefiles may be using this.
1331
 
    GENCAT=gencat
1332
 
    AC_SUBST(GENCAT)
1333
 
 
1334
 
    dnl Enable libtool support if the surrounding package wishes it.
1335
 
    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
1336
 
    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
1337
 
  ])
1338
 
 
1339
 
  dnl For backward compatibility. Some Makefiles may be using this.
1340
 
  INTLLIBS="$LIBINTL"
1341
 
  AC_SUBST(INTLLIBS)
1342
 
 
1343
 
  dnl Make all documented variables known to autoconf.
1344
 
  AC_SUBST(LIBINTL)
1345
 
  AC_SUBST(LTLIBINTL)
1346
 
  AC_SUBST(POSUB)
1347
 
])
1348
 
 
1349
 
 
1350
 
dnl Checks for all prerequisites of the po subdirectory,
1351
 
dnl except for USE_NLS.
1352
 
AC_DEFUN([AM_PO_SUBDIRS],
1353
 
[
1354
 
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1355
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
1356
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1357
 
 
1358
 
  dnl Perform the following tests also if --disable-nls has been given,
1359
 
  dnl because they are needed for "make dist" to work.
1360
 
 
1361
 
  dnl Search for GNU msgfmt in the PATH.
1362
 
  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1363
 
  dnl The second test excludes FreeBSD msgfmt.
1364
 
  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1365
 
    [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
1366
 
     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1367
 
    :)
1368
 
  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1369
 
 
1370
 
  dnl Search for GNU xgettext 0.11 or newer in the PATH.
1371
 
  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1372
 
  dnl The second test excludes FreeBSD xgettext.
1373
 
  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1374
 
    [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1375
 
     (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)],
1376
 
    :)
1377
 
  dnl Remove leftover from FreeBSD xgettext call.
1378
 
  rm -f messages.po
1379
 
 
1380
 
  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1381
 
  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1382
 
    [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
1383
 
 
1384
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1385
 
  dnl Test whether we really found GNU msgfmt.
1386
 
  if test "$GMSGFMT" != ":"; then
1387
 
    dnl If it is no GNU msgfmt we define it as : so that the
1388
 
    dnl Makefiles still can work.
1389
 
    if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
1390
 
       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1391
 
      : ;
1392
 
    else
1393
 
      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
1394
 
      AC_MSG_RESULT(
1395
 
        [found $GMSGFMT program is not GNU msgfmt; ignore it])
1396
 
      GMSGFMT=":"
1397
 
    fi
1398
 
  fi
1399
 
 
1400
 
  dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
1401
 
  dnl Test whether we really found GNU xgettext.
1402
 
  if test "$XGETTEXT" != ":"; then
1403
 
    dnl If it is no GNU xgettext we define it as : so that the
1404
 
    dnl Makefiles still can work.
1405
 
    if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
1406
 
       (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
1407
 
      : ;
1408
 
    else
1409
 
      AC_MSG_RESULT(
1410
 
        [found xgettext program is not GNU xgettext; ignore it])
1411
 
      XGETTEXT=":"
1412
 
    fi
1413
 
    dnl Remove leftover from FreeBSD xgettext call.
1414
 
    rm -f messages.po
1415
 
  fi
1416
 
 
1417
 
  AC_OUTPUT_COMMANDS([
1418
 
    for ac_file in $CONFIG_FILES; do
1419
 
      # Support "outfile[:infile[:infile...]]"
1420
 
      case "$ac_file" in
1421
 
        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1422
 
      esac
1423
 
      # PO directories have a Makefile.in generated from Makefile.in.in.
1424
 
      case "$ac_file" in */Makefile.in)
1425
 
        # Adjust a relative srcdir.
1426
 
        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1427
 
        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1428
 
        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1429
 
        # In autoconf-2.13 it is called $ac_given_srcdir.
1430
 
        # In autoconf-2.50 it is called $srcdir.
1431
 
        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1432
 
        case "$ac_given_srcdir" in
1433
 
          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1434
 
          /*) top_srcdir="$ac_given_srcdir" ;;
1435
 
          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
1436
 
        esac
1437
 
        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1438
 
          rm -f "$ac_dir/POTFILES"
1439
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1440
 
          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1441
 
          # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1442
 
          # on $ac_dir but don't depend on user-specified configuration
1443
 
          # parameters.
1444
 
          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1445
 
            # The LINGUAS file contains the set of available languages.
1446
 
            if test -n "$ALL_LINGUAS"; then
1447
 
              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1448
 
            fi
1449
 
            ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1450
 
            # Hide the ALL_LINGUAS assigment from automake.
1451
 
            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1452
 
          fi
1453
 
          case "$ac_given_srcdir" in
1454
 
            .) srcdirpre= ;;
1455
 
            *) srcdirpre='$(srcdir)/' ;;
1456
 
          esac
1457
 
          POFILES=
1458
 
          GMOFILES=
1459
 
          UPDATEPOFILES=
1460
 
          DUMMYPOFILES=
1461
 
          for lang in $ALL_LINGUAS; do
1462
 
            POFILES="$POFILES $srcdirpre$lang.po"
1463
 
            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1464
 
            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1465
 
            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1466
 
          done
1467
 
          # CATALOGS depends on both $ac_dir and the user's LINGUAS
1468
 
          # environment variable.
1469
 
          INST_LINGUAS=
1470
 
          if test -n "$ALL_LINGUAS"; then
1471
 
            for presentlang in $ALL_LINGUAS; do
1472
 
              useit=no
1473
 
              if test "%UNSET%" != "$LINGUAS"; then
1474
 
                desiredlanguages="$LINGUAS"
1475
 
              else
1476
 
                desiredlanguages="$ALL_LINGUAS"
1477
 
              fi
1478
 
              for desiredlang in $desiredlanguages; do
1479
 
                # Use the presentlang catalog if desiredlang is
1480
 
                #   a. equal to presentlang, or
1481
 
                #   b. a variant of presentlang (because in this case,
1482
 
                #      presentlang can be used as a fallback for messages
1483
 
                #      which are not translated in the desiredlang catalog).
1484
 
                case "$desiredlang" in
1485
 
                  "$presentlang"*) useit=yes;;
1486
 
                esac
1487
 
              done
1488
 
              if test $useit = yes; then
1489
 
                INST_LINGUAS="$INST_LINGUAS $presentlang"
1490
 
              fi
1491
 
            done
1492
 
          fi
1493
 
          CATALOGS=
1494
 
          if test -n "$INST_LINGUAS"; then
1495
 
            for lang in $INST_LINGUAS; do
1496
 
              CATALOGS="$CATALOGS $lang.gmo"
1497
 
            done
1498
 
          fi
1499
 
          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1500
 
          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"
1501
 
          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1502
 
            if test -f "$f"; then
1503
 
              case "$f" in
1504
 
                *.orig | *.bak | *~) ;;
1505
 
                *) cat "$f" >> "$ac_dir/Makefile" ;;
1506
 
              esac
1507
 
            fi
1508
 
          done
1509
 
        fi
1510
 
        ;;
1511
 
      esac
1512
 
    done],
1513
 
   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1514
 
    # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1515
 
    # from automake.
1516
 
    eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1517
 
    # Capture the value of LINGUAS because we need it to compute CATALOGS.
1518
 
    LINGUAS="${LINGUAS-%UNSET%}"
1519
 
   ])
1520
 
])
1521
 
 
1522
 
 
1523
 
dnl Checks for all prerequisites of the intl subdirectory,
1524
 
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1525
 
dnl            USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1526
 
AC_DEFUN([AM_INTL_SUBDIR],
1527
 
[
1528
 
  AC_REQUIRE([AC_PROG_INSTALL])dnl
1529
 
  AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1530
 
  AC_REQUIRE([AC_PROG_CC])dnl
1531
 
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
1532
 
  AC_REQUIRE([AC_PROG_RANLIB])dnl
1533
 
  AC_REQUIRE([AC_ISC_POSIX])dnl
1534
 
  AC_REQUIRE([AC_HEADER_STDC])dnl
1535
 
  AC_REQUIRE([AC_C_CONST])dnl
1536
 
  AC_REQUIRE([AC_C_INLINE])dnl
1537
 
  AC_REQUIRE([AC_TYPE_OFF_T])dnl
1538
 
  AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1539
 
  AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1540
 
  AC_REQUIRE([AC_FUNC_MMAP])dnl
1541
 
  AC_REQUIRE([jm_GLIBC21])dnl
1542
 
  AC_REQUIRE([gt_INTDIV0])dnl
1543
 
  AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1544
 
  AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1545
 
  AC_REQUIRE([gt_INTTYPES_PRI])dnl
1546
 
 
1547
 
  AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1548
 
stdlib.h string.h unistd.h sys/param.h])
1549
 
  AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
1550
 
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
1551
 
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1552
 
 
1553
 
  AM_ICONV
1554
 
  AM_LANGINFO_CODESET
1555
 
  if test $ac_cv_header_locale_h = yes; then
1556
 
    AM_LC_MESSAGES
1557
 
  fi
1558
 
 
1559
 
  dnl intl/plural.c is generated from intl/plural.y. It requires bison,
1560
 
  dnl because plural.y uses bison specific features. It requires at least
1561
 
  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
1562
 
  dnl compile.
1563
 
  dnl bison is only needed for the maintainer (who touches plural.y). But in
1564
 
  dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
1565
 
  dnl the rule in general Makefile. Now, some people carelessly touch the
1566
 
  dnl files or have a broken "make" program, hence the plural.c rule will
1567
 
  dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
1568
 
  dnl present or too old.
1569
 
  AC_CHECK_PROGS([INTLBISON], [bison])
1570
 
  if test -z "$INTLBISON"; then
1571
 
    ac_verc_fail=yes
1572
 
  else
1573
 
    dnl Found it, now check the version.
1574
 
    AC_MSG_CHECKING([version of bison])
1575
 
changequote(<<,>>)dnl
1576
 
    ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
1577
 
    case $ac_prog_version in
1578
 
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1579
 
      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
1580
 
changequote([,])dnl
1581
 
         ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
1582
 
      *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
1583
 
    esac
1584
 
    AC_MSG_RESULT([$ac_prog_version])
1585
 
  fi
1586
 
  if test $ac_verc_fail = yes; then
1587
 
    INTLBISON=:
1588
 
  fi
1589
 
])
1590
 
 
1591
 
 
1592
 
AC_DEFUN([AM_MKINSTALLDIRS],
1593
 
[
1594
 
  dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1595
 
  dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
1596
 
  dnl Try to locate is.
1597
 
  MKINSTALLDIRS=
1598
 
  if test -n "$ac_aux_dir"; then
1599
 
    MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1600
 
  fi
1601
 
  if test -z "$MKINSTALLDIRS"; then
1602
 
    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1603
 
  fi
1604
 
  AC_SUBST(MKINSTALLDIRS)
1605
 
])
1606
 
 
1607
 
 
1608
 
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1609
 
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1610
 
 
1611
 
# lib-prefix.m4 serial 1 (gettext-0.11)
1612
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1613
 
dnl This file is free software, distributed under the terms of the GNU
1614
 
dnl General Public License.  As a special exception to the GNU General
1615
 
dnl Public License, this file may be distributed as part of a program
1616
 
dnl that contains a configuration script generated by Autoconf, under
1617
 
dnl the same distribution terms as the rest of that program.
1618
 
 
1619
 
dnl From Bruno Haible.
1620
 
 
1621
 
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1622
 
dnl to access previously installed libraries. The basic assumption is that
1623
 
dnl a user will want packages to use other packages he previously installed
1624
 
dnl with the same --prefix option.
1625
 
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1626
 
dnl libraries, but is otherwise very convenient.
1627
 
AC_DEFUN([AC_LIB_PREFIX],
1628
 
[
1629
 
  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1630
 
  AC_REQUIRE([AC_PROG_CC])
1631
 
  AC_REQUIRE([AC_CANONICAL_HOST])
1632
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1633
 
  dnl By default, look in $includedir and $libdir.
1634
 
  use_additional=yes
1635
 
  AC_LIB_WITH_FINAL_PREFIX([
1636
 
    eval additional_includedir=\"$includedir\"
1637
 
    eval additional_libdir=\"$libdir\"
1638
 
  ])
1639
 
  AC_ARG_WITH([lib-prefix],
1640
 
[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1641
 
  --without-lib-prefix    don't search for libraries in includedir and libdir],
1642
 
[
1643
 
    if test "X$withval" = "Xno"; then
1644
 
      use_additional=no
1645
 
    else
1646
 
      if test "X$withval" = "X"; then
1647
 
        AC_LIB_WITH_FINAL_PREFIX([
1648
 
          eval additional_includedir=\"$includedir\"
1649
 
          eval additional_libdir=\"$libdir\"
1650
 
        ])
1651
 
      else
1652
 
        additional_includedir="$withval/include"
1653
 
        additional_libdir="$withval/lib"
1654
 
      fi
1655
 
    fi
1656
 
])
1657
 
  if test $use_additional = yes; then
1658
 
    dnl Potentially add $additional_includedir to $CPPFLAGS.
1659
 
    dnl But don't add it
1660
 
    dnl   1. if it's the standard /usr/include,
1661
 
    dnl   2. if it's already present in $CPPFLAGS,
1662
 
    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1663
 
    dnl   4. if it doesn't exist as a directory.
1664
 
    if test "X$additional_includedir" != "X/usr/include"; then
1665
 
      haveit=
1666
 
      for x in $CPPFLAGS; do
1667
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1668
 
        if test "X$x" = "X-I$additional_includedir"; then
1669
 
          haveit=yes
1670
 
          break
1671
 
        fi
1672
 
      done
1673
 
      if test -z "$haveit"; then
1674
 
        if test "X$additional_includedir" = "X/usr/local/include"; then
1675
 
          if test -n "$GCC"; then
1676
 
            case $host_os in
1677
 
              linux*) haveit=yes;;
1678
 
            esac
1679
 
          fi
1680
 
        fi
1681
 
        if test -z "$haveit"; then
1682
 
          if test -d "$additional_includedir"; then
1683
 
            dnl Really add $additional_includedir to $CPPFLAGS.
1684
 
            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1685
 
          fi
1686
 
        fi
1687
 
      fi
1688
 
    fi
1689
 
    dnl Potentially add $additional_libdir to $LDFLAGS.
1690
 
    dnl But don't add it
1691
 
    dnl   1. if it's the standard /usr/lib,
1692
 
    dnl   2. if it's already present in $LDFLAGS,
1693
 
    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1694
 
    dnl   4. if it doesn't exist as a directory.
1695
 
    if test "X$additional_libdir" != "X/usr/lib"; then
1696
 
      haveit=
1697
 
      for x in $LDFLAGS; do
1698
 
        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1699
 
        if test "X$x" = "X-L$additional_libdir"; then
1700
 
          haveit=yes
1701
 
          break
1702
 
        fi
1703
 
      done
1704
 
      if test -z "$haveit"; then
1705
 
        if test "X$additional_libdir" = "X/usr/local/lib"; then
1706
 
          if test -n "$GCC"; then
1707
 
            case $host_os in
1708
 
              linux*) haveit=yes;;
1709
 
            esac
1710
 
          fi
1711
 
        fi
1712
 
        if test -z "$haveit"; then
1713
 
          if test -d "$additional_libdir"; then
1714
 
            dnl Really add $additional_libdir to $LDFLAGS.
1715
 
            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1716
 
          fi
1717
 
        fi
1718
 
      fi
1719
 
    fi
1720
 
  fi
1721
 
])
1722
 
 
1723
 
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1724
 
dnl acl_final_exec_prefix, containing the values to which $prefix and
1725
 
dnl $exec_prefix will expand at the end of the configure script.
1726
 
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1727
 
[
1728
 
  dnl Unfortunately, prefix and exec_prefix get only finally determined
1729
 
  dnl at the end of configure.
1730
 
  if test "X$prefix" = "XNONE"; then
1731
 
    acl_final_prefix="$ac_default_prefix"
1732
 
  else
1733
 
    acl_final_prefix="$prefix"
1734
 
  fi
1735
 
  if test "X$exec_prefix" = "XNONE"; then
1736
 
    acl_final_exec_prefix='${prefix}'
1737
 
  else
1738
 
    acl_final_exec_prefix="$exec_prefix"
1739
 
  fi
1740
 
  acl_save_prefix="$prefix"
1741
 
  prefix="$acl_final_prefix"
1742
 
  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1743
 
  prefix="$acl_save_prefix"
1744
 
])
1745
 
 
1746
 
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1747
 
dnl variables prefix and exec_prefix bound to the values they will have
1748
 
dnl at the end of the configure script.
1749
 
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1750
 
[
1751
 
  acl_save_prefix="$prefix"
1752
 
  prefix="$acl_final_prefix"
1753
 
  acl_save_exec_prefix="$exec_prefix"
1754
 
  exec_prefix="$acl_final_exec_prefix"
1755
 
  $1
1756
 
  exec_prefix="$acl_save_exec_prefix"
1757
 
  prefix="$acl_save_prefix"
1758
 
])
1759
 
 
1760
 
# lib-link.m4 serial 3 (gettext-0.11.3)
1761
 
dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1762
 
dnl This file is free software, distributed under the terms of the GNU
1763
 
dnl General Public License.  As a special exception to the GNU General
1764
 
dnl Public License, this file may be distributed as part of a program
1765
 
dnl that contains a configuration script generated by Autoconf, under
1766
 
dnl the same distribution terms as the rest of that program.
1767
 
 
1768
 
dnl From Bruno Haible.
1769
 
 
1770
 
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1771
 
dnl the libraries corresponding to explicit and implicit dependencies.
1772
 
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1773
 
dnl augments the CPPFLAGS variable.
1774
 
AC_DEFUN([AC_LIB_LINKFLAGS],
1775
 
[
1776
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1777
 
  AC_REQUIRE([AC_LIB_RPATH])
1778
 
  define([Name],[translit([$1],[./-], [___])])
1779
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1780
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1781
 
  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1782
 
    AC_LIB_LINKFLAGS_BODY([$1], [$2])
1783
 
    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1784
 
    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1785
 
    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1786
 
  ])
1787
 
  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1788
 
  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1789
 
  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1790
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1791
 
  AC_SUBST([LIB]NAME)
1792
 
  AC_SUBST([LTLIB]NAME)
1793
 
  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1794
 
  dnl results of this search when this library appears as a dependency.
1795
 
  HAVE_LIB[]NAME=yes
1796
 
  undefine([Name])
1797
 
  undefine([NAME])
1798
 
])
1799
 
 
1800
 
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1801
 
dnl searches for libname and the libraries corresponding to explicit and
1802
 
dnl implicit dependencies, together with the specified include files and
1803
 
dnl the ability to compile and link the specified testcode. If found, it
1804
 
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1805
 
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1806
 
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1807
 
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1808
 
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1809
 
[
1810
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1811
 
  AC_REQUIRE([AC_LIB_RPATH])
1812
 
  define([Name],[translit([$1],[./-], [___])])
1813
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1814
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1815
 
 
1816
 
  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1817
 
  dnl accordingly.
1818
 
  AC_LIB_LINKFLAGS_BODY([$1], [$2])
1819
 
 
1820
 
  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1821
 
  dnl because if the user has installed lib[]Name and not disabled its use
1822
 
  dnl via --without-lib[]Name-prefix, he wants to use it.
1823
 
  ac_save_CPPFLAGS="$CPPFLAGS"
1824
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1825
 
 
1826
 
  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1827
 
    ac_save_LIBS="$LIBS"
1828
 
    LIBS="$LIBS $LIB[]NAME"
1829
 
    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1830
 
    LIBS="$ac_save_LIBS"
1831
 
  ])
1832
 
  if test "$ac_cv_lib[]Name" = yes; then
1833
 
    HAVE_LIB[]NAME=yes
1834
 
    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1835
 
    AC_MSG_CHECKING([how to link with lib[]$1])
1836
 
    AC_MSG_RESULT([$LIB[]NAME])
1837
 
  else
1838
 
    HAVE_LIB[]NAME=no
1839
 
    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1840
 
    dnl $INC[]NAME either.
1841
 
    CPPFLAGS="$ac_save_CPPFLAGS"
1842
 
    LIB[]NAME=
1843
 
    LTLIB[]NAME=
1844
 
  fi
1845
 
  AC_SUBST([HAVE_LIB]NAME)
1846
 
  AC_SUBST([LIB]NAME)
1847
 
  AC_SUBST([LTLIB]NAME)
1848
 
  undefine([Name])
1849
 
  undefine([NAME])
1850
 
])
1851
 
 
1852
 
dnl Determine the platform dependent parameters needed to use rpath:
1853
 
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1854
 
dnl hardcode_direct, hardcode_minus_L,
1855
 
dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
1856
 
AC_DEFUN([AC_LIB_RPATH],
1857
 
[
1858
 
  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
1859
 
  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
1860
 
  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
1861
 
  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1862
 
  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1863
 
    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1864
 
    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1865
 
    . ./conftest.sh
1866
 
    rm -f ./conftest.sh
1867
 
    acl_cv_rpath=done
1868
 
  ])
1869
 
  wl="$acl_cv_wl"
1870
 
  libext="$acl_cv_libext"
1871
 
  shlibext="$acl_cv_shlibext"
1872
 
  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1873
 
  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1874
 
  hardcode_direct="$acl_cv_hardcode_direct"
1875
 
  hardcode_minus_L="$acl_cv_hardcode_minus_L"
1876
 
  sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1877
 
  sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1878
 
  dnl Determine whether the user wants rpath handling at all.
1879
 
  AC_ARG_ENABLE(rpath,
1880
 
    [  --disable-rpath         do not hardcode runtime library paths],
1881
 
    :, enable_rpath=yes)
1882
 
])
1883
 
 
1884
 
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1885
 
dnl the libraries corresponding to explicit and implicit dependencies.
1886
 
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1887
 
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1888
 
[
1889
 
  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1890
 
                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1891
 
  dnl By default, look in $includedir and $libdir.
1892
 
  use_additional=yes
1893
 
  AC_LIB_WITH_FINAL_PREFIX([
1894
 
    eval additional_includedir=\"$includedir\"
1895
 
    eval additional_libdir=\"$libdir\"
1896
 
  ])
1897
 
  AC_ARG_WITH([lib$1-prefix],
1898
 
[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
1899
 
  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
1900
 
[
1901
 
    if test "X$withval" = "Xno"; then
1902
 
      use_additional=no
1903
 
    else
1904
 
      if test "X$withval" = "X"; then
1905
 
        AC_LIB_WITH_FINAL_PREFIX([
1906
 
          eval additional_includedir=\"$includedir\"
1907
 
          eval additional_libdir=\"$libdir\"
1908
 
        ])
1909
 
      else
1910
 
        additional_includedir="$withval/include"
1911
 
        additional_libdir="$withval/lib"
1912
 
      fi
1913
 
    fi
1914
 
])
1915
 
  dnl Search the library and its dependencies in $additional_libdir and
1916
 
  dnl $LDFLAGS. Using breadth-first-seach.
1917
 
  LIB[]NAME=
1918
 
  LTLIB[]NAME=
1919
 
  INC[]NAME=
1920
 
  rpathdirs=
1921
 
  ltrpathdirs=
1922
 
  names_already_handled=
1923
 
  names_next_round='$1 $2'
1924
 
  while test -n "$names_next_round"; do
1925
 
    names_this_round="$names_next_round"
1926
 
    names_next_round=
1927
 
    for name in $names_this_round; do
1928
 
      already_handled=
1929
 
      for n in $names_already_handled; do
1930
 
        if test "$n" = "$name"; then
1931
 
          already_handled=yes
1932
 
          break
1933
 
        fi
1934
 
      done
1935
 
      if test -z "$already_handled"; then
1936
 
        names_already_handled="$names_already_handled $name"
1937
 
        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1938
 
        dnl or AC_LIB_HAVE_LINKFLAGS call.
1939
 
        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1940
 
        eval value=\"\$HAVE_LIB$uppername\"
1941
 
        if test -n "$value"; then
1942
 
          if test "$value" = yes; then
1943
 
            eval value=\"\$LIB$uppername\"
1944
 
            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1945
 
            eval value=\"\$LTLIB$uppername\"
1946
 
            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1947
 
          else
1948
 
            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1949
 
            dnl that this library doesn't exist. So just drop it.
1950
 
            :
1951
 
          fi
1952
 
        else
1953
 
          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1954
 
          dnl and the already constructed $LIBNAME/$LTLIBNAME.
1955
 
          found_dir=
1956
 
          found_la=
1957
 
          found_so=
1958
 
          found_a=
1959
 
          if test $use_additional = yes; then
1960
 
            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1961
 
              found_dir="$additional_libdir"
1962
 
              found_so="$additional_libdir/lib$name.$shlibext"
1963
 
              if test -f "$additional_libdir/lib$name.la"; then
1964
 
                found_la="$additional_libdir/lib$name.la"
1965
 
              fi
1966
 
            else
1967
 
              if test -f "$additional_libdir/lib$name.$libext"; then
1968
 
                found_dir="$additional_libdir"
1969
 
                found_a="$additional_libdir/lib$name.$libext"
1970
 
                if test -f "$additional_libdir/lib$name.la"; then
1971
 
                  found_la="$additional_libdir/lib$name.la"
1972
 
                fi
1973
 
              fi
1974
 
            fi
1975
 
          fi
1976
 
          if test "X$found_dir" = "X"; then
1977
 
            for x in $LDFLAGS $LTLIB[]NAME; do
1978
 
              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1979
 
              case "$x" in
1980
 
                -L*)
1981
 
                  dir=`echo "X$x" | sed -e 's/^X-L//'`
1982
 
                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1983
 
                    found_dir="$dir"
1984
 
                    found_so="$dir/lib$name.$shlibext"
1985
 
                    if test -f "$dir/lib$name.la"; then
1986
 
                      found_la="$dir/lib$name.la"
1987
 
                    fi
1988
 
                  else
1989
 
                    if test -f "$dir/lib$name.$libext"; then
1990
 
                      found_dir="$dir"
1991
 
                      found_a="$dir/lib$name.$libext"
1992
 
                      if test -f "$dir/lib$name.la"; then
1993
 
                        found_la="$dir/lib$name.la"
1994
 
                      fi
1995
 
                    fi
1996
 
                  fi
1997
 
                  ;;
1998
 
              esac
1999
 
              if test "X$found_dir" != "X"; then
2000
 
                break
2001
 
              fi
2002
 
            done
2003
 
          fi
2004
 
          if test "X$found_dir" != "X"; then
2005
 
            dnl Found the library.
2006
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
2007
 
            if test "X$found_so" != "X"; then
2008
 
              dnl Linking with a shared library. We attempt to hardcode its
2009
 
              dnl directory into the executable's runpath, unless it's the
2010
 
              dnl standard /usr/lib.
2011
 
              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
2012
 
                dnl No hardcoding is needed.
2013
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2014
 
              else
2015
 
                dnl Use an explicit option to hardcode DIR into the resulting
2016
 
                dnl binary.
2017
 
                dnl Potentially add DIR to ltrpathdirs.
2018
 
                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2019
 
                haveit=
2020
 
                for x in $ltrpathdirs; do
2021
 
                  if test "X$x" = "X$found_dir"; then
2022
 
                    haveit=yes
2023
 
                    break
2024
 
                  fi
2025
 
                done
2026
 
                if test -z "$haveit"; then
2027
 
                  ltrpathdirs="$ltrpathdirs $found_dir"
2028
 
                fi
2029
 
                dnl The hardcoding into $LIBNAME is system dependent.
2030
 
                if test "$hardcode_direct" = yes; then
2031
 
                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
2032
 
                  dnl resulting binary.
2033
 
                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2034
 
                else
2035
 
                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
2036
 
                    dnl Use an explicit option to hardcode DIR into the resulting
2037
 
                    dnl binary.
2038
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2039
 
                    dnl Potentially add DIR to rpathdirs.
2040
 
                    dnl The rpathdirs will be appended to $LIBNAME at the end.
2041
 
                    haveit=
2042
 
                    for x in $rpathdirs; do
2043
 
                      if test "X$x" = "X$found_dir"; then
2044
 
                        haveit=yes
2045
 
                        break
2046
 
                      fi
2047
 
                    done
2048
 
                    if test -z "$haveit"; then
2049
 
                      rpathdirs="$rpathdirs $found_dir"
2050
 
                    fi
2051
 
                  else
2052
 
                    dnl Rely on "-L$found_dir".
2053
 
                    dnl But don't add it if it's already contained in the LDFLAGS
2054
 
                    dnl or the already constructed $LIBNAME
2055
 
                    haveit=
2056
 
                    for x in $LDFLAGS $LIB[]NAME; do
2057
 
                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2058
 
                      if test "X$x" = "X-L$found_dir"; then
2059
 
                        haveit=yes
2060
 
                        break
2061
 
                      fi
2062
 
                    done
2063
 
                    if test -z "$haveit"; then
2064
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
2065
 
                    fi
2066
 
                    if test "$hardcode_minus_L" != no; then
2067
 
                      dnl FIXME: Not sure whether we should use
2068
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2069
 
                      dnl here.
2070
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
2071
 
                    else
2072
 
                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
2073
 
                      dnl here, because this doesn't fit in flags passed to the
2074
 
                      dnl compiler. So give up. No hardcoding. This affects only
2075
 
                      dnl very old systems.
2076
 
                      dnl FIXME: Not sure whether we should use
2077
 
                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
2078
 
                      dnl here.
2079
 
                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2080
 
                    fi
2081
 
                  fi
2082
 
                fi
2083
 
              fi
2084
 
            else
2085
 
              if test "X$found_a" != "X"; then
2086
 
                dnl Linking with a static library.
2087
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
2088
 
              else
2089
 
                dnl We shouldn't come here, but anyway it's good to have a
2090
 
                dnl fallback.
2091
 
                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
2092
 
              fi
2093
 
            fi
2094
 
            dnl Assume the include files are nearby.
2095
 
            additional_includedir=
2096
 
            case "$found_dir" in
2097
 
              */lib | */lib/)
2098
 
                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
2099
 
                additional_includedir="$basedir/include"
2100
 
                ;;
2101
 
            esac
2102
 
            if test "X$additional_includedir" != "X"; then
2103
 
              dnl Potentially add $additional_includedir to $INCNAME.
2104
 
              dnl But don't add it
2105
 
              dnl   1. if it's the standard /usr/include,
2106
 
              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
2107
 
              dnl   3. if it's already present in $CPPFLAGS or the already
2108
 
              dnl      constructed $INCNAME,
2109
 
              dnl   4. if it doesn't exist as a directory.
2110
 
              if test "X$additional_includedir" != "X/usr/include"; then
2111
 
                haveit=
2112
 
                if test "X$additional_includedir" = "X/usr/local/include"; then
2113
 
                  if test -n "$GCC"; then
2114
 
                    case $host_os in
2115
 
                      linux*) haveit=yes;;
2116
 
                    esac
2117
 
                  fi
2118
 
                fi
2119
 
                if test -z "$haveit"; then
2120
 
                  for x in $CPPFLAGS $INC[]NAME; do
2121
 
                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2122
 
                    if test "X$x" = "X-I$additional_includedir"; then
2123
 
                      haveit=yes
2124
 
                      break
2125
 
                    fi
2126
 
                  done
2127
 
                  if test -z "$haveit"; then
2128
 
                    if test -d "$additional_includedir"; then
2129
 
                      dnl Really add $additional_includedir to $INCNAME.
2130
 
                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
2131
 
                    fi
2132
 
                  fi
2133
 
                fi
2134
 
              fi
2135
 
            fi
2136
 
            dnl Look for dependencies.
2137
 
            if test -n "$found_la"; then
2138
 
              dnl Read the .la file. It defines the variables
2139
 
              dnl dlname, library_names, old_library, dependency_libs, current,
2140
 
              dnl age, revision, installed, dlopen, dlpreopen, libdir.
2141
 
              save_libdir="$libdir"
2142
 
              case "$found_la" in
2143
 
                */* | *\\*) . "$found_la" ;;
2144
 
                *) . "./$found_la" ;;
2145
 
              esac
2146
 
              libdir="$save_libdir"
2147
 
              dnl We use only dependency_libs.
2148
 
              for dep in $dependency_libs; do
2149
 
                case "$dep" in
2150
 
                  -L*)
2151
 
                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
2152
 
                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
2153
 
                    dnl But don't add it
2154
 
                    dnl   1. if it's the standard /usr/lib,
2155
 
                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
2156
 
                    dnl   3. if it's already present in $LDFLAGS or the already
2157
 
                    dnl      constructed $LIBNAME,
2158
 
                    dnl   4. if it doesn't exist as a directory.
2159
 
                    if test "X$additional_libdir" != "X/usr/lib"; then
2160
 
                      haveit=
2161
 
                      if test "X$additional_libdir" = "X/usr/local/lib"; then
2162
 
                        if test -n "$GCC"; then
2163
 
                          case $host_os in
2164
 
                            linux*) haveit=yes;;
2165
 
                          esac
2166
 
                        fi
2167
 
                      fi
2168
 
                      if test -z "$haveit"; then
2169
 
                        haveit=
2170
 
                        for x in $LDFLAGS $LIB[]NAME; do
2171
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2172
 
                          if test "X$x" = "X-L$additional_libdir"; then
2173
 
                            haveit=yes
2174
 
                            break
2175
 
                          fi
2176
 
                        done
2177
 
                        if test -z "$haveit"; then
2178
 
                          if test -d "$additional_libdir"; then
2179
 
                            dnl Really add $additional_libdir to $LIBNAME.
2180
 
                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
2181
 
                          fi
2182
 
                        fi
2183
 
                        haveit=
2184
 
                        for x in $LDFLAGS $LTLIB[]NAME; do
2185
 
                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2186
 
                          if test "X$x" = "X-L$additional_libdir"; then
2187
 
                            haveit=yes
2188
 
                            break
2189
 
                          fi
2190
 
                        done
2191
 
                        if test -z "$haveit"; then
2192
 
                          if test -d "$additional_libdir"; then
2193
 
                            dnl Really add $additional_libdir to $LTLIBNAME.
2194
 
                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
2195
 
                          fi
2196
 
                        fi
2197
 
                      fi
2198
 
                    fi
2199
 
                    ;;
2200
 
                  -R*)
2201
 
                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
2202
 
                    if test "$enable_rpath" != no; then
2203
 
                      dnl Potentially add DIR to rpathdirs.
2204
 
                      dnl The rpathdirs will be appended to $LIBNAME at the end.
2205
 
                      haveit=
2206
 
                      for x in $rpathdirs; do
2207
 
                        if test "X$x" = "X$dir"; then
2208
 
                          haveit=yes
2209
 
                          break
2210
 
                        fi
2211
 
                      done
2212
 
                      if test -z "$haveit"; then
2213
 
                        rpathdirs="$rpathdirs $dir"
2214
 
                      fi
2215
 
                      dnl Potentially add DIR to ltrpathdirs.
2216
 
                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
2217
 
                      haveit=
2218
 
                      for x in $ltrpathdirs; do
2219
 
                        if test "X$x" = "X$dir"; then
2220
 
                          haveit=yes
2221
 
                          break
2222
 
                        fi
2223
 
                      done
2224
 
                      if test -z "$haveit"; then
2225
 
                        ltrpathdirs="$ltrpathdirs $dir"
2226
 
                      fi
2227
 
                    fi
2228
 
                    ;;
2229
 
                  -l*)
2230
 
                    dnl Handle this in the next round.
2231
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
2232
 
                    ;;
2233
 
                  *.la)
2234
 
                    dnl Handle this in the next round. Throw away the .la's
2235
 
                    dnl directory; it is already contained in a preceding -L
2236
 
                    dnl option.
2237
 
                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
2238
 
                    ;;
2239
 
                  *)
2240
 
                    dnl Most likely an immediate library name.
2241
 
                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
2242
 
                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
2243
 
                    ;;
2244
 
                esac
2245
 
              done
2246
 
            fi
2247
 
          else
2248
 
            dnl Didn't find the library; assume it is in the system directories
2249
 
            dnl known to the linker and runtime loader. (All the system
2250
 
            dnl directories known to the linker should also be known to the
2251
 
            dnl runtime loader, otherwise the system is severely misconfigured.)
2252
 
            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
2253
 
            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
2254
 
          fi
2255
 
        fi
2256
 
      fi
2257
 
    done
2258
 
  done
2259
 
  if test "X$rpathdirs" != "X"; then
2260
 
    if test -n "$hardcode_libdir_separator"; then
2261
 
      dnl Weird platform: only the last -rpath option counts, the user must
2262
 
      dnl pass all path elements in one option. We can arrange that for a
2263
 
      dnl single library, but not when more than one $LIBNAMEs are used.
2264
 
      alldirs=
2265
 
      for found_dir in $rpathdirs; do
2266
 
        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
2267
 
      done
2268
 
      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
2269
 
      acl_save_libdir="$libdir"
2270
 
      libdir="$alldirs"
2271
 
      eval flag=\"$hardcode_libdir_flag_spec\"
2272
 
      libdir="$acl_save_libdir"
2273
 
      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2274
 
    else
2275
 
      dnl The -rpath options are cumulative.
2276
 
      for found_dir in $rpathdirs; do
2277
 
        acl_save_libdir="$libdir"
2278
 
        libdir="$found_dir"
2279
 
        eval flag=\"$hardcode_libdir_flag_spec\"
2280
 
        libdir="$acl_save_libdir"
2281
 
        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
2282
 
      done
2283
 
    fi
2284
 
  fi
2285
 
  if test "X$ltrpathdirs" != "X"; then
2286
 
    dnl When using libtool, the option that works for both libraries and
2287
 
    dnl executables is -R. The -R options are cumulative.
2288
 
    for found_dir in $ltrpathdirs; do
2289
 
      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
2290
 
    done
2291
 
  fi
2292
 
])
2293
 
 
2294
 
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
2295
 
dnl unless already present in VAR.
2296
 
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
2297
 
dnl contains two or three consecutive elements that belong together.
2298
 
AC_DEFUN([AC_LIB_APPENDTOVAR],
2299
 
[
2300
 
  for element in [$2]; do
2301
 
    haveit=
2302
 
    for x in $[$1]; do
2303
 
      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
2304
 
      if test "X$x" = "X$element"; then
2305
 
        haveit=yes
2306
 
        break
2307
 
      fi
2308
 
    done
2309
 
    if test -z "$haveit"; then
2310
 
      [$1]="${[$1]}${[$1]:+ }$element"
2311
 
    fi
2312
 
  done
2313
 
])
2314
 
 
2315
 
# lib-ld.m4 serial 1 (gettext-0.11)
2316
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2317
 
dnl This file is free software, distributed under the terms of the GNU
2318
 
dnl General Public License.  As a special exception to the GNU General
2319
 
dnl Public License, this file may be distributed as part of a program
2320
 
dnl that contains a configuration script generated by Autoconf, under
2321
 
dnl the same distribution terms as the rest of that program.
2322
 
 
2323
 
dnl Subroutines of libtool.m4,
2324
 
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
2325
 
dnl with libtool.m4.
2326
 
 
2327
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
2328
 
AC_DEFUN([AC_LIB_PROG_LD_GNU],
2329
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
2330
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2331
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2332
 
  acl_cv_prog_gnu_ld=yes
2333
 
else
2334
 
  acl_cv_prog_gnu_ld=no
2335
 
fi])
2336
 
with_gnu_ld=$acl_cv_prog_gnu_ld
2337
 
])
2338
 
 
2339
 
dnl From libtool-1.4. Sets the variable LD.
2340
 
AC_DEFUN([AC_LIB_PROG_LD],
2341
 
[AC_ARG_WITH(gnu-ld,
2342
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
2343
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2344
 
AC_REQUIRE([AC_PROG_CC])dnl
2345
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2346
 
ac_prog=ld
2347
 
if test "$GCC" = yes; then
2348
 
  # Check if gcc -print-prog-name=ld gives a path.
2349
 
  AC_MSG_CHECKING([for ld used by GCC])
2350
 
  case $host in
2351
 
  *-*-mingw*)
2352
 
    # gcc leaves a trailing carriage return which upsets mingw
2353
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2354
 
  *)
2355
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2356
 
  esac
2357
 
  case $ac_prog in
2358
 
    # Accept absolute paths.
2359
 
    [[\\/]* | [A-Za-z]:[\\/]*)]
2360
 
      [re_direlt='/[^/][^/]*/\.\./']
2361
 
      # Canonicalize the path of ld
2362
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2363
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2364
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2365
 
      done
2366
 
      test -z "$LD" && LD="$ac_prog"
2367
 
      ;;
2368
 
  "")
2369
 
    # If it fails, then pretend we aren't using GCC.
2370
 
    ac_prog=ld
2371
 
    ;;
2372
 
  *)
2373
 
    # If it is relative, then search for the first ld in PATH.
2374
 
    with_gnu_ld=unknown
2375
 
    ;;
2376
 
  esac
2377
 
elif test "$with_gnu_ld" = yes; then
2378
 
  AC_MSG_CHECKING([for GNU ld])
2379
 
else
2380
 
  AC_MSG_CHECKING([for non-GNU ld])
2381
 
fi
2382
 
AC_CACHE_VAL(acl_cv_path_LD,
2383
 
[if test -z "$LD"; then
2384
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2385
 
  for ac_dir in $PATH; do
2386
 
    test -z "$ac_dir" && ac_dir=.
2387
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2388
 
      acl_cv_path_LD="$ac_dir/$ac_prog"
2389
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
2390
 
      # but apparently some GNU ld's only accept -v.
2391
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
2392
 
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2393
 
        test "$with_gnu_ld" != no && break
2394
 
      else
2395
 
        test "$with_gnu_ld" != yes && break
2396
 
      fi
2397
 
    fi
2398
 
  done
2399
 
  IFS="$ac_save_ifs"
2400
 
else
2401
 
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
2402
 
fi])
2403
 
LD="$acl_cv_path_LD"
2404
 
if test -n "$LD"; then
2405
 
  AC_MSG_RESULT($LD)
2406
 
else
2407
 
  AC_MSG_RESULT(no)
2408
 
fi
2409
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2410
 
AC_LIB_PROG_LD_GNU
2411
 
])
2412
 
 
2413
 
# iconv.m4 serial AM4 (gettext-0.11.3)
2414
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2415
 
dnl This file is free software, distributed under the terms of the GNU
2416
 
dnl General Public License.  As a special exception to the GNU General
2417
 
dnl Public License, this file may be distributed as part of a program
2418
 
dnl that contains a configuration script generated by Autoconf, under
2419
 
dnl the same distribution terms as the rest of that program.
2420
 
 
2421
 
dnl From Bruno Haible.
2422
 
 
2423
 
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2424
 
[
2425
 
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2426
 
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2427
 
  AC_REQUIRE([AC_LIB_RPATH])
2428
 
 
2429
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2430
 
  dnl accordingly.
2431
 
  AC_LIB_LINKFLAGS_BODY([iconv])
2432
 
])
2433
 
 
2434
 
AC_DEFUN([AM_ICONV_LINK],
2435
 
[
2436
 
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2437
 
  dnl those with the standalone portable GNU libiconv installed).
2438
 
 
2439
 
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2440
 
  dnl accordingly.
2441
 
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2442
 
 
2443
 
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2444
 
  dnl because if the user has installed libiconv and not disabled its use
2445
 
  dnl via --without-libiconv-prefix, he wants to use it. The first
2446
 
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2447
 
  am_save_CPPFLAGS="$CPPFLAGS"
2448
 
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2449
 
 
2450
 
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2451
 
    am_cv_func_iconv="no, consider installing GNU libiconv"
2452
 
    am_cv_lib_iconv=no
2453
 
    AC_TRY_LINK([#include <stdlib.h>
2454
 
#include <iconv.h>],
2455
 
      [iconv_t cd = iconv_open("","");
2456
 
       iconv(cd,NULL,NULL,NULL,NULL);
2457
 
       iconv_close(cd);],
2458
 
      am_cv_func_iconv=yes)
2459
 
    if test "$am_cv_func_iconv" != yes; then
2460
 
      am_save_LIBS="$LIBS"
2461
 
      LIBS="$LIBS $LIBICONV"
2462
 
      AC_TRY_LINK([#include <stdlib.h>
2463
 
#include <iconv.h>],
2464
 
        [iconv_t cd = iconv_open("","");
2465
 
         iconv(cd,NULL,NULL,NULL,NULL);
2466
 
         iconv_close(cd);],
2467
 
        am_cv_lib_iconv=yes
2468
 
        am_cv_func_iconv=yes)
2469
 
      LIBS="$am_save_LIBS"
2470
 
    fi
2471
 
  ])
2472
 
  if test "$am_cv_func_iconv" = yes; then
2473
 
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2474
 
  fi
2475
 
  if test "$am_cv_lib_iconv" = yes; then
2476
 
    AC_MSG_CHECKING([how to link with libiconv])
2477
 
    AC_MSG_RESULT([$LIBICONV])
2478
 
  else
2479
 
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2480
 
    dnl either.
2481
 
    CPPFLAGS="$am_save_CPPFLAGS"
2482
 
    LIBICONV=
2483
 
    LTLIBICONV=
2484
 
  fi
2485
 
  AC_SUBST(LIBICONV)
2486
 
  AC_SUBST(LTLIBICONV)
2487
 
])
2488
 
 
2489
 
AC_DEFUN([AM_ICONV],
2490
 
[
2491
 
  AM_ICONV_LINK
2492
 
  if test "$am_cv_func_iconv" = yes; then
2493
 
    AC_MSG_CHECKING([for iconv declaration])
2494
 
    AC_CACHE_VAL(am_cv_proto_iconv, [
2495
 
      AC_TRY_COMPILE([
2496
 
#include <stdlib.h>
2497
 
#include <iconv.h>
2498
 
extern
2499
 
#ifdef __cplusplus
2500
 
"C"
2501
 
#endif
2502
 
#if defined(__STDC__) || defined(__cplusplus)
2503
 
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2504
 
#else
2505
 
size_t iconv();
2506
 
#endif
2507
 
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2508
 
      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);"])
2509
 
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2510
 
    AC_MSG_RESULT([$]{ac_t:-
2511
 
         }[$]am_cv_proto_iconv)
2512
 
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2513
 
      [Define as const if the declaration of iconv() needs const.])
2514
 
  fi
2515
 
])
2516
 
 
2517
 
# progtest.m4 serial 2 (gettext-0.10.40)
2518
 
dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2519
 
dnl This file is free software, distributed under the terms of the GNU
2520
 
dnl General Public License.  As a special exception to the GNU General
2521
 
dnl Public License, this file may be distributed as part of a program
2522
 
dnl that contains a configuration script generated by Autoconf, under
2523
 
dnl the same distribution terms as the rest of that program.
2524
 
dnl
2525
 
dnl This file can can be used in projects which are not available under
2526
 
dnl the GNU General Public License or the GNU Library General Public
2527
 
dnl License but which still want to provide support for the GNU gettext
2528
 
dnl functionality.
2529
 
dnl Please note that the actual code of the GNU gettext library is covered
2530
 
dnl by the GNU Library General Public License, and the rest of the GNU
2531
 
dnl gettext package package is covered by the GNU General Public License.
2532
 
dnl They are *not* in the public domain.
2533
 
 
2534
 
dnl Authors:
2535
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
2536
 
 
2537
 
# Search path for a program which passes the given test.
2538
 
 
2539
 
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2540
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2541
 
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2542
 
[# Extract the first word of "$2", so it can be a program name with args.
2543
 
set dummy $2; ac_word=[$]2
2544
 
AC_MSG_CHECKING([for $ac_word])
2545
 
AC_CACHE_VAL(ac_cv_path_$1,
2546
 
[case "[$]$1" in
2547
 
  /*)
2548
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2549
 
  ;;
2550
 
  *)
2551
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2552
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
2553
 
    test -z "$ac_dir" && ac_dir=.
2554
 
    if test -f $ac_dir/$ac_word; then
2555
 
      if [$3]; then
2556
 
        ac_cv_path_$1="$ac_dir/$ac_word"
2557
 
        break
2558
 
      fi
2559
 
    fi
2560
 
  done
2561
 
  IFS="$ac_save_ifs"
2562
 
dnl If no 4th arg is given, leave the cache variable unset,
2563
 
dnl so AC_PATH_PROGS will keep looking.
2564
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2565
 
])dnl
2566
 
  ;;
2567
 
esac])dnl
2568
 
$1="$ac_cv_path_$1"
2569
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2570
 
  AC_MSG_RESULT([$]$1)
2571
 
else
2572
 
  AC_MSG_RESULT(no)
2573
 
fi
2574
 
AC_SUBST($1)dnl
2575
 
])
2576
 
 
2577
 
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2578
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2579
 
dnl This file is free software, distributed under the terms of the GNU
2580
 
dnl General Public License.  As a special exception to the GNU General
2581
 
dnl Public License, this file may be distributed as part of a program
2582
 
dnl that contains a configuration script generated by Autoconf, under
2583
 
dnl the same distribution terms as the rest of that program.
2584
 
 
2585
 
# Test for the GNU C Library, version 2.1 or newer.
2586
 
# From Bruno Haible.
2587
 
 
2588
 
AC_DEFUN([jm_GLIBC21],
2589
 
  [
2590
 
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
2591
 
      ac_cv_gnu_library_2_1,
2592
 
      [AC_EGREP_CPP([Lucky GNU user],
2593
 
        [
2594
 
#include <features.h>
2595
 
#ifdef __GNU_LIBRARY__
2596
 
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
2597
 
  Lucky GNU user
2598
 
 #endif
2599
 
#endif
2600
 
        ],
2601
 
        ac_cv_gnu_library_2_1=yes,
2602
 
        ac_cv_gnu_library_2_1=no)
2603
 
      ]
2604
 
    )
2605
 
    AC_SUBST(GLIBC21)
2606
 
    GLIBC21="$ac_cv_gnu_library_2_1"
2607
 
  ]
2608
 
)
2609
 
 
2610
 
# intdiv0.m4 serial 1 (gettext-0.11.3)
2611
 
dnl Copyright (C) 2002 Free Software Foundation, Inc.
2612
 
dnl This file is free software, distributed under the terms of the GNU
2613
 
dnl General Public License.  As a special exception to the GNU General
2614
 
dnl Public License, this file may be distributed as part of a program
2615
 
dnl that contains a configuration script generated by Autoconf, under
2616
 
dnl the same distribution terms as the rest of that program.
2617
 
 
2618
 
dnl From Bruno Haible.
2619
 
 
2620
 
AC_DEFUN([gt_INTDIV0],
2621
 
[
2622
 
  AC_REQUIRE([AC_PROG_CC])dnl
2623
 
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
2624
 
 
2625
 
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
2626
 
    gt_cv_int_divbyzero_sigfpe,
2627
 
    [
2628
 
      AC_TRY_RUN([
2629
 
#include <stdlib.h>
2630
 
#include <signal.h>
2631
 
 
2632
 
static void
2633
 
#ifdef __cplusplus
2634
 
sigfpe_handler (int sig)
2635
 
#else
2636
 
sigfpe_handler (sig) int sig;
2637
 
#endif
2638
 
{
2639
 
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
2640
 
  exit (sig != SIGFPE);
2641
 
}
2642
 
 
2643
 
int x = 1;
2644
 
int y = 0;
2645
 
int z;
2646
 
int nan;
2647
 
 
2648
 
int main ()
2649
 
{
2650
 
  signal (SIGFPE, sigfpe_handler);
2651
 
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
2652
 
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
2653
 
  signal (SIGTRAP, sigfpe_handler);
2654
 
#endif
2655
 
/* Linux/SPARC yields signal SIGILL.  */
2656
 
#if defined (__sparc__) && defined (__linux__)
2657
 
  signal (SIGILL, sigfpe_handler);
2658
 
#endif
2659
 
 
2660
 
  z = x / y;
2661
 
  nan = y / y;
2662
 
  exit (1);
2663
 
}
2664
 
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2665
 
        [
2666
 
          # Guess based on the CPU.
2667
 
          case "$host_cpu" in
2668
 
            alpha* | i[34567]86 | m68k | s390*)
2669
 
              gt_cv_int_divbyzero_sigfpe="guessing yes";;
2670
 
            *)
2671
 
              gt_cv_int_divbyzero_sigfpe="guessing no";;
2672
 
          esac
2673
 
        ])
2674
 
    ])
2675
 
  case "$gt_cv_int_divbyzero_sigfpe" in
2676
 
    *yes) value=1;;
2677
 
    *) value=0;;
2678
 
  esac
2679
 
  AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2680
 
    [Define if integer division by zero raises signal SIGFPE.])
2681
 
])
2682
 
 
2683
 
# uintmax_t.m4 serial 6 (gettext-0.11)
2684
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2685
 
dnl This file is free software, distributed under the terms of the GNU
2686
 
dnl General Public License.  As a special exception to the GNU General
2687
 
dnl Public License, this file may be distributed as part of a program
2688
 
dnl that contains a configuration script generated by Autoconf, under
2689
 
dnl the same distribution terms as the rest of that program.
2690
 
 
2691
 
dnl From Paul Eggert.
2692
 
 
2693
 
AC_PREREQ(2.13)
2694
 
 
2695
 
# Define uintmax_t to `unsigned long' or `unsigned long long'
2696
 
# if <inttypes.h> does not exist.
2697
 
 
2698
 
AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2699
 
[
2700
 
  AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2701
 
  AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2702
 
  if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2703
 
    AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2704
 
    test $ac_cv_type_unsigned_long_long = yes \
2705
 
      && ac_type='unsigned long long' \
2706
 
      || ac_type='unsigned long'
2707
 
    AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2708
 
  [Define to unsigned long or unsigned long long
2709
 
   if <inttypes.h> and <stdint.h> don't define.])
2710
 
  fi
2711
 
])
2712
 
 
2713
 
# inttypes_h.m4 serial 4 (gettext-0.11.4)
2714
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2715
 
dnl This file is free software, distributed under the terms of the GNU
2716
 
dnl General Public License.  As a special exception to the GNU General
2717
 
dnl Public License, this file may be distributed as part of a program
2718
 
dnl that contains a configuration script generated by Autoconf, under
2719
 
dnl the same distribution terms as the rest of that program.
2720
 
 
2721
 
dnl From Paul Eggert.
2722
 
 
2723
 
# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2724
 
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2725
 
 
2726
 
AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2727
 
[
2728
 
  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2729
 
  [AC_TRY_COMPILE(
2730
 
    [#include <sys/types.h>
2731
 
#include <inttypes.h>],
2732
 
    [uintmax_t i = (uintmax_t) -1;],
2733
 
    jm_ac_cv_header_inttypes_h=yes,
2734
 
    jm_ac_cv_header_inttypes_h=no)])
2735
 
  if test $jm_ac_cv_header_inttypes_h = yes; then
2736
 
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2737
 
[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2738
 
   and declares uintmax_t. ])
2739
 
  fi
2740
 
])
2741
 
 
2742
 
# stdint_h.m4 serial 2 (gettext-0.11.4)
2743
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2744
 
dnl This file is free software, distributed under the terms of the GNU
2745
 
dnl General Public License.  As a special exception to the GNU General
2746
 
dnl Public License, this file may be distributed as part of a program
2747
 
dnl that contains a configuration script generated by Autoconf, under
2748
 
dnl the same distribution terms as the rest of that program.
2749
 
 
2750
 
dnl From Paul Eggert.
2751
 
 
2752
 
# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2753
 
# doesn't clash with <sys/types.h>, and declares uintmax_t.
2754
 
 
2755
 
AC_DEFUN([jm_AC_HEADER_STDINT_H],
2756
 
[
2757
 
  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2758
 
  [AC_TRY_COMPILE(
2759
 
    [#include <sys/types.h>
2760
 
#include <stdint.h>],
2761
 
    [uintmax_t i = (uintmax_t) -1;],
2762
 
    jm_ac_cv_header_stdint_h=yes,
2763
 
    jm_ac_cv_header_stdint_h=no)])
2764
 
  if test $jm_ac_cv_header_stdint_h = yes; then
2765
 
    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2766
 
[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2767
 
   and declares uintmax_t. ])
2768
 
  fi
2769
 
])
2770
 
 
2771
 
# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2772
 
dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2773
 
dnl This file is free software, distributed under the terms of the GNU
2774
 
dnl General Public License.  As a special exception to the GNU General
2775
 
dnl Public License, this file may be distributed as part of a program
2776
 
dnl that contains a configuration script generated by Autoconf, under
2777
 
dnl the same distribution terms as the rest of that program.
2778
 
 
2779
 
dnl From Paul Eggert.
2780
 
 
2781
 
AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2782
 
[
2783
 
  AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2784
 
  [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2785
 
    [unsigned long long ullmax = (unsigned long long) -1;
2786
 
     return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2787
 
    ac_cv_type_unsigned_long_long=yes,
2788
 
    ac_cv_type_unsigned_long_long=no)])
2789
 
  if test $ac_cv_type_unsigned_long_long = yes; then
2790
 
    AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2791
 
      [Define if you have the unsigned long long type.])
2792
 
  fi
2793
 
])
2794
 
 
2795
 
# inttypes.m4 serial 1 (gettext-0.11.4)
2796
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2797
 
dnl This file is free software, distributed under the terms of the GNU
2798
 
dnl General Public License.  As a special exception to the GNU General
2799
 
dnl Public License, this file may be distributed as part of a program
2800
 
dnl that contains a configuration script generated by Autoconf, under
2801
 
dnl the same distribution terms as the rest of that program.
2802
 
 
2803
 
dnl From Paul Eggert.
2804
 
 
2805
 
# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
2806
 
# <sys/types.h>.
2807
 
 
2808
 
AC_DEFUN([gt_HEADER_INTTYPES_H],
2809
 
[
2810
 
  AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
2811
 
  [
2812
 
    AC_TRY_COMPILE(
2813
 
      [#include <sys/types.h>
2814
 
#include <inttypes.h>],
2815
 
      [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
2816
 
  ])
2817
 
  if test $gt_cv_header_inttypes_h = yes; then
2818
 
    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
2819
 
      [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
2820
 
  fi
2821
 
])
2822
 
 
2823
 
# inttypes-pri.m4 serial 1 (gettext-0.11.4)
2824
 
dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2825
 
dnl This file is free software, distributed under the terms of the GNU
2826
 
dnl General Public License.  As a special exception to the GNU General
2827
 
dnl Public License, this file may be distributed as part of a program
2828
 
dnl that contains a configuration script generated by Autoconf, under
2829
 
dnl the same distribution terms as the rest of that program.
2830
 
 
2831
 
dnl From Bruno Haible.
2832
 
 
2833
 
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
2834
 
# macros to non-string values.  This is the case on AIX 4.3.3.
2835
 
 
2836
 
AC_DEFUN([gt_INTTYPES_PRI],
2837
 
[
2838
 
  AC_REQUIRE([gt_HEADER_INTTYPES_H])
2839
 
  if test $gt_cv_header_inttypes_h = yes; then
2840
 
    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
2841
 
      gt_cv_inttypes_pri_broken,
2842
 
      [
2843
 
        AC_TRY_COMPILE([#include <inttypes.h>
2844
 
#ifdef PRId32
2845
 
char *p = PRId32;
2846
 
#endif
2847
 
], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
2848
 
      ])
2849
 
  fi
2850
 
  if test "$gt_cv_inttypes_pri_broken" = yes; then
2851
 
    AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
2852
 
      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
2853
 
  fi
2854
 
])
2855
 
 
2856
 
# codeset.m4 serial AM1 (gettext-0.10.40)
2857
 
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2858
 
dnl This file is free software, distributed under the terms of the GNU
2859
 
dnl General Public License.  As a special exception to the GNU General
2860
 
dnl Public License, this file may be distributed as part of a program
2861
 
dnl that contains a configuration script generated by Autoconf, under
2862
 
dnl the same distribution terms as the rest of that program.
2863
 
 
2864
 
dnl From Bruno Haible.
2865
 
 
2866
 
AC_DEFUN([AM_LANGINFO_CODESET],
2867
 
[
2868
 
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2869
 
    [AC_TRY_LINK([#include <langinfo.h>],
2870
 
      [char* cs = nl_langinfo(CODESET);],
2871
 
      am_cv_langinfo_codeset=yes,
2872
 
      am_cv_langinfo_codeset=no)
2873
 
    ])
2874
 
  if test $am_cv_langinfo_codeset = yes; then
2875
 
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2876
 
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2877
 
  fi
2878
 
])
2879
 
 
2880
 
# lcmessage.m4 serial 3 (gettext-0.11.3)
2881
 
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2882
 
dnl This file is free software, distributed under the terms of the GNU
2883
 
dnl General Public License.  As a special exception to the GNU General
2884
 
dnl Public License, this file may be distributed as part of a program
2885
 
dnl that contains a configuration script generated by Autoconf, under
2886
 
dnl the same distribution terms as the rest of that program.
2887
 
dnl
2888
 
dnl This file can can be used in projects which are not available under
2889
 
dnl the GNU General Public License or the GNU Library General Public
2890
 
dnl License but which still want to provide support for the GNU gettext
2891
 
dnl functionality.
2892
 
dnl Please note that the actual code of the GNU gettext library is covered
2893
 
dnl by the GNU Library General Public License, and the rest of the GNU
2894
 
dnl gettext package package is covered by the GNU General Public License.
2895
 
dnl They are *not* in the public domain.
2896
 
 
2897
 
dnl Authors:
2898
 
dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
2899
 
 
2900
 
# Check whether LC_MESSAGES is available in <locale.h>.
2901
 
 
2902
 
AC_DEFUN([AM_LC_MESSAGES],
2903
 
[
2904
 
  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2905
 
    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2906
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2907
 
  if test $am_cv_val_LC_MESSAGES = yes; then
2908
 
    AC_DEFINE(HAVE_LC_MESSAGES, 1,
2909
 
      [Define if your <locale.h> file defines LC_MESSAGES.])
2910
 
  fi
2911
 
])
2912
 
 
 
868
rm -rf conftest.dir
 
869
 
 
870
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
871
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
872
AC_SUBST([am__tar])
 
873
AC_SUBST([am__untar])
 
874
]) # _AM_PROG_TAR
 
875
 
 
876
m4_include([m4/findlib.m4])
 
877
m4_include([m4/nullsort.m4])
 
878
m4_include([gnulib/m4/alloca.m4])
 
879
m4_include([gnulib/m4/atexit.m4])
 
880
m4_include([gnulib/m4/canonicalize.m4])
 
881
m4_include([gnulib/m4/closeout.m4])
 
882
m4_include([gnulib/m4/d-ino.m4])
 
883
m4_include([gnulib/m4/dirname.m4])
 
884
m4_include([gnulib/m4/dos.m4])
 
885
m4_include([gnulib/m4/error.m4])
 
886
m4_include([gnulib/m4/exitfail.m4])
 
887
m4_include([gnulib/m4/extensions.m4])
 
888
m4_include([gnulib/m4/fileblocks.m4])
 
889
m4_include([gnulib/m4/filemode.m4])
 
890
m4_include([gnulib/m4/filenamecat.m4])
 
891
m4_include([gnulib/m4/fnmatch.m4])
 
892
m4_include([gnulib/m4/fpending.m4])
 
893
m4_include([gnulib/m4/fstypename.m4])
 
894
m4_include([gnulib/m4/getcwd-path-max.m4])
 
895
m4_include([gnulib/m4/getcwd.m4])
 
896
m4_include([gnulib/m4/getline.m4])
 
897
m4_include([gnulib/m4/getndelim2.m4])
 
898
m4_include([gnulib/m4/getopt.m4])
 
899
m4_include([gnulib/m4/gettext.m4])
 
900
m4_include([gnulib/m4/gettimeofday.m4])
 
901
m4_include([gnulib/m4/gnulib.m4])
 
902
m4_include([gnulib/m4/human.m4])
 
903
m4_include([gnulib/m4/iconv.m4])
 
904
m4_include([gnulib/m4/idcache.m4])
 
905
m4_include([gnulib/m4/intmax_t.m4])
 
906
m4_include([gnulib/m4/inttypes_h.m4])
 
907
m4_include([gnulib/m4/lib-ld.m4])
 
908
m4_include([gnulib/m4/lib-link.m4])
 
909
m4_include([gnulib/m4/lib-prefix.m4])
 
910
m4_include([gnulib/m4/longlong.m4])
 
911
m4_include([gnulib/m4/ls-mntd-fs.m4])
 
912
m4_include([gnulib/m4/lstat.m4])
 
913
m4_include([gnulib/m4/mbrtowc.m4])
 
914
m4_include([gnulib/m4/mbstate_t.m4])
 
915
m4_include([gnulib/m4/memcmp.m4])
 
916
m4_include([gnulib/m4/mempcpy.m4])
 
917
m4_include([gnulib/m4/memset.m4])
 
918
m4_include([gnulib/m4/mktime.m4])
 
919
m4_include([gnulib/m4/modechange.m4])
 
920
m4_include([gnulib/m4/mountlist.m4])
 
921
m4_include([gnulib/m4/nls.m4])
 
922
m4_include([gnulib/m4/onceonly_2_57.m4])
 
923
m4_include([gnulib/m4/pathmax.m4])
 
924
m4_include([gnulib/m4/po.m4])
 
925
m4_include([gnulib/m4/progtest.m4])
 
926
m4_include([gnulib/m4/quote.m4])
 
927
m4_include([gnulib/m4/quotearg.m4])
 
928
m4_include([gnulib/m4/readlink.m4])
 
929
m4_include([gnulib/m4/regex.m4])
 
930
m4_include([gnulib/m4/restrict.m4])
 
931
m4_include([gnulib/m4/rpmatch.m4])
 
932
m4_include([gnulib/m4/savedir.m4])
 
933
m4_include([gnulib/m4/ssize_t.m4])
 
934
m4_include([gnulib/m4/stat-macros.m4])
 
935
m4_include([gnulib/m4/stat.m4])
 
936
m4_include([gnulib/m4/stdbool.m4])
 
937
m4_include([gnulib/m4/stdint_h.m4])
 
938
m4_include([gnulib/m4/stpcpy.m4])
 
939
m4_include([gnulib/m4/strdup.m4])
 
940
m4_include([gnulib/m4/strftime.m4])
 
941
m4_include([gnulib/m4/strstr.m4])
 
942
m4_include([gnulib/m4/strtoimax.m4])
 
943
m4_include([gnulib/m4/strtol.m4])
 
944
m4_include([gnulib/m4/strtoll.m4])
 
945
m4_include([gnulib/m4/strtoul.m4])
 
946
m4_include([gnulib/m4/strtoull.m4])
 
947
m4_include([gnulib/m4/strtoumax.m4])
 
948
m4_include([gnulib/m4/time_r.m4])
 
949
m4_include([gnulib/m4/tm_gmtoff.m4])
 
950
m4_include([gnulib/m4/tzset.m4])
 
951
m4_include([gnulib/m4/uintmax_t.m4])
 
952
m4_include([gnulib/m4/ulonglong.m4])
 
953
m4_include([gnulib/m4/xalloc.m4])
 
954
m4_include([gnulib/m4/xgetcwd.m4])
 
955
m4_include([gnulib/m4/xreadlink.m4])
 
956
m4_include([gnulib/m4/xstrtol.m4])
 
957
m4_include([gnulib/m4/xstrtoumax.m4])
 
958
m4_include([gnulib/m4/yesno.m4])