~ubuntu-branches/ubuntu/natty/gnome-vfs/natty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-03-17 16:12:58 UTC
  • mfrom: (0.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090317161258-px3a2czt9g2ktjz3
Tags: 1:2.24.1-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
m4_ifndef([AC_AUTOCONF_VERSION],
15
15
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
 
m4_if(AC_AUTOCONF_VERSION, [2.61],,
17
 
[m4_warning([this file was generated for autoconf 2.61.
 
16
m4_if(AC_AUTOCONF_VERSION, [2.62],,
 
17
[m4_warning([this file was generated for autoconf 2.62.
18
18
You have another version of autoconf.  It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
21
 
 
22
# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
 
23
#
 
24
# This file is free software; the Free Software Foundation
 
25
# gives unlimited permission to copy and/or distribute it,
 
26
# with or without modifications, as long as this notice is preserved.
 
27
 
 
28
# AM_AUTOMAKE_VERSION(VERSION)
 
29
# ----------------------------
 
30
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
31
# generated from the m4 files accompanying Automake X.Y.
 
32
# (This private macro should not be called outside this file.)
 
33
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
34
[am__api_version='1.10'
 
35
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
36
dnl require some minimum version.  Point them to the right macro.
 
37
m4_if([$1], [1.10.1], [],
 
38
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
39
])
 
40
 
 
41
# _AM_AUTOCONF_VERSION(VERSION)
 
42
# -----------------------------
 
43
# aclocal traces this macro to find the Autoconf version.
 
44
# This is a private macro too.  Using m4_define simplifies
 
45
# the logic in aclocal, which can simply ignore this definition.
 
46
m4_define([_AM_AUTOCONF_VERSION], [])
 
47
 
 
48
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
49
# -------------------------------
 
50
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
51
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
53
[AM_AUTOMAKE_VERSION([1.10.1])dnl
 
54
m4_ifndef([AC_AUTOCONF_VERSION],
 
55
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
56
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
 
57
 
 
58
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
59
 
 
60
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
61
#
 
62
# This file is free software; the Free Software Foundation
 
63
# gives unlimited permission to copy and/or distribute it,
 
64
# with or without modifications, as long as this notice is preserved.
 
65
 
 
66
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
67
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
68
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
69
#
 
70
# Of course, Automake must honor this variable whenever it calls a
 
71
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
72
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
73
# depending on how configure is run.  This is pretty annoying, since
 
74
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
75
# source directory, any form will work fine, but in subdirectories a
 
76
# relative path needs to be adjusted first.
 
77
#
 
78
# $ac_aux_dir/missing
 
79
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
80
# $top_srcdir/$ac_aux_dir/missing
 
81
#    fails if $ac_aux_dir is absolute,
 
82
#    fails when called from a subdirectory in a VPATH build with
 
83
#          a relative $ac_aux_dir
 
84
#
 
85
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
86
# are both prefixed by $srcdir.  In an in-source build this is usually
 
87
# harmless because $srcdir is `.', but things will broke when you
 
88
# start a VPATH build or use an absolute $srcdir.
 
89
#
 
90
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
91
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
92
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
93
# and then we would define $MISSING as
 
94
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
95
# This will work as long as MISSING is not called from configure, because
 
96
# unfortunately $(top_srcdir) has no meaning in configure.
 
97
# However there are other variables, like CC, which are often used in
 
98
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
99
#
 
100
# Another solution, used here, is to always expand $ac_aux_dir to an
 
101
# absolute PATH.  The drawback is that using absolute paths prevent a
 
102
# configured tree to be moved without reconfiguration.
 
103
 
 
104
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
105
[dnl Rely on autoconf to set up CDPATH properly.
 
106
AC_PREREQ([2.50])dnl
 
107
# expand $ac_aux_dir to an absolute path
 
108
am_aux_dir=`cd $ac_aux_dir && pwd`
 
109
])
 
110
 
 
111
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
112
 
 
113
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 
114
# Free Software Foundation, Inc.
 
115
#
 
116
# This file is free software; the Free Software Foundation
 
117
# gives unlimited permission to copy and/or distribute it,
 
118
# with or without modifications, as long as this notice is preserved.
 
119
 
 
120
# serial 8
 
121
 
 
122
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
123
# -------------------------------------
 
124
# Define a conditional.
 
125
AC_DEFUN([AM_CONDITIONAL],
 
126
[AC_PREREQ(2.52)dnl
 
127
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
128
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
129
AC_SUBST([$1_TRUE])dnl
 
130
AC_SUBST([$1_FALSE])dnl
 
131
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
132
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
133
if $2; then
 
134
  $1_TRUE=
 
135
  $1_FALSE='#'
 
136
else
 
137
  $1_TRUE='#'
 
138
  $1_FALSE=
 
139
fi
 
140
AC_CONFIG_COMMANDS_PRE(
 
141
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
142
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
143
Usually this means the macro was only invoked conditionally.]])
 
144
fi])])
 
145
 
 
146
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
147
# Free Software Foundation, Inc.
 
148
#
 
149
# This file is free software; the Free Software Foundation
 
150
# gives unlimited permission to copy and/or distribute it,
 
151
# with or without modifications, as long as this notice is preserved.
 
152
 
 
153
# serial 9
 
154
 
 
155
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
156
# written in clear, in which case automake, when reading aclocal.m4,
 
157
# will think it sees a *use*, and therefore will trigger all it's
 
158
# C support machinery.  Also note that it means that autoscan, seeing
 
159
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
160
 
 
161
 
 
162
# _AM_DEPENDENCIES(NAME)
 
163
# ----------------------
 
164
# See how the compiler implements dependency checking.
 
165
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
166
# We try a few techniques and use that to set a single cache variable.
 
167
#
 
168
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
169
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
170
# dependency, and given that the user is not expected to run this macro,
 
171
# just rely on AC_PROG_CC.
 
172
AC_DEFUN([_AM_DEPENDENCIES],
 
173
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
174
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
175
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
176
AC_REQUIRE([AM_DEP_TRACK])dnl
 
177
 
 
178
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
179
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
180
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
181
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
182
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
183
                   [depcc="$$1"   am_compiler_list=])
 
184
 
 
185
AC_CACHE_CHECK([dependency style of $depcc],
 
186
               [am_cv_$1_dependencies_compiler_type],
 
187
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
188
  # We make a subdir and do the tests there.  Otherwise we can end up
 
189
  # making bogus files that we don't know about and never remove.  For
 
190
  # instance it was reported that on HP-UX the gcc test will end up
 
191
  # making a dummy file named `D' -- because `-MD' means `put the output
 
192
  # in D'.
 
193
  mkdir conftest.dir
 
194
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
195
  # using a relative directory.
 
196
  cp "$am_depcomp" conftest.dir
 
197
  cd conftest.dir
 
198
  # We will build objects and dependencies in a subdirectory because
 
199
  # it helps to detect inapplicable dependency modes.  For instance
 
200
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
201
  # side effect of compilation, but ICC will put the dependencies in
 
202
  # the current directory while Tru64 will put them in the object
 
203
  # directory.
 
204
  mkdir sub
 
205
 
 
206
  am_cv_$1_dependencies_compiler_type=none
 
207
  if test "$am_compiler_list" = ""; then
 
208
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
209
  fi
 
210
  for depmode in $am_compiler_list; do
 
211
    # Setup a source with many dependencies, because some compilers
 
212
    # like to wrap large dependency lists on column 80 (with \), and
 
213
    # we should not choose a depcomp mode which is confused by this.
 
214
    #
 
215
    # We need to recreate these files for each test, as the compiler may
 
216
    # overwrite some of them when testing with obscure command lines.
 
217
    # This happens at least with the AIX C compiler.
 
218
    : > sub/conftest.c
 
219
    for i in 1 2 3 4 5 6; do
 
220
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
221
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
222
      # Solaris 8's {/usr,}/bin/sh.
 
223
      touch sub/conftst$i.h
 
224
    done
 
225
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
226
 
 
227
    case $depmode in
 
228
    nosideeffect)
 
229
      # after this tag, mechanisms are not by side-effect, so they'll
 
230
      # only be used when explicitly requested
 
231
      if test "x$enable_dependency_tracking" = xyes; then
 
232
        continue
 
233
      else
 
234
        break
 
235
      fi
 
236
      ;;
 
237
    none) break ;;
 
238
    esac
 
239
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
240
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
241
    # handle `-M -o', and we need to detect this.
 
242
    if depmode=$depmode \
 
243
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
244
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
245
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
246
         >/dev/null 2>conftest.err &&
 
247
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
248
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
249
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
250
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
251
      # icc doesn't choke on unknown options, it will just issue warnings
 
252
      # or remarks (even with -Werror).  So we grep stderr for any message
 
253
      # that says an option was ignored or not supported.
 
254
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
255
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
256
      # The diagnosis changed in icc 8.0:
 
257
      #   icc: Command line remark: option '-MP' not supported
 
258
      if (grep 'ignoring option' conftest.err ||
 
259
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
260
        am_cv_$1_dependencies_compiler_type=$depmode
 
261
        break
 
262
      fi
 
263
    fi
 
264
  done
 
265
 
 
266
  cd ..
 
267
  rm -rf conftest.dir
 
268
else
 
269
  am_cv_$1_dependencies_compiler_type=none
 
270
fi
 
271
])
 
272
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
273
AM_CONDITIONAL([am__fastdep$1], [
 
274
  test "x$enable_dependency_tracking" != xno \
 
275
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
276
])
 
277
 
 
278
 
 
279
# AM_SET_DEPDIR
 
280
# -------------
 
281
# Choose a directory name for dependency files.
 
282
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
283
AC_DEFUN([AM_SET_DEPDIR],
 
284
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
285
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
286
])
 
287
 
 
288
 
 
289
# AM_DEP_TRACK
 
290
# ------------
 
291
AC_DEFUN([AM_DEP_TRACK],
 
292
[AC_ARG_ENABLE(dependency-tracking,
 
293
[  --disable-dependency-tracking  speeds up one-time build
 
294
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
295
if test "x$enable_dependency_tracking" != xno; then
 
296
  am_depcomp="$ac_aux_dir/depcomp"
 
297
  AMDEPBACKSLASH='\'
 
298
fi
 
299
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
300
AC_SUBST([AMDEPBACKSLASH])dnl
 
301
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
302
])
 
303
 
 
304
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
305
 
 
306
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
307
# Free Software Foundation, Inc.
 
308
#
 
309
# This file is free software; the Free Software Foundation
 
310
# gives unlimited permission to copy and/or distribute it,
 
311
# with or without modifications, as long as this notice is preserved.
 
312
 
 
313
#serial 3
 
314
 
 
315
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
316
# ------------------------------
 
317
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
318
[for mf in $CONFIG_FILES; do
 
319
  # Strip MF so we end up with the name of the file.
 
320
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
321
  # Check whether this is an Automake generated Makefile or not.
 
322
  # We used to match only the files named `Makefile.in', but
 
323
  # some people rename them; so instead we look at the file content.
 
324
  # Grep'ing the first line is not enough: some people post-process
 
325
  # each Makefile.in and add a new line on top of each file to say so.
 
326
  # Grep'ing the whole file is not good either: AIX grep has a line
 
327
  # limit of 2048, but all sed's we know have understand at least 4000.
 
328
  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
329
    dirpart=`AS_DIRNAME("$mf")`
 
330
  else
 
331
    continue
 
332
  fi
 
333
  # Extract the definition of DEPDIR, am__include, and am__quote
 
334
  # from the Makefile without running `make'.
 
335
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
336
  test -z "$DEPDIR" && continue
 
337
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
338
  test -z "am__include" && continue
 
339
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
340
  # When using ansi2knr, U may be empty or an underscore; expand it
 
341
  U=`sed -n 's/^U = //p' < "$mf"`
 
342
  # Find all dependency output files, they are included files with
 
343
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
344
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
345
  # expansion.
 
346
  for file in `sed -n "
 
347
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
348
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
349
    # Make sure the directory exists.
 
350
    test -f "$dirpart/$file" && continue
 
351
    fdir=`AS_DIRNAME(["$file"])`
 
352
    AS_MKDIR_P([$dirpart/$fdir])
 
353
    # echo "creating $dirpart/$file"
 
354
    echo '# dummy' > "$dirpart/$file"
 
355
  done
 
356
done
 
357
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
358
 
 
359
 
 
360
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
361
# -----------------------------
 
362
# This macro should only be invoked once -- use via AC_REQUIRE.
 
363
#
 
364
# This code is only required when automatic dependency tracking
 
365
# is enabled.  FIXME.  This creates each `.P' file that we will
 
366
# need in order to bootstrap the dependency handling code.
 
367
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
368
[AC_CONFIG_COMMANDS([depfiles],
 
369
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
370
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
371
])
 
372
 
 
373
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
374
# Free Software Foundation, Inc.
 
375
#
 
376
# This file is free software; the Free Software Foundation
 
377
# gives unlimited permission to copy and/or distribute it,
 
378
# with or without modifications, as long as this notice is preserved.
 
379
 
 
380
# serial 8
 
381
 
 
382
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
383
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
384
 
 
385
# Do all the work for Automake.                             -*- Autoconf -*-
 
386
 
 
387
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
388
# 2005, 2006, 2008 Free Software Foundation, Inc.
 
389
#
 
390
# This file is free software; the Free Software Foundation
 
391
# gives unlimited permission to copy and/or distribute it,
 
392
# with or without modifications, as long as this notice is preserved.
 
393
 
 
394
# serial 13
 
395
 
 
396
# This macro actually does too much.  Some checks are only needed if
 
397
# your package does certain things.  But this isn't really a big deal.
 
398
 
 
399
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
400
# AM_INIT_AUTOMAKE([OPTIONS])
 
401
# -----------------------------------------------
 
402
# The call with PACKAGE and VERSION arguments is the old style
 
403
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
404
# and VERSION should now be passed to AC_INIT and removed from
 
405
# the call to AM_INIT_AUTOMAKE.
 
406
# We support both call styles for the transition.  After
 
407
# the next Automake release, Autoconf can make the AC_INIT
 
408
# arguments mandatory, and then we can depend on a new Autoconf
 
409
# release and drop the old call support.
 
410
AC_DEFUN([AM_INIT_AUTOMAKE],
 
411
[AC_PREREQ([2.60])dnl
 
412
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
413
dnl the ones we care about.
 
414
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
415
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
416
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
417
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
418
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
419
  # is not polluted with repeated "-I."
 
420
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
421
  # test to see if srcdir already configured
 
422
  if test -f $srcdir/config.status; then
 
423
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
424
  fi
 
425
fi
 
426
 
 
427
# test whether we have cygpath
 
428
if test -z "$CYGPATH_W"; then
 
429
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
430
    CYGPATH_W='cygpath -w'
 
431
  else
 
432
    CYGPATH_W=echo
 
433
  fi
 
434
fi
 
435
AC_SUBST([CYGPATH_W])
 
436
 
 
437
# Define the identity of the package.
 
438
dnl Distinguish between old-style and new-style calls.
 
439
m4_ifval([$2],
 
440
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
441
 AC_SUBST([PACKAGE], [$1])dnl
 
442
 AC_SUBST([VERSION], [$2])],
 
443
[_AM_SET_OPTIONS([$1])dnl
 
444
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
445
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
446
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
447
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
448
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
449
 
 
450
_AM_IF_OPTION([no-define],,
 
451
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
452
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
453
 
 
454
# Some tools Automake needs.
 
455
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
456
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
457
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
458
AM_MISSING_PROG(AUTOCONF, autoconf)
 
459
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
460
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
461
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
462
AM_PROG_INSTALL_SH
 
463
AM_PROG_INSTALL_STRIP
 
464
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
465
# We need awk for the "check" target.  The system "awk" is bad on
 
466
# some platforms.
 
467
AC_REQUIRE([AC_PROG_AWK])dnl
 
468
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
469
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
470
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
471
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
472
                             [_AM_PROG_TAR([v7])])])
 
473
_AM_IF_OPTION([no-dependencies],,
 
474
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
475
                  [_AM_DEPENDENCIES(CC)],
 
476
                  [define([AC_PROG_CC],
 
477
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
478
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
479
                  [_AM_DEPENDENCIES(CXX)],
 
480
                  [define([AC_PROG_CXX],
 
481
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
482
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
483
                  [_AM_DEPENDENCIES(OBJC)],
 
484
                  [define([AC_PROG_OBJC],
 
485
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
486
])
 
487
])
 
488
 
 
489
 
 
490
# When config.status generates a header, we must update the stamp-h file.
 
491
# This file resides in the same directory as the config header
 
492
# that is generated.  The stamp files are numbered to have different names.
 
493
 
 
494
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
495
# loop where config.status creates the headers, so we can generate
 
496
# our stamp files there.
 
497
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
498
[# Compute $1's index in $config_headers.
 
499
_am_arg=$1
 
500
_am_stamp_count=1
 
501
for _am_header in $config_headers :; do
 
502
  case $_am_header in
 
503
    $_am_arg | $_am_arg:* )
 
504
      break ;;
 
505
    * )
 
506
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
507
  esac
 
508
done
 
509
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
510
 
 
511
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
512
#
 
513
# This file is free software; the Free Software Foundation
 
514
# gives unlimited permission to copy and/or distribute it,
 
515
# with or without modifications, as long as this notice is preserved.
 
516
 
 
517
# AM_PROG_INSTALL_SH
 
518
# ------------------
 
519
# Define $install_sh.
 
520
AC_DEFUN([AM_PROG_INSTALL_SH],
 
521
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
522
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 
523
AC_SUBST(install_sh)])
 
524
 
 
525
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
526
#
 
527
# This file is free software; the Free Software Foundation
 
528
# gives unlimited permission to copy and/or distribute it,
 
529
# with or without modifications, as long as this notice is preserved.
 
530
 
 
531
# serial 2
 
532
 
 
533
# Check whether the underlying file-system supports filenames
 
534
# with a leading dot.  For instance MS-DOS doesn't.
 
535
AC_DEFUN([AM_SET_LEADING_DOT],
 
536
[rm -rf .tst 2>/dev/null
 
537
mkdir .tst 2>/dev/null
 
538
if test -d .tst; then
 
539
  am__leading_dot=.
 
540
else
 
541
  am__leading_dot=_
 
542
fi
 
543
rmdir .tst 2>/dev/null
 
544
AC_SUBST([am__leading_dot])])
 
545
 
 
546
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
547
# From Jim Meyering
 
548
 
 
549
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
 
550
# Free Software Foundation, Inc.
 
551
#
 
552
# This file is free software; the Free Software Foundation
 
553
# gives unlimited permission to copy and/or distribute it,
 
554
# with or without modifications, as long as this notice is preserved.
 
555
 
 
556
# serial 4
 
557
 
 
558
AC_DEFUN([AM_MAINTAINER_MODE],
 
559
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
560
  dnl maintainer-mode is disabled by default
 
561
  AC_ARG_ENABLE(maintainer-mode,
 
562
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
563
                          (and sometimes confusing) to the casual installer],
 
564
      USE_MAINTAINER_MODE=$enableval,
 
565
      USE_MAINTAINER_MODE=no)
 
566
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
567
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
568
  MAINT=$MAINTAINER_MODE_TRUE
 
569
  AC_SUBST(MAINT)dnl
 
570
]
 
571
)
 
572
 
 
573
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
574
 
 
575
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
576
 
 
577
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
578
#
 
579
# This file is free software; the Free Software Foundation
 
580
# gives unlimited permission to copy and/or distribute it,
 
581
# with or without modifications, as long as this notice is preserved.
 
582
 
 
583
# serial 3
 
584
 
 
585
# AM_MAKE_INCLUDE()
 
586
# -----------------
 
587
# Check to see how make treats includes.
 
588
AC_DEFUN([AM_MAKE_INCLUDE],
 
589
[am_make=${MAKE-make}
 
590
cat > confinc << 'END'
 
591
am__doit:
 
592
        @echo done
 
593
.PHONY: am__doit
 
594
END
 
595
# If we don't find an include directive, just comment out the code.
 
596
AC_MSG_CHECKING([for style of include used by $am_make])
 
597
am__include="#"
 
598
am__quote=
 
599
_am_result=none
 
600
# First try GNU make style include.
 
601
echo "include confinc" > confmf
 
602
# We grep out `Entering directory' and `Leaving directory'
 
603
# messages which can occur if `w' ends up in MAKEFLAGS.
 
604
# In particular we don't look at `^make:' because GNU make might
 
605
# be invoked under some other name (usually "gmake"), in which
 
606
# case it prints its new name instead of `make'.
 
607
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
608
   am__include=include
 
609
   am__quote=
 
610
   _am_result=GNU
 
611
fi
 
612
# Now try BSD make style include.
 
613
if test "$am__include" = "#"; then
 
614
   echo '.include "confinc"' > confmf
 
615
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
616
      am__include=.include
 
617
      am__quote="\""
 
618
      _am_result=BSD
 
619
   fi
 
620
fi
 
621
AC_SUBST([am__include])
 
622
AC_SUBST([am__quote])
 
623
AC_MSG_RESULT([$_am_result])
 
624
rm -f confinc confmf
 
625
])
 
626
 
 
627
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
628
 
 
629
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 
630
# Free Software Foundation, Inc.
 
631
#
 
632
# This file is free software; the Free Software Foundation
 
633
# gives unlimited permission to copy and/or distribute it,
 
634
# with or without modifications, as long as this notice is preserved.
 
635
 
 
636
# serial 5
 
637
 
 
638
# AM_MISSING_PROG(NAME, PROGRAM)
 
639
# ------------------------------
 
640
AC_DEFUN([AM_MISSING_PROG],
 
641
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
642
$1=${$1-"${am_missing_run}$2"}
 
643
AC_SUBST($1)])
 
644
 
 
645
 
 
646
# AM_MISSING_HAS_RUN
 
647
# ------------------
 
648
# Define MISSING if not defined so far and test if it supports --run.
 
649
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
650
AC_DEFUN([AM_MISSING_HAS_RUN],
 
651
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
652
AC_REQUIRE_AUX_FILE([missing])dnl
 
653
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
654
# Use eval to expand $SHELL
 
655
if eval "$MISSING --run true"; then
 
656
  am_missing_run="$MISSING --run "
 
657
else
 
658
  am_missing_run=
 
659
  AC_MSG_WARN([`missing' script is too old or missing])
 
660
fi
 
661
])
 
662
 
 
663
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
664
#
 
665
# This file is free software; the Free Software Foundation
 
666
# gives unlimited permission to copy and/or distribute it,
 
667
# with or without modifications, as long as this notice is preserved.
 
668
 
 
669
# AM_PROG_MKDIR_P
 
670
# ---------------
 
671
# Check for `mkdir -p'.
 
672
AC_DEFUN([AM_PROG_MKDIR_P],
 
673
[AC_PREREQ([2.60])dnl
 
674
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
675
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
676
dnl while keeping a definition of mkdir_p for backward compatibility.
 
677
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
678
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
679
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
680
dnl adjustment using top_builddir (which is defined more often than
 
681
dnl MKDIR_P).
 
682
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
683
case $mkdir_p in
 
684
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
685
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
686
esac
 
687
])
 
688
 
 
689
# Helper functions for option handling.                     -*- Autoconf -*-
 
690
 
 
691
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
692
#
 
693
# This file is free software; the Free Software Foundation
 
694
# gives unlimited permission to copy and/or distribute it,
 
695
# with or without modifications, as long as this notice is preserved.
 
696
 
 
697
# serial 3
 
698
 
 
699
# _AM_MANGLE_OPTION(NAME)
 
700
# -----------------------
 
701
AC_DEFUN([_AM_MANGLE_OPTION],
 
702
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
703
 
 
704
# _AM_SET_OPTION(NAME)
 
705
# ------------------------------
 
706
# Set option NAME.  Presently that only means defining a flag for this option.
 
707
AC_DEFUN([_AM_SET_OPTION],
 
708
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
709
 
 
710
# _AM_SET_OPTIONS(OPTIONS)
 
711
# ----------------------------------
 
712
# OPTIONS is a space-separated list of Automake options.
 
713
AC_DEFUN([_AM_SET_OPTIONS],
 
714
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
715
 
 
716
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
717
# -------------------------------------------
 
718
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
719
AC_DEFUN([_AM_IF_OPTION],
 
720
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
721
 
 
722
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
723
 
 
724
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
725
# Free Software Foundation, Inc.
 
726
#
 
727
# This file is free software; the Free Software Foundation
 
728
# gives unlimited permission to copy and/or distribute it,
 
729
# with or without modifications, as long as this notice is preserved.
 
730
 
 
731
# serial 4
 
732
 
 
733
# AM_SANITY_CHECK
 
734
# ---------------
 
735
AC_DEFUN([AM_SANITY_CHECK],
 
736
[AC_MSG_CHECKING([whether build environment is sane])
 
737
# Just in case
 
738
sleep 1
 
739
echo timestamp > conftest.file
 
740
# Do `set' in a subshell so we don't clobber the current shell's
 
741
# arguments.  Must try -L first in case configure is actually a
 
742
# symlink; some systems play weird games with the mod time of symlinks
 
743
# (eg FreeBSD returns the mod time of the symlink's containing
 
744
# directory).
 
745
if (
 
746
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
747
   if test "$[*]" = "X"; then
 
748
      # -L didn't work.
 
749
      set X `ls -t $srcdir/configure conftest.file`
 
750
   fi
 
751
   rm -f conftest.file
 
752
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
753
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
754
 
 
755
      # If neither matched, then we have a broken ls.  This can happen
 
756
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
757
      # broken ls alias from the environment.  This has actually
 
758
      # happened.  Such a system could not be considered "sane".
 
759
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
760
alias in your environment])
 
761
   fi
 
762
 
 
763
   test "$[2]" = conftest.file
 
764
   )
 
765
then
 
766
   # Ok.
 
767
   :
 
768
else
 
769
   AC_MSG_ERROR([newly created file is older than distributed files!
 
770
Check your system clock])
 
771
fi
 
772
AC_MSG_RESULT(yes)])
 
773
 
 
774
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
775
#
 
776
# This file is free software; the Free Software Foundation
 
777
# gives unlimited permission to copy and/or distribute it,
 
778
# with or without modifications, as long as this notice is preserved.
 
779
 
 
780
# AM_PROG_INSTALL_STRIP
 
781
# ---------------------
 
782
# One issue with vendor `install' (even GNU) is that you can't
 
783
# specify the program used to strip binaries.  This is especially
 
784
# annoying in cross-compiling environments, where the build's strip
 
785
# is unlikely to handle the host's binaries.
 
786
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
787
# always use install-sh in `make install-strip', and initialize
 
788
# STRIPPROG with the value of the STRIP variable (set by the user).
 
789
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
790
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
791
# Installed binaries are usually stripped using `strip' when the user
 
792
# run `make install-strip'.  However `strip' might not be the right
 
793
# tool to use in cross-compilation environments, therefore Automake
 
794
# will honor the `STRIP' environment variable to overrule this program.
 
795
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
796
if test "$cross_compiling" != no; then
 
797
  AC_CHECK_TOOL([STRIP], [strip], :)
 
798
fi
 
799
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
800
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
801
 
 
802
# Copyright (C) 2006  Free Software Foundation, Inc.
 
803
#
 
804
# This file is free software; the Free Software Foundation
 
805
# gives unlimited permission to copy and/or distribute it,
 
806
# with or without modifications, as long as this notice is preserved.
 
807
 
 
808
# _AM_SUBST_NOTMAKE(VARIABLE)
 
809
# ---------------------------
 
810
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
811
# This macro is traced by Automake.
 
812
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
813
 
 
814
# Check how to create a tarball.                            -*- Autoconf -*-
 
815
 
 
816
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
817
#
 
818
# This file is free software; the Free Software Foundation
 
819
# gives unlimited permission to copy and/or distribute it,
 
820
# with or without modifications, as long as this notice is preserved.
 
821
 
 
822
# serial 2
 
823
 
 
824
# _AM_PROG_TAR(FORMAT)
 
825
# --------------------
 
826
# Check how to create a tarball in format FORMAT.
 
827
# FORMAT should be one of `v7', `ustar', or `pax'.
 
828
#
 
829
# Substitute a variable $(am__tar) that is a command
 
830
# writing to stdout a FORMAT-tarball containing the directory
 
831
# $tardir.
 
832
#     tardir=directory && $(am__tar) > result.tar
 
833
#
 
834
# Substitute a variable $(am__untar) that extract such
 
835
# a tarball read from stdin.
 
836
#     $(am__untar) < result.tar
 
837
AC_DEFUN([_AM_PROG_TAR],
 
838
[# Always define AMTAR for backward compatibility.
 
839
AM_MISSING_PROG([AMTAR], [tar])
 
840
m4_if([$1], [v7],
 
841
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
842
     [m4_case([$1], [ustar],, [pax],,
 
843
              [m4_fatal([Unknown tar format])])
 
844
AC_MSG_CHECKING([how to create a $1 tar archive])
 
845
# Loop over all known methods to create a tar archive until one works.
 
846
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
847
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
848
# Do not fold the above two line into one, because Tru64 sh and
 
849
# Solaris sh will not grok spaces in the rhs of `-'.
 
850
for _am_tool in $_am_tools
 
851
do
 
852
  case $_am_tool in
 
853
  gnutar)
 
854
    for _am_tar in tar gnutar gtar;
 
855
    do
 
856
      AM_RUN_LOG([$_am_tar --version]) && break
 
857
    done
 
858
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
859
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
860
    am__untar="$_am_tar -xf -"
 
861
    ;;
 
862
  plaintar)
 
863
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
864
    # ustar tarball either.
 
865
    (tar --version) >/dev/null 2>&1 && continue
 
866
    am__tar='tar chf - "$$tardir"'
 
867
    am__tar_='tar chf - "$tardir"'
 
868
    am__untar='tar xf -'
 
869
    ;;
 
870
  pax)
 
871
    am__tar='pax -L -x $1 -w "$$tardir"'
 
872
    am__tar_='pax -L -x $1 -w "$tardir"'
 
873
    am__untar='pax -r'
 
874
    ;;
 
875
  cpio)
 
876
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
877
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
878
    am__untar='cpio -i -H $1 -d'
 
879
    ;;
 
880
  none)
 
881
    am__tar=false
 
882
    am__tar_=false
 
883
    am__untar=false
 
884
    ;;
 
885
  esac
 
886
 
 
887
  # If the value was cached, stop now.  We just wanted to have am__tar
 
888
  # and am__untar set.
 
889
  test -n "${am_cv_prog_tar_$1}" && break
 
890
 
 
891
  # tar/untar a dummy directory, and stop if the command works
 
892
  rm -rf conftest.dir
 
893
  mkdir conftest.dir
 
894
  echo GrepMe > conftest.dir/file
 
895
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
896
  rm -rf conftest.dir
 
897
  if test -s conftest.tar; then
 
898
    AM_RUN_LOG([$am__untar <conftest.tar])
 
899
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
900
  fi
 
901
done
 
902
rm -rf conftest.dir
 
903
 
 
904
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
905
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
906
AC_SUBST([am__tar])
 
907
AC_SUBST([am__untar])
 
908
]) # _AM_PROG_TAR
 
909
 
 
910
dnl AM_GCONF_SOURCE_2
 
911
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
 
912
dnl  (i.e. pass to gconftool-2
 
913
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
 
914
dnl  you should install foo.schemas files
 
915
dnl
 
916
 
 
917
AC_DEFUN([AM_GCONF_SOURCE_2],
 
918
[
 
919
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
 
920
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
921
  else
 
922
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
 
923
  fi
 
924
 
 
925
  AC_ARG_WITH([gconf-source],
 
926
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
 
927
                             [Config database for installing schema files.]),
 
928
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
 
929
 
 
930
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
 
931
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
 
932
 
 
933
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
 
934
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
 
935
  fi
 
936
 
 
937
  AC_ARG_WITH([gconf-schema-file-dir],
 
938
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
 
939
                             [Directory for installing schema files.]),
 
940
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
 
941
 
 
942
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
 
943
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
 
944
 
 
945
  AC_ARG_ENABLE(schemas-install,
 
946
     [  --disable-schemas-install       Disable the schemas installation],
 
947
     [case ${enableval} in
 
948
       yes|no) ;;
 
949
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
 
950
      esac])
 
951
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
 
952
])
 
953
 
 
954
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
955
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
956
#
 
957
# This file is free software, distributed under the terms of the GNU
 
958
# General Public License.  As a special exception to the GNU General
 
959
# Public License, this file may be distributed as part of a program
 
960
# that contains a configuration script generated by Autoconf, under
 
961
# the same distribution terms as the rest of that program.
 
962
#
 
963
# This file can be copied and used freely without restrictions.  It can
 
964
# be used in projects which are not available under the GNU Public License
 
965
# but which still want to provide support for the GNU gettext functionality.
 
966
#
 
967
# Macro to add for using GNU gettext.
 
968
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
969
#
 
970
# Modified to never use included libintl. 
 
971
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
972
#
 
973
# Major rework to remove unused code
 
974
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
975
#
 
976
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
977
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
978
#
 
979
# Modified to require ngettext
 
980
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
981
#
 
982
# We need this here as well, since someone might use autoconf-2.5x
 
983
# to configure GLib then an older version to configure a package
 
984
# using AM_GLIB_GNU_GETTEXT
 
985
AC_PREREQ(2.53)
 
986
 
 
987
dnl
 
988
dnl We go to great lengths to make sure that aclocal won't 
 
989
dnl try to pull in the installed version of these macros
 
990
dnl when running aclocal in the glib directory.
 
991
dnl
 
992
m4_copy([AC_DEFUN],[glib_DEFUN])
 
993
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
994
dnl
 
995
dnl At the end, if we're not within glib, we'll define the public
 
996
dnl definitions in terms of our private definitions.
 
997
dnl
 
998
 
 
999
# GLIB_LC_MESSAGES
 
1000
#--------------------
 
1001
glib_DEFUN([GLIB_LC_MESSAGES],
 
1002
  [AC_CHECK_HEADERS([locale.h])
 
1003
    if test $ac_cv_header_locale_h = yes; then
 
1004
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
1005
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
1006
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
1007
    if test $am_cv_val_LC_MESSAGES = yes; then
 
1008
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
1009
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
1010
    fi
 
1011
  fi])
 
1012
 
 
1013
# GLIB_PATH_PROG_WITH_TEST
 
1014
#----------------------------
 
1015
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
1016
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
1017
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
1018
[# Extract the first word of "$2", so it can be a program name with args.
 
1019
set dummy $2; ac_word=[$]2
 
1020
AC_MSG_CHECKING([for $ac_word])
 
1021
AC_CACHE_VAL(ac_cv_path_$1,
 
1022
[case "[$]$1" in
 
1023
  /*)
 
1024
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
1025
  ;;
 
1026
  *)
 
1027
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
1028
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
1029
    test -z "$ac_dir" && ac_dir=.
 
1030
    if test -f $ac_dir/$ac_word; then
 
1031
      if [$3]; then
 
1032
        ac_cv_path_$1="$ac_dir/$ac_word"
 
1033
        break
 
1034
      fi
 
1035
    fi
 
1036
  done
 
1037
  IFS="$ac_save_ifs"
 
1038
dnl If no 4th arg is given, leave the cache variable unset,
 
1039
dnl so AC_PATH_PROGS will keep looking.
 
1040
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
1041
])dnl
 
1042
  ;;
 
1043
esac])dnl
 
1044
$1="$ac_cv_path_$1"
 
1045
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
1046
  AC_MSG_RESULT([$]$1)
 
1047
else
 
1048
  AC_MSG_RESULT(no)
 
1049
fi
 
1050
AC_SUBST($1)dnl
 
1051
])
 
1052
 
 
1053
# GLIB_WITH_NLS
 
1054
#-----------------
 
1055
glib_DEFUN([GLIB_WITH_NLS],
 
1056
  dnl NLS is obligatory
 
1057
  [USE_NLS=yes
 
1058
    AC_SUBST(USE_NLS)
 
1059
 
 
1060
    gt_cv_have_gettext=no
 
1061
 
 
1062
    CATOBJEXT=NONE
 
1063
    XGETTEXT=:
 
1064
    INTLLIBS=
 
1065
 
 
1066
    AC_CHECK_HEADER(libintl.h,
 
1067
     [gt_cv_func_dgettext_libintl="no"
 
1068
      libintl_extra_libs=""
 
1069
 
 
1070
      #
 
1071
      # First check in libc
 
1072
      #
 
1073
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
1074
        [AC_TRY_LINK([
 
1075
#include <libintl.h>
 
1076
],
 
1077
         [return !ngettext ("","", 1)],
 
1078
          gt_cv_func_ngettext_libc=yes,
 
1079
          gt_cv_func_ngettext_libc=no)
 
1080
        ])
 
1081
  
 
1082
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1083
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
1084
                [AC_TRY_LINK([
 
1085
#include <libintl.h>
 
1086
],
 
1087
                  [return !dgettext ("","")],
 
1088
                  gt_cv_func_dgettext_libc=yes,
 
1089
                  gt_cv_func_dgettext_libc=no)
 
1090
                ])
 
1091
      fi
 
1092
  
 
1093
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1094
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1095
      fi
 
1096
 
 
1097
      #
 
1098
      # If we don't have everything we want, check in libintl
 
1099
      #
 
1100
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
1101
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
1102
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
1103
        
 
1104
        AC_CHECK_LIB(intl, bindtextdomain,
 
1105
            [AC_CHECK_LIB(intl, ngettext,
 
1106
                    [AC_CHECK_LIB(intl, dgettext,
 
1107
                                  gt_cv_func_dgettext_libintl=yes)])])
 
1108
 
 
1109
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
1110
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
1111
          AC_MSG_RESULT([])
 
1112
          AC_CHECK_LIB(intl, ngettext,
 
1113
                [AC_CHECK_LIB(intl, dcgettext,
 
1114
                       [gt_cv_func_dgettext_libintl=yes
 
1115
                        libintl_extra_libs=-liconv],
 
1116
                        :,-liconv)],
 
1117
                :,-liconv)
 
1118
        fi
 
1119
 
 
1120
        #
 
1121
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
1122
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
1123
        # and both have dgettext and ngettext
 
1124
        #
 
1125
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
1126
          glib_save_LIBS="$LIBS"
 
1127
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
1128
          unset ac_cv_func_bind_textdomain_codeset
 
1129
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1130
          LIBS="$glib_save_LIBS"
 
1131
 
 
1132
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
1133
            gt_cv_func_dgettext_libc=no
 
1134
          else
 
1135
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1136
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
1137
              gt_cv_func_dgettext_libintl=no
 
1138
            fi
 
1139
          fi
 
1140
        fi
 
1141
      fi
 
1142
 
 
1143
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1144
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1145
        gt_cv_have_gettext=yes
 
1146
      fi
 
1147
  
 
1148
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1149
        INTLLIBS="-lintl $libintl_extra_libs"
 
1150
      fi
 
1151
  
 
1152
      if test "$gt_cv_have_gettext" = "yes"; then
 
1153
        AC_DEFINE(HAVE_GETTEXT,1,
 
1154
          [Define if the GNU gettext() function is already present or preinstalled.])
 
1155
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
1156
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
1157
        if test "$MSGFMT" != "no"; then
 
1158
          glib_save_LIBS="$LIBS"
 
1159
          LIBS="$LIBS $INTLLIBS"
 
1160
          AC_CHECK_FUNCS(dcgettext)
 
1161
          MSGFMT_OPTS=
 
1162
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
1163
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
1164
msgid ""
 
1165
msgstr ""
 
1166
"Content-Type: text/plain; charset=UTF-8\n"
 
1167
"Project-Id-Version: test 1.0\n"
 
1168
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
1169
"Last-Translator: test <foo@bar.xx>\n"
 
1170
"Language-Team: C <LL@li.org>\n"
 
1171
"MIME-Version: 1.0\n"
 
1172
"Content-Transfer-Encoding: 8bit\n"
 
1173
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
1174
          AC_SUBST(MSGFMT_OPTS)
 
1175
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1176
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
1177
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
1178
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
1179
                         return _nl_msg_cat_cntr],
 
1180
            [CATOBJEXT=.gmo 
 
1181
             DATADIRNAME=share],
 
1182
            [case $host in
 
1183
            *-*-solaris*)
 
1184
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1185
            dnl GNU format message catalog is always supported,
 
1186
            dnl since both are added to the libc all together.
 
1187
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
1188
            dnl and CATOBJEXT=.gmo in this case.
 
1189
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
1190
              [CATOBJEXT=.gmo 
 
1191
               DATADIRNAME=share],
 
1192
              [CATOBJEXT=.mo
 
1193
               DATADIRNAME=lib])
 
1194
            ;;
 
1195
            *)
 
1196
            CATOBJEXT=.mo
 
1197
            DATADIRNAME=lib
 
1198
            ;;
 
1199
            esac])
 
1200
          LIBS="$glib_save_LIBS"
 
1201
          INSTOBJEXT=.mo
 
1202
        else
 
1203
          gt_cv_have_gettext=no
 
1204
        fi
 
1205
      fi
 
1206
    ])
 
1207
 
 
1208
    if test "$gt_cv_have_gettext" = "yes" ; then
 
1209
      AC_DEFINE(ENABLE_NLS, 1,
 
1210
        [always defined to indicate that i18n is enabled])
 
1211
    fi
 
1212
 
 
1213
    dnl Test whether we really found GNU xgettext.
 
1214
    if test "$XGETTEXT" != ":"; then
 
1215
      dnl If it is not GNU xgettext we define it as : so that the
 
1216
      dnl Makefiles still can work.
 
1217
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
1218
        : ;
 
1219
      else
 
1220
        AC_MSG_RESULT(
 
1221
          [found xgettext program is not GNU xgettext; ignore it])
 
1222
        XGETTEXT=":"
 
1223
      fi
 
1224
    fi
 
1225
 
 
1226
    # We need to process the po/ directory.
 
1227
    POSUB=po
 
1228
 
 
1229
    AC_OUTPUT_COMMANDS(
 
1230
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
1231
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
1232
      esac])
 
1233
 
 
1234
    dnl These rules are solely for the distribution goal.  While doing this
 
1235
    dnl we only have to keep exactly one list of the available catalogs
 
1236
    dnl in configure.in.
 
1237
    for lang in $ALL_LINGUAS; do
 
1238
      GMOFILES="$GMOFILES $lang.gmo"
 
1239
      POFILES="$POFILES $lang.po"
 
1240
    done
 
1241
 
 
1242
    dnl Make all variables we use known to autoconf.
 
1243
    AC_SUBST(CATALOGS)
 
1244
    AC_SUBST(CATOBJEXT)
 
1245
    AC_SUBST(DATADIRNAME)
 
1246
    AC_SUBST(GMOFILES)
 
1247
    AC_SUBST(INSTOBJEXT)
 
1248
    AC_SUBST(INTLLIBS)
 
1249
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
1250
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
1251
    AC_SUBST(POFILES)
 
1252
    AC_SUBST(POSUB)
 
1253
  ])
 
1254
 
 
1255
# AM_GLIB_GNU_GETTEXT
 
1256
# -------------------
 
1257
# Do checks necessary for use of gettext. If a suitable implementation 
 
1258
# of gettext is found in either in libintl or in the C library,
 
1259
# it will set INTLLIBS to the libraries needed for use of gettext
 
1260
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
1261
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
1262
# on various variables needed by the Makefile.in.in installed by 
 
1263
# glib-gettextize.
 
1264
dnl
 
1265
glib_DEFUN([GLIB_GNU_GETTEXT],
 
1266
  [AC_REQUIRE([AC_PROG_CC])dnl
 
1267
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
1268
   
 
1269
   GLIB_LC_MESSAGES
 
1270
   GLIB_WITH_NLS
 
1271
 
 
1272
   if test "$gt_cv_have_gettext" = "yes"; then
 
1273
     if test "x$ALL_LINGUAS" = "x"; then
 
1274
       LINGUAS=
 
1275
     else
 
1276
       AC_MSG_CHECKING(for catalogs to be installed)
 
1277
       NEW_LINGUAS=
 
1278
       for presentlang in $ALL_LINGUAS; do
 
1279
         useit=no
 
1280
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
1281
           desiredlanguages="$LINGUAS"
 
1282
         else
 
1283
           desiredlanguages="$ALL_LINGUAS"
 
1284
         fi
 
1285
         for desiredlang in $desiredlanguages; do
 
1286
           # Use the presentlang catalog if desiredlang is
 
1287
           #   a. equal to presentlang, or
 
1288
           #   b. a variant of presentlang (because in this case,
 
1289
           #      presentlang can be used as a fallback for messages
 
1290
           #      which are not translated in the desiredlang catalog).
 
1291
           case "$desiredlang" in
 
1292
             "$presentlang"*) useit=yes;;
 
1293
           esac
 
1294
         done
 
1295
         if test $useit = yes; then
 
1296
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
1297
         fi
 
1298
       done
 
1299
       LINGUAS=$NEW_LINGUAS
 
1300
       AC_MSG_RESULT($LINGUAS)
 
1301
     fi
 
1302
 
 
1303
     dnl Construct list of names of catalog files to be constructed.
 
1304
     if test -n "$LINGUAS"; then
 
1305
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
1306
     fi
 
1307
   fi
 
1308
 
 
1309
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
1310
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
1311
   dnl Try to locate is.
 
1312
   MKINSTALLDIRS=
 
1313
   if test -n "$ac_aux_dir"; then
 
1314
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
1315
   fi
 
1316
   if test -z "$MKINSTALLDIRS"; then
 
1317
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
1318
   fi
 
1319
   AC_SUBST(MKINSTALLDIRS)
 
1320
 
 
1321
   dnl Generate list of files to be processed by xgettext which will
 
1322
   dnl be included in po/Makefile.
 
1323
   test -d po || mkdir po
 
1324
   if test "x$srcdir" != "x."; then
 
1325
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
1326
       posrcprefix="$srcdir/"
 
1327
     else
 
1328
       posrcprefix="../$srcdir/"
 
1329
     fi
 
1330
   else
 
1331
     posrcprefix="../"
 
1332
   fi
 
1333
   rm -f po/POTFILES
 
1334
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
1335
        < $srcdir/po/POTFILES.in > po/POTFILES
 
1336
  ])
 
1337
 
 
1338
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
1339
# -------------------------------
 
1340
# Define VARIABLE to the location where catalog files will
 
1341
# be installed by po/Makefile.
 
1342
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
1343
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
1344
glib_save_prefix="$prefix"
 
1345
glib_save_exec_prefix="$exec_prefix"
 
1346
glib_save_datarootdir="$datarootdir"
 
1347
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
1348
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
1349
datarootdir=`eval echo "${datarootdir}"`
 
1350
if test "x$CATOBJEXT" = "x.mo" ; then
 
1351
  localedir=`eval echo "${libdir}/locale"`
 
1352
else
 
1353
  localedir=`eval echo "${datadir}/locale"`
 
1354
fi
 
1355
prefix="$glib_save_prefix"
 
1356
exec_prefix="$glib_save_exec_prefix"
 
1357
datarootdir="$glib_save_datarootdir"
 
1358
AC_DEFINE_UNQUOTED($1, "$localedir",
 
1359
  [Define the location where the catalogs will be installed])
 
1360
])
 
1361
 
 
1362
dnl
 
1363
dnl Now the definitions that aclocal will find
 
1364
dnl
 
1365
ifdef(glib_configure_in,[],[
 
1366
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
1367
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
1368
])dnl
 
1369
 
 
1370
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
1371
 
1372
# Create a temporary file with TEST-FILE as its contents and pass the
 
1373
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
1374
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
1375
AC_DEFUN([GLIB_RUN_PROG],
 
1376
[cat >conftest.foo <<_ACEOF
 
1377
$2
 
1378
_ACEOF
 
1379
if AC_RUN_LOG([$1 conftest.foo]); then
 
1380
  m4_ifval([$3], [$3], [:])
 
1381
m4_ifvaln([$4], [else $4])dnl
 
1382
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
1383
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
1384
fi])
 
1385
 
 
1386
 
 
1387
# gnome-common.m4
 
1388
 
1389
 
 
1390
dnl GNOME_COMMON_INIT
 
1391
 
 
1392
AC_DEFUN([GNOME_COMMON_INIT],
 
1393
[
 
1394
  dnl this macro should come after AC_CONFIG_MACRO_DIR
 
1395
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
 
1396
 
 
1397
  dnl ensure that when the Automake generated makefile calls aclocal,
 
1398
  dnl it honours the $ACLOCAL_FLAGS environment variable
 
1399
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
 
1400
  if test -n "$ac_macro_dir"; then
 
1401
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
 
1402
  fi
 
1403
 
 
1404
  AC_SUBST([ACLOCAL_AMFLAGS])
 
1405
])
 
1406
 
 
1407
AC_DEFUN([GNOME_DEBUG_CHECK],
 
1408
[
 
1409
        AC_ARG_ENABLE([debug],
 
1410
                      AC_HELP_STRING([--enable-debug],
 
1411
                                     [turn on debugging]),,
 
1412
                      [enable_debug=no])
 
1413
 
 
1414
        if test x$enable_debug = xyes ; then
 
1415
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
 
1416
                [Enable additional debugging at the expense of performance and size])
 
1417
        fi
 
1418
])
 
1419
 
 
1420
dnl GNOME_MAINTAINER_MODE_DEFINES ()
 
1421
dnl define DISABLE_DEPRECATED
 
1422
dnl
 
1423
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
 
1424
[
 
1425
        AC_REQUIRE([AM_MAINTAINER_MODE])
 
1426
 
 
1427
        if test $USE_MAINTAINER_MODE = yes; then
 
1428
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED -DWNCK_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_DEPRECATED"
 
1429
        else
 
1430
                DISABLE_DEPRECATED=""
 
1431
        fi
 
1432
        AC_SUBST(DISABLE_DEPRECATED)
 
1433
])
 
1434
 
 
1435
dnl GNOME_COMPILE_WARNINGS
 
1436
dnl Turn on many useful compiler warnings
 
1437
dnl For now, only works on GCC
 
1438
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
1439
    dnl ******************************
 
1440
    dnl More compiler warnings
 
1441
    dnl ******************************
 
1442
 
 
1443
    AC_ARG_ENABLE(compile-warnings, 
 
1444
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
1445
                                 [Turn on compiler warnings]),,
 
1446
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
1447
 
 
1448
    warnCFLAGS=
 
1449
    if test "x$GCC" != xyes; then
 
1450
        enable_compile_warnings=no
 
1451
    fi
 
1452
 
 
1453
    warning_flags=
 
1454
    realsave_CFLAGS="$CFLAGS"
 
1455
 
 
1456
    case "$enable_compile_warnings" in
 
1457
    no)
 
1458
        warning_flags=
 
1459
        ;;
 
1460
    minimum)
 
1461
        warning_flags="-Wall"
 
1462
        ;;
 
1463
    yes)
 
1464
        warning_flags="-Wall -Wmissing-prototypes"
 
1465
        ;;
 
1466
    maximum|error)
 
1467
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
1468
        CFLAGS="$warning_flags $CFLAGS"
 
1469
        for option in -Wno-sign-compare; do
 
1470
                SAVE_CFLAGS="$CFLAGS"
 
1471
                CFLAGS="$CFLAGS $option"
 
1472
                AC_MSG_CHECKING([whether gcc understands $option])
 
1473
                AC_TRY_COMPILE([], [],
 
1474
                        has_option=yes,
 
1475
                        has_option=no,)
 
1476
                CFLAGS="$SAVE_CFLAGS"
 
1477
                AC_MSG_RESULT($has_option)
 
1478
                if test $has_option = yes; then
 
1479
                  warning_flags="$warning_flags $option"
 
1480
                fi
 
1481
                unset has_option
 
1482
                unset SAVE_CFLAGS
 
1483
        done
 
1484
        unset option
 
1485
        if test "$enable_compile_warnings" = "error" ; then
 
1486
            warning_flags="$warning_flags -Werror"
 
1487
        fi
 
1488
        ;;
 
1489
    *)
 
1490
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
1491
        ;;
 
1492
    esac
 
1493
    CFLAGS="$realsave_CFLAGS"
 
1494
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
1495
    AC_MSG_RESULT($warning_flags)
 
1496
 
 
1497
    AC_ARG_ENABLE(iso-c,
 
1498
                  AC_HELP_STRING([--enable-iso-c],
 
1499
                                 [Try to warn if code is not ISO C ]),,
 
1500
                  [enable_iso_c=no])
 
1501
 
 
1502
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
1503
    complCFLAGS=
 
1504
    if test "x$enable_iso_c" != "xno"; then
 
1505
        if test "x$GCC" = "xyes"; then
 
1506
        case " $CFLAGS " in
 
1507
            *[\ \       ]-ansi[\ \      ]*) ;;
 
1508
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
1509
        esac
 
1510
        case " $CFLAGS " in
 
1511
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
1512
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
1513
        esac
 
1514
        fi
 
1515
    fi
 
1516
    AC_MSG_RESULT($complCFLAGS)
 
1517
 
 
1518
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
1519
    AC_SUBST(WARN_CFLAGS)
 
1520
])
 
1521
 
 
1522
dnl For C++, do basically the same thing.
 
1523
 
 
1524
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
1525
  AC_ARG_ENABLE(cxx-warnings,
 
1526
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
1527
                               [Turn on compiler warnings.]),,
 
1528
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
1529
 
 
1530
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
1531
  warnCXXFLAGS=
 
1532
  if test "x$GXX" != xyes; then
 
1533
    enable_cxx_warnings=no
 
1534
  fi
 
1535
  if test "x$enable_cxx_warnings" != "xno"; then
 
1536
    if test "x$GXX" = "xyes"; then
 
1537
      case " $CXXFLAGS " in
 
1538
      *[\ \     ]-Wall[\ \      ]*) ;;
 
1539
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
1540
      esac
 
1541
 
 
1542
      ## -W is not all that useful.  And it cannot be controlled
 
1543
      ## with individual -Wno-xxx flags, unlike -Wall
 
1544
      if test "x$enable_cxx_warnings" = "xyes"; then
 
1545
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
1546
      fi
 
1547
    fi
 
1548
  fi
 
1549
  AC_MSG_RESULT($warnCXXFLAGS)
 
1550
 
 
1551
   AC_ARG_ENABLE(iso-cxx,
 
1552
                 AC_HELP_STRING([--enable-iso-cxx],
 
1553
                                [Try to warn if code is not ISO C++ ]),,
 
1554
                 [enable_iso_cxx=no])
 
1555
 
 
1556
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
1557
   complCXXFLAGS=
 
1558
   if test "x$enable_iso_cxx" != "xno"; then
 
1559
     if test "x$GXX" = "xyes"; then
 
1560
      case " $CXXFLAGS " in
 
1561
      *[\ \     ]-ansi[\ \      ]*) ;;
 
1562
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
1563
      esac
 
1564
 
 
1565
      case " $CXXFLAGS " in
 
1566
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
1567
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
1568
      esac
 
1569
     fi
 
1570
   fi
 
1571
  AC_MSG_RESULT($complCXXFLAGS)
 
1572
 
 
1573
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
1574
  AC_SUBST(WARN_CXXFLAGS)
 
1575
])
 
1576
 
 
1577
dnl -*- mode: autoconf -*-
 
1578
 
 
1579
# serial 1
 
1580
 
 
1581
dnl Usage:
 
1582
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
 
1583
AC_DEFUN([GTK_DOC_CHECK],
 
1584
[
 
1585
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
 
1586
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
 
1587
 
 
1588
  dnl for overriding the documentation installation directory
 
1589
  AC_ARG_WITH([html-dir],
 
1590
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
 
1591
    [with_html_dir='${datadir}/gtk-doc/html'])
 
1592
  HTML_DIR="$with_html_dir"
 
1593
  AC_SUBST([HTML_DIR])
 
1594
 
 
1595
  dnl enable/disable documentation building
 
1596
  AC_ARG_ENABLE([gtk-doc],
 
1597
    AS_HELP_STRING([--enable-gtk-doc],
 
1598
                   [use gtk-doc to build documentation [[default=no]]]),,
 
1599
    [enable_gtk_doc=no])
 
1600
 
 
1601
  if test x$enable_gtk_doc = xyes; then
 
1602
    ifelse([$1],[],
 
1603
      [PKG_CHECK_EXISTS([gtk-doc],,
 
1604
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
 
1605
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
 
1606
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
 
1607
  fi
 
1608
 
 
1609
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
 
1610
  AC_MSG_RESULT($enable_gtk_doc)
 
1611
 
 
1612
  dnl enable/disable output formats
 
1613
  AC_ARG_ENABLE([gtk-doc-html],
 
1614
    AS_HELP_STRING([--enable-gtk-doc-html],
 
1615
                   [build documentation in html format [[default=yes]]]),,
 
1616
    [enable_gtk_doc_html=yes])
 
1617
  AC_ARG_ENABLE([gtk-doc-pdf],
 
1618
    AS_HELP_STRING([--enable-gtk-doc-pdf],
 
1619
                   [build documentation in pdf format [[default=no]]]),,
 
1620
    [enable_gtk_doc_pdf=no])
 
1621
 
 
1622
  dnl check for tools we added during development
 
1623
  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
 
1624
  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
 
1625
 
 
1626
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
 
1627
  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
 
1628
  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
 
1629
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
 
1630
  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
 
1631
])
 
1632
 
 
1633
 
 
1634
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
1635
# serial 40 IT_PROG_INTLTOOL
 
1636
AC_DEFUN([IT_PROG_INTLTOOL], [
 
1637
AC_PREREQ([2.50])dnl
 
1638
AC_REQUIRE([AM_NLS])dnl
 
1639
 
 
1640
case "$am__api_version" in
 
1641
    1.[01234])
 
1642
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
1643
    ;;
 
1644
    *)
 
1645
    ;;
 
1646
esac
 
1647
 
 
1648
if test -n "$1"; then
 
1649
    AC_MSG_CHECKING([for intltool >= $1])
 
1650
 
 
1651
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1652
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
1653
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1654
    ]
 
1655
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
1656
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
1657
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
1658
fi
 
1659
 
 
1660
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
1661
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
1662
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
1663
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
1664
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
1665
fi
 
1666
 
 
1667
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1668
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1669
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1670
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1671
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
1672
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1673
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1674
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1675
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1676
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1677
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1678
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
1679
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1680
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1681
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1682
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1683
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
 
1684
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
1685
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
 
1686
 
 
1687
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
1688
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
1689
AC_SUBST(INTLTOOL_KEYS_RULE)
 
1690
AC_SUBST(INTLTOOL_PROP_RULE)
 
1691
AC_SUBST(INTLTOOL_OAF_RULE)
 
1692
AC_SUBST(INTLTOOL_PONG_RULE)
 
1693
AC_SUBST(INTLTOOL_SERVER_RULE)
 
1694
AC_SUBST(INTLTOOL_SHEET_RULE)
 
1695
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
1696
AC_SUBST(INTLTOOL_UI_RULE)
 
1697
AC_SUBST(INTLTOOL_XAM_RULE)
 
1698
AC_SUBST(INTLTOOL_KBD_RULE)
 
1699
AC_SUBST(INTLTOOL_XML_RULE)
 
1700
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
1701
AC_SUBST(INTLTOOL_CAVES_RULE)
 
1702
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
 
1703
AC_SUBST(INTLTOOL_THEME_RULE)
 
1704
AC_SUBST(INTLTOOL_SERVICE_RULE)
 
1705
AC_SUBST(INTLTOOL_POLICY_RULE)
 
1706
 
 
1707
# Check the gettext tools to make sure they are GNU
 
1708
AC_PATH_PROG(XGETTEXT, xgettext)
 
1709
AC_PATH_PROG(MSGMERGE, msgmerge)
 
1710
AC_PATH_PROG(MSGFMT, msgfmt)
 
1711
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1712
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
1713
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1714
fi
 
1715
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
1716
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
1717
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
1718
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
1719
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1720
fi
 
1721
 
 
1722
AC_PATH_PROG(INTLTOOL_PERL, [perl])
 
1723
if test -z "$INTLTOOL_PERL"; then
 
1724
   AC_MSG_ERROR([perl not found; required for intltool])
 
1725
fi
 
1726
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
1727
   AC_MSG_ERROR([perl 5.x required for intltool])
 
1728
fi
 
1729
if test "x$2" != "xno-xml"; then
 
1730
   AC_MSG_CHECKING([for XML::Parser])
 
1731
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
1732
       AC_MSG_RESULT([ok])
 
1733
   else
 
1734
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
1735
   fi
 
1736
fi
 
1737
 
 
1738
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
1739
AC_SUBST(ALL_LINGUAS)
 
1740
 
 
1741
# Set DATADIRNAME correctly if it is not set yet
 
1742
# (copied from glib-gettext.m4)
 
1743
if test -z "$DATADIRNAME"; then
 
1744
  AC_LINK_IFELSE(
 
1745
    [AC_LANG_PROGRAM([[]],
 
1746
                     [[extern int _nl_msg_cat_cntr;
 
1747
                       return _nl_msg_cat_cntr]])],
 
1748
    [DATADIRNAME=share],
 
1749
    [case $host in
 
1750
    *-*-solaris*)
 
1751
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1752
    dnl GNU format message catalog is always supported,
 
1753
    dnl since both are added to the libc all together.
 
1754
    dnl Hence, we'd like to go with DATADIRNAME=share
 
1755
    dnl in this case.
 
1756
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
1757
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
1758
    ;;
 
1759
    *)
 
1760
    [DATADIRNAME=lib]
 
1761
    ;;
 
1762
    esac])
 
1763
fi
 
1764
AC_SUBST(DATADIRNAME)
 
1765
 
 
1766
IT_PO_SUBDIR([po])
 
1767
 
 
1768
])
 
1769
 
 
1770
 
 
1771
# IT_PO_SUBDIR(DIRNAME)
 
1772
# ---------------------
 
1773
# All po subdirs have to be declared with this macro; the subdir "po" is
 
1774
# declared by IT_PROG_INTLTOOL.
 
1775
#
 
1776
AC_DEFUN([IT_PO_SUBDIR],
 
1777
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
1778
dnl
 
1779
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
1780
dnl of config.status.
 
1781
AC_CONFIG_COMMANDS_PRE([
 
1782
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
1783
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then
 
1784
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
1785
    fi
 
1786
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
1787
    >"$1/stamp-it.tmp"
 
1788
    [sed '/^#/d
 
1789
         s/^[[].*] *//
 
1790
         /^[    ]*$/d
 
1791
        '"s|^|  $ac_top_srcdir/|" \
 
1792
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
1793
    ]
 
1794
    [sed '/^POTFILES =/,/[^\\]$/ {
 
1795
                /^POTFILES =/!d
 
1796
                r $1/POTFILES
 
1797
          }
 
1798
         ' "$1/Makefile.in" >"$1/Makefile"]
 
1799
    rm -f "$1/Makefile.tmp"
 
1800
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
1801
  ])
 
1802
])dnl
 
1803
])
 
1804
 
 
1805
# deprecated macros
 
1806
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
1807
# A hint is needed for aclocal from Automake <= 1.9.4:
 
1808
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
1809
 
 
1810
 
22
1811
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23
1812
 
24
 
# serial 51 AC_PROG_LIBTOOL
 
1813
# serial 52 AC_PROG_LIBTOOL
25
1814
 
26
1815
 
27
1816
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
109
1898
AC_REQUIRE([AC_OBJEXT])dnl
110
1899
AC_REQUIRE([AC_EXEEXT])dnl
111
1900
dnl
112
 
 
113
1901
AC_LIBTOOL_SYS_MAX_CMD_LEN
114
1902
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
115
1903
AC_LIBTOOL_OBJDIR
211
1999
  ;;
212
2000
esac
213
2001
 
 
2002
_LT_REQUIRED_DARWIN_CHECKS
 
2003
 
214
2004
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
215
2005
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
216
2006
enable_win32_dll=yes, enable_win32_dll=no)
290
2080
echo "$lt_simple_link_test_code" >conftest.$ac_ext
291
2081
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
292
2082
_lt_linker_boilerplate=`cat conftest.err`
293
 
$rm conftest*
 
2083
$rm -r conftest*
294
2084
])# _LT_LINKER_BOILERPLATE
295
2085
 
 
2086
# _LT_REQUIRED_DARWIN_CHECKS
 
2087
# --------------------------
 
2088
# Check for some things on darwin
 
2089
AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
 
2090
  case $host_os in
 
2091
    rhapsody* | darwin*)
 
2092
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
 
2093
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
 
2094
 
 
2095
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
 
2096
      [lt_cv_apple_cc_single_mod=no
 
2097
      if test -z "${LT_MULTI_MODULE}"; then
 
2098
   # By default we will add the -single_module flag. You can override
 
2099
   # by either setting the environment variable LT_MULTI_MODULE
 
2100
   # non-empty at configure time, or by adding -multi_module to the
 
2101
   # link flags.
 
2102
   echo "int foo(void){return 1;}" > conftest.c
 
2103
   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 
2104
     -dynamiclib ${wl}-single_module conftest.c
 
2105
   if test -f libconftest.dylib; then
 
2106
     lt_cv_apple_cc_single_mod=yes
 
2107
     rm -rf libconftest.dylib*
 
2108
   fi
 
2109
   rm conftest.c
 
2110
      fi])
 
2111
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
 
2112
      [lt_cv_ld_exported_symbols_list],
 
2113
      [lt_cv_ld_exported_symbols_list=no
 
2114
      save_LDFLAGS=$LDFLAGS
 
2115
      echo "_main" > conftest.sym
 
2116
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
 
2117
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 
2118
   [lt_cv_ld_exported_symbols_list=yes],
 
2119
   [lt_cv_ld_exported_symbols_list=no])
 
2120
   LDFLAGS="$save_LDFLAGS"
 
2121
    ])
 
2122
    case $host_os in
 
2123
    rhapsody* | darwin1.[[0123]])
 
2124
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
 
2125
    darwin1.*)
 
2126
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2127
    darwin*)
 
2128
      # if running on 10.5 or later, the deployment target defaults
 
2129
      # to the OS version, if on x86, and 10.4, the deployment
 
2130
      # target defaults to 10.4. Don't you love it?
 
2131
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 
2132
   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
 
2133
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2134
   10.[[012]]*)
 
2135
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
 
2136
   10.*)
 
2137
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
 
2138
      esac
 
2139
    ;;
 
2140
  esac
 
2141
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
 
2142
      _lt_dar_single_mod='$single_module'
 
2143
    fi
 
2144
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
 
2145
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
 
2146
    else
 
2147
      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
 
2148
    fi
 
2149
    if test "$DSYMUTIL" != ":"; then
 
2150
      _lt_dsymutil="~$DSYMUTIL \$lib || :"
 
2151
    else
 
2152
      _lt_dsymutil=
 
2153
    fi
 
2154
    ;;
 
2155
  esac
 
2156
])
296
2157
 
297
2158
# _LT_AC_SYS_LIBPATH_AIX
298
2159
# ----------------------
618
2479
    *64-bit*)
619
2480
      case $lt_cv_prog_gnu_ld in
620
2481
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
621
 
      *)    LD="${LD-ld} -64" ;;
 
2482
      *)
 
2483
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 
2484
          LD="${LD-ld} -64"
 
2485
        fi
 
2486
        ;;
622
2487
      esac
623
2488
      ;;
624
2489
    esac
711
2576
       $2=yes
712
2577
     fi
713
2578
   fi
714
 
   $rm conftest*
 
2579
   $rm -r conftest*
715
2580
   LDFLAGS="$save_LDFLAGS"
716
2581
])
717
2582
 
982
2847
    AC_CHECK_FUNC([shl_load],
983
2848
          [lt_cv_dlopen="shl_load"],
984
2849
      [AC_CHECK_LIB([dld], [shl_load],
985
 
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
2850
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
986
2851
        [AC_CHECK_FUNC([dlopen],
987
2852
              [lt_cv_dlopen="dlopen"],
988
2853
          [AC_CHECK_LIB([dl], [dlopen],
990
2855
            [AC_CHECK_LIB([svld], [dlopen],
991
2856
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
992
2857
              [AC_CHECK_LIB([dld], [dld_link],
993
 
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
2858
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
994
2859
              ])
995
2860
            ])
996
2861
          ])
1307
3172
  soname_spec='${libname}${release}${shared_ext}$major'
1308
3173
  ;;
1309
3174
 
1310
 
aix4* | aix5*)
 
3175
aix[[4-9]]*)
1311
3176
  version_type=linux
1312
3177
  need_lib_prefix=no
1313
3178
  need_version=no
1830
3695
AC_MSG_RESULT([$dynamic_linker])
1831
3696
test "$dynamic_linker" = no && can_build_shared=no
1832
3697
 
 
3698
AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
 
3699
[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
 
3700
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
 
3701
AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
 
3702
[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
 
3703
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
 
3704
 
1833
3705
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1834
3706
if test "$GCC" = yes; then
1835
3707
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2329
4201
# whether `pass_all' will *always* work, you probably want this one.
2330
4202
 
2331
4203
case $host_os in
2332
 
aix4* | aix5*)
 
4204
aix[[4-9]]*)
2333
4205
  lt_cv_deplibs_check_method=pass_all
2334
4206
  ;;
2335
4207
 
2765
4637
  fi
2766
4638
  ;;
2767
4639
 
2768
 
aix4* | aix5*)
 
4640
aix[[4-9]]*)
2769
4641
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2770
4642
    test "$enable_shared" = yes && enable_static=no
2771
4643
  fi
2822
4694
_LT_AC_TAGVAR(predeps, $1)=
2823
4695
_LT_AC_TAGVAR(postdeps, $1)=
2824
4696
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
4697
_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
2825
4698
 
2826
4699
# Source file extension for C++ test sources.
2827
4700
ac_ext=cpp
2931
4804
    # FIXME: insert proper C++ library support
2932
4805
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2933
4806
    ;;
2934
 
  aix4* | aix5*)
 
4807
  aix[[4-9]]*)
2935
4808
    if test "$host_cpu" = ia64; then
2936
4809
      # On IA64, the linker does run time linking by default, so we don't
2937
4810
      # have to do anything special.
2944
4817
      # Test if we are trying to use run time linking or normal
2945
4818
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2946
4819
      # need to do runtime linking.
2947
 
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
4820
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
2948
4821
        for ld_flag in $LDFLAGS; do
2949
4822
          case $ld_flag in
2950
4823
          *-brtl*)
3090
4963
    fi
3091
4964
  ;;
3092
4965
      darwin* | rhapsody*)
3093
 
        case $host_os in
3094
 
        rhapsody* | darwin1.[[012]])
3095
 
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3096
 
         ;;
3097
 
       *) # Darwin 1.3 on
3098
 
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3099
 
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3100
 
         else
3101
 
           case ${MACOSX_DEPLOYMENT_TARGET} in
3102
 
             10.[[012]])
3103
 
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3104
 
               ;;
3105
 
             10.*)
3106
 
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3107
 
               ;;
3108
 
           esac
3109
 
         fi
3110
 
         ;;
3111
 
        esac
3112
4966
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3113
4967
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3114
4968
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3115
4969
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3116
4970
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3117
4971
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3118
 
 
3119
 
    if test "$GXX" = yes ; then
3120
 
      lt_int_apple_cc_single_mod=no
 
4972
      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
 
4973
      if test "$GXX" = yes ; then
3121
4974
      output_verbose_link_cmd='echo'
3122
 
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3123
 
       lt_int_apple_cc_single_mod=yes
 
4975
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
 
4976
      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
 
4977
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
 
4978
      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
4979
      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
 
4980
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
 
4981
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
3124
4982
      fi
3125
 
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3126
 
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3127
 
      else
3128
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3129
 
        fi
3130
 
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3131
 
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3132
 
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3133
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3134
 
          else
3135
 
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3136
 
          fi
3137
 
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3138
4983
      else
3139
4984
      case $cc_basename in
3140
4985
        xlc*)
3385
5230
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3386
5231
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3387
5232
        ;;
3388
 
      pgCC*)
 
5233
      pgCC* | pgcpp*)
3389
5234
        # Portland Group C++ compiler
3390
5235
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3391
5236
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3820
5665
# compiler output when linking a shared library.
3821
5666
# Parse the compiler output and extract the necessary
3822
5667
# objects, libraries and library flags.
3823
 
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
5668
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
 
5669
[AC_REQUIRE([LT_AC_PROG_SED])dnl
3824
5670
dnl we can't use the lt_simple_compile_test_code here,
3825
5671
dnl because it contains code intended for an executable,
3826
5672
dnl not a library.  It's possible we should let each
3945
5791
 
3946
5792
$rm -f confest.$objext
3947
5793
 
 
5794
_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
 
5795
if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
5796
  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
 
5797
fi
 
5798
 
3948
5799
# PORTME: override above test on systems where it is broken
3949
5800
ifelse([$1],[CXX],
3950
5801
[case $host_os in
4001
5852
  ;;
4002
5853
esac
4003
5854
])
4004
 
 
4005
5855
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4006
5856
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4007
5857
esac
4086
5936
    postinstall_cmds='$RANLIB $lib'
4087
5937
  fi
4088
5938
  ;;
4089
 
aix4* | aix5*)
 
5939
aix[[4-9]]*)
4090
5940
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4091
5941
    test "$enable_shared" = yes && enable_static=no
4092
5942
  fi
4263
6113
    _LT_AC_TAGVAR(predeps, $1) \
4264
6114
    _LT_AC_TAGVAR(postdeps, $1) \
4265
6115
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
6116
    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4266
6117
    _LT_AC_TAGVAR(archive_cmds, $1) \
4267
6118
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4268
6119
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4325
6176
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4326
6177
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4327
6178
#
4328
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
 
6179
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4329
6180
# Free Software Foundation, Inc.
4330
6181
#
4331
6182
# This file is part of GNU Libtool:
4562
6413
# shared library.
4563
6414
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4564
6415
 
 
6416
# The directories searched by this compiler when creating a shared
 
6417
# library
 
6418
compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
 
6419
 
4565
6420
# The library search path used internally by the compiler when linking
4566
6421
# a shared library.
4567
6422
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4911
6766
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4912
6767
    cat conftest.$ac_ext >&5
4913
6768
  fi
4914
 
  rm -f conftest* conftst*
 
6769
  rm -rf conftest* conftst*
4915
6770
 
4916
6771
  # Do not use the global_symbol_pipe unless it works.
4917
6772
  if test "$pipe_works" = yes; then
4968
6823
      # built for inclusion in a dll (and should export symbols for example).
4969
6824
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4970
6825
      # (--disable-auto-import) libraries
4971
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
6826
      m4_if([$1], [GCJ], [],
 
6827
        [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4972
6828
      ;;
4973
6829
    darwin* | rhapsody*)
4974
6830
      # PIC is the default on this platform
5005
6861
    esac
5006
6862
  else
5007
6863
    case $host_os in
5008
 
      aix4* | aix5*)
 
6864
      aix[[4-9]]*)
5009
6865
        # All AIX code is PIC.
5010
6866
        if test "$host_cpu" = ia64; then
5011
6867
          # AIX 5 now supports IA64 processor
5101
6957
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5102
6958
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5103
6959
            ;;
5104
 
          pgCC*)
 
6960
          pgCC* | pgcpp*)
5105
6961
            # Portland Group C++ compiler.
5106
6962
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5107
6963
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5252
7108
      # built for inclusion in a dll (and should export symbols for example).
5253
7109
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5254
7110
      # (--disable-auto-import) libraries
5255
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
7111
      m4_if([$1], [GCJ], [],
 
7112
        [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5256
7113
      ;;
5257
7114
 
5258
7115
    darwin* | rhapsody*)
5322
7179
    mingw* | cygwin* | pw32* | os2*)
5323
7180
      # This hack is so that the source file can tell whether it is being
5324
7181
      # built for inclusion in a dll (and should export symbols for example).
5325
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
7182
      m4_if([$1], [GCJ], [],
 
7183
        [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5326
7184
      ;;
5327
7185
 
5328
7186
    hpux9* | hpux10* | hpux11*)
5459
7317
#
5460
7318
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5461
7319
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5462
 
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
7320
    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
5463
7321
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5464
7322
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5465
7323
     "" | " "*) ;;
5483
7341
#
5484
7342
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5485
7343
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5486
 
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
7344
  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5487
7345
  $lt_tmp_static_flag,
5488
7346
  [],
5489
7347
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5499
7357
ifelse([$1],[CXX],[
5500
7358
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5501
7359
  case $host_os in
5502
 
  aix4* | aix5*)
 
7360
  aix[[4-9]]*)
5503
7361
    # If we're using GNU nm, then we don't want the "-C" option.
5504
7362
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5505
7363
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5518
7376
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5519
7377
  ;;
5520
7378
  esac
 
7379
  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5521
7380
],[
5522
7381
  runpath_var=
5523
7382
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5548
7407
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5549
7408
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5550
7409
  # as well as any symbol that contains `d'.
5551
 
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
7410
  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5552
7411
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5553
7412
  # platforms (ab)use it in PIC code, but their linkers get confused if
5554
7413
  # the symbol is explicitly referenced.  Since portable code cannot
5555
7414
  # rely on this symbol name, it's probably fine to never include it in
5556
7415
  # preloaded symbol tables.
 
7416
  # Exclude shared library initialization/finalization symbols.
 
7417
dnl Note also adjust exclude_expsyms for C++ above.
5557
7418
  extract_expsyms_cmds=
5558
7419
  # Just being paranoid about ensuring that cc_basename is set.
5559
7420
  _LT_CC_BASENAME([$compiler])
5603
7464
 
5604
7465
    # See if GNU ld supports shared libraries.
5605
7466
    case $host_os in
5606
 
    aix3* | aix4* | aix5*)
 
7467
    aix[[3-9]]*)
5607
7468
      # On AIX/PPC, the GNU linker is very broken
5608
7469
      if test "$host_cpu" != ia64; then
5609
7470
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5822
7683
      fi
5823
7684
      ;;
5824
7685
 
5825
 
    aix4* | aix5*)
 
7686
    aix[[4-9]]*)
5826
7687
      if test "$host_cpu" = ia64; then
5827
7688
        # On IA64, the linker does run time linking by default, so we don't
5828
7689
        # have to do anything special.
5842
7703
        # Test if we are trying to use run time linking or normal
5843
7704
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5844
7705
        # need to do runtime linking.
5845
 
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
7706
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5846
7707
          for ld_flag in $LDFLAGS; do
5847
7708
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5848
7709
            aix_use_runtimelinking=yes
6002
7863
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6003
7864
    if test "$GCC" = yes ; then
6004
7865
        output_verbose_link_cmd='echo'
6005
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6006
 
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6007
 
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6008
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6009
 
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
7866
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
 
7867
        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
 
7868
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
 
7869
        _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
6010
7870
    else
6011
7871
      case $cc_basename in
6012
7872
        xlc*)
6775
8635
fi[]dnl
6776
8636
])# PKG_CHECK_MODULES
6777
8637
 
6778
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
6779
 
#
6780
 
# This file is free software; the Free Software Foundation
6781
 
# gives unlimited permission to copy and/or distribute it,
6782
 
# with or without modifications, as long as this notice is preserved.
6783
 
 
6784
 
# AM_AUTOMAKE_VERSION(VERSION)
6785
 
# ----------------------------
6786
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6787
 
# generated from the m4 files accompanying Automake X.Y.
6788
 
# (This private macro should not be called outside this file.)
6789
 
AC_DEFUN([AM_AUTOMAKE_VERSION],
6790
 
[am__api_version='1.10'
6791
 
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
6792
 
dnl require some minimum version.  Point them to the right macro.
6793
 
m4_if([$1], [1.10.1], [],
6794
 
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
6795
 
])
6796
 
 
6797
 
# _AM_AUTOCONF_VERSION(VERSION)
6798
 
# -----------------------------
6799
 
# aclocal traces this macro to find the Autoconf version.
6800
 
# This is a private macro too.  Using m4_define simplifies
6801
 
# the logic in aclocal, which can simply ignore this definition.
6802
 
m4_define([_AM_AUTOCONF_VERSION], [])
6803
 
 
6804
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
6805
 
# -------------------------------
6806
 
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6807
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6808
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6809
 
[AM_AUTOMAKE_VERSION([1.10.1])dnl
6810
 
m4_ifndef([AC_AUTOCONF_VERSION],
6811
 
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
6812
 
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
6813
 
 
6814
 
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6815
 
 
6816
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6817
 
#
6818
 
# This file is free software; the Free Software Foundation
6819
 
# gives unlimited permission to copy and/or distribute it,
6820
 
# with or without modifications, as long as this notice is preserved.
6821
 
 
6822
 
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6823
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6824
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6825
 
#
6826
 
# Of course, Automake must honor this variable whenever it calls a
6827
 
# tool from the auxiliary directory.  The problem is that $srcdir (and
6828
 
# therefore $ac_aux_dir as well) can be either absolute or relative,
6829
 
# depending on how configure is run.  This is pretty annoying, since
6830
 
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6831
 
# source directory, any form will work fine, but in subdirectories a
6832
 
# relative path needs to be adjusted first.
6833
 
#
6834
 
# $ac_aux_dir/missing
6835
 
#    fails when called from a subdirectory if $ac_aux_dir is relative
6836
 
# $top_srcdir/$ac_aux_dir/missing
6837
 
#    fails if $ac_aux_dir is absolute,
6838
 
#    fails when called from a subdirectory in a VPATH build with
6839
 
#          a relative $ac_aux_dir
6840
 
#
6841
 
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6842
 
# are both prefixed by $srcdir.  In an in-source build this is usually
6843
 
# harmless because $srcdir is `.', but things will broke when you
6844
 
# start a VPATH build or use an absolute $srcdir.
6845
 
#
6846
 
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6847
 
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6848
 
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6849
 
# and then we would define $MISSING as
6850
 
#   MISSING="\${SHELL} $am_aux_dir/missing"
6851
 
# This will work as long as MISSING is not called from configure, because
6852
 
# unfortunately $(top_srcdir) has no meaning in configure.
6853
 
# However there are other variables, like CC, which are often used in
6854
 
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6855
 
#
6856
 
# Another solution, used here, is to always expand $ac_aux_dir to an
6857
 
# absolute PATH.  The drawback is that using absolute paths prevent a
6858
 
# configured tree to be moved without reconfiguration.
6859
 
 
6860
 
AC_DEFUN([AM_AUX_DIR_EXPAND],
6861
 
[dnl Rely on autoconf to set up CDPATH properly.
6862
 
AC_PREREQ([2.50])dnl
6863
 
# expand $ac_aux_dir to an absolute path
6864
 
am_aux_dir=`cd $ac_aux_dir && pwd`
6865
 
])
6866
 
 
6867
 
# AM_CONDITIONAL                                            -*- Autoconf -*-
6868
 
 
6869
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
6870
 
# Free Software Foundation, Inc.
6871
 
#
6872
 
# This file is free software; the Free Software Foundation
6873
 
# gives unlimited permission to copy and/or distribute it,
6874
 
# with or without modifications, as long as this notice is preserved.
6875
 
 
6876
 
# serial 8
6877
 
 
6878
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6879
 
# -------------------------------------
6880
 
# Define a conditional.
6881
 
AC_DEFUN([AM_CONDITIONAL],
6882
 
[AC_PREREQ(2.52)dnl
6883
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6884
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6885
 
AC_SUBST([$1_TRUE])dnl
6886
 
AC_SUBST([$1_FALSE])dnl
6887
 
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
6888
 
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
6889
 
if $2; then
6890
 
  $1_TRUE=
6891
 
  $1_FALSE='#'
6892
 
else
6893
 
  $1_TRUE='#'
6894
 
  $1_FALSE=
6895
 
fi
6896
 
AC_CONFIG_COMMANDS_PRE(
6897
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6898
 
  AC_MSG_ERROR([[conditional "$1" was never defined.
6899
 
Usually this means the macro was only invoked conditionally.]])
6900
 
fi])])
6901
 
 
6902
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6903
 
# Free Software Foundation, Inc.
6904
 
#
6905
 
# This file is free software; the Free Software Foundation
6906
 
# gives unlimited permission to copy and/or distribute it,
6907
 
# with or without modifications, as long as this notice is preserved.
6908
 
 
6909
 
# serial 9
6910
 
 
6911
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6912
 
# written in clear, in which case automake, when reading aclocal.m4,
6913
 
# will think it sees a *use*, and therefore will trigger all it's
6914
 
# C support machinery.  Also note that it means that autoscan, seeing
6915
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6916
 
 
6917
 
 
6918
 
# _AM_DEPENDENCIES(NAME)
6919
 
# ----------------------
6920
 
# See how the compiler implements dependency checking.
6921
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6922
 
# We try a few techniques and use that to set a single cache variable.
6923
 
#
6924
 
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6925
 
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6926
 
# dependency, and given that the user is not expected to run this macro,
6927
 
# just rely on AC_PROG_CC.
6928
 
AC_DEFUN([_AM_DEPENDENCIES],
6929
 
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6930
 
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6931
 
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6932
 
AC_REQUIRE([AM_DEP_TRACK])dnl
6933
 
 
6934
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6935
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6936
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6937
 
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
6938
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6939
 
                   [depcc="$$1"   am_compiler_list=])
6940
 
 
6941
 
AC_CACHE_CHECK([dependency style of $depcc],
6942
 
               [am_cv_$1_dependencies_compiler_type],
6943
 
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6944
 
  # We make a subdir and do the tests there.  Otherwise we can end up
6945
 
  # making bogus files that we don't know about and never remove.  For
6946
 
  # instance it was reported that on HP-UX the gcc test will end up
6947
 
  # making a dummy file named `D' -- because `-MD' means `put the output
6948
 
  # in D'.
6949
 
  mkdir conftest.dir
6950
 
  # Copy depcomp to subdir because otherwise we won't find it if we're
6951
 
  # using a relative directory.
6952
 
  cp "$am_depcomp" conftest.dir
6953
 
  cd conftest.dir
6954
 
  # We will build objects and dependencies in a subdirectory because
6955
 
  # it helps to detect inapplicable dependency modes.  For instance
6956
 
  # both Tru64's cc and ICC support -MD to output dependencies as a
6957
 
  # side effect of compilation, but ICC will put the dependencies in
6958
 
  # the current directory while Tru64 will put them in the object
6959
 
  # directory.
6960
 
  mkdir sub
6961
 
 
6962
 
  am_cv_$1_dependencies_compiler_type=none
6963
 
  if test "$am_compiler_list" = ""; then
6964
 
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6965
 
  fi
6966
 
  for depmode in $am_compiler_list; do
6967
 
    # Setup a source with many dependencies, because some compilers
6968
 
    # like to wrap large dependency lists on column 80 (with \), and
6969
 
    # we should not choose a depcomp mode which is confused by this.
6970
 
    #
6971
 
    # We need to recreate these files for each test, as the compiler may
6972
 
    # overwrite some of them when testing with obscure command lines.
6973
 
    # This happens at least with the AIX C compiler.
6974
 
    : > sub/conftest.c
6975
 
    for i in 1 2 3 4 5 6; do
6976
 
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6977
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6978
 
      # Solaris 8's {/usr,}/bin/sh.
6979
 
      touch sub/conftst$i.h
6980
 
    done
6981
 
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6982
 
 
6983
 
    case $depmode in
6984
 
    nosideeffect)
6985
 
      # after this tag, mechanisms are not by side-effect, so they'll
6986
 
      # only be used when explicitly requested
6987
 
      if test "x$enable_dependency_tracking" = xyes; then
6988
 
        continue
6989
 
      else
6990
 
        break
6991
 
      fi
6992
 
      ;;
6993
 
    none) break ;;
6994
 
    esac
6995
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6996
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
6997
 
    # handle `-M -o', and we need to detect this.
6998
 
    if depmode=$depmode \
6999
 
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7000
 
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7001
 
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7002
 
         >/dev/null 2>conftest.err &&
7003
 
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7004
 
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7005
 
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7006
 
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7007
 
      # icc doesn't choke on unknown options, it will just issue warnings
7008
 
      # or remarks (even with -Werror).  So we grep stderr for any message
7009
 
      # that says an option was ignored or not supported.
7010
 
      # When given -MP, icc 7.0 and 7.1 complain thusly:
7011
 
      #   icc: Command line warning: ignoring option '-M'; no argument required
7012
 
      # The diagnosis changed in icc 8.0:
7013
 
      #   icc: Command line remark: option '-MP' not supported
7014
 
      if (grep 'ignoring option' conftest.err ||
7015
 
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7016
 
        am_cv_$1_dependencies_compiler_type=$depmode
7017
 
        break
7018
 
      fi
7019
 
    fi
7020
 
  done
7021
 
 
7022
 
  cd ..
7023
 
  rm -rf conftest.dir
7024
 
else
7025
 
  am_cv_$1_dependencies_compiler_type=none
7026
 
fi
7027
 
])
7028
 
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7029
 
AM_CONDITIONAL([am__fastdep$1], [
7030
 
  test "x$enable_dependency_tracking" != xno \
7031
 
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7032
 
])
7033
 
 
7034
 
 
7035
 
# AM_SET_DEPDIR
7036
 
# -------------
7037
 
# Choose a directory name for dependency files.
7038
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
7039
 
AC_DEFUN([AM_SET_DEPDIR],
7040
 
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7041
 
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7042
 
])
7043
 
 
7044
 
 
7045
 
# AM_DEP_TRACK
7046
 
# ------------
7047
 
AC_DEFUN([AM_DEP_TRACK],
7048
 
[AC_ARG_ENABLE(dependency-tracking,
7049
 
[  --disable-dependency-tracking  speeds up one-time build
7050
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
7051
 
if test "x$enable_dependency_tracking" != xno; then
7052
 
  am_depcomp="$ac_aux_dir/depcomp"
7053
 
  AMDEPBACKSLASH='\'
7054
 
fi
7055
 
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7056
 
AC_SUBST([AMDEPBACKSLASH])dnl
7057
 
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
7058
 
])
7059
 
 
7060
 
# Generate code to set up dependency tracking.              -*- Autoconf -*-
7061
 
 
7062
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7063
 
# Free Software Foundation, Inc.
7064
 
#
7065
 
# This file is free software; the Free Software Foundation
7066
 
# gives unlimited permission to copy and/or distribute it,
7067
 
# with or without modifications, as long as this notice is preserved.
7068
 
 
7069
 
#serial 3
7070
 
 
7071
 
# _AM_OUTPUT_DEPENDENCY_COMMANDS
7072
 
# ------------------------------
7073
 
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7074
 
[for mf in $CONFIG_FILES; do
7075
 
  # Strip MF so we end up with the name of the file.
7076
 
  mf=`echo "$mf" | sed -e 's/:.*$//'`
7077
 
  # Check whether this is an Automake generated Makefile or not.
7078
 
  # We used to match only the files named `Makefile.in', but
7079
 
  # some people rename them; so instead we look at the file content.
7080
 
  # Grep'ing the first line is not enough: some people post-process
7081
 
  # each Makefile.in and add a new line on top of each file to say so.
7082
 
  # Grep'ing the whole file is not good either: AIX grep has a line
7083
 
  # limit of 2048, but all sed's we know have understand at least 4000.
7084
 
  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
7085
 
    dirpart=`AS_DIRNAME("$mf")`
7086
 
  else
7087
 
    continue
7088
 
  fi
7089
 
  # Extract the definition of DEPDIR, am__include, and am__quote
7090
 
  # from the Makefile without running `make'.
7091
 
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7092
 
  test -z "$DEPDIR" && continue
7093
 
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
7094
 
  test -z "am__include" && continue
7095
 
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7096
 
  # When using ansi2knr, U may be empty or an underscore; expand it
7097
 
  U=`sed -n 's/^U = //p' < "$mf"`
7098
 
  # Find all dependency output files, they are included files with
7099
 
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
7100
 
  # simplest approach to changing $(DEPDIR) to its actual value in the
7101
 
  # expansion.
7102
 
  for file in `sed -n "
7103
 
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7104
 
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7105
 
    # Make sure the directory exists.
7106
 
    test -f "$dirpart/$file" && continue
7107
 
    fdir=`AS_DIRNAME(["$file"])`
7108
 
    AS_MKDIR_P([$dirpart/$fdir])
7109
 
    # echo "creating $dirpart/$file"
7110
 
    echo '# dummy' > "$dirpart/$file"
7111
 
  done
7112
 
done
7113
 
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7114
 
 
7115
 
 
7116
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
7117
 
# -----------------------------
7118
 
# This macro should only be invoked once -- use via AC_REQUIRE.
7119
 
#
7120
 
# This code is only required when automatic dependency tracking
7121
 
# is enabled.  FIXME.  This creates each `.P' file that we will
7122
 
# need in order to bootstrap the dependency handling code.
7123
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7124
 
[AC_CONFIG_COMMANDS([depfiles],
7125
 
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7126
 
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7127
 
])
7128
 
 
7129
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7130
 
# Free Software Foundation, Inc.
7131
 
#
7132
 
# This file is free software; the Free Software Foundation
7133
 
# gives unlimited permission to copy and/or distribute it,
7134
 
# with or without modifications, as long as this notice is preserved.
7135
 
 
7136
 
# serial 8
7137
 
 
7138
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
7139
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7140
 
 
7141
 
# Do all the work for Automake.                             -*- Autoconf -*-
7142
 
 
7143
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7144
 
# 2005, 2006, 2008 Free Software Foundation, Inc.
7145
 
#
7146
 
# This file is free software; the Free Software Foundation
7147
 
# gives unlimited permission to copy and/or distribute it,
7148
 
# with or without modifications, as long as this notice is preserved.
7149
 
 
7150
 
# serial 13
7151
 
 
7152
 
# This macro actually does too much.  Some checks are only needed if
7153
 
# your package does certain things.  But this isn't really a big deal.
7154
 
 
7155
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7156
 
# AM_INIT_AUTOMAKE([OPTIONS])
7157
 
# -----------------------------------------------
7158
 
# The call with PACKAGE and VERSION arguments is the old style
7159
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
7160
 
# and VERSION should now be passed to AC_INIT and removed from
7161
 
# the call to AM_INIT_AUTOMAKE.
7162
 
# We support both call styles for the transition.  After
7163
 
# the next Automake release, Autoconf can make the AC_INIT
7164
 
# arguments mandatory, and then we can depend on a new Autoconf
7165
 
# release and drop the old call support.
7166
 
AC_DEFUN([AM_INIT_AUTOMAKE],
7167
 
[AC_PREREQ([2.60])dnl
7168
 
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
7169
 
dnl the ones we care about.
7170
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7171
 
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7172
 
AC_REQUIRE([AC_PROG_INSTALL])dnl
7173
 
if test "`cd $srcdir && pwd`" != "`pwd`"; then
7174
 
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7175
 
  # is not polluted with repeated "-I."
7176
 
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
7177
 
  # test to see if srcdir already configured
7178
 
  if test -f $srcdir/config.status; then
7179
 
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7180
 
  fi
7181
 
fi
7182
 
 
7183
 
# test whether we have cygpath
7184
 
if test -z "$CYGPATH_W"; then
7185
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
7186
 
    CYGPATH_W='cygpath -w'
7187
 
  else
7188
 
    CYGPATH_W=echo
7189
 
  fi
7190
 
fi
7191
 
AC_SUBST([CYGPATH_W])
7192
 
 
7193
 
# Define the identity of the package.
7194
 
dnl Distinguish between old-style and new-style calls.
7195
 
m4_ifval([$2],
7196
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7197
 
 AC_SUBST([PACKAGE], [$1])dnl
7198
 
 AC_SUBST([VERSION], [$2])],
7199
 
[_AM_SET_OPTIONS([$1])dnl
7200
 
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
7201
 
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
7202
 
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
7203
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7204
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7205
 
 
7206
 
_AM_IF_OPTION([no-define],,
7207
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7208
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7209
 
 
7210
 
# Some tools Automake needs.
7211
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
7212
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
7213
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7214
 
AM_MISSING_PROG(AUTOCONF, autoconf)
7215
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7216
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
7217
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
7218
 
AM_PROG_INSTALL_SH
7219
 
AM_PROG_INSTALL_STRIP
7220
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7221
 
# We need awk for the "check" target.  The system "awk" is bad on
7222
 
# some platforms.
7223
 
AC_REQUIRE([AC_PROG_AWK])dnl
7224
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7225
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7226
 
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7227
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7228
 
                             [_AM_PROG_TAR([v7])])])
7229
 
_AM_IF_OPTION([no-dependencies],,
7230
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
7231
 
                  [_AM_DEPENDENCIES(CC)],
7232
 
                  [define([AC_PROG_CC],
7233
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7234
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
7235
 
                  [_AM_DEPENDENCIES(CXX)],
7236
 
                  [define([AC_PROG_CXX],
7237
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7238
 
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
7239
 
                  [_AM_DEPENDENCIES(OBJC)],
7240
 
                  [define([AC_PROG_OBJC],
7241
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
7242
 
])
7243
 
])
7244
 
 
7245
 
 
7246
 
# When config.status generates a header, we must update the stamp-h file.
7247
 
# This file resides in the same directory as the config header
7248
 
# that is generated.  The stamp files are numbered to have different names.
7249
 
 
7250
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7251
 
# loop where config.status creates the headers, so we can generate
7252
 
# our stamp files there.
7253
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7254
 
[# Compute $1's index in $config_headers.
7255
 
_am_arg=$1
7256
 
_am_stamp_count=1
7257
 
for _am_header in $config_headers :; do
7258
 
  case $_am_header in
7259
 
    $_am_arg | $_am_arg:* )
7260
 
      break ;;
7261
 
    * )
7262
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7263
 
  esac
7264
 
done
7265
 
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
7266
 
 
7267
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7268
 
#
7269
 
# This file is free software; the Free Software Foundation
7270
 
# gives unlimited permission to copy and/or distribute it,
7271
 
# with or without modifications, as long as this notice is preserved.
7272
 
 
7273
 
# AM_PROG_INSTALL_SH
7274
 
# ------------------
7275
 
# Define $install_sh.
7276
 
AC_DEFUN([AM_PROG_INSTALL_SH],
7277
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7278
 
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
7279
 
AC_SUBST(install_sh)])
7280
 
 
7281
 
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7282
 
#
7283
 
# This file is free software; the Free Software Foundation
7284
 
# gives unlimited permission to copy and/or distribute it,
7285
 
# with or without modifications, as long as this notice is preserved.
7286
 
 
7287
 
# serial 2
7288
 
 
7289
 
# Check whether the underlying file-system supports filenames
7290
 
# with a leading dot.  For instance MS-DOS doesn't.
7291
 
AC_DEFUN([AM_SET_LEADING_DOT],
7292
 
[rm -rf .tst 2>/dev/null
7293
 
mkdir .tst 2>/dev/null
7294
 
if test -d .tst; then
7295
 
  am__leading_dot=.
7296
 
else
7297
 
  am__leading_dot=_
7298
 
fi
7299
 
rmdir .tst 2>/dev/null
7300
 
AC_SUBST([am__leading_dot])])
7301
 
 
7302
 
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
7303
 
# From Jim Meyering
7304
 
 
7305
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7306
 
# Free Software Foundation, Inc.
7307
 
#
7308
 
# This file is free software; the Free Software Foundation
7309
 
# gives unlimited permission to copy and/or distribute it,
7310
 
# with or without modifications, as long as this notice is preserved.
7311
 
 
7312
 
# serial 4
7313
 
 
7314
 
AC_DEFUN([AM_MAINTAINER_MODE],
7315
 
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7316
 
  dnl maintainer-mode is disabled by default
7317
 
  AC_ARG_ENABLE(maintainer-mode,
7318
 
[  --enable-maintainer-mode  enable make rules and dependencies not useful
7319
 
                          (and sometimes confusing) to the casual installer],
7320
 
      USE_MAINTAINER_MODE=$enableval,
7321
 
      USE_MAINTAINER_MODE=no)
7322
 
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7323
 
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7324
 
  MAINT=$MAINTAINER_MODE_TRUE
7325
 
  AC_SUBST(MAINT)dnl
7326
 
]
7327
 
)
7328
 
 
7329
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7330
 
 
7331
 
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
7332
 
 
7333
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7334
 
#
7335
 
# This file is free software; the Free Software Foundation
7336
 
# gives unlimited permission to copy and/or distribute it,
7337
 
# with or without modifications, as long as this notice is preserved.
7338
 
 
7339
 
# serial 3
7340
 
 
7341
 
# AM_MAKE_INCLUDE()
7342
 
# -----------------
7343
 
# Check to see how make treats includes.
7344
 
AC_DEFUN([AM_MAKE_INCLUDE],
7345
 
[am_make=${MAKE-make}
7346
 
cat > confinc << 'END'
7347
 
am__doit:
7348
 
        @echo done
7349
 
.PHONY: am__doit
7350
 
END
7351
 
# If we don't find an include directive, just comment out the code.
7352
 
AC_MSG_CHECKING([for style of include used by $am_make])
7353
 
am__include="#"
7354
 
am__quote=
7355
 
_am_result=none
7356
 
# First try GNU make style include.
7357
 
echo "include confinc" > confmf
7358
 
# We grep out `Entering directory' and `Leaving directory'
7359
 
# messages which can occur if `w' ends up in MAKEFLAGS.
7360
 
# In particular we don't look at `^make:' because GNU make might
7361
 
# be invoked under some other name (usually "gmake"), in which
7362
 
# case it prints its new name instead of `make'.
7363
 
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7364
 
   am__include=include
7365
 
   am__quote=
7366
 
   _am_result=GNU
7367
 
fi
7368
 
# Now try BSD make style include.
7369
 
if test "$am__include" = "#"; then
7370
 
   echo '.include "confinc"' > confmf
7371
 
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7372
 
      am__include=.include
7373
 
      am__quote="\""
7374
 
      _am_result=BSD
7375
 
   fi
7376
 
fi
7377
 
AC_SUBST([am__include])
7378
 
AC_SUBST([am__quote])
7379
 
AC_MSG_RESULT([$_am_result])
7380
 
rm -f confinc confmf
7381
 
])
7382
 
 
7383
 
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7384
 
 
7385
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
7386
 
# Free Software Foundation, Inc.
7387
 
#
7388
 
# This file is free software; the Free Software Foundation
7389
 
# gives unlimited permission to copy and/or distribute it,
7390
 
# with or without modifications, as long as this notice is preserved.
7391
 
 
7392
 
# serial 5
7393
 
 
7394
 
# AM_MISSING_PROG(NAME, PROGRAM)
7395
 
# ------------------------------
7396
 
AC_DEFUN([AM_MISSING_PROG],
7397
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
7398
 
$1=${$1-"${am_missing_run}$2"}
7399
 
AC_SUBST($1)])
7400
 
 
7401
 
 
7402
 
# AM_MISSING_HAS_RUN
7403
 
# ------------------
7404
 
# Define MISSING if not defined so far and test if it supports --run.
7405
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
7406
 
AC_DEFUN([AM_MISSING_HAS_RUN],
7407
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7408
 
AC_REQUIRE_AUX_FILE([missing])dnl
7409
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7410
 
# Use eval to expand $SHELL
7411
 
if eval "$MISSING --run true"; then
7412
 
  am_missing_run="$MISSING --run "
7413
 
else
7414
 
  am_missing_run=
7415
 
  AC_MSG_WARN([`missing' script is too old or missing])
7416
 
fi
7417
 
])
7418
 
 
7419
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7420
 
#
7421
 
# This file is free software; the Free Software Foundation
7422
 
# gives unlimited permission to copy and/or distribute it,
7423
 
# with or without modifications, as long as this notice is preserved.
7424
 
 
7425
 
# AM_PROG_MKDIR_P
7426
 
# ---------------
7427
 
# Check for `mkdir -p'.
7428
 
AC_DEFUN([AM_PROG_MKDIR_P],
7429
 
[AC_PREREQ([2.60])dnl
7430
 
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
7431
 
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
7432
 
dnl while keeping a definition of mkdir_p for backward compatibility.
7433
 
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7434
 
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7435
 
dnl Makefile.ins that do not define MKDIR_P, so we do our own
7436
 
dnl adjustment using top_builddir (which is defined more often than
7437
 
dnl MKDIR_P).
7438
 
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7439
 
case $mkdir_p in
7440
 
  [[\\/$]]* | ?:[[\\/]]*) ;;
7441
 
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7442
 
esac
7443
 
])
7444
 
 
7445
 
# Helper functions for option handling.                     -*- Autoconf -*-
7446
 
 
7447
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7448
 
#
7449
 
# This file is free software; the Free Software Foundation
7450
 
# gives unlimited permission to copy and/or distribute it,
7451
 
# with or without modifications, as long as this notice is preserved.
7452
 
 
7453
 
# serial 3
7454
 
 
7455
 
# _AM_MANGLE_OPTION(NAME)
7456
 
# -----------------------
7457
 
AC_DEFUN([_AM_MANGLE_OPTION],
7458
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7459
 
 
7460
 
# _AM_SET_OPTION(NAME)
7461
 
# ------------------------------
7462
 
# Set option NAME.  Presently that only means defining a flag for this option.
7463
 
AC_DEFUN([_AM_SET_OPTION],
7464
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7465
 
 
7466
 
# _AM_SET_OPTIONS(OPTIONS)
7467
 
# ----------------------------------
7468
 
# OPTIONS is a space-separated list of Automake options.
7469
 
AC_DEFUN([_AM_SET_OPTIONS],
7470
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7471
 
 
7472
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7473
 
# -------------------------------------------
7474
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7475
 
AC_DEFUN([_AM_IF_OPTION],
7476
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7477
 
 
7478
 
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7479
 
 
7480
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7481
 
# Free Software Foundation, Inc.
7482
 
#
7483
 
# This file is free software; the Free Software Foundation
7484
 
# gives unlimited permission to copy and/or distribute it,
7485
 
# with or without modifications, as long as this notice is preserved.
7486
 
 
7487
 
# serial 4
7488
 
 
7489
 
# AM_SANITY_CHECK
7490
 
# ---------------
7491
 
AC_DEFUN([AM_SANITY_CHECK],
7492
 
[AC_MSG_CHECKING([whether build environment is sane])
7493
 
# Just in case
7494
 
sleep 1
7495
 
echo timestamp > conftest.file
7496
 
# Do `set' in a subshell so we don't clobber the current shell's
7497
 
# arguments.  Must try -L first in case configure is actually a
7498
 
# symlink; some systems play weird games with the mod time of symlinks
7499
 
# (eg FreeBSD returns the mod time of the symlink's containing
7500
 
# directory).
7501
 
if (
7502
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7503
 
   if test "$[*]" = "X"; then
7504
 
      # -L didn't work.
7505
 
      set X `ls -t $srcdir/configure conftest.file`
7506
 
   fi
7507
 
   rm -f conftest.file
7508
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
7509
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7510
 
 
7511
 
      # If neither matched, then we have a broken ls.  This can happen
7512
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
7513
 
      # broken ls alias from the environment.  This has actually
7514
 
      # happened.  Such a system could not be considered "sane".
7515
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7516
 
alias in your environment])
7517
 
   fi
7518
 
 
7519
 
   test "$[2]" = conftest.file
7520
 
   )
7521
 
then
7522
 
   # Ok.
7523
 
   :
7524
 
else
7525
 
   AC_MSG_ERROR([newly created file is older than distributed files!
7526
 
Check your system clock])
7527
 
fi
7528
 
AC_MSG_RESULT(yes)])
7529
 
 
7530
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7531
 
#
7532
 
# This file is free software; the Free Software Foundation
7533
 
# gives unlimited permission to copy and/or distribute it,
7534
 
# with or without modifications, as long as this notice is preserved.
7535
 
 
7536
 
# AM_PROG_INSTALL_STRIP
7537
 
# ---------------------
7538
 
# One issue with vendor `install' (even GNU) is that you can't
7539
 
# specify the program used to strip binaries.  This is especially
7540
 
# annoying in cross-compiling environments, where the build's strip
7541
 
# is unlikely to handle the host's binaries.
7542
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
7543
 
# always use install-sh in `make install-strip', and initialize
7544
 
# STRIPPROG with the value of the STRIP variable (set by the user).
7545
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
7546
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7547
 
# Installed binaries are usually stripped using `strip' when the user
7548
 
# run `make install-strip'.  However `strip' might not be the right
7549
 
# tool to use in cross-compilation environments, therefore Automake
7550
 
# will honor the `STRIP' environment variable to overrule this program.
7551
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7552
 
if test "$cross_compiling" != no; then
7553
 
  AC_CHECK_TOOL([STRIP], [strip], :)
7554
 
fi
7555
 
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7556
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
7557
 
 
7558
 
# Copyright (C) 2006  Free Software Foundation, Inc.
7559
 
#
7560
 
# This file is free software; the Free Software Foundation
7561
 
# gives unlimited permission to copy and/or distribute it,
7562
 
# with or without modifications, as long as this notice is preserved.
7563
 
 
7564
 
# _AM_SUBST_NOTMAKE(VARIABLE)
7565
 
# ---------------------------
7566
 
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
7567
 
# This macro is traced by Automake.
7568
 
AC_DEFUN([_AM_SUBST_NOTMAKE])
7569
 
 
7570
 
# Check how to create a tarball.                            -*- Autoconf -*-
7571
 
 
7572
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7573
 
#
7574
 
# This file is free software; the Free Software Foundation
7575
 
# gives unlimited permission to copy and/or distribute it,
7576
 
# with or without modifications, as long as this notice is preserved.
7577
 
 
7578
 
# serial 2
7579
 
 
7580
 
# _AM_PROG_TAR(FORMAT)
7581
 
# --------------------
7582
 
# Check how to create a tarball in format FORMAT.
7583
 
# FORMAT should be one of `v7', `ustar', or `pax'.
7584
 
#
7585
 
# Substitute a variable $(am__tar) that is a command
7586
 
# writing to stdout a FORMAT-tarball containing the directory
7587
 
# $tardir.
7588
 
#     tardir=directory && $(am__tar) > result.tar
7589
 
#
7590
 
# Substitute a variable $(am__untar) that extract such
7591
 
# a tarball read from stdin.
7592
 
#     $(am__untar) < result.tar
7593
 
AC_DEFUN([_AM_PROG_TAR],
7594
 
[# Always define AMTAR for backward compatibility.
7595
 
AM_MISSING_PROG([AMTAR], [tar])
7596
 
m4_if([$1], [v7],
7597
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7598
 
     [m4_case([$1], [ustar],, [pax],,
7599
 
              [m4_fatal([Unknown tar format])])
7600
 
AC_MSG_CHECKING([how to create a $1 tar archive])
7601
 
# Loop over all known methods to create a tar archive until one works.
7602
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7603
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7604
 
# Do not fold the above two line into one, because Tru64 sh and
7605
 
# Solaris sh will not grok spaces in the rhs of `-'.
7606
 
for _am_tool in $_am_tools
7607
 
do
7608
 
  case $_am_tool in
7609
 
  gnutar)
7610
 
    for _am_tar in tar gnutar gtar;
7611
 
    do
7612
 
      AM_RUN_LOG([$_am_tar --version]) && break
7613
 
    done
7614
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7615
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7616
 
    am__untar="$_am_tar -xf -"
7617
 
    ;;
7618
 
  plaintar)
7619
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
7620
 
    # ustar tarball either.
7621
 
    (tar --version) >/dev/null 2>&1 && continue
7622
 
    am__tar='tar chf - "$$tardir"'
7623
 
    am__tar_='tar chf - "$tardir"'
7624
 
    am__untar='tar xf -'
7625
 
    ;;
7626
 
  pax)
7627
 
    am__tar='pax -L -x $1 -w "$$tardir"'
7628
 
    am__tar_='pax -L -x $1 -w "$tardir"'
7629
 
    am__untar='pax -r'
7630
 
    ;;
7631
 
  cpio)
7632
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7633
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7634
 
    am__untar='cpio -i -H $1 -d'
7635
 
    ;;
7636
 
  none)
7637
 
    am__tar=false
7638
 
    am__tar_=false
7639
 
    am__untar=false
7640
 
    ;;
7641
 
  esac
7642
 
 
7643
 
  # If the value was cached, stop now.  We just wanted to have am__tar
7644
 
  # and am__untar set.
7645
 
  test -n "${am_cv_prog_tar_$1}" && break
7646
 
 
7647
 
  # tar/untar a dummy directory, and stop if the command works
7648
 
  rm -rf conftest.dir
7649
 
  mkdir conftest.dir
7650
 
  echo GrepMe > conftest.dir/file
7651
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7652
 
  rm -rf conftest.dir
7653
 
  if test -s conftest.tar; then
7654
 
    AM_RUN_LOG([$am__untar <conftest.tar])
7655
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7656
 
  fi
7657
 
done
7658
 
rm -rf conftest.dir
7659
 
 
7660
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7661
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7662
 
AC_SUBST([am__tar])
7663
 
AC_SUBST([am__untar])
7664
 
]) # _AM_PROG_TAR
7665
 
 
7666
 
dnl AM_GCONF_SOURCE_2
7667
 
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
7668
 
dnl  (i.e. pass to gconftool-2
7669
 
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
7670
 
dnl  you should install foo.schemas files
7671
 
dnl
7672
 
 
7673
 
AC_DEFUN([AM_GCONF_SOURCE_2],
7674
 
[
7675
 
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
7676
 
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
7677
 
  else
7678
 
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
7679
 
  fi
7680
 
 
7681
 
  AC_ARG_WITH([gconf-source],
7682
 
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
7683
 
                             [Config database for installing schema files.]),
7684
 
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
7685
 
 
7686
 
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
7687
 
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
7688
 
 
7689
 
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
7690
 
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
7691
 
  fi
7692
 
 
7693
 
  AC_ARG_WITH([gconf-schema-file-dir],
7694
 
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
7695
 
                             [Directory for installing schema files.]),
7696
 
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
7697
 
 
7698
 
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
7699
 
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
7700
 
 
7701
 
  AC_ARG_ENABLE(schemas-install,
7702
 
     [  --disable-schemas-install       Disable the schemas installation],
7703
 
     [case ${enableval} in
7704
 
       yes|no) ;;
7705
 
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
7706
 
      esac])
7707
 
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
7708
 
])
7709
 
 
7710
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
7711
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
7712
 
#
7713
 
# This file is free software, distributed under the terms of the GNU
7714
 
# General Public License.  As a special exception to the GNU General
7715
 
# Public License, this file may be distributed as part of a program
7716
 
# that contains a configuration script generated by Autoconf, under
7717
 
# the same distribution terms as the rest of that program.
7718
 
#
7719
 
# This file can be copied and used freely without restrictions.  It can
7720
 
# be used in projects which are not available under the GNU Public License
7721
 
# but which still want to provide support for the GNU gettext functionality.
7722
 
#
7723
 
# Macro to add for using GNU gettext.
7724
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7725
 
#
7726
 
# Modified to never use included libintl. 
7727
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7728
 
#
7729
 
# Major rework to remove unused code
7730
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7731
 
#
7732
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
7733
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
7734
 
#
7735
 
# Modified to require ngettext
7736
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
7737
 
#
7738
 
# We need this here as well, since someone might use autoconf-2.5x
7739
 
# to configure GLib then an older version to configure a package
7740
 
# using AM_GLIB_GNU_GETTEXT
7741
 
AC_PREREQ(2.53)
7742
 
 
7743
 
dnl
7744
 
dnl We go to great lengths to make sure that aclocal won't 
7745
 
dnl try to pull in the installed version of these macros
7746
 
dnl when running aclocal in the glib directory.
7747
 
dnl
7748
 
m4_copy([AC_DEFUN],[glib_DEFUN])
7749
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7750
 
dnl
7751
 
dnl At the end, if we're not within glib, we'll define the public
7752
 
dnl definitions in terms of our private definitions.
7753
 
dnl
7754
 
 
7755
 
# GLIB_LC_MESSAGES
7756
 
#--------------------
7757
 
glib_DEFUN([GLIB_LC_MESSAGES],
7758
 
  [AC_CHECK_HEADERS([locale.h])
7759
 
    if test $ac_cv_header_locale_h = yes; then
7760
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7761
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7762
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7763
 
    if test $am_cv_val_LC_MESSAGES = yes; then
7764
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
7765
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
7766
 
    fi
7767
 
  fi])
7768
 
 
7769
 
# GLIB_PATH_PROG_WITH_TEST
7770
 
#----------------------------
7771
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7772
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7773
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7774
 
[# Extract the first word of "$2", so it can be a program name with args.
7775
 
set dummy $2; ac_word=[$]2
7776
 
AC_MSG_CHECKING([for $ac_word])
7777
 
AC_CACHE_VAL(ac_cv_path_$1,
7778
 
[case "[$]$1" in
7779
 
  /*)
7780
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7781
 
  ;;
7782
 
  *)
7783
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7784
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
7785
 
    test -z "$ac_dir" && ac_dir=.
7786
 
    if test -f $ac_dir/$ac_word; then
7787
 
      if [$3]; then
7788
 
        ac_cv_path_$1="$ac_dir/$ac_word"
7789
 
        break
7790
 
      fi
7791
 
    fi
7792
 
  done
7793
 
  IFS="$ac_save_ifs"
7794
 
dnl If no 4th arg is given, leave the cache variable unset,
7795
 
dnl so AC_PATH_PROGS will keep looking.
7796
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7797
 
])dnl
7798
 
  ;;
7799
 
esac])dnl
7800
 
$1="$ac_cv_path_$1"
7801
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7802
 
  AC_MSG_RESULT([$]$1)
7803
 
else
7804
 
  AC_MSG_RESULT(no)
7805
 
fi
7806
 
AC_SUBST($1)dnl
7807
 
])
7808
 
 
7809
 
# GLIB_WITH_NLS
7810
 
#-----------------
7811
 
glib_DEFUN([GLIB_WITH_NLS],
7812
 
  dnl NLS is obligatory
7813
 
  [USE_NLS=yes
7814
 
    AC_SUBST(USE_NLS)
7815
 
 
7816
 
    gt_cv_have_gettext=no
7817
 
 
7818
 
    CATOBJEXT=NONE
7819
 
    XGETTEXT=:
7820
 
    INTLLIBS=
7821
 
 
7822
 
    AC_CHECK_HEADER(libintl.h,
7823
 
     [gt_cv_func_dgettext_libintl="no"
7824
 
      libintl_extra_libs=""
7825
 
 
7826
 
      #
7827
 
      # First check in libc
7828
 
      #
7829
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
7830
 
        [AC_TRY_LINK([
7831
 
#include <libintl.h>
7832
 
],
7833
 
         [return !ngettext ("","", 1)],
7834
 
          gt_cv_func_ngettext_libc=yes,
7835
 
          gt_cv_func_ngettext_libc=no)
7836
 
        ])
7837
 
  
7838
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7839
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7840
 
                [AC_TRY_LINK([
7841
 
#include <libintl.h>
7842
 
],
7843
 
                  [return !dgettext ("","")],
7844
 
                  gt_cv_func_dgettext_libc=yes,
7845
 
                  gt_cv_func_dgettext_libc=no)
7846
 
                ])
7847
 
      fi
7848
 
  
7849
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7850
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
7851
 
      fi
7852
 
 
7853
 
      #
7854
 
      # If we don't have everything we want, check in libintl
7855
 
      #
7856
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
7857
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
7858
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7859
 
        
7860
 
        AC_CHECK_LIB(intl, bindtextdomain,
7861
 
            [AC_CHECK_LIB(intl, ngettext,
7862
 
                    [AC_CHECK_LIB(intl, dgettext,
7863
 
                                  gt_cv_func_dgettext_libintl=yes)])])
7864
 
 
7865
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7866
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
7867
 
          AC_MSG_RESULT([])
7868
 
          AC_CHECK_LIB(intl, ngettext,
7869
 
                [AC_CHECK_LIB(intl, dcgettext,
7870
 
                       [gt_cv_func_dgettext_libintl=yes
7871
 
                        libintl_extra_libs=-liconv],
7872
 
                        :,-liconv)],
7873
 
                :,-liconv)
7874
 
        fi
7875
 
 
7876
 
        #
7877
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
7878
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
7879
 
        # and both have dgettext and ngettext
7880
 
        #
7881
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7882
 
          glib_save_LIBS="$LIBS"
7883
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
7884
 
          unset ac_cv_func_bind_textdomain_codeset
7885
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
7886
 
          LIBS="$glib_save_LIBS"
7887
 
 
7888
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7889
 
            gt_cv_func_dgettext_libc=no
7890
 
          else
7891
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
7892
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
7893
 
              gt_cv_func_dgettext_libintl=no
7894
 
            fi
7895
 
          fi
7896
 
        fi
7897
 
      fi
7898
 
 
7899
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
7900
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
7901
 
        gt_cv_have_gettext=yes
7902
 
      fi
7903
 
  
7904
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7905
 
        INTLLIBS="-lintl $libintl_extra_libs"
7906
 
      fi
7907
 
  
7908
 
      if test "$gt_cv_have_gettext" = "yes"; then
7909
 
        AC_DEFINE(HAVE_GETTEXT,1,
7910
 
          [Define if the GNU gettext() function is already present or preinstalled.])
7911
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7912
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7913
 
        if test "$MSGFMT" != "no"; then
7914
 
          glib_save_LIBS="$LIBS"
7915
 
          LIBS="$LIBS $INTLLIBS"
7916
 
          AC_CHECK_FUNCS(dcgettext)
7917
 
          MSGFMT_OPTS=
7918
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
7919
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
7920
 
msgid ""
7921
 
msgstr ""
7922
 
"Content-Type: text/plain; charset=UTF-8\n"
7923
 
"Project-Id-Version: test 1.0\n"
7924
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
7925
 
"Last-Translator: test <foo@bar.xx>\n"
7926
 
"Language-Team: C <LL@li.org>\n"
7927
 
"MIME-Version: 1.0\n"
7928
 
"Content-Transfer-Encoding: 8bit\n"
7929
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
7930
 
          AC_SUBST(MSGFMT_OPTS)
7931
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7932
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7933
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7934
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7935
 
                         return _nl_msg_cat_cntr],
7936
 
            [CATOBJEXT=.gmo 
7937
 
             DATADIRNAME=share],
7938
 
            [case $host in
7939
 
            *-*-solaris*)
7940
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
7941
 
            dnl GNU format message catalog is always supported,
7942
 
            dnl since both are added to the libc all together.
7943
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
7944
 
            dnl and CATOBJEXT=.gmo in this case.
7945
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
7946
 
              [CATOBJEXT=.gmo 
7947
 
               DATADIRNAME=share],
7948
 
              [CATOBJEXT=.mo
7949
 
               DATADIRNAME=lib])
7950
 
            ;;
7951
 
            *)
7952
 
            CATOBJEXT=.mo
7953
 
            DATADIRNAME=lib
7954
 
            ;;
7955
 
            esac])
7956
 
          LIBS="$glib_save_LIBS"
7957
 
          INSTOBJEXT=.mo
7958
 
        else
7959
 
          gt_cv_have_gettext=no
7960
 
        fi
7961
 
      fi
7962
 
    ])
7963
 
 
7964
 
    if test "$gt_cv_have_gettext" = "yes" ; then
7965
 
      AC_DEFINE(ENABLE_NLS, 1,
7966
 
        [always defined to indicate that i18n is enabled])
7967
 
    fi
7968
 
 
7969
 
    dnl Test whether we really found GNU xgettext.
7970
 
    if test "$XGETTEXT" != ":"; then
7971
 
      dnl If it is not GNU xgettext we define it as : so that the
7972
 
      dnl Makefiles still can work.
7973
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7974
 
        : ;
7975
 
      else
7976
 
        AC_MSG_RESULT(
7977
 
          [found xgettext program is not GNU xgettext; ignore it])
7978
 
        XGETTEXT=":"
7979
 
      fi
7980
 
    fi
7981
 
 
7982
 
    # We need to process the po/ directory.
7983
 
    POSUB=po
7984
 
 
7985
 
    AC_OUTPUT_COMMANDS(
7986
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
7987
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7988
 
      esac])
7989
 
 
7990
 
    dnl These rules are solely for the distribution goal.  While doing this
7991
 
    dnl we only have to keep exactly one list of the available catalogs
7992
 
    dnl in configure.in.
7993
 
    for lang in $ALL_LINGUAS; do
7994
 
      GMOFILES="$GMOFILES $lang.gmo"
7995
 
      POFILES="$POFILES $lang.po"
7996
 
    done
7997
 
 
7998
 
    dnl Make all variables we use known to autoconf.
7999
 
    AC_SUBST(CATALOGS)
8000
 
    AC_SUBST(CATOBJEXT)
8001
 
    AC_SUBST(DATADIRNAME)
8002
 
    AC_SUBST(GMOFILES)
8003
 
    AC_SUBST(INSTOBJEXT)
8004
 
    AC_SUBST(INTLLIBS)
8005
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
8006
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
8007
 
    AC_SUBST(POFILES)
8008
 
    AC_SUBST(POSUB)
8009
 
  ])
8010
 
 
8011
 
# AM_GLIB_GNU_GETTEXT
8012
 
# -------------------
8013
 
# Do checks necessary for use of gettext. If a suitable implementation 
8014
 
# of gettext is found in either in libintl or in the C library,
8015
 
# it will set INTLLIBS to the libraries needed for use of gettext
8016
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
8017
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
8018
 
# on various variables needed by the Makefile.in.in installed by 
8019
 
# glib-gettextize.
8020
 
dnl
8021
 
glib_DEFUN([GLIB_GNU_GETTEXT],
8022
 
  [AC_REQUIRE([AC_PROG_CC])dnl
8023
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
8024
 
   
8025
 
   GLIB_LC_MESSAGES
8026
 
   GLIB_WITH_NLS
8027
 
 
8028
 
   if test "$gt_cv_have_gettext" = "yes"; then
8029
 
     if test "x$ALL_LINGUAS" = "x"; then
8030
 
       LINGUAS=
8031
 
     else
8032
 
       AC_MSG_CHECKING(for catalogs to be installed)
8033
 
       NEW_LINGUAS=
8034
 
       for presentlang in $ALL_LINGUAS; do
8035
 
         useit=no
8036
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
8037
 
           desiredlanguages="$LINGUAS"
8038
 
         else
8039
 
           desiredlanguages="$ALL_LINGUAS"
8040
 
         fi
8041
 
         for desiredlang in $desiredlanguages; do
8042
 
           # Use the presentlang catalog if desiredlang is
8043
 
           #   a. equal to presentlang, or
8044
 
           #   b. a variant of presentlang (because in this case,
8045
 
           #      presentlang can be used as a fallback for messages
8046
 
           #      which are not translated in the desiredlang catalog).
8047
 
           case "$desiredlang" in
8048
 
             "$presentlang"*) useit=yes;;
8049
 
           esac
8050
 
         done
8051
 
         if test $useit = yes; then
8052
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
8053
 
         fi
8054
 
       done
8055
 
       LINGUAS=$NEW_LINGUAS
8056
 
       AC_MSG_RESULT($LINGUAS)
8057
 
     fi
8058
 
 
8059
 
     dnl Construct list of names of catalog files to be constructed.
8060
 
     if test -n "$LINGUAS"; then
8061
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
8062
 
     fi
8063
 
   fi
8064
 
 
8065
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8066
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
8067
 
   dnl Try to locate is.
8068
 
   MKINSTALLDIRS=
8069
 
   if test -n "$ac_aux_dir"; then
8070
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
8071
 
   fi
8072
 
   if test -z "$MKINSTALLDIRS"; then
8073
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8074
 
   fi
8075
 
   AC_SUBST(MKINSTALLDIRS)
8076
 
 
8077
 
   dnl Generate list of files to be processed by xgettext which will
8078
 
   dnl be included in po/Makefile.
8079
 
   test -d po || mkdir po
8080
 
   if test "x$srcdir" != "x."; then
8081
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
8082
 
       posrcprefix="$srcdir/"
8083
 
     else
8084
 
       posrcprefix="../$srcdir/"
8085
 
     fi
8086
 
   else
8087
 
     posrcprefix="../"
8088
 
   fi
8089
 
   rm -f po/POTFILES
8090
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
8091
 
        < $srcdir/po/POTFILES.in > po/POTFILES
8092
 
  ])
8093
 
 
8094
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
8095
 
# -------------------------------
8096
 
# Define VARIABLE to the location where catalog files will
8097
 
# be installed by po/Makefile.
8098
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
8099
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
8100
 
glib_save_prefix="$prefix"
8101
 
glib_save_exec_prefix="$exec_prefix"
8102
 
glib_save_datarootdir="$datarootdir"
8103
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
8104
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
8105
 
datarootdir=`eval echo "${datarootdir}"`
8106
 
if test "x$CATOBJEXT" = "x.mo" ; then
8107
 
  localedir=`eval echo "${libdir}/locale"`
8108
 
else
8109
 
  localedir=`eval echo "${datadir}/locale"`
8110
 
fi
8111
 
prefix="$glib_save_prefix"
8112
 
exec_prefix="$glib_save_exec_prefix"
8113
 
datarootdir="$glib_save_datarootdir"
8114
 
AC_DEFINE_UNQUOTED($1, "$localedir",
8115
 
  [Define the location where the catalogs will be installed])
8116
 
])
8117
 
 
8118
 
dnl
8119
 
dnl Now the definitions that aclocal will find
8120
 
dnl
8121
 
ifdef(glib_configure_in,[],[
8122
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
8123
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
8124
 
])dnl
8125
 
 
8126
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
8127
 
8128
 
# Create a temporary file with TEST-FILE as its contents and pass the
8129
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
8130
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
8131
 
AC_DEFUN([GLIB_RUN_PROG],
8132
 
[cat >conftest.foo <<_ACEOF
8133
 
$2
8134
 
_ACEOF
8135
 
if AC_RUN_LOG([$1 conftest.foo]); then
8136
 
  m4_ifval([$3], [$3], [:])
8137
 
m4_ifvaln([$4], [else $4])dnl
8138
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
8139
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
8140
 
fi])
8141
 
 
8142
 
 
8143
 
# gnome-common.m4
8144
 
8145
 
 
8146
 
dnl GNOME_COMMON_INIT
8147
 
 
8148
 
AC_DEFUN([GNOME_COMMON_INIT],
8149
 
[
8150
 
  dnl this macro should come after AC_CONFIG_MACRO_DIR
8151
 
  AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
8152
 
 
8153
 
  dnl ensure that when the Automake generated makefile calls aclocal,
8154
 
  dnl it honours the $ACLOCAL_FLAGS environment variable
8155
 
  ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
8156
 
  if test -n "$ac_macro_dir"; then
8157
 
    ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
8158
 
  fi
8159
 
 
8160
 
  AC_SUBST([ACLOCAL_AMFLAGS])
8161
 
])
8162
 
 
8163
 
AC_DEFUN([GNOME_DEBUG_CHECK],
8164
 
[
8165
 
        AC_ARG_ENABLE([debug],
8166
 
                      AC_HELP_STRING([--enable-debug],
8167
 
                                     [turn on debugging]),,
8168
 
                      [enable_debug=no])
8169
 
 
8170
 
        if test x$enable_debug = xyes ; then
8171
 
            AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
8172
 
                [Enable additional debugging at the expense of performance and size])
8173
 
        fi
8174
 
])
8175
 
 
8176
 
dnl GNOME_MAINTAINER_MODE_DEFINES ()
8177
 
dnl define DISABLE_DEPRECATED
8178
 
dnl
8179
 
AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
8180
 
[
8181
 
        AC_REQUIRE([AM_MAINTAINER_MODE])
8182
 
 
8183
 
        if test $USE_MAINTAINER_MODE = yes; then
8184
 
                DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
8185
 
        else
8186
 
                DISABLE_DEPRECATED=""
8187
 
        fi
8188
 
        AC_SUBST(DISABLE_DEPRECATED)
8189
 
])
8190
 
 
8191
 
dnl GNOME_COMPILE_WARNINGS
8192
 
dnl Turn on many useful compiler warnings
8193
 
dnl For now, only works on GCC
8194
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
8195
 
    dnl ******************************
8196
 
    dnl More compiler warnings
8197
 
    dnl ******************************
8198
 
 
8199
 
    AC_ARG_ENABLE(compile-warnings, 
8200
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
8201
 
                                 [Turn on compiler warnings]),,
8202
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
8203
 
 
8204
 
    warnCFLAGS=
8205
 
    if test "x$GCC" != xyes; then
8206
 
        enable_compile_warnings=no
8207
 
    fi
8208
 
 
8209
 
    warning_flags=
8210
 
    realsave_CFLAGS="$CFLAGS"
8211
 
 
8212
 
    case "$enable_compile_warnings" in
8213
 
    no)
8214
 
        warning_flags=
8215
 
        ;;
8216
 
    minimum)
8217
 
        warning_flags="-Wall"
8218
 
        ;;
8219
 
    yes)
8220
 
        warning_flags="-Wall -Wmissing-prototypes"
8221
 
        ;;
8222
 
    maximum|error)
8223
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
8224
 
        CFLAGS="$warning_flags $CFLAGS"
8225
 
        for option in -Wno-sign-compare; do
8226
 
                SAVE_CFLAGS="$CFLAGS"
8227
 
                CFLAGS="$CFLAGS $option"
8228
 
                AC_MSG_CHECKING([whether gcc understands $option])
8229
 
                AC_TRY_COMPILE([], [],
8230
 
                        has_option=yes,
8231
 
                        has_option=no,)
8232
 
                CFLAGS="$SAVE_CFLAGS"
8233
 
                AC_MSG_RESULT($has_option)
8234
 
                if test $has_option = yes; then
8235
 
                  warning_flags="$warning_flags $option"
8236
 
                fi
8237
 
                unset has_option
8238
 
                unset SAVE_CFLAGS
8239
 
        done
8240
 
        unset option
8241
 
        if test "$enable_compile_warnings" = "error" ; then
8242
 
            warning_flags="$warning_flags -Werror"
8243
 
        fi
8244
 
        ;;
8245
 
    *)
8246
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
8247
 
        ;;
8248
 
    esac
8249
 
    CFLAGS="$realsave_CFLAGS"
8250
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
8251
 
    AC_MSG_RESULT($warning_flags)
8252
 
 
8253
 
    AC_ARG_ENABLE(iso-c,
8254
 
                  AC_HELP_STRING([--enable-iso-c],
8255
 
                                 [Try to warn if code is not ISO C ]),,
8256
 
                  [enable_iso_c=no])
8257
 
 
8258
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
8259
 
    complCFLAGS=
8260
 
    if test "x$enable_iso_c" != "xno"; then
8261
 
        if test "x$GCC" = "xyes"; then
8262
 
        case " $CFLAGS " in
8263
 
            *[\ \       ]-ansi[\ \      ]*) ;;
8264
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
8265
 
        esac
8266
 
        case " $CFLAGS " in
8267
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
8268
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
8269
 
        esac
8270
 
        fi
8271
 
    fi
8272
 
    AC_MSG_RESULT($complCFLAGS)
8273
 
 
8274
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
8275
 
    AC_SUBST(WARN_CFLAGS)
8276
 
])
8277
 
 
8278
 
dnl For C++, do basically the same thing.
8279
 
 
8280
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
8281
 
  AC_ARG_ENABLE(cxx-warnings,
8282
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
8283
 
                               [Turn on compiler warnings.]),,
8284
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
8285
 
 
8286
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
8287
 
  warnCXXFLAGS=
8288
 
  if test "x$GXX" != xyes; then
8289
 
    enable_cxx_warnings=no
8290
 
  fi
8291
 
  if test "x$enable_cxx_warnings" != "xno"; then
8292
 
    if test "x$GXX" = "xyes"; then
8293
 
      case " $CXXFLAGS " in
8294
 
      *[\ \     ]-Wall[\ \      ]*) ;;
8295
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
8296
 
      esac
8297
 
 
8298
 
      ## -W is not all that useful.  And it cannot be controlled
8299
 
      ## with individual -Wno-xxx flags, unlike -Wall
8300
 
      if test "x$enable_cxx_warnings" = "xyes"; then
8301
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
8302
 
      fi
8303
 
    fi
8304
 
  fi
8305
 
  AC_MSG_RESULT($warnCXXFLAGS)
8306
 
 
8307
 
   AC_ARG_ENABLE(iso-cxx,
8308
 
                 AC_HELP_STRING([--enable-iso-cxx],
8309
 
                                [Try to warn if code is not ISO C++ ]),,
8310
 
                 [enable_iso_cxx=no])
8311
 
 
8312
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
8313
 
   complCXXFLAGS=
8314
 
   if test "x$enable_iso_cxx" != "xno"; then
8315
 
     if test "x$GXX" = "xyes"; then
8316
 
      case " $CXXFLAGS " in
8317
 
      *[\ \     ]-ansi[\ \      ]*) ;;
8318
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
8319
 
      esac
8320
 
 
8321
 
      case " $CXXFLAGS " in
8322
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
8323
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
8324
 
      esac
8325
 
     fi
8326
 
   fi
8327
 
  AC_MSG_RESULT($complCXXFLAGS)
8328
 
 
8329
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
8330
 
  AC_SUBST(WARN_CXXFLAGS)
8331
 
])
8332
 
 
8333
 
dnl -*- mode: autoconf -*-
8334
 
 
8335
 
# serial 1
8336
 
 
8337
 
dnl Usage:
8338
 
dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
8339
 
AC_DEFUN([GTK_DOC_CHECK],
8340
 
[
8341
 
  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
8342
 
  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
8343
 
  dnl for overriding the documentation installation directory
8344
 
  AC_ARG_WITH([html-dir],
8345
 
    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
8346
 
    [with_html_dir='${datadir}/gtk-doc/html'])
8347
 
  HTML_DIR="$with_html_dir"
8348
 
  AC_SUBST([HTML_DIR])
8349
 
 
8350
 
  dnl enable/disable documentation building
8351
 
  AC_ARG_ENABLE([gtk-doc],
8352
 
    AS_HELP_STRING([--enable-gtk-doc],
8353
 
                   [use gtk-doc to build documentation [[default=no]]]),,
8354
 
    [enable_gtk_doc=no])
8355
 
 
8356
 
  if test x$enable_gtk_doc = xyes; then
8357
 
    ifelse([$1],[],
8358
 
      [PKG_CHECK_EXISTS([gtk-doc],,
8359
 
                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
8360
 
      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
8361
 
                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))])
8362
 
  fi
8363
 
 
8364
 
  AC_MSG_CHECKING([whether to build gtk-doc documentation])
8365
 
  AC_MSG_RESULT($enable_gtk_doc)
8366
 
 
8367
 
  AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,)
8368
 
 
8369
 
  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
8370
 
  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
8371
 
])
8372
 
 
8373
 
 
8374
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
8375
 
# serial 40 IT_PROG_INTLTOOL
8376
 
AC_DEFUN([IT_PROG_INTLTOOL], [
8377
 
AC_PREREQ([2.50])dnl
8378
 
AC_REQUIRE([AM_NLS])dnl
8379
 
 
8380
 
case "$am__api_version" in
8381
 
    1.[01234])
8382
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
8383
 
    ;;
8384
 
    *)
8385
 
    ;;
8386
 
esac
8387
 
 
8388
 
if test -n "$1"; then
8389
 
    AC_MSG_CHECKING([for intltool >= $1])
8390
 
 
8391
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8392
 
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
8393
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
8394
 
    ]
8395
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
8396
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
8397
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
8398
 
fi
8399
 
 
8400
 
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
8401
 
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
8402
 
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
8403
 
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
8404
 
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
8405
 
fi
8406
 
 
8407
 
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8408
 
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8409
 
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8410
 
     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8411
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
8412
 
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8413
 
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8414
 
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8415
 
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8416
 
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8417
 
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8418
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
8419
 
      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8420
 
      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8421
 
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8422
 
  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8423
 
    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
8424
 
    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8425
 
   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
8426
 
 
8427
 
AC_SUBST(INTLTOOL_DESKTOP_RULE)
8428
 
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
8429
 
AC_SUBST(INTLTOOL_KEYS_RULE)
8430
 
AC_SUBST(INTLTOOL_PROP_RULE)
8431
 
AC_SUBST(INTLTOOL_OAF_RULE)
8432
 
AC_SUBST(INTLTOOL_PONG_RULE)
8433
 
AC_SUBST(INTLTOOL_SERVER_RULE)
8434
 
AC_SUBST(INTLTOOL_SHEET_RULE)
8435
 
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
8436
 
AC_SUBST(INTLTOOL_UI_RULE)
8437
 
AC_SUBST(INTLTOOL_XAM_RULE)
8438
 
AC_SUBST(INTLTOOL_KBD_RULE)
8439
 
AC_SUBST(INTLTOOL_XML_RULE)
8440
 
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
8441
 
AC_SUBST(INTLTOOL_CAVES_RULE)
8442
 
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
8443
 
AC_SUBST(INTLTOOL_THEME_RULE)
8444
 
AC_SUBST(INTLTOOL_SERVICE_RULE)
8445
 
AC_SUBST(INTLTOOL_POLICY_RULE)
8446
 
 
8447
 
# Check the gettext tools to make sure they are GNU
8448
 
AC_PATH_PROG(XGETTEXT, xgettext)
8449
 
AC_PATH_PROG(MSGMERGE, msgmerge)
8450
 
AC_PATH_PROG(MSGFMT, msgfmt)
8451
 
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
8452
 
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
8453
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
8454
 
fi
8455
 
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
8456
 
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
8457
 
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
8458
 
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
8459
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
8460
 
fi
8461
 
 
8462
 
AC_PATH_PROG(INTLTOOL_PERL, [perl])
8463
 
if test -z "$INTLTOOL_PERL"; then
8464
 
   AC_MSG_ERROR([perl not found; required for intltool])
8465
 
fi
8466
 
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
8467
 
   AC_MSG_ERROR([perl 5.x required for intltool])
8468
 
fi
8469
 
if test "x$2" != "xno-xml"; then
8470
 
   AC_MSG_CHECKING([for XML::Parser])
8471
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
8472
 
       AC_MSG_RESULT([ok])
8473
 
   else
8474
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
8475
 
   fi
8476
 
fi
8477
 
 
8478
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
8479
 
AC_SUBST(ALL_LINGUAS)
8480
 
 
8481
 
# Set DATADIRNAME correctly if it is not set yet
8482
 
# (copied from glib-gettext.m4)
8483
 
if test -z "$DATADIRNAME"; then
8484
 
  AC_LINK_IFELSE(
8485
 
    [AC_LANG_PROGRAM([[]],
8486
 
                     [[extern int _nl_msg_cat_cntr;
8487
 
                       return _nl_msg_cat_cntr]])],
8488
 
    [DATADIRNAME=share],
8489
 
    [case $host in
8490
 
    *-*-solaris*)
8491
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
8492
 
    dnl GNU format message catalog is always supported,
8493
 
    dnl since both are added to the libc all together.
8494
 
    dnl Hence, we'd like to go with DATADIRNAME=share
8495
 
    dnl in this case.
8496
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
8497
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
8498
 
    ;;
8499
 
    *)
8500
 
    [DATADIRNAME=lib]
8501
 
    ;;
8502
 
    esac])
8503
 
fi
8504
 
AC_SUBST(DATADIRNAME)
8505
 
 
8506
 
IT_PO_SUBDIR([po])
8507
 
 
8508
 
])
8509
 
 
8510
 
 
8511
 
# IT_PO_SUBDIR(DIRNAME)
8512
 
# ---------------------
8513
 
# All po subdirs have to be declared with this macro; the subdir "po" is
8514
 
# declared by IT_PROG_INTLTOOL.
8515
 
#
8516
 
AC_DEFUN([IT_PO_SUBDIR],
8517
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
8518
 
dnl
8519
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
8520
 
dnl of config.status.
8521
 
AC_CONFIG_COMMANDS_PRE([
8522
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
8523
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
8524
 
    >"$1/stamp-it.tmp"
8525
 
    [sed '/^#/d
8526
 
         s/^[[].*] *//
8527
 
         /^[    ]*$/d
8528
 
        '"s|^|  $ac_top_srcdir/|" \
8529
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
8530
 
    ]
8531
 
    [sed '/^POTFILES =/,/[^\\]$/ {
8532
 
                /^POTFILES =/!d
8533
 
                r $1/POTFILES
8534
 
          }
8535
 
         ' "$1/Makefile.in" >"$1/Makefile"]
8536
 
    rm -f "$1/Makefile.tmp"
8537
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
8538
 
  ])
8539
 
])dnl
8540
 
])
8541
 
 
8542
 
# deprecated macros
8543
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
8544
 
# A hint is needed for aclocal from Automake <= 1.9.4:
8545
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
8546
 
 
8547
 
 
8548
8638
m4_include([acinclude.m4])