~ubuntu-branches/debian/jessie/debfoster/jessie

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Ivo Timmermans
  • Date: 2004-08-03 19:37:04 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040803193704-ozifry6esgxzwnf1
Tags: 2.5-4
* src/conffile.c, etc/debfoster.conf: Set NegativeKeepers to "no" by
  default.
* po/da.po: Updated Danish translation.  (Closes: #262650)

Show diffs side-by-side

added added

removed removed

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