~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

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