~ubuntu-branches/ubuntu/dapper/gworldclock/dapper

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Drew Parsons
  • Date: 2003-12-23 15:31:20 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20031223153120-1drxus7uk82vk4by
Tags: 1.3-2
Build-depends: libxml2-dev. Closes: #224865.

Show diffs side-by-side

added added

removed removed

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