~ubuntu-branches/ubuntu/natty/gnome-netstatus/natty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-06-19 15:48:31 UTC
  • mfrom: (2.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100619154831-bxh4douutik1popk
Tags: 2.28.1-1ubuntu1
* Merge from debian unstable (LP: #596276), remaining changes:
  - debian/patches/03-use_aspect_correct_icon_scaling.patch:
    + Use aspect correct icon scaling.
  - debian/rules:
    + added back -Wl,--as-needed to CFLAGS to get rid of useless
      dependencies.
  - debian/control.in:
    + removed libgnomeui-dev B-D.
    + add Vcs-Bzr tag

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(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
17
 
[m4_warning([this file was generated for autoconf 2.64.
 
16
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
 
17
[m4_warning([this file was generated for autoconf 2.63.
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, 2008  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.11'
 
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.11], [],
 
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 AM_INIT_AUTOMAKE.
 
52
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
53
[AM_AUTOMAKE_VERSION([1.11])dnl
 
54
m4_ifndef([AC_AUTOCONF_VERSION],
 
55
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 
56
_AM_AUTOCONF_VERSION(m4_defn([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, 2008
 
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 9
 
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
m4_define([_AM_COND_VALUE_$1], [$2])dnl
 
134
if $2; then
 
135
  $1_TRUE=
 
136
  $1_FALSE='#'
 
137
else
 
138
  $1_TRUE='#'
 
139
  $1_FALSE=
 
140
fi
 
141
AC_CONFIG_COMMANDS_PRE(
 
142
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
143
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
144
Usually this means the macro was only invoked conditionally.]])
 
145
fi])])
 
146
 
 
147
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 
148
# Free Software Foundation, Inc.
 
149
#
 
150
# This file is free software; the Free Software Foundation
 
151
# gives unlimited permission to copy and/or distribute it,
 
152
# with or without modifications, as long as this notice is preserved.
 
153
 
 
154
# serial 10
 
155
 
 
156
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
157
# written in clear, in which case automake, when reading aclocal.m4,
 
158
# will think it sees a *use*, and therefore will trigger all it's
 
159
# C support machinery.  Also note that it means that autoscan, seeing
 
160
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
161
 
 
162
 
 
163
# _AM_DEPENDENCIES(NAME)
 
164
# ----------------------
 
165
# See how the compiler implements dependency checking.
 
166
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
167
# We try a few techniques and use that to set a single cache variable.
 
168
#
 
169
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
170
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
171
# dependency, and given that the user is not expected to run this macro,
 
172
# just rely on AC_PROG_CC.
 
173
AC_DEFUN([_AM_DEPENDENCIES],
 
174
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
175
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
176
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
177
AC_REQUIRE([AM_DEP_TRACK])dnl
 
178
 
 
179
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
180
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
181
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
182
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
183
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
184
                   [depcc="$$1"   am_compiler_list=])
 
185
 
 
186
AC_CACHE_CHECK([dependency style of $depcc],
 
187
               [am_cv_$1_dependencies_compiler_type],
 
188
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
189
  # We make a subdir and do the tests there.  Otherwise we can end up
 
190
  # making bogus files that we don't know about and never remove.  For
 
191
  # instance it was reported that on HP-UX the gcc test will end up
 
192
  # making a dummy file named `D' -- because `-MD' means `put the output
 
193
  # in D'.
 
194
  mkdir conftest.dir
 
195
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
196
  # using a relative directory.
 
197
  cp "$am_depcomp" conftest.dir
 
198
  cd conftest.dir
 
199
  # We will build objects and dependencies in a subdirectory because
 
200
  # it helps to detect inapplicable dependency modes.  For instance
 
201
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
202
  # side effect of compilation, but ICC will put the dependencies in
 
203
  # the current directory while Tru64 will put them in the object
 
204
  # directory.
 
205
  mkdir sub
 
206
 
 
207
  am_cv_$1_dependencies_compiler_type=none
 
208
  if test "$am_compiler_list" = ""; then
 
209
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
210
  fi
 
211
  am__universal=false
 
212
  m4_case([$1], [CC],
 
213
    [case " $depcc " in #(
 
214
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
215
     esac],
 
216
    [CXX],
 
217
    [case " $depcc " in #(
 
218
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
 
219
     esac])
 
220
 
 
221
  for depmode in $am_compiler_list; do
 
222
    # Setup a source with many dependencies, because some compilers
 
223
    # like to wrap large dependency lists on column 80 (with \), and
 
224
    # we should not choose a depcomp mode which is confused by this.
 
225
    #
 
226
    # We need to recreate these files for each test, as the compiler may
 
227
    # overwrite some of them when testing with obscure command lines.
 
228
    # This happens at least with the AIX C compiler.
 
229
    : > sub/conftest.c
 
230
    for i in 1 2 3 4 5 6; do
 
231
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
232
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
233
      # Solaris 8's {/usr,}/bin/sh.
 
234
      touch sub/conftst$i.h
 
235
    done
 
236
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
237
 
 
238
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
239
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
240
    # handle `-M -o', and we need to detect this.  Also, some Intel
 
241
    # versions had trouble with output in subdirs
 
242
    am__obj=sub/conftest.${OBJEXT-o}
 
243
    am__minus_obj="-o $am__obj"
 
244
    case $depmode in
 
245
    gcc)
 
246
      # This depmode causes a compiler race in universal mode.
 
247
      test "$am__universal" = false || continue
 
248
      ;;
 
249
    nosideeffect)
 
250
      # after this tag, mechanisms are not by side-effect, so they'll
 
251
      # only be used when explicitly requested
 
252
      if test "x$enable_dependency_tracking" = xyes; then
 
253
        continue
 
254
      else
 
255
        break
 
256
      fi
 
257
      ;;
 
258
    msvisualcpp | msvcmsys)
 
259
      # This compiler won't grok `-c -o', but also, the minuso test has
 
260
      # not run yet.  These depmodes are late enough in the game, and
 
261
      # so weak that their functioning should not be impacted.
 
262
      am__obj=conftest.${OBJEXT-o}
 
263
      am__minus_obj=
 
264
      ;;
 
265
    none) break ;;
 
266
    esac
 
267
    if depmode=$depmode \
 
268
       source=sub/conftest.c object=$am__obj \
 
269
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
270
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
 
271
         >/dev/null 2>conftest.err &&
 
272
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
273
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
274
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
 
275
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
276
      # icc doesn't choke on unknown options, it will just issue warnings
 
277
      # or remarks (even with -Werror).  So we grep stderr for any message
 
278
      # that says an option was ignored or not supported.
 
279
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
280
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
281
      # The diagnosis changed in icc 8.0:
 
282
      #   icc: Command line remark: option '-MP' not supported
 
283
      if (grep 'ignoring option' conftest.err ||
 
284
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
285
        am_cv_$1_dependencies_compiler_type=$depmode
 
286
        break
 
287
      fi
 
288
    fi
 
289
  done
 
290
 
 
291
  cd ..
 
292
  rm -rf conftest.dir
 
293
else
 
294
  am_cv_$1_dependencies_compiler_type=none
 
295
fi
 
296
])
 
297
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
298
AM_CONDITIONAL([am__fastdep$1], [
 
299
  test "x$enable_dependency_tracking" != xno \
 
300
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
301
])
 
302
 
 
303
 
 
304
# AM_SET_DEPDIR
 
305
# -------------
 
306
# Choose a directory name for dependency files.
 
307
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
308
AC_DEFUN([AM_SET_DEPDIR],
 
309
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
310
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
311
])
 
312
 
 
313
 
 
314
# AM_DEP_TRACK
 
315
# ------------
 
316
AC_DEFUN([AM_DEP_TRACK],
 
317
[AC_ARG_ENABLE(dependency-tracking,
 
318
[  --disable-dependency-tracking  speeds up one-time build
 
319
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
320
if test "x$enable_dependency_tracking" != xno; then
 
321
  am_depcomp="$ac_aux_dir/depcomp"
 
322
  AMDEPBACKSLASH='\'
 
323
fi
 
324
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
325
AC_SUBST([AMDEPBACKSLASH])dnl
 
326
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
327
])
 
328
 
 
329
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
330
 
 
331
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
332
# Free Software Foundation, Inc.
 
333
#
 
334
# This file is free software; the Free Software Foundation
 
335
# gives unlimited permission to copy and/or distribute it,
 
336
# with or without modifications, as long as this notice is preserved.
 
337
 
 
338
#serial 5
 
339
 
 
340
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
341
# ------------------------------
 
342
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
343
[{
 
344
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
 
345
  # are listed without --file.  Let's play safe and only enable the eval
 
346
  # if we detect the quoting.
 
347
  case $CONFIG_FILES in
 
348
  *\'*) eval set x "$CONFIG_FILES" ;;
 
349
  *)   set x $CONFIG_FILES ;;
 
350
  esac
 
351
  shift
 
352
  for mf
 
353
  do
 
354
    # Strip MF so we end up with the name of the file.
 
355
    mf=`echo "$mf" | sed -e 's/:.*$//'`
 
356
    # Check whether this is an Automake generated Makefile or not.
 
357
    # We used to match only the files named `Makefile.in', but
 
358
    # some people rename them; so instead we look at the file content.
 
359
    # Grep'ing the first line is not enough: some people post-process
 
360
    # each Makefile.in and add a new line on top of each file to say so.
 
361
    # Grep'ing the whole file is not good either: AIX grep has a line
 
362
    # limit of 2048, but all sed's we know have understand at least 4000.
 
363
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
 
364
      dirpart=`AS_DIRNAME("$mf")`
 
365
    else
 
366
      continue
 
367
    fi
 
368
    # Extract the definition of DEPDIR, am__include, and am__quote
 
369
    # from the Makefile without running `make'.
 
370
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
371
    test -z "$DEPDIR" && continue
 
372
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
373
    test -z "am__include" && continue
 
374
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
375
    # When using ansi2knr, U may be empty or an underscore; expand it
 
376
    U=`sed -n 's/^U = //p' < "$mf"`
 
377
    # Find all dependency output files, they are included files with
 
378
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
379
    # simplest approach to changing $(DEPDIR) to its actual value in the
 
380
    # expansion.
 
381
    for file in `sed -n "
 
382
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
383
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
384
      # Make sure the directory exists.
 
385
      test -f "$dirpart/$file" && continue
 
386
      fdir=`AS_DIRNAME(["$file"])`
 
387
      AS_MKDIR_P([$dirpart/$fdir])
 
388
      # echo "creating $dirpart/$file"
 
389
      echo '# dummy' > "$dirpart/$file"
 
390
    done
 
391
  done
 
392
}
 
393
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
394
 
 
395
 
 
396
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
397
# -----------------------------
 
398
# This macro should only be invoked once -- use via AC_REQUIRE.
 
399
#
 
400
# This code is only required when automatic dependency tracking
 
401
# is enabled.  FIXME.  This creates each `.P' file that we will
 
402
# need in order to bootstrap the dependency handling code.
 
403
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
404
[AC_CONFIG_COMMANDS([depfiles],
 
405
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
406
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
407
])
 
408
 
 
409
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
410
# Free Software Foundation, Inc.
 
411
#
 
412
# This file is free software; the Free Software Foundation
 
413
# gives unlimited permission to copy and/or distribute it,
 
414
# with or without modifications, as long as this notice is preserved.
 
415
 
 
416
# serial 8
 
417
 
 
418
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
419
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
420
 
 
421
# Do all the work for Automake.                             -*- Autoconf -*-
 
422
 
 
423
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
424
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 
425
#
 
426
# This file is free software; the Free Software Foundation
 
427
# gives unlimited permission to copy and/or distribute it,
 
428
# with or without modifications, as long as this notice is preserved.
 
429
 
 
430
# serial 16
 
431
 
 
432
# This macro actually does too much.  Some checks are only needed if
 
433
# your package does certain things.  But this isn't really a big deal.
 
434
 
 
435
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
436
# AM_INIT_AUTOMAKE([OPTIONS])
 
437
# -----------------------------------------------
 
438
# The call with PACKAGE and VERSION arguments is the old style
 
439
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
440
# and VERSION should now be passed to AC_INIT and removed from
 
441
# the call to AM_INIT_AUTOMAKE.
 
442
# We support both call styles for the transition.  After
 
443
# the next Automake release, Autoconf can make the AC_INIT
 
444
# arguments mandatory, and then we can depend on a new Autoconf
 
445
# release and drop the old call support.
 
446
AC_DEFUN([AM_INIT_AUTOMAKE],
 
447
[AC_PREREQ([2.62])dnl
 
448
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
449
dnl the ones we care about.
 
450
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
451
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
452
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
453
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
454
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
455
  # is not polluted with repeated "-I."
 
456
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
457
  # test to see if srcdir already configured
 
458
  if test -f $srcdir/config.status; then
 
459
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
460
  fi
 
461
fi
 
462
 
 
463
# test whether we have cygpath
 
464
if test -z "$CYGPATH_W"; then
 
465
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
466
    CYGPATH_W='cygpath -w'
 
467
  else
 
468
    CYGPATH_W=echo
 
469
  fi
 
470
fi
 
471
AC_SUBST([CYGPATH_W])
 
472
 
 
473
# Define the identity of the package.
 
474
dnl Distinguish between old-style and new-style calls.
 
475
m4_ifval([$2],
 
476
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
477
 AC_SUBST([PACKAGE], [$1])dnl
 
478
 AC_SUBST([VERSION], [$2])],
 
479
[_AM_SET_OPTIONS([$1])dnl
 
480
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
481
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
482
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
483
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
484
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
485
 
 
486
_AM_IF_OPTION([no-define],,
 
487
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
488
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
489
 
 
490
# Some tools Automake needs.
 
491
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
492
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
493
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
494
AM_MISSING_PROG(AUTOCONF, autoconf)
 
495
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
496
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
497
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
498
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
499
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 
500
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
501
# We need awk for the "check" target.  The system "awk" is bad on
 
502
# some platforms.
 
503
AC_REQUIRE([AC_PROG_AWK])dnl
 
504
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
505
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
506
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
507
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
508
                             [_AM_PROG_TAR([v7])])])
 
509
_AM_IF_OPTION([no-dependencies],,
 
510
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
511
                  [_AM_DEPENDENCIES(CC)],
 
512
                  [define([AC_PROG_CC],
 
513
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
514
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
515
                  [_AM_DEPENDENCIES(CXX)],
 
516
                  [define([AC_PROG_CXX],
 
517
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
518
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
519
                  [_AM_DEPENDENCIES(OBJC)],
 
520
                  [define([AC_PROG_OBJC],
 
521
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
522
])
 
523
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
 
524
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
 
525
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
 
526
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
 
527
AC_CONFIG_COMMANDS_PRE(dnl
 
528
[m4_provide_if([_AM_COMPILER_EXEEXT],
 
529
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 
530
])
 
531
 
 
532
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 
533
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
 
534
dnl mangled by Autoconf and run in a shell conditional statement.
 
535
m4_define([_AC_COMPILER_EXEEXT],
 
536
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
537
 
 
538
 
 
539
# When config.status generates a header, we must update the stamp-h file.
 
540
# This file resides in the same directory as the config header
 
541
# that is generated.  The stamp files are numbered to have different names.
 
542
 
 
543
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
544
# loop where config.status creates the headers, so we can generate
 
545
# our stamp files there.
 
546
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
547
[# Compute $1's index in $config_headers.
 
548
_am_arg=$1
 
549
_am_stamp_count=1
 
550
for _am_header in $config_headers :; do
 
551
  case $_am_header in
 
552
    $_am_arg | $_am_arg:* )
 
553
      break ;;
 
554
    * )
 
555
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
556
  esac
 
557
done
 
558
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
559
 
 
560
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 
561
#
 
562
# This file is free software; the Free Software Foundation
 
563
# gives unlimited permission to copy and/or distribute it,
 
564
# with or without modifications, as long as this notice is preserved.
 
565
 
 
566
# AM_PROG_INSTALL_SH
 
567
# ------------------
 
568
# Define $install_sh.
 
569
AC_DEFUN([AM_PROG_INSTALL_SH],
 
570
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
571
if test x"${install_sh}" != xset; then
 
572
  case $am_aux_dir in
 
573
  *\ * | *\     *)
 
574
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
 
575
  *)
 
576
    install_sh="\${SHELL} $am_aux_dir/install-sh"
 
577
  esac
 
578
fi
 
579
AC_SUBST(install_sh)])
 
580
 
 
581
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
582
#
 
583
# This file is free software; the Free Software Foundation
 
584
# gives unlimited permission to copy and/or distribute it,
 
585
# with or without modifications, as long as this notice is preserved.
 
586
 
 
587
# serial 2
 
588
 
 
589
# Check whether the underlying file-system supports filenames
 
590
# with a leading dot.  For instance MS-DOS doesn't.
 
591
AC_DEFUN([AM_SET_LEADING_DOT],
 
592
[rm -rf .tst 2>/dev/null
 
593
mkdir .tst 2>/dev/null
 
594
if test -d .tst; then
 
595
  am__leading_dot=.
 
596
else
 
597
  am__leading_dot=_
 
598
fi
 
599
rmdir .tst 2>/dev/null
 
600
AC_SUBST([am__leading_dot])])
 
601
 
 
602
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
603
# From Jim Meyering
 
604
 
 
605
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 
606
# Free Software Foundation, Inc.
 
607
#
 
608
# This file is free software; the Free Software Foundation
 
609
# gives unlimited permission to copy and/or distribute it,
 
610
# with or without modifications, as long as this notice is preserved.
 
611
 
 
612
# serial 5
 
613
 
 
614
# AM_MAINTAINER_MODE([DEFAULT-MODE])
 
615
# ----------------------------------
 
616
# Control maintainer-specific portions of Makefiles.
 
617
# Default is to disable them, unless `enable' is passed literally.
 
618
# For symmetry, `disable' may be passed as well.  Anyway, the user
 
619
# can override the default with the --enable/--disable switch.
 
620
AC_DEFUN([AM_MAINTAINER_MODE],
 
621
[m4_case(m4_default([$1], [disable]),
 
622
       [enable], [m4_define([am_maintainer_other], [disable])],
 
623
       [disable], [m4_define([am_maintainer_other], [enable])],
 
624
       [m4_define([am_maintainer_other], [enable])
 
625
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
 
626
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
 
627
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
 
628
  AC_ARG_ENABLE([maintainer-mode],
 
629
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
 
630
                          (and sometimes confusing) to the casual installer],
 
631
      [USE_MAINTAINER_MODE=$enableval],
 
632
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
 
633
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
634
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
 
635
  MAINT=$MAINTAINER_MODE_TRUE
 
636
  AC_SUBST([MAINT])dnl
 
637
]
 
638
)
 
639
 
 
640
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
641
 
 
642
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
643
 
 
644
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 
645
#
 
646
# This file is free software; the Free Software Foundation
 
647
# gives unlimited permission to copy and/or distribute it,
 
648
# with or without modifications, as long as this notice is preserved.
 
649
 
 
650
# serial 4
 
651
 
 
652
# AM_MAKE_INCLUDE()
 
653
# -----------------
 
654
# Check to see how make treats includes.
 
655
AC_DEFUN([AM_MAKE_INCLUDE],
 
656
[am_make=${MAKE-make}
 
657
cat > confinc << 'END'
 
658
am__doit:
 
659
        @echo this is the am__doit target
 
660
.PHONY: am__doit
 
661
END
 
662
# If we don't find an include directive, just comment out the code.
 
663
AC_MSG_CHECKING([for style of include used by $am_make])
 
664
am__include="#"
 
665
am__quote=
 
666
_am_result=none
 
667
# First try GNU make style include.
 
668
echo "include confinc" > confmf
 
669
# Ignore all kinds of additional output from `make'.
 
670
case `$am_make -s -f confmf 2> /dev/null` in #(
 
671
*the\ am__doit\ target*)
 
672
  am__include=include
 
673
  am__quote=
 
674
  _am_result=GNU
 
675
  ;;
 
676
esac
 
677
# Now try BSD make style include.
 
678
if test "$am__include" = "#"; then
 
679
   echo '.include "confinc"' > confmf
 
680
   case `$am_make -s -f confmf 2> /dev/null` in #(
 
681
   *the\ am__doit\ target*)
 
682
     am__include=.include
 
683
     am__quote="\""
 
684
     _am_result=BSD
 
685
     ;;
 
686
   esac
 
687
fi
 
688
AC_SUBST([am__include])
 
689
AC_SUBST([am__quote])
 
690
AC_MSG_RESULT([$_am_result])
 
691
rm -f confinc confmf
 
692
])
 
693
 
 
694
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
695
 
 
696
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 
697
# Free Software Foundation, Inc.
 
698
#
 
699
# This file is free software; the Free Software Foundation
 
700
# gives unlimited permission to copy and/or distribute it,
 
701
# with or without modifications, as long as this notice is preserved.
 
702
 
 
703
# serial 6
 
704
 
 
705
# AM_MISSING_PROG(NAME, PROGRAM)
 
706
# ------------------------------
 
707
AC_DEFUN([AM_MISSING_PROG],
 
708
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
709
$1=${$1-"${am_missing_run}$2"}
 
710
AC_SUBST($1)])
 
711
 
 
712
 
 
713
# AM_MISSING_HAS_RUN
 
714
# ------------------
 
715
# Define MISSING if not defined so far and test if it supports --run.
 
716
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
717
AC_DEFUN([AM_MISSING_HAS_RUN],
 
718
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
719
AC_REQUIRE_AUX_FILE([missing])dnl
 
720
if test x"${MISSING+set}" != xset; then
 
721
  case $am_aux_dir in
 
722
  *\ * | *\     *)
 
723
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
 
724
  *)
 
725
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
 
726
  esac
 
727
fi
 
728
# Use eval to expand $SHELL
 
729
if eval "$MISSING --run true"; then
 
730
  am_missing_run="$MISSING --run "
 
731
else
 
732
  am_missing_run=
 
733
  AC_MSG_WARN([`missing' script is too old or missing])
 
734
fi
 
735
])
 
736
 
 
737
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
738
#
 
739
# This file is free software; the Free Software Foundation
 
740
# gives unlimited permission to copy and/or distribute it,
 
741
# with or without modifications, as long as this notice is preserved.
 
742
 
 
743
# AM_PROG_MKDIR_P
 
744
# ---------------
 
745
# Check for `mkdir -p'.
 
746
AC_DEFUN([AM_PROG_MKDIR_P],
 
747
[AC_PREREQ([2.60])dnl
 
748
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
749
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
750
dnl while keeping a definition of mkdir_p for backward compatibility.
 
751
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
752
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
753
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
754
dnl adjustment using top_builddir (which is defined more often than
 
755
dnl MKDIR_P).
 
756
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
757
case $mkdir_p in
 
758
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
759
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
760
esac
 
761
])
 
762
 
 
763
# Helper functions for option handling.                     -*- Autoconf -*-
 
764
 
 
765
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 
766
#
 
767
# This file is free software; the Free Software Foundation
 
768
# gives unlimited permission to copy and/or distribute it,
 
769
# with or without modifications, as long as this notice is preserved.
 
770
 
 
771
# serial 4
 
772
 
 
773
# _AM_MANGLE_OPTION(NAME)
 
774
# -----------------------
 
775
AC_DEFUN([_AM_MANGLE_OPTION],
 
776
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
777
 
 
778
# _AM_SET_OPTION(NAME)
 
779
# ------------------------------
 
780
# Set option NAME.  Presently that only means defining a flag for this option.
 
781
AC_DEFUN([_AM_SET_OPTION],
 
782
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
783
 
 
784
# _AM_SET_OPTIONS(OPTIONS)
 
785
# ----------------------------------
 
786
# OPTIONS is a space-separated list of Automake options.
 
787
AC_DEFUN([_AM_SET_OPTIONS],
 
788
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
789
 
 
790
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
791
# -------------------------------------------
 
792
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
793
AC_DEFUN([_AM_IF_OPTION],
 
794
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
795
 
 
796
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
797
 
 
798
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 
799
# Free Software Foundation, Inc.
 
800
#
 
801
# This file is free software; the Free Software Foundation
 
802
# gives unlimited permission to copy and/or distribute it,
 
803
# with or without modifications, as long as this notice is preserved.
 
804
 
 
805
# serial 5
 
806
 
 
807
# AM_SANITY_CHECK
 
808
# ---------------
 
809
AC_DEFUN([AM_SANITY_CHECK],
 
810
[AC_MSG_CHECKING([whether build environment is sane])
 
811
# Just in case
 
812
sleep 1
 
813
echo timestamp > conftest.file
 
814
# Reject unsafe characters in $srcdir or the absolute working directory
 
815
# name.  Accept space and tab only in the latter.
 
816
am_lf='
 
817
'
 
818
case `pwd` in
 
819
  *[[\\\"\#\$\&\'\`$am_lf]]*)
 
820
    AC_MSG_ERROR([unsafe absolute working directory name]);;
 
821
esac
 
822
case $srcdir in
 
823
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
 
824
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
 
825
esac
 
826
 
 
827
# Do `set' in a subshell so we don't clobber the current shell's
 
828
# arguments.  Must try -L first in case configure is actually a
 
829
# symlink; some systems play weird games with the mod time of symlinks
 
830
# (eg FreeBSD returns the mod time of the symlink's containing
 
831
# directory).
 
832
if (
 
833
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
 
834
   if test "$[*]" = "X"; then
 
835
      # -L didn't work.
 
836
      set X `ls -t "$srcdir/configure" conftest.file`
 
837
   fi
 
838
   rm -f conftest.file
 
839
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
840
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
841
 
 
842
      # If neither matched, then we have a broken ls.  This can happen
 
843
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
844
      # broken ls alias from the environment.  This has actually
 
845
      # happened.  Such a system could not be considered "sane".
 
846
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
847
alias in your environment])
 
848
   fi
 
849
 
 
850
   test "$[2]" = conftest.file
 
851
   )
 
852
then
 
853
   # Ok.
 
854
   :
 
855
else
 
856
   AC_MSG_ERROR([newly created file is older than distributed files!
 
857
Check your system clock])
 
858
fi
 
859
AC_MSG_RESULT(yes)])
 
860
 
 
861
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
862
#
 
863
# This file is free software; the Free Software Foundation
 
864
# gives unlimited permission to copy and/or distribute it,
 
865
# with or without modifications, as long as this notice is preserved.
 
866
 
 
867
# AM_PROG_INSTALL_STRIP
 
868
# ---------------------
 
869
# One issue with vendor `install' (even GNU) is that you can't
 
870
# specify the program used to strip binaries.  This is especially
 
871
# annoying in cross-compiling environments, where the build's strip
 
872
# is unlikely to handle the host's binaries.
 
873
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
874
# always use install-sh in `make install-strip', and initialize
 
875
# STRIPPROG with the value of the STRIP variable (set by the user).
 
876
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
877
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
878
# Installed binaries are usually stripped using `strip' when the user
 
879
# run `make install-strip'.  However `strip' might not be the right
 
880
# tool to use in cross-compilation environments, therefore Automake
 
881
# will honor the `STRIP' environment variable to overrule this program.
 
882
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
883
if test "$cross_compiling" != no; then
 
884
  AC_CHECK_TOOL([STRIP], [strip], :)
 
885
fi
 
886
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
887
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
888
 
 
889
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 
890
#
 
891
# This file is free software; the Free Software Foundation
 
892
# gives unlimited permission to copy and/or distribute it,
 
893
# with or without modifications, as long as this notice is preserved.
 
894
 
 
895
# serial 2
 
896
 
 
897
# _AM_SUBST_NOTMAKE(VARIABLE)
 
898
# ---------------------------
 
899
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 
900
# This macro is traced by Automake.
 
901
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
902
 
 
903
# AM_SUBST_NOTMAKE(VARIABLE)
 
904
# ---------------------------
 
905
# Public sister of _AM_SUBST_NOTMAKE.
 
906
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
907
 
 
908
# Check how to create a tarball.                            -*- Autoconf -*-
 
909
 
 
910
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
911
#
 
912
# This file is free software; the Free Software Foundation
 
913
# gives unlimited permission to copy and/or distribute it,
 
914
# with or without modifications, as long as this notice is preserved.
 
915
 
 
916
# serial 2
 
917
 
 
918
# _AM_PROG_TAR(FORMAT)
 
919
# --------------------
 
920
# Check how to create a tarball in format FORMAT.
 
921
# FORMAT should be one of `v7', `ustar', or `pax'.
 
922
#
 
923
# Substitute a variable $(am__tar) that is a command
 
924
# writing to stdout a FORMAT-tarball containing the directory
 
925
# $tardir.
 
926
#     tardir=directory && $(am__tar) > result.tar
 
927
#
 
928
# Substitute a variable $(am__untar) that extract such
 
929
# a tarball read from stdin.
 
930
#     $(am__untar) < result.tar
 
931
AC_DEFUN([_AM_PROG_TAR],
 
932
[# Always define AMTAR for backward compatibility.
 
933
AM_MISSING_PROG([AMTAR], [tar])
 
934
m4_if([$1], [v7],
 
935
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
936
     [m4_case([$1], [ustar],, [pax],,
 
937
              [m4_fatal([Unknown tar format])])
 
938
AC_MSG_CHECKING([how to create a $1 tar archive])
 
939
# Loop over all known methods to create a tar archive until one works.
 
940
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
941
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
942
# Do not fold the above two line into one, because Tru64 sh and
 
943
# Solaris sh will not grok spaces in the rhs of `-'.
 
944
for _am_tool in $_am_tools
 
945
do
 
946
  case $_am_tool in
 
947
  gnutar)
 
948
    for _am_tar in tar gnutar gtar;
 
949
    do
 
950
      AM_RUN_LOG([$_am_tar --version]) && break
 
951
    done
 
952
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
953
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
954
    am__untar="$_am_tar -xf -"
 
955
    ;;
 
956
  plaintar)
 
957
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
958
    # ustar tarball either.
 
959
    (tar --version) >/dev/null 2>&1 && continue
 
960
    am__tar='tar chf - "$$tardir"'
 
961
    am__tar_='tar chf - "$tardir"'
 
962
    am__untar='tar xf -'
 
963
    ;;
 
964
  pax)
 
965
    am__tar='pax -L -x $1 -w "$$tardir"'
 
966
    am__tar_='pax -L -x $1 -w "$tardir"'
 
967
    am__untar='pax -r'
 
968
    ;;
 
969
  cpio)
 
970
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
971
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
972
    am__untar='cpio -i -H $1 -d'
 
973
    ;;
 
974
  none)
 
975
    am__tar=false
 
976
    am__tar_=false
 
977
    am__untar=false
 
978
    ;;
 
979
  esac
 
980
 
 
981
  # If the value was cached, stop now.  We just wanted to have am__tar
 
982
  # and am__untar set.
 
983
  test -n "${am_cv_prog_tar_$1}" && break
 
984
 
 
985
  # tar/untar a dummy directory, and stop if the command works
 
986
  rm -rf conftest.dir
 
987
  mkdir conftest.dir
 
988
  echo GrepMe > conftest.dir/file
 
989
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
990
  rm -rf conftest.dir
 
991
  if test -s conftest.tar; then
 
992
    AM_RUN_LOG([$am__untar <conftest.tar])
 
993
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
994
  fi
 
995
done
 
996
rm -rf conftest.dir
 
997
 
 
998
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
999
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1000
AC_SUBST([am__tar])
 
1001
AC_SUBST([am__untar])
 
1002
]) # _AM_PROG_TAR
 
1003
 
 
1004
dnl AM_GCONF_SOURCE_2
 
1005
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
 
1006
dnl  (i.e. pass to gconftool-2
 
1007
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
 
1008
dnl  you should install foo.schemas files
 
1009
dnl
 
1010
 
 
1011
AC_DEFUN([AM_GCONF_SOURCE_2],
 
1012
[
 
1013
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
 
1014
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 
1015
  else
 
1016
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
 
1017
  fi
 
1018
 
 
1019
  AC_ARG_WITH([gconf-source],
 
1020
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
 
1021
                             [Config database for installing schema files.]),
 
1022
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
 
1023
 
 
1024
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
 
1025
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
 
1026
 
 
1027
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
 
1028
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
 
1029
  fi
 
1030
 
 
1031
  AC_ARG_WITH([gconf-schema-file-dir],
 
1032
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
 
1033
                             [Directory for installing schema files.]),
 
1034
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
 
1035
 
 
1036
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
 
1037
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
 
1038
 
 
1039
  AC_ARG_ENABLE(schemas-install,
 
1040
     [  --disable-schemas-install       Disable the schemas installation],
 
1041
     [case ${enableval} in
 
1042
       yes|no) ;;
 
1043
       *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;;
 
1044
      esac])
 
1045
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
 
1046
])
 
1047
 
 
1048
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
1049
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
1050
#
 
1051
# This file is free software, distributed under the terms of the GNU
 
1052
# General Public License.  As a special exception to the GNU General
 
1053
# Public License, this file may be distributed as part of a program
 
1054
# that contains a configuration script generated by Autoconf, under
 
1055
# the same distribution terms as the rest of that program.
 
1056
#
 
1057
# This file can be copied and used freely without restrictions.  It can
 
1058
# be used in projects which are not available under the GNU Public License
 
1059
# but which still want to provide support for the GNU gettext functionality.
 
1060
#
 
1061
# Macro to add for using GNU gettext.
 
1062
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
1063
#
 
1064
# Modified to never use included libintl. 
 
1065
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
1066
#
 
1067
# Major rework to remove unused code
 
1068
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
1069
#
 
1070
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
1071
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
1072
#
 
1073
# Modified to require ngettext
 
1074
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
1075
#
 
1076
# We need this here as well, since someone might use autoconf-2.5x
 
1077
# to configure GLib then an older version to configure a package
 
1078
# using AM_GLIB_GNU_GETTEXT
 
1079
AC_PREREQ(2.53)
 
1080
 
 
1081
dnl
 
1082
dnl We go to great lengths to make sure that aclocal won't 
 
1083
dnl try to pull in the installed version of these macros
 
1084
dnl when running aclocal in the glib directory.
 
1085
dnl
 
1086
m4_copy([AC_DEFUN],[glib_DEFUN])
 
1087
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
1088
dnl
 
1089
dnl At the end, if we're not within glib, we'll define the public
 
1090
dnl definitions in terms of our private definitions.
 
1091
dnl
 
1092
 
 
1093
# GLIB_LC_MESSAGES
 
1094
#--------------------
 
1095
glib_DEFUN([GLIB_LC_MESSAGES],
 
1096
  [AC_CHECK_HEADERS([locale.h])
 
1097
    if test $ac_cv_header_locale_h = yes; then
 
1098
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
1099
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
1100
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
1101
    if test $am_cv_val_LC_MESSAGES = yes; then
 
1102
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
1103
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
1104
    fi
 
1105
  fi])
 
1106
 
 
1107
# GLIB_PATH_PROG_WITH_TEST
 
1108
#----------------------------
 
1109
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
1110
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
1111
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
1112
[# Extract the first word of "$2", so it can be a program name with args.
 
1113
set dummy $2; ac_word=[$]2
 
1114
AC_MSG_CHECKING([for $ac_word])
 
1115
AC_CACHE_VAL(ac_cv_path_$1,
 
1116
[case "[$]$1" in
 
1117
  /*)
 
1118
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
1119
  ;;
 
1120
  *)
 
1121
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
1122
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
1123
    test -z "$ac_dir" && ac_dir=.
 
1124
    if test -f $ac_dir/$ac_word; then
 
1125
      if [$3]; then
 
1126
        ac_cv_path_$1="$ac_dir/$ac_word"
 
1127
        break
 
1128
      fi
 
1129
    fi
 
1130
  done
 
1131
  IFS="$ac_save_ifs"
 
1132
dnl If no 4th arg is given, leave the cache variable unset,
 
1133
dnl so AC_PATH_PROGS will keep looking.
 
1134
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
1135
])dnl
 
1136
  ;;
 
1137
esac])dnl
 
1138
$1="$ac_cv_path_$1"
 
1139
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
1140
  AC_MSG_RESULT([$]$1)
 
1141
else
 
1142
  AC_MSG_RESULT(no)
 
1143
fi
 
1144
AC_SUBST($1)dnl
 
1145
])
 
1146
 
 
1147
# GLIB_WITH_NLS
 
1148
#-----------------
 
1149
glib_DEFUN([GLIB_WITH_NLS],
 
1150
  dnl NLS is obligatory
 
1151
  [USE_NLS=yes
 
1152
    AC_SUBST(USE_NLS)
 
1153
 
 
1154
    gt_cv_have_gettext=no
 
1155
 
 
1156
    CATOBJEXT=NONE
 
1157
    XGETTEXT=:
 
1158
    INTLLIBS=
 
1159
 
 
1160
    AC_CHECK_HEADER(libintl.h,
 
1161
     [gt_cv_func_dgettext_libintl="no"
 
1162
      libintl_extra_libs=""
 
1163
 
 
1164
      #
 
1165
      # First check in libc
 
1166
      #
 
1167
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
1168
        [AC_TRY_LINK([
 
1169
#include <libintl.h>
 
1170
],
 
1171
         [return !ngettext ("","", 1)],
 
1172
          gt_cv_func_ngettext_libc=yes,
 
1173
          gt_cv_func_ngettext_libc=no)
 
1174
        ])
 
1175
  
 
1176
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1177
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
1178
                [AC_TRY_LINK([
 
1179
#include <libintl.h>
 
1180
],
 
1181
                  [return !dgettext ("","")],
 
1182
                  gt_cv_func_dgettext_libc=yes,
 
1183
                  gt_cv_func_dgettext_libc=no)
 
1184
                ])
 
1185
      fi
 
1186
  
 
1187
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
1188
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1189
      fi
 
1190
 
 
1191
      #
 
1192
      # If we don't have everything we want, check in libintl
 
1193
      #
 
1194
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
1195
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
1196
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
1197
        
 
1198
        AC_CHECK_LIB(intl, bindtextdomain,
 
1199
            [AC_CHECK_LIB(intl, ngettext,
 
1200
                    [AC_CHECK_LIB(intl, dgettext,
 
1201
                                  gt_cv_func_dgettext_libintl=yes)])])
 
1202
 
 
1203
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
1204
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
1205
          AC_MSG_RESULT([])
 
1206
          AC_CHECK_LIB(intl, ngettext,
 
1207
                [AC_CHECK_LIB(intl, dcgettext,
 
1208
                       [gt_cv_func_dgettext_libintl=yes
 
1209
                        libintl_extra_libs=-liconv],
 
1210
                        :,-liconv)],
 
1211
                :,-liconv)
 
1212
        fi
 
1213
 
 
1214
        #
 
1215
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
1216
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
1217
        # and both have dgettext and ngettext
 
1218
        #
 
1219
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
1220
          glib_save_LIBS="$LIBS"
 
1221
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
1222
          unset ac_cv_func_bind_textdomain_codeset
 
1223
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
1224
          LIBS="$glib_save_LIBS"
 
1225
 
 
1226
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
1227
            gt_cv_func_dgettext_libc=no
 
1228
          else
 
1229
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1230
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
1231
              gt_cv_func_dgettext_libintl=no
 
1232
            fi
 
1233
          fi
 
1234
        fi
 
1235
      fi
 
1236
 
 
1237
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
1238
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1239
        gt_cv_have_gettext=yes
 
1240
      fi
 
1241
  
 
1242
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
1243
        INTLLIBS="-lintl $libintl_extra_libs"
 
1244
      fi
 
1245
  
 
1246
      if test "$gt_cv_have_gettext" = "yes"; then
 
1247
        AC_DEFINE(HAVE_GETTEXT,1,
 
1248
          [Define if the GNU gettext() function is already present or preinstalled.])
 
1249
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
1250
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
1251
        if test "$MSGFMT" != "no"; then
 
1252
          glib_save_LIBS="$LIBS"
 
1253
          LIBS="$LIBS $INTLLIBS"
 
1254
          AC_CHECK_FUNCS(dcgettext)
 
1255
          MSGFMT_OPTS=
 
1256
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
1257
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
1258
msgid ""
 
1259
msgstr ""
 
1260
"Content-Type: text/plain; charset=UTF-8\n"
 
1261
"Project-Id-Version: test 1.0\n"
 
1262
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
1263
"Last-Translator: test <foo@bar.xx>\n"
 
1264
"Language-Team: C <LL@li.org>\n"
 
1265
"MIME-Version: 1.0\n"
 
1266
"Content-Transfer-Encoding: 8bit\n"
 
1267
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
1268
          AC_SUBST(MSGFMT_OPTS)
 
1269
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1270
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
1271
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
1272
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
1273
                         return _nl_msg_cat_cntr],
 
1274
            [CATOBJEXT=.gmo 
 
1275
             DATADIRNAME=share],
 
1276
            [case $host in
 
1277
            *-*-solaris*)
 
1278
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1279
            dnl GNU format message catalog is always supported,
 
1280
            dnl since both are added to the libc all together.
 
1281
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
1282
            dnl and CATOBJEXT=.gmo in this case.
 
1283
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
1284
              [CATOBJEXT=.gmo 
 
1285
               DATADIRNAME=share],
 
1286
              [CATOBJEXT=.mo
 
1287
               DATADIRNAME=lib])
 
1288
            ;;
 
1289
            *)
 
1290
            CATOBJEXT=.mo
 
1291
            DATADIRNAME=lib
 
1292
            ;;
 
1293
            esac])
 
1294
          LIBS="$glib_save_LIBS"
 
1295
          INSTOBJEXT=.mo
 
1296
        else
 
1297
          gt_cv_have_gettext=no
 
1298
        fi
 
1299
      fi
 
1300
    ])
 
1301
 
 
1302
    if test "$gt_cv_have_gettext" = "yes" ; then
 
1303
      AC_DEFINE(ENABLE_NLS, 1,
 
1304
        [always defined to indicate that i18n is enabled])
 
1305
    fi
 
1306
 
 
1307
    dnl Test whether we really found GNU xgettext.
 
1308
    if test "$XGETTEXT" != ":"; then
 
1309
      dnl If it is not GNU xgettext we define it as : so that the
 
1310
      dnl Makefiles still can work.
 
1311
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
1312
        : ;
 
1313
      else
 
1314
        AC_MSG_RESULT(
 
1315
          [found xgettext program is not GNU xgettext; ignore it])
 
1316
        XGETTEXT=":"
 
1317
      fi
 
1318
    fi
 
1319
 
 
1320
    # We need to process the po/ directory.
 
1321
    POSUB=po
 
1322
 
 
1323
    AC_OUTPUT_COMMANDS(
 
1324
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
1325
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
1326
      esac])
 
1327
 
 
1328
    dnl These rules are solely for the distribution goal.  While doing this
 
1329
    dnl we only have to keep exactly one list of the available catalogs
 
1330
    dnl in configure.in.
 
1331
    for lang in $ALL_LINGUAS; do
 
1332
      GMOFILES="$GMOFILES $lang.gmo"
 
1333
      POFILES="$POFILES $lang.po"
 
1334
    done
 
1335
 
 
1336
    dnl Make all variables we use known to autoconf.
 
1337
    AC_SUBST(CATALOGS)
 
1338
    AC_SUBST(CATOBJEXT)
 
1339
    AC_SUBST(DATADIRNAME)
 
1340
    AC_SUBST(GMOFILES)
 
1341
    AC_SUBST(INSTOBJEXT)
 
1342
    AC_SUBST(INTLLIBS)
 
1343
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
1344
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
1345
    AC_SUBST(POFILES)
 
1346
    AC_SUBST(POSUB)
 
1347
  ])
 
1348
 
 
1349
# AM_GLIB_GNU_GETTEXT
 
1350
# -------------------
 
1351
# Do checks necessary for use of gettext. If a suitable implementation 
 
1352
# of gettext is found in either in libintl or in the C library,
 
1353
# it will set INTLLIBS to the libraries needed for use of gettext
 
1354
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
1355
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
1356
# on various variables needed by the Makefile.in.in installed by 
 
1357
# glib-gettextize.
 
1358
dnl
 
1359
glib_DEFUN([GLIB_GNU_GETTEXT],
 
1360
  [AC_REQUIRE([AC_PROG_CC])dnl
 
1361
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
1362
   
 
1363
   GLIB_LC_MESSAGES
 
1364
   GLIB_WITH_NLS
 
1365
 
 
1366
   if test "$gt_cv_have_gettext" = "yes"; then
 
1367
     if test "x$ALL_LINGUAS" = "x"; then
 
1368
       LINGUAS=
 
1369
     else
 
1370
       AC_MSG_CHECKING(for catalogs to be installed)
 
1371
       NEW_LINGUAS=
 
1372
       for presentlang in $ALL_LINGUAS; do
 
1373
         useit=no
 
1374
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
1375
           desiredlanguages="$LINGUAS"
 
1376
         else
 
1377
           desiredlanguages="$ALL_LINGUAS"
 
1378
         fi
 
1379
         for desiredlang in $desiredlanguages; do
 
1380
           # Use the presentlang catalog if desiredlang is
 
1381
           #   a. equal to presentlang, or
 
1382
           #   b. a variant of presentlang (because in this case,
 
1383
           #      presentlang can be used as a fallback for messages
 
1384
           #      which are not translated in the desiredlang catalog).
 
1385
           case "$desiredlang" in
 
1386
             "$presentlang"*) useit=yes;;
 
1387
           esac
 
1388
         done
 
1389
         if test $useit = yes; then
 
1390
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
1391
         fi
 
1392
       done
 
1393
       LINGUAS=$NEW_LINGUAS
 
1394
       AC_MSG_RESULT($LINGUAS)
 
1395
     fi
 
1396
 
 
1397
     dnl Construct list of names of catalog files to be constructed.
 
1398
     if test -n "$LINGUAS"; then
 
1399
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
1400
     fi
 
1401
   fi
 
1402
 
 
1403
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
1404
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
1405
   dnl Try to locate is.
 
1406
   MKINSTALLDIRS=
 
1407
   if test -n "$ac_aux_dir"; then
 
1408
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
1409
   fi
 
1410
   if test -z "$MKINSTALLDIRS"; then
 
1411
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
1412
   fi
 
1413
   AC_SUBST(MKINSTALLDIRS)
 
1414
 
 
1415
   dnl Generate list of files to be processed by xgettext which will
 
1416
   dnl be included in po/Makefile.
 
1417
   test -d po || mkdir po
 
1418
   if test "x$srcdir" != "x."; then
 
1419
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
1420
       posrcprefix="$srcdir/"
 
1421
     else
 
1422
       posrcprefix="../$srcdir/"
 
1423
     fi
 
1424
   else
 
1425
     posrcprefix="../"
 
1426
   fi
 
1427
   rm -f po/POTFILES
 
1428
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
1429
        < $srcdir/po/POTFILES.in > po/POTFILES
 
1430
  ])
 
1431
 
 
1432
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
1433
# -------------------------------
 
1434
# Define VARIABLE to the location where catalog files will
 
1435
# be installed by po/Makefile.
 
1436
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
1437
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
1438
glib_save_prefix="$prefix"
 
1439
glib_save_exec_prefix="$exec_prefix"
 
1440
glib_save_datarootdir="$datarootdir"
 
1441
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
1442
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
1443
datarootdir=`eval echo "${datarootdir}"`
 
1444
if test "x$CATOBJEXT" = "x.mo" ; then
 
1445
  localedir=`eval echo "${libdir}/locale"`
 
1446
else
 
1447
  localedir=`eval echo "${datadir}/locale"`
 
1448
fi
 
1449
prefix="$glib_save_prefix"
 
1450
exec_prefix="$glib_save_exec_prefix"
 
1451
datarootdir="$glib_save_datarootdir"
 
1452
AC_DEFINE_UNQUOTED($1, "$localedir",
 
1453
  [Define the location where the catalogs will be installed])
 
1454
])
 
1455
 
 
1456
dnl
 
1457
dnl Now the definitions that aclocal will find
 
1458
dnl
 
1459
ifdef(glib_configure_in,[],[
 
1460
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
1461
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
1462
])dnl
 
1463
 
 
1464
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
1465
 
1466
# Create a temporary file with TEST-FILE as its contents and pass the
 
1467
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
1468
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
1469
AC_DEFUN([GLIB_RUN_PROG],
 
1470
[cat >conftest.foo <<_ACEOF
 
1471
$2
 
1472
_ACEOF
 
1473
if AC_RUN_LOG([$1 conftest.foo]); then
 
1474
  m4_ifval([$3], [$3], [:])
 
1475
m4_ifvaln([$4], [else $4])dnl
 
1476
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
1477
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
1478
fi])
 
1479
 
 
1480
 
 
1481
dnl GNOME_COMPILE_WARNINGS
 
1482
dnl Turn on many useful compiler warnings
 
1483
dnl For now, only works on GCC
 
1484
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
1485
    dnl ******************************
 
1486
    dnl More compiler warnings
 
1487
    dnl ******************************
 
1488
 
 
1489
    AC_ARG_ENABLE(compile-warnings, 
 
1490
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
1491
                                 [Turn on compiler warnings]),,
 
1492
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
1493
 
 
1494
    warnCFLAGS=
 
1495
    if test "x$GCC" != xyes; then
 
1496
        enable_compile_warnings=no
 
1497
    fi
 
1498
 
 
1499
    warning_flags=
 
1500
    realsave_CFLAGS="$CFLAGS"
 
1501
 
 
1502
    case "$enable_compile_warnings" in
 
1503
    no)
 
1504
        warning_flags=
 
1505
        ;;
 
1506
    minimum)
 
1507
        warning_flags="-Wall"
 
1508
        ;;
 
1509
    yes)
 
1510
        warning_flags="-Wall -Wmissing-prototypes"
 
1511
        ;;
 
1512
    maximum|error)
 
1513
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
1514
        CFLAGS="$warning_flags $CFLAGS"
 
1515
        for option in -Wno-sign-compare; do
 
1516
                SAVE_CFLAGS="$CFLAGS"
 
1517
                CFLAGS="$CFLAGS $option"
 
1518
                AC_MSG_CHECKING([whether gcc understands $option])
 
1519
                AC_TRY_COMPILE([], [],
 
1520
                        has_option=yes,
 
1521
                        has_option=no,)
 
1522
                CFLAGS="$SAVE_CFLAGS"
 
1523
                AC_MSG_RESULT($has_option)
 
1524
                if test $has_option = yes; then
 
1525
                  warning_flags="$warning_flags $option"
 
1526
                fi
 
1527
                unset has_option
 
1528
                unset SAVE_CFLAGS
 
1529
        done
 
1530
        unset option
 
1531
        if test "$enable_compile_warnings" = "error" ; then
 
1532
            warning_flags="$warning_flags -Werror"
 
1533
        fi
 
1534
        ;;
 
1535
    *)
 
1536
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
1537
        ;;
 
1538
    esac
 
1539
    CFLAGS="$realsave_CFLAGS"
 
1540
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
1541
    AC_MSG_RESULT($warning_flags)
 
1542
 
 
1543
    AC_ARG_ENABLE(iso-c,
 
1544
                  AC_HELP_STRING([--enable-iso-c],
 
1545
                                 [Try to warn if code is not ISO C ]),,
 
1546
                  [enable_iso_c=no])
 
1547
 
 
1548
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
1549
    complCFLAGS=
 
1550
    if test "x$enable_iso_c" != "xno"; then
 
1551
        if test "x$GCC" = "xyes"; then
 
1552
        case " $CFLAGS " in
 
1553
            *[\ \       ]-ansi[\ \      ]*) ;;
 
1554
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
1555
        esac
 
1556
        case " $CFLAGS " in
 
1557
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
1558
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
1559
        esac
 
1560
        fi
 
1561
    fi
 
1562
    AC_MSG_RESULT($complCFLAGS)
 
1563
 
 
1564
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
1565
    AC_SUBST(WARN_CFLAGS)
 
1566
])
 
1567
 
 
1568
dnl For C++, do basically the same thing.
 
1569
 
 
1570
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
1571
  AC_ARG_ENABLE(cxx-warnings,
 
1572
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
1573
                               [Turn on compiler warnings.]),,
 
1574
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
1575
 
 
1576
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
1577
  warnCXXFLAGS=
 
1578
  if test "x$GXX" != xyes; then
 
1579
    enable_cxx_warnings=no
 
1580
  fi
 
1581
  if test "x$enable_cxx_warnings" != "xno"; then
 
1582
    if test "x$GXX" = "xyes"; then
 
1583
      case " $CXXFLAGS " in
 
1584
      *[\ \     ]-Wall[\ \      ]*) ;;
 
1585
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
1586
      esac
 
1587
 
 
1588
      ## -W is not all that useful.  And it cannot be controlled
 
1589
      ## with individual -Wno-xxx flags, unlike -Wall
 
1590
      if test "x$enable_cxx_warnings" = "xyes"; then
 
1591
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
1592
      fi
 
1593
    fi
 
1594
  fi
 
1595
  AC_MSG_RESULT($warnCXXFLAGS)
 
1596
 
 
1597
   AC_ARG_ENABLE(iso-cxx,
 
1598
                 AC_HELP_STRING([--enable-iso-cxx],
 
1599
                                [Try to warn if code is not ISO C++ ]),,
 
1600
                 [enable_iso_cxx=no])
 
1601
 
 
1602
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
1603
   complCXXFLAGS=
 
1604
   if test "x$enable_iso_cxx" != "xno"; then
 
1605
     if test "x$GXX" = "xyes"; then
 
1606
      case " $CXXFLAGS " in
 
1607
      *[\ \     ]-ansi[\ \      ]*) ;;
 
1608
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
1609
      esac
 
1610
 
 
1611
      case " $CXXFLAGS " in
 
1612
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
1613
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
1614
      esac
 
1615
     fi
 
1616
   fi
 
1617
  AC_MSG_RESULT($complCXXFLAGS)
 
1618
 
 
1619
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
1620
  AC_SUBST(WARN_CXXFLAGS)
 
1621
])
 
1622
 
 
1623
dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
 
1624
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
 
1625
AC_DEFUN([GNOME_DOC_DEFINES],
 
1626
[
 
1627
AC_ARG_WITH([help-dir],
 
1628
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
 
1629
  [with_help_dir='${datadir}/gnome/help'])
 
1630
HELP_DIR="$with_help_dir"
 
1631
AC_SUBST(HELP_DIR)
 
1632
 
 
1633
AC_ARG_WITH([omf-dir],
 
1634
  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
 
1635
  [with_omf_dir='${datadir}/omf'])
 
1636
OMF_DIR="$with_omf_dir"
 
1637
AC_SUBST(OMF_DIR)
 
1638
 
 
1639
AC_ARG_WITH([help-formats],
 
1640
  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
 
1641
  [with_help_formats=''])
 
1642
DOC_USER_FORMATS="$with_help_formats"
 
1643
AC_SUBST(DOC_USER_FORMATS)
 
1644
 
 
1645
AC_ARG_ENABLE([scrollkeeper],
 
1646
        [AC_HELP_STRING([--disable-scrollkeeper],
 
1647
                        [do not make updates to the scrollkeeper database])],,
 
1648
        enable_scrollkeeper=yes)
 
1649
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
 
1650
 
 
1651
dnl disable scrollkeeper automatically for distcheck
 
1652
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
 
1653
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
 
1654
 
 
1655
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
 
1656
])
 
1657
 
 
1658
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
 
1659
#
 
1660
AC_DEFUN([GNOME_DOC_INIT],
 
1661
[AC_REQUIRE([AC_PROG_LN_S])dnl
 
1662
 
 
1663
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
 
1664
 
 
1665
AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
 
1666
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
 
1667
        [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
 
1668
 
 
1669
if test "$gdu_cv_have_gdu" = "yes"; then
 
1670
        AC_MSG_RESULT([yes])
 
1671
        ifelse([$2],,[:],[$2])
 
1672
else
 
1673
        AC_MSG_RESULT([no])
 
1674
        ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
 
1675
fi
 
1676
 
 
1677
GNOME_DOC_DEFINES
 
1678
])
 
1679
 
 
1680
 
 
1681
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
 
1682
# serial 40 IT_PROG_INTLTOOL
 
1683
AC_DEFUN([IT_PROG_INTLTOOL], [
 
1684
AC_PREREQ([2.50])dnl
 
1685
AC_REQUIRE([AM_NLS])dnl
 
1686
 
 
1687
case "$am__api_version" in
 
1688
    1.[01234])
 
1689
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
 
1690
    ;;
 
1691
    *)
 
1692
    ;;
 
1693
esac
 
1694
 
 
1695
if test -n "$1"; then
 
1696
    AC_MSG_CHECKING([for intltool >= $1])
 
1697
 
 
1698
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1699
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
 
1700
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
 
1701
    ]
 
1702
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
1703
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
 
1704
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
 
1705
fi
 
1706
 
 
1707
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
 
1708
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
 
1709
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
 
1710
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
 
1711
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
 
1712
fi
 
1713
 
 
1714
  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 $< [$]@' 
 
1715
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 $< [$]@' 
 
1716
     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 $< [$]@' 
 
1717
     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 $< [$]@' 
 
1718
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
 
1719
     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 $< [$]@' 
 
1720
   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 $< [$]@' 
 
1721
    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 $< [$]@' 
 
1722
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 $< [$]@' 
 
1723
       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 $< [$]@' 
 
1724
      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 $< [$]@' 
 
1725
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
 
1726
      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 $< [$]@' 
 
1727
      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 $< [$]@' 
 
1728
    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 $< [$]@' 
 
1729
  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 $< [$]@' 
 
1730
    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 $< [$]@' 
 
1731
    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 $< [$]@'
 
1732
   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 $< [$]@'
 
1733
 
 
1734
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
 
1735
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
 
1736
_IT_SUBST(INTLTOOL_KEYS_RULE)
 
1737
_IT_SUBST(INTLTOOL_PROP_RULE)
 
1738
_IT_SUBST(INTLTOOL_OAF_RULE)
 
1739
_IT_SUBST(INTLTOOL_PONG_RULE)
 
1740
_IT_SUBST(INTLTOOL_SERVER_RULE)
 
1741
_IT_SUBST(INTLTOOL_SHEET_RULE)
 
1742
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
1743
_IT_SUBST(INTLTOOL_UI_RULE)
 
1744
_IT_SUBST(INTLTOOL_XAM_RULE)
 
1745
_IT_SUBST(INTLTOOL_KBD_RULE)
 
1746
_IT_SUBST(INTLTOOL_XML_RULE)
 
1747
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
 
1748
_IT_SUBST(INTLTOOL_CAVES_RULE)
 
1749
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
 
1750
_IT_SUBST(INTLTOOL_THEME_RULE)
 
1751
_IT_SUBST(INTLTOOL_SERVICE_RULE)
 
1752
_IT_SUBST(INTLTOOL_POLICY_RULE)
 
1753
 
 
1754
# Check the gettext tools to make sure they are GNU
 
1755
AC_PATH_PROG(XGETTEXT, xgettext)
 
1756
AC_PATH_PROG(MSGMERGE, msgmerge)
 
1757
AC_PATH_PROG(MSGFMT, msgfmt)
 
1758
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
1759
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
 
1760
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1761
fi
 
1762
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
 
1763
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
 
1764
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
 
1765
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
 
1766
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
 
1767
fi
 
1768
 
 
1769
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
1770
if test -z "$INTLTOOL_PERL"; then
 
1771
   AC_MSG_ERROR([perl not found])
 
1772
fi
 
1773
AC_MSG_CHECKING([for perl >= 5.8.1])
 
1774
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
 
1775
if test $? -ne 0; then
 
1776
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
 
1777
else
 
1778
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
 
1779
   AC_MSG_RESULT([$IT_PERL_VERSION])
 
1780
fi
 
1781
if test "x$2" != "xno-xml"; then
 
1782
   AC_MSG_CHECKING([for XML::Parser])
 
1783
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
 
1784
       AC_MSG_RESULT([ok])
 
1785
   else
 
1786
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
 
1787
   fi
 
1788
fi
 
1789
 
 
1790
# Substitute ALL_LINGUAS so we can use it in po/Makefile
 
1791
AC_SUBST(ALL_LINGUAS)
 
1792
 
 
1793
# Set DATADIRNAME correctly if it is not set yet
 
1794
# (copied from glib-gettext.m4)
 
1795
if test -z "$DATADIRNAME"; then
 
1796
  AC_LINK_IFELSE(
 
1797
    [AC_LANG_PROGRAM([[]],
 
1798
                     [[extern int _nl_msg_cat_cntr;
 
1799
                       return _nl_msg_cat_cntr]])],
 
1800
    [DATADIRNAME=share],
 
1801
    [case $host in
 
1802
    *-*-solaris*)
 
1803
    dnl On Solaris, if bind_textdomain_codeset is in libc,
 
1804
    dnl GNU format message catalog is always supported,
 
1805
    dnl since both are added to the libc all together.
 
1806
    dnl Hence, we'd like to go with DATADIRNAME=share
 
1807
    dnl in this case.
 
1808
    AC_CHECK_FUNC(bind_textdomain_codeset,
 
1809
      [DATADIRNAME=share], [DATADIRNAME=lib])
 
1810
    ;;
 
1811
    *)
 
1812
    [DATADIRNAME=lib]
 
1813
    ;;
 
1814
    esac])
 
1815
fi
 
1816
AC_SUBST(DATADIRNAME)
 
1817
 
 
1818
IT_PO_SUBDIR([po])
 
1819
 
 
1820
])
 
1821
 
 
1822
 
 
1823
# IT_PO_SUBDIR(DIRNAME)
 
1824
# ---------------------
 
1825
# All po subdirs have to be declared with this macro; the subdir "po" is
 
1826
# declared by IT_PROG_INTLTOOL.
 
1827
#
 
1828
AC_DEFUN([IT_PO_SUBDIR],
 
1829
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
 
1830
dnl
 
1831
dnl The following CONFIG_COMMANDS should be exetuted at the very end
 
1832
dnl of config.status.
 
1833
AC_CONFIG_COMMANDS_PRE([
 
1834
  AC_CONFIG_COMMANDS([$1/stamp-it], [
 
1835
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
 
1836
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
 
1837
    fi
 
1838
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
 
1839
    >"$1/stamp-it.tmp"
 
1840
    [sed '/^#/d
 
1841
         s/^[[].*] *//
 
1842
         /^[    ]*$/d
 
1843
        '"s|^|  $ac_top_srcdir/|" \
 
1844
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
 
1845
    ]
 
1846
    [sed '/^POTFILES =/,/[^\\]$/ {
 
1847
                /^POTFILES =/!d
 
1848
                r $1/POTFILES
 
1849
          }
 
1850
         ' "$1/Makefile.in" >"$1/Makefile"]
 
1851
    rm -f "$1/Makefile.tmp"
 
1852
    mv "$1/stamp-it.tmp" "$1/stamp-it"
 
1853
  ])
 
1854
])dnl
 
1855
])
 
1856
 
 
1857
# _IT_SUBST(VARIABLE)
 
1858
# -------------------
 
1859
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
 
1860
#
 
1861
AC_DEFUN([_IT_SUBST],
 
1862
[
 
1863
AC_SUBST([$1])
 
1864
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
 
1865
]
 
1866
)
 
1867
 
 
1868
# deprecated macros
 
1869
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
 
1870
# A hint is needed for aclocal from Automake <= 1.9.4:
 
1871
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
 
1872
 
 
1873
 
22
1874
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23
1875
#
24
1876
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2500
4352
  dynamic_linker='GNU/Linux ld.so'
2501
4353
  ;;
2502
4354
 
2503
 
netbsdelf*-gnu)
2504
 
  version_type=linux
2505
 
  need_lib_prefix=no
2506
 
  need_version=no
2507
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2508
 
  soname_spec='${libname}${release}${shared_ext}$major'
2509
 
  shlibpath_var=LD_LIBRARY_PATH
2510
 
  shlibpath_overrides_runpath=no
2511
 
  hardcode_into_libs=yes
2512
 
  dynamic_linker='NetBSD ld.elf_so'
2513
 
  ;;
2514
 
 
2515
4355
netbsd*)
2516
4356
  version_type=sunos
2517
4357
  need_lib_prefix=no
3103
4943
  lt_cv_deplibs_check_method=pass_all
3104
4944
  ;;
3105
4945
 
3106
 
netbsd* | netbsdelf*-gnu)
 
4946
netbsd*)
3107
4947
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3108
4948
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3109
4949
  else
3784
5624
            ;;
3785
5625
        esac
3786
5626
        ;;
3787
 
      netbsd* | netbsdelf*-gnu)
 
5627
      netbsd*)
3788
5628
        ;;
3789
5629
      *qnx* | *nto*)
3790
5630
        # QNX uses GNU C++, but need to define -shared option too, otherwise
4209
6049
  cygwin* | mingw* | cegcc*)
4210
6050
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4211
6051
  ;;
4212
 
  linux* | k*bsd*-gnu)
4213
 
    _LT_TAGVAR(link_all_deplibs, $1)=no
4214
 
  ;;
4215
6052
  *)
4216
6053
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4217
6054
  ;;
4276
6113
  openbsd*)
4277
6114
    with_gnu_ld=no
4278
6115
    ;;
4279
 
  linux* | k*bsd*-gnu)
4280
 
    _LT_TAGVAR(link_all_deplibs, $1)=no
4281
 
    ;;
4282
6116
  esac
4283
6117
 
4284
6118
  _LT_TAGVAR(ld_shlibs, $1)=yes
4461
6295
      fi
4462
6296
      ;;
4463
6297
 
4464
 
    netbsd* | netbsdelf*-gnu)
 
6298
    netbsd*)
4465
6299
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4466
6300
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4467
6301
        wlarc=
4636
6470
        if test "$aix_use_runtimelinking" = yes; then
4637
6471
          shared_flag="$shared_flag "'${wl}-G'
4638
6472
        fi
4639
 
        _LT_TAGVAR(link_all_deplibs, $1)=no
4640
6473
      else
4641
6474
        # not using gcc
4642
6475
        if test "$host_cpu" = ia64; then
4875
6708
      _LT_TAGVAR(link_all_deplibs, $1)=yes
4876
6709
      ;;
4877
6710
 
4878
 
    netbsd* | netbsdelf*-gnu)
 
6711
    netbsd*)
4879
6712
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4880
6713
        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4881
6714
      else
8084
9917
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8085
9918
# ---------------------------------------------
8086
9919
m4_define([_PKG_CONFIG],
8087
 
[if test -n "$PKG_CONFIG"; then
8088
 
    if test -n "$$1"; then
8089
 
        pkg_cv_[]$1="$$1"
8090
 
    else
8091
 
        PKG_CHECK_EXISTS([$3],
8092
 
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8093
 
                         [pkg_failed=yes])
8094
 
    fi
8095
 
else
8096
 
        pkg_failed=untried
 
9920
[if test -n "$$1"; then
 
9921
    pkg_cv_[]$1="$$1"
 
9922
 elif test -n "$PKG_CONFIG"; then
 
9923
    PKG_CHECK_EXISTS([$3],
 
9924
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
9925
                     [pkg_failed=yes])
 
9926
 else
 
9927
    pkg_failed=untried
8097
9928
fi[]dnl
8098
9929
])# _PKG_CONFIG
8099
9930
 
8137
9968
if test $pkg_failed = yes; then
8138
9969
        _PKG_SHORT_ERRORS_SUPPORTED
8139
9970
        if test $_pkg_short_errors_supported = yes; then
8140
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
9971
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8141
9972
        else 
8142
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
9973
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8143
9974
        fi
8144
9975
        # Put the nasty error message in config.log where it belongs
8145
9976
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8174
10005
fi[]dnl
8175
10006
])# PKG_CHECK_MODULES
8176
10007
 
8177
 
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8178
 
#
8179
 
# This file is free software; the Free Software Foundation
8180
 
# gives unlimited permission to copy and/or distribute it,
8181
 
# with or without modifications, as long as this notice is preserved.
8182
 
 
8183
 
# AM_AUTOMAKE_VERSION(VERSION)
8184
 
# ----------------------------
8185
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
8186
 
# generated from the m4 files accompanying Automake X.Y.
8187
 
# (This private macro should not be called outside this file.)
8188
 
AC_DEFUN([AM_AUTOMAKE_VERSION],
8189
 
[am__api_version='1.11'
8190
 
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8191
 
dnl require some minimum version.  Point them to the right macro.
8192
 
m4_if([$1], [1.11], [],
8193
 
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8194
 
])
8195
 
 
8196
 
# _AM_AUTOCONF_VERSION(VERSION)
8197
 
# -----------------------------
8198
 
# aclocal traces this macro to find the Autoconf version.
8199
 
# This is a private macro too.  Using m4_define simplifies
8200
 
# the logic in aclocal, which can simply ignore this definition.
8201
 
m4_define([_AM_AUTOCONF_VERSION], [])
8202
 
 
8203
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
8204
 
# -------------------------------
8205
 
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8206
 
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8207
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8208
 
[AM_AUTOMAKE_VERSION([1.11])dnl
8209
 
m4_ifndef([AC_AUTOCONF_VERSION],
8210
 
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8211
 
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8212
 
 
8213
 
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8214
 
 
8215
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8216
 
#
8217
 
# This file is free software; the Free Software Foundation
8218
 
# gives unlimited permission to copy and/or distribute it,
8219
 
# with or without modifications, as long as this notice is preserved.
8220
 
 
8221
 
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8222
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8223
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8224
 
#
8225
 
# Of course, Automake must honor this variable whenever it calls a
8226
 
# tool from the auxiliary directory.  The problem is that $srcdir (and
8227
 
# therefore $ac_aux_dir as well) can be either absolute or relative,
8228
 
# depending on how configure is run.  This is pretty annoying, since
8229
 
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8230
 
# source directory, any form will work fine, but in subdirectories a
8231
 
# relative path needs to be adjusted first.
8232
 
#
8233
 
# $ac_aux_dir/missing
8234
 
#    fails when called from a subdirectory if $ac_aux_dir is relative
8235
 
# $top_srcdir/$ac_aux_dir/missing
8236
 
#    fails if $ac_aux_dir is absolute,
8237
 
#    fails when called from a subdirectory in a VPATH build with
8238
 
#          a relative $ac_aux_dir
8239
 
#
8240
 
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8241
 
# are both prefixed by $srcdir.  In an in-source build this is usually
8242
 
# harmless because $srcdir is `.', but things will broke when you
8243
 
# start a VPATH build or use an absolute $srcdir.
8244
 
#
8245
 
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8246
 
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8247
 
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8248
 
# and then we would define $MISSING as
8249
 
#   MISSING="\${SHELL} $am_aux_dir/missing"
8250
 
# This will work as long as MISSING is not called from configure, because
8251
 
# unfortunately $(top_srcdir) has no meaning in configure.
8252
 
# However there are other variables, like CC, which are often used in
8253
 
# configure, and could therefore not use this "fixed" $ac_aux_dir.
8254
 
#
8255
 
# Another solution, used here, is to always expand $ac_aux_dir to an
8256
 
# absolute PATH.  The drawback is that using absolute paths prevent a
8257
 
# configured tree to be moved without reconfiguration.
8258
 
 
8259
 
AC_DEFUN([AM_AUX_DIR_EXPAND],
8260
 
[dnl Rely on autoconf to set up CDPATH properly.
8261
 
AC_PREREQ([2.50])dnl
8262
 
# expand $ac_aux_dir to an absolute path
8263
 
am_aux_dir=`cd $ac_aux_dir && pwd`
8264
 
])
8265
 
 
8266
 
# AM_CONDITIONAL                                            -*- Autoconf -*-
8267
 
 
8268
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8269
 
# Free Software Foundation, Inc.
8270
 
#
8271
 
# This file is free software; the Free Software Foundation
8272
 
# gives unlimited permission to copy and/or distribute it,
8273
 
# with or without modifications, as long as this notice is preserved.
8274
 
 
8275
 
# serial 9
8276
 
 
8277
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8278
 
# -------------------------------------
8279
 
# Define a conditional.
8280
 
AC_DEFUN([AM_CONDITIONAL],
8281
 
[AC_PREREQ(2.52)dnl
8282
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8283
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8284
 
AC_SUBST([$1_TRUE])dnl
8285
 
AC_SUBST([$1_FALSE])dnl
8286
 
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8287
 
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8288
 
m4_define([_AM_COND_VALUE_$1], [$2])dnl
8289
 
if $2; then
8290
 
  $1_TRUE=
8291
 
  $1_FALSE='#'
8292
 
else
8293
 
  $1_TRUE='#'
8294
 
  $1_FALSE=
8295
 
fi
8296
 
AC_CONFIG_COMMANDS_PRE(
8297
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8298
 
  AC_MSG_ERROR([[conditional "$1" was never defined.
8299
 
Usually this means the macro was only invoked conditionally.]])
8300
 
fi])])
8301
 
 
8302
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8303
 
# Free Software Foundation, Inc.
8304
 
#
8305
 
# This file is free software; the Free Software Foundation
8306
 
# gives unlimited permission to copy and/or distribute it,
8307
 
# with or without modifications, as long as this notice is preserved.
8308
 
 
8309
 
# serial 10
8310
 
 
8311
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8312
 
# written in clear, in which case automake, when reading aclocal.m4,
8313
 
# will think it sees a *use*, and therefore will trigger all it's
8314
 
# C support machinery.  Also note that it means that autoscan, seeing
8315
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8316
 
 
8317
 
 
8318
 
# _AM_DEPENDENCIES(NAME)
8319
 
# ----------------------
8320
 
# See how the compiler implements dependency checking.
8321
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
8322
 
# We try a few techniques and use that to set a single cache variable.
8323
 
#
8324
 
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8325
 
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8326
 
# dependency, and given that the user is not expected to run this macro,
8327
 
# just rely on AC_PROG_CC.
8328
 
AC_DEFUN([_AM_DEPENDENCIES],
8329
 
[AC_REQUIRE([AM_SET_DEPDIR])dnl
8330
 
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8331
 
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8332
 
AC_REQUIRE([AM_DEP_TRACK])dnl
8333
 
 
8334
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8335
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8336
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8337
 
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8338
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8339
 
                   [depcc="$$1"   am_compiler_list=])
8340
 
 
8341
 
AC_CACHE_CHECK([dependency style of $depcc],
8342
 
               [am_cv_$1_dependencies_compiler_type],
8343
 
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8344
 
  # We make a subdir and do the tests there.  Otherwise we can end up
8345
 
  # making bogus files that we don't know about and never remove.  For
8346
 
  # instance it was reported that on HP-UX the gcc test will end up
8347
 
  # making a dummy file named `D' -- because `-MD' means `put the output
8348
 
  # in D'.
8349
 
  mkdir conftest.dir
8350
 
  # Copy depcomp to subdir because otherwise we won't find it if we're
8351
 
  # using a relative directory.
8352
 
  cp "$am_depcomp" conftest.dir
8353
 
  cd conftest.dir
8354
 
  # We will build objects and dependencies in a subdirectory because
8355
 
  # it helps to detect inapplicable dependency modes.  For instance
8356
 
  # both Tru64's cc and ICC support -MD to output dependencies as a
8357
 
  # side effect of compilation, but ICC will put the dependencies in
8358
 
  # the current directory while Tru64 will put them in the object
8359
 
  # directory.
8360
 
  mkdir sub
8361
 
 
8362
 
  am_cv_$1_dependencies_compiler_type=none
8363
 
  if test "$am_compiler_list" = ""; then
8364
 
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8365
 
  fi
8366
 
  am__universal=false
8367
 
  m4_case([$1], [CC],
8368
 
    [case " $depcc " in #(
8369
 
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8370
 
     esac],
8371
 
    [CXX],
8372
 
    [case " $depcc " in #(
8373
 
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8374
 
     esac])
8375
 
 
8376
 
  for depmode in $am_compiler_list; do
8377
 
    # Setup a source with many dependencies, because some compilers
8378
 
    # like to wrap large dependency lists on column 80 (with \), and
8379
 
    # we should not choose a depcomp mode which is confused by this.
8380
 
    #
8381
 
    # We need to recreate these files for each test, as the compiler may
8382
 
    # overwrite some of them when testing with obscure command lines.
8383
 
    # This happens at least with the AIX C compiler.
8384
 
    : > sub/conftest.c
8385
 
    for i in 1 2 3 4 5 6; do
8386
 
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8387
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8388
 
      # Solaris 8's {/usr,}/bin/sh.
8389
 
      touch sub/conftst$i.h
8390
 
    done
8391
 
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8392
 
 
8393
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8394
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
8395
 
    # handle `-M -o', and we need to detect this.  Also, some Intel
8396
 
    # versions had trouble with output in subdirs
8397
 
    am__obj=sub/conftest.${OBJEXT-o}
8398
 
    am__minus_obj="-o $am__obj"
8399
 
    case $depmode in
8400
 
    gcc)
8401
 
      # This depmode causes a compiler race in universal mode.
8402
 
      test "$am__universal" = false || continue
8403
 
      ;;
8404
 
    nosideeffect)
8405
 
      # after this tag, mechanisms are not by side-effect, so they'll
8406
 
      # only be used when explicitly requested
8407
 
      if test "x$enable_dependency_tracking" = xyes; then
8408
 
        continue
8409
 
      else
8410
 
        break
8411
 
      fi
8412
 
      ;;
8413
 
    msvisualcpp | msvcmsys)
8414
 
      # This compiler won't grok `-c -o', but also, the minuso test has
8415
 
      # not run yet.  These depmodes are late enough in the game, and
8416
 
      # so weak that their functioning should not be impacted.
8417
 
      am__obj=conftest.${OBJEXT-o}
8418
 
      am__minus_obj=
8419
 
      ;;
8420
 
    none) break ;;
8421
 
    esac
8422
 
    if depmode=$depmode \
8423
 
       source=sub/conftest.c object=$am__obj \
8424
 
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8425
 
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8426
 
         >/dev/null 2>conftest.err &&
8427
 
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8428
 
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8429
 
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8430
 
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8431
 
      # icc doesn't choke on unknown options, it will just issue warnings
8432
 
      # or remarks (even with -Werror).  So we grep stderr for any message
8433
 
      # that says an option was ignored or not supported.
8434
 
      # When given -MP, icc 7.0 and 7.1 complain thusly:
8435
 
      #   icc: Command line warning: ignoring option '-M'; no argument required
8436
 
      # The diagnosis changed in icc 8.0:
8437
 
      #   icc: Command line remark: option '-MP' not supported
8438
 
      if (grep 'ignoring option' conftest.err ||
8439
 
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8440
 
        am_cv_$1_dependencies_compiler_type=$depmode
8441
 
        break
8442
 
      fi
8443
 
    fi
8444
 
  done
8445
 
 
8446
 
  cd ..
8447
 
  rm -rf conftest.dir
8448
 
else
8449
 
  am_cv_$1_dependencies_compiler_type=none
8450
 
fi
8451
 
])
8452
 
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8453
 
AM_CONDITIONAL([am__fastdep$1], [
8454
 
  test "x$enable_dependency_tracking" != xno \
8455
 
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8456
 
])
8457
 
 
8458
 
 
8459
 
# AM_SET_DEPDIR
8460
 
# -------------
8461
 
# Choose a directory name for dependency files.
8462
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
8463
 
AC_DEFUN([AM_SET_DEPDIR],
8464
 
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8465
 
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8466
 
])
8467
 
 
8468
 
 
8469
 
# AM_DEP_TRACK
8470
 
# ------------
8471
 
AC_DEFUN([AM_DEP_TRACK],
8472
 
[AC_ARG_ENABLE(dependency-tracking,
8473
 
[  --disable-dependency-tracking  speeds up one-time build
8474
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
8475
 
if test "x$enable_dependency_tracking" != xno; then
8476
 
  am_depcomp="$ac_aux_dir/depcomp"
8477
 
  AMDEPBACKSLASH='\'
8478
 
fi
8479
 
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8480
 
AC_SUBST([AMDEPBACKSLASH])dnl
8481
 
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8482
 
])
8483
 
 
8484
 
# Generate code to set up dependency tracking.              -*- Autoconf -*-
8485
 
 
8486
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8487
 
# Free Software Foundation, Inc.
8488
 
#
8489
 
# This file is free software; the Free Software Foundation
8490
 
# gives unlimited permission to copy and/or distribute it,
8491
 
# with or without modifications, as long as this notice is preserved.
8492
 
 
8493
 
#serial 5
8494
 
 
8495
 
# _AM_OUTPUT_DEPENDENCY_COMMANDS
8496
 
# ------------------------------
8497
 
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8498
 
[{
8499
 
  # Autoconf 2.62 quotes --file arguments for eval, but not when files
8500
 
  # are listed without --file.  Let's play safe and only enable the eval
8501
 
  # if we detect the quoting.
8502
 
  case $CONFIG_FILES in
8503
 
  *\'*) eval set x "$CONFIG_FILES" ;;
8504
 
  *)   set x $CONFIG_FILES ;;
8505
 
  esac
8506
 
  shift
8507
 
  for mf
8508
 
  do
8509
 
    # Strip MF so we end up with the name of the file.
8510
 
    mf=`echo "$mf" | sed -e 's/:.*$//'`
8511
 
    # Check whether this is an Automake generated Makefile or not.
8512
 
    # We used to match only the files named `Makefile.in', but
8513
 
    # some people rename them; so instead we look at the file content.
8514
 
    # Grep'ing the first line is not enough: some people post-process
8515
 
    # each Makefile.in and add a new line on top of each file to say so.
8516
 
    # Grep'ing the whole file is not good either: AIX grep has a line
8517
 
    # limit of 2048, but all sed's we know have understand at least 4000.
8518
 
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8519
 
      dirpart=`AS_DIRNAME("$mf")`
8520
 
    else
8521
 
      continue
8522
 
    fi
8523
 
    # Extract the definition of DEPDIR, am__include, and am__quote
8524
 
    # from the Makefile without running `make'.
8525
 
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8526
 
    test -z "$DEPDIR" && continue
8527
 
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
8528
 
    test -z "am__include" && continue
8529
 
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8530
 
    # When using ansi2knr, U may be empty or an underscore; expand it
8531
 
    U=`sed -n 's/^U = //p' < "$mf"`
8532
 
    # Find all dependency output files, they are included files with
8533
 
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
8534
 
    # simplest approach to changing $(DEPDIR) to its actual value in the
8535
 
    # expansion.
8536
 
    for file in `sed -n "
8537
 
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8538
 
         sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8539
 
      # Make sure the directory exists.
8540
 
      test -f "$dirpart/$file" && continue
8541
 
      fdir=`AS_DIRNAME(["$file"])`
8542
 
      AS_MKDIR_P([$dirpart/$fdir])
8543
 
      # echo "creating $dirpart/$file"
8544
 
      echo '# dummy' > "$dirpart/$file"
8545
 
    done
8546
 
  done
8547
 
}
8548
 
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8549
 
 
8550
 
 
8551
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
8552
 
# -----------------------------
8553
 
# This macro should only be invoked once -- use via AC_REQUIRE.
8554
 
#
8555
 
# This code is only required when automatic dependency tracking
8556
 
# is enabled.  FIXME.  This creates each `.P' file that we will
8557
 
# need in order to bootstrap the dependency handling code.
8558
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8559
 
[AC_CONFIG_COMMANDS([depfiles],
8560
 
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8561
 
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8562
 
])
8563
 
 
8564
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8565
 
# Free Software Foundation, Inc.
8566
 
#
8567
 
# This file is free software; the Free Software Foundation
8568
 
# gives unlimited permission to copy and/or distribute it,
8569
 
# with or without modifications, as long as this notice is preserved.
8570
 
 
8571
 
# serial 8
8572
 
 
8573
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
8574
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
8575
 
 
8576
 
# Do all the work for Automake.                             -*- Autoconf -*-
8577
 
 
8578
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8579
 
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
8580
 
#
8581
 
# This file is free software; the Free Software Foundation
8582
 
# gives unlimited permission to copy and/or distribute it,
8583
 
# with or without modifications, as long as this notice is preserved.
8584
 
 
8585
 
# serial 16
8586
 
 
8587
 
# This macro actually does too much.  Some checks are only needed if
8588
 
# your package does certain things.  But this isn't really a big deal.
8589
 
 
8590
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
8591
 
# AM_INIT_AUTOMAKE([OPTIONS])
8592
 
# -----------------------------------------------
8593
 
# The call with PACKAGE and VERSION arguments is the old style
8594
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
8595
 
# and VERSION should now be passed to AC_INIT and removed from
8596
 
# the call to AM_INIT_AUTOMAKE.
8597
 
# We support both call styles for the transition.  After
8598
 
# the next Automake release, Autoconf can make the AC_INIT
8599
 
# arguments mandatory, and then we can depend on a new Autoconf
8600
 
# release and drop the old call support.
8601
 
AC_DEFUN([AM_INIT_AUTOMAKE],
8602
 
[AC_PREREQ([2.62])dnl
8603
 
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
8604
 
dnl the ones we care about.
8605
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
8606
 
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
8607
 
AC_REQUIRE([AC_PROG_INSTALL])dnl
8608
 
if test "`cd $srcdir && pwd`" != "`pwd`"; then
8609
 
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8610
 
  # is not polluted with repeated "-I."
8611
 
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8612
 
  # test to see if srcdir already configured
8613
 
  if test -f $srcdir/config.status; then
8614
 
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8615
 
  fi
8616
 
fi
8617
 
 
8618
 
# test whether we have cygpath
8619
 
if test -z "$CYGPATH_W"; then
8620
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
8621
 
    CYGPATH_W='cygpath -w'
8622
 
  else
8623
 
    CYGPATH_W=echo
8624
 
  fi
8625
 
fi
8626
 
AC_SUBST([CYGPATH_W])
8627
 
 
8628
 
# Define the identity of the package.
8629
 
dnl Distinguish between old-style and new-style calls.
8630
 
m4_ifval([$2],
8631
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8632
 
 AC_SUBST([PACKAGE], [$1])dnl
8633
 
 AC_SUBST([VERSION], [$2])],
8634
 
[_AM_SET_OPTIONS([$1])dnl
8635
 
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8636
 
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8637
 
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
8638
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8639
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8640
 
 
8641
 
_AM_IF_OPTION([no-define],,
8642
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8643
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8644
 
 
8645
 
# Some tools Automake needs.
8646
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
8647
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
8648
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8649
 
AM_MISSING_PROG(AUTOCONF, autoconf)
8650
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8651
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
8652
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
8653
 
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8654
 
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
8655
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
8656
 
# We need awk for the "check" target.  The system "awk" is bad on
8657
 
# some platforms.
8658
 
AC_REQUIRE([AC_PROG_AWK])dnl
8659
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
8660
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8661
 
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8662
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8663
 
                             [_AM_PROG_TAR([v7])])])
8664
 
_AM_IF_OPTION([no-dependencies],,
8665
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
8666
 
                  [_AM_DEPENDENCIES(CC)],
8667
 
                  [define([AC_PROG_CC],
8668
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8669
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
8670
 
                  [_AM_DEPENDENCIES(CXX)],
8671
 
                  [define([AC_PROG_CXX],
8672
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8673
 
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
8674
 
                  [_AM_DEPENDENCIES(OBJC)],
8675
 
                  [define([AC_PROG_OBJC],
8676
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
8677
 
])
8678
 
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
8679
 
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
8680
 
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
8681
 
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
8682
 
AC_CONFIG_COMMANDS_PRE(dnl
8683
 
[m4_provide_if([_AM_COMPILER_EXEEXT],
8684
 
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
8685
 
])
8686
 
 
8687
 
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
8688
 
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
8689
 
dnl mangled by Autoconf and run in a shell conditional statement.
8690
 
m4_define([_AC_COMPILER_EXEEXT],
8691
 
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
8692
 
 
8693
 
 
8694
 
# When config.status generates a header, we must update the stamp-h file.
8695
 
# This file resides in the same directory as the config header
8696
 
# that is generated.  The stamp files are numbered to have different names.
8697
 
 
8698
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8699
 
# loop where config.status creates the headers, so we can generate
8700
 
# our stamp files there.
8701
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8702
 
[# Compute $1's index in $config_headers.
8703
 
_am_arg=$1
8704
 
_am_stamp_count=1
8705
 
for _am_header in $config_headers :; do
8706
 
  case $_am_header in
8707
 
    $_am_arg | $_am_arg:* )
8708
 
      break ;;
8709
 
    * )
8710
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8711
 
  esac
8712
 
done
8713
 
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
8714
 
 
8715
 
# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
8716
 
#
8717
 
# This file is free software; the Free Software Foundation
8718
 
# gives unlimited permission to copy and/or distribute it,
8719
 
# with or without modifications, as long as this notice is preserved.
8720
 
 
8721
 
# AM_PROG_INSTALL_SH
8722
 
# ------------------
8723
 
# Define $install_sh.
8724
 
AC_DEFUN([AM_PROG_INSTALL_SH],
8725
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8726
 
if test x"${install_sh}" != xset; then
8727
 
  case $am_aux_dir in
8728
 
  *\ * | *\     *)
8729
 
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
8730
 
  *)
8731
 
    install_sh="\${SHELL} $am_aux_dir/install-sh"
8732
 
  esac
8733
 
fi
8734
 
AC_SUBST(install_sh)])
8735
 
 
8736
 
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
8737
 
#
8738
 
# This file is free software; the Free Software Foundation
8739
 
# gives unlimited permission to copy and/or distribute it,
8740
 
# with or without modifications, as long as this notice is preserved.
8741
 
 
8742
 
# serial 2
8743
 
 
8744
 
# Check whether the underlying file-system supports filenames
8745
 
# with a leading dot.  For instance MS-DOS doesn't.
8746
 
AC_DEFUN([AM_SET_LEADING_DOT],
8747
 
[rm -rf .tst 2>/dev/null
8748
 
mkdir .tst 2>/dev/null
8749
 
if test -d .tst; then
8750
 
  am__leading_dot=.
8751
 
else
8752
 
  am__leading_dot=_
8753
 
fi
8754
 
rmdir .tst 2>/dev/null
8755
 
AC_SUBST([am__leading_dot])])
8756
 
 
8757
 
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
8758
 
# From Jim Meyering
8759
 
 
8760
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8761
 
# Free Software Foundation, Inc.
8762
 
#
8763
 
# This file is free software; the Free Software Foundation
8764
 
# gives unlimited permission to copy and/or distribute it,
8765
 
# with or without modifications, as long as this notice is preserved.
8766
 
 
8767
 
# serial 5
8768
 
 
8769
 
# AM_MAINTAINER_MODE([DEFAULT-MODE])
8770
 
# ----------------------------------
8771
 
# Control maintainer-specific portions of Makefiles.
8772
 
# Default is to disable them, unless `enable' is passed literally.
8773
 
# For symmetry, `disable' may be passed as well.  Anyway, the user
8774
 
# can override the default with the --enable/--disable switch.
8775
 
AC_DEFUN([AM_MAINTAINER_MODE],
8776
 
[m4_case(m4_default([$1], [disable]),
8777
 
       [enable], [m4_define([am_maintainer_other], [disable])],
8778
 
       [disable], [m4_define([am_maintainer_other], [enable])],
8779
 
       [m4_define([am_maintainer_other], [enable])
8780
 
        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
8781
 
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
8782
 
  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
8783
 
  AC_ARG_ENABLE([maintainer-mode],
8784
 
[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
8785
 
                          (and sometimes confusing) to the casual installer],
8786
 
      [USE_MAINTAINER_MODE=$enableval],
8787
 
      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
8788
 
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8789
 
  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
8790
 
  MAINT=$MAINTAINER_MODE_TRUE
8791
 
  AC_SUBST([MAINT])dnl
8792
 
]
8793
 
)
8794
 
 
8795
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8796
 
 
8797
 
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
8798
 
 
8799
 
# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
8800
 
#
8801
 
# This file is free software; the Free Software Foundation
8802
 
# gives unlimited permission to copy and/or distribute it,
8803
 
# with or without modifications, as long as this notice is preserved.
8804
 
 
8805
 
# serial 4
8806
 
 
8807
 
# AM_MAKE_INCLUDE()
8808
 
# -----------------
8809
 
# Check to see how make treats includes.
8810
 
AC_DEFUN([AM_MAKE_INCLUDE],
8811
 
[am_make=${MAKE-make}
8812
 
cat > confinc << 'END'
8813
 
am__doit:
8814
 
        @echo this is the am__doit target
8815
 
.PHONY: am__doit
8816
 
END
8817
 
# If we don't find an include directive, just comment out the code.
8818
 
AC_MSG_CHECKING([for style of include used by $am_make])
8819
 
am__include="#"
8820
 
am__quote=
8821
 
_am_result=none
8822
 
# First try GNU make style include.
8823
 
echo "include confinc" > confmf
8824
 
# Ignore all kinds of additional output from `make'.
8825
 
case `$am_make -s -f confmf 2> /dev/null` in #(
8826
 
*the\ am__doit\ target*)
8827
 
  am__include=include
8828
 
  am__quote=
8829
 
  _am_result=GNU
8830
 
  ;;
8831
 
esac
8832
 
# Now try BSD make style include.
8833
 
if test "$am__include" = "#"; then
8834
 
   echo '.include "confinc"' > confmf
8835
 
   case `$am_make -s -f confmf 2> /dev/null` in #(
8836
 
   *the\ am__doit\ target*)
8837
 
     am__include=.include
8838
 
     am__quote="\""
8839
 
     _am_result=BSD
8840
 
     ;;
8841
 
   esac
8842
 
fi
8843
 
AC_SUBST([am__include])
8844
 
AC_SUBST([am__quote])
8845
 
AC_MSG_RESULT([$_am_result])
8846
 
rm -f confinc confmf
8847
 
])
8848
 
 
8849
 
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
8850
 
 
8851
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
8852
 
# Free Software Foundation, Inc.
8853
 
#
8854
 
# This file is free software; the Free Software Foundation
8855
 
# gives unlimited permission to copy and/or distribute it,
8856
 
# with or without modifications, as long as this notice is preserved.
8857
 
 
8858
 
# serial 6
8859
 
 
8860
 
# AM_MISSING_PROG(NAME, PROGRAM)
8861
 
# ------------------------------
8862
 
AC_DEFUN([AM_MISSING_PROG],
8863
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
8864
 
$1=${$1-"${am_missing_run}$2"}
8865
 
AC_SUBST($1)])
8866
 
 
8867
 
 
8868
 
# AM_MISSING_HAS_RUN
8869
 
# ------------------
8870
 
# Define MISSING if not defined so far and test if it supports --run.
8871
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
8872
 
AC_DEFUN([AM_MISSING_HAS_RUN],
8873
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8874
 
AC_REQUIRE_AUX_FILE([missing])dnl
8875
 
if test x"${MISSING+set}" != xset; then
8876
 
  case $am_aux_dir in
8877
 
  *\ * | *\     *)
8878
 
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8879
 
  *)
8880
 
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8881
 
  esac
8882
 
fi
8883
 
# Use eval to expand $SHELL
8884
 
if eval "$MISSING --run true"; then
8885
 
  am_missing_run="$MISSING --run "
8886
 
else
8887
 
  am_missing_run=
8888
 
  AC_MSG_WARN([`missing' script is too old or missing])
8889
 
fi
8890
 
])
8891
 
 
8892
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8893
 
#
8894
 
# This file is free software; the Free Software Foundation
8895
 
# gives unlimited permission to copy and/or distribute it,
8896
 
# with or without modifications, as long as this notice is preserved.
8897
 
 
8898
 
# AM_PROG_MKDIR_P
8899
 
# ---------------
8900
 
# Check for `mkdir -p'.
8901
 
AC_DEFUN([AM_PROG_MKDIR_P],
8902
 
[AC_PREREQ([2.60])dnl
8903
 
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
8904
 
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8905
 
dnl while keeping a definition of mkdir_p for backward compatibility.
8906
 
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8907
 
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8908
 
dnl Makefile.ins that do not define MKDIR_P, so we do our own
8909
 
dnl adjustment using top_builddir (which is defined more often than
8910
 
dnl MKDIR_P).
8911
 
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8912
 
case $mkdir_p in
8913
 
  [[\\/$]]* | ?:[[\\/]]*) ;;
8914
 
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8915
 
esac
8916
 
])
8917
 
 
8918
 
# Helper functions for option handling.                     -*- Autoconf -*-
8919
 
 
8920
 
# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
8921
 
#
8922
 
# This file is free software; the Free Software Foundation
8923
 
# gives unlimited permission to copy and/or distribute it,
8924
 
# with or without modifications, as long as this notice is preserved.
8925
 
 
8926
 
# serial 4
8927
 
 
8928
 
# _AM_MANGLE_OPTION(NAME)
8929
 
# -----------------------
8930
 
AC_DEFUN([_AM_MANGLE_OPTION],
8931
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8932
 
 
8933
 
# _AM_SET_OPTION(NAME)
8934
 
# ------------------------------
8935
 
# Set option NAME.  Presently that only means defining a flag for this option.
8936
 
AC_DEFUN([_AM_SET_OPTION],
8937
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8938
 
 
8939
 
# _AM_SET_OPTIONS(OPTIONS)
8940
 
# ----------------------------------
8941
 
# OPTIONS is a space-separated list of Automake options.
8942
 
AC_DEFUN([_AM_SET_OPTIONS],
8943
 
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8944
 
 
8945
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8946
 
# -------------------------------------------
8947
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8948
 
AC_DEFUN([_AM_IF_OPTION],
8949
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8950
 
 
8951
 
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8952
 
 
8953
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8954
 
# Free Software Foundation, Inc.
8955
 
#
8956
 
# This file is free software; the Free Software Foundation
8957
 
# gives unlimited permission to copy and/or distribute it,
8958
 
# with or without modifications, as long as this notice is preserved.
8959
 
 
8960
 
# serial 5
8961
 
 
8962
 
# AM_SANITY_CHECK
8963
 
# ---------------
8964
 
AC_DEFUN([AM_SANITY_CHECK],
8965
 
[AC_MSG_CHECKING([whether build environment is sane])
8966
 
# Just in case
8967
 
sleep 1
8968
 
echo timestamp > conftest.file
8969
 
# Reject unsafe characters in $srcdir or the absolute working directory
8970
 
# name.  Accept space and tab only in the latter.
8971
 
am_lf='
8972
 
'
8973
 
case `pwd` in
8974
 
  *[[\\\"\#\$\&\'\`$am_lf]]*)
8975
 
    AC_MSG_ERROR([unsafe absolute working directory name]);;
8976
 
esac
8977
 
case $srcdir in
8978
 
  *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
8979
 
    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8980
 
esac
8981
 
 
8982
 
# Do `set' in a subshell so we don't clobber the current shell's
8983
 
# arguments.  Must try -L first in case configure is actually a
8984
 
# symlink; some systems play weird games with the mod time of symlinks
8985
 
# (eg FreeBSD returns the mod time of the symlink's containing
8986
 
# directory).
8987
 
if (
8988
 
   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8989
 
   if test "$[*]" = "X"; then
8990
 
      # -L didn't work.
8991
 
      set X `ls -t "$srcdir/configure" conftest.file`
8992
 
   fi
8993
 
   rm -f conftest.file
8994
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
8995
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8996
 
 
8997
 
      # If neither matched, then we have a broken ls.  This can happen
8998
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
8999
 
      # broken ls alias from the environment.  This has actually
9000
 
      # happened.  Such a system could not be considered "sane".
9001
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9002
 
alias in your environment])
9003
 
   fi
9004
 
 
9005
 
   test "$[2]" = conftest.file
9006
 
   )
9007
 
then
9008
 
   # Ok.
9009
 
   :
9010
 
else
9011
 
   AC_MSG_ERROR([newly created file is older than distributed files!
9012
 
Check your system clock])
9013
 
fi
9014
 
AC_MSG_RESULT(yes)])
9015
 
 
9016
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9017
 
#
9018
 
# This file is free software; the Free Software Foundation
9019
 
# gives unlimited permission to copy and/or distribute it,
9020
 
# with or without modifications, as long as this notice is preserved.
9021
 
 
9022
 
# AM_PROG_INSTALL_STRIP
9023
 
# ---------------------
9024
 
# One issue with vendor `install' (even GNU) is that you can't
9025
 
# specify the program used to strip binaries.  This is especially
9026
 
# annoying in cross-compiling environments, where the build's strip
9027
 
# is unlikely to handle the host's binaries.
9028
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
9029
 
# always use install-sh in `make install-strip', and initialize
9030
 
# STRIPPROG with the value of the STRIP variable (set by the user).
9031
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
9032
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9033
 
# Installed binaries are usually stripped using `strip' when the user
9034
 
# run `make install-strip'.  However `strip' might not be the right
9035
 
# tool to use in cross-compilation environments, therefore Automake
9036
 
# will honor the `STRIP' environment variable to overrule this program.
9037
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9038
 
if test "$cross_compiling" != no; then
9039
 
  AC_CHECK_TOOL([STRIP], [strip], :)
9040
 
fi
9041
 
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9042
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
9043
 
 
9044
 
# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9045
 
#
9046
 
# This file is free software; the Free Software Foundation
9047
 
# gives unlimited permission to copy and/or distribute it,
9048
 
# with or without modifications, as long as this notice is preserved.
9049
 
 
9050
 
# serial 2
9051
 
 
9052
 
# _AM_SUBST_NOTMAKE(VARIABLE)
9053
 
# ---------------------------
9054
 
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9055
 
# This macro is traced by Automake.
9056
 
AC_DEFUN([_AM_SUBST_NOTMAKE])
9057
 
 
9058
 
# AM_SUBST_NOTMAKE(VARIABLE)
9059
 
# ---------------------------
9060
 
# Public sister of _AM_SUBST_NOTMAKE.
9061
 
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9062
 
 
9063
 
# Check how to create a tarball.                            -*- Autoconf -*-
9064
 
 
9065
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9066
 
#
9067
 
# This file is free software; the Free Software Foundation
9068
 
# gives unlimited permission to copy and/or distribute it,
9069
 
# with or without modifications, as long as this notice is preserved.
9070
 
 
9071
 
# serial 2
9072
 
 
9073
 
# _AM_PROG_TAR(FORMAT)
9074
 
# --------------------
9075
 
# Check how to create a tarball in format FORMAT.
9076
 
# FORMAT should be one of `v7', `ustar', or `pax'.
9077
 
#
9078
 
# Substitute a variable $(am__tar) that is a command
9079
 
# writing to stdout a FORMAT-tarball containing the directory
9080
 
# $tardir.
9081
 
#     tardir=directory && $(am__tar) > result.tar
9082
 
#
9083
 
# Substitute a variable $(am__untar) that extract such
9084
 
# a tarball read from stdin.
9085
 
#     $(am__untar) < result.tar
9086
 
AC_DEFUN([_AM_PROG_TAR],
9087
 
[# Always define AMTAR for backward compatibility.
9088
 
AM_MISSING_PROG([AMTAR], [tar])
9089
 
m4_if([$1], [v7],
9090
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9091
 
     [m4_case([$1], [ustar],, [pax],,
9092
 
              [m4_fatal([Unknown tar format])])
9093
 
AC_MSG_CHECKING([how to create a $1 tar archive])
9094
 
# Loop over all known methods to create a tar archive until one works.
9095
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9096
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9097
 
# Do not fold the above two line into one, because Tru64 sh and
9098
 
# Solaris sh will not grok spaces in the rhs of `-'.
9099
 
for _am_tool in $_am_tools
9100
 
do
9101
 
  case $_am_tool in
9102
 
  gnutar)
9103
 
    for _am_tar in tar gnutar gtar;
9104
 
    do
9105
 
      AM_RUN_LOG([$_am_tar --version]) && break
9106
 
    done
9107
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9108
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9109
 
    am__untar="$_am_tar -xf -"
9110
 
    ;;
9111
 
  plaintar)
9112
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
9113
 
    # ustar tarball either.
9114
 
    (tar --version) >/dev/null 2>&1 && continue
9115
 
    am__tar='tar chf - "$$tardir"'
9116
 
    am__tar_='tar chf - "$tardir"'
9117
 
    am__untar='tar xf -'
9118
 
    ;;
9119
 
  pax)
9120
 
    am__tar='pax -L -x $1 -w "$$tardir"'
9121
 
    am__tar_='pax -L -x $1 -w "$tardir"'
9122
 
    am__untar='pax -r'
9123
 
    ;;
9124
 
  cpio)
9125
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9126
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9127
 
    am__untar='cpio -i -H $1 -d'
9128
 
    ;;
9129
 
  none)
9130
 
    am__tar=false
9131
 
    am__tar_=false
9132
 
    am__untar=false
9133
 
    ;;
9134
 
  esac
9135
 
 
9136
 
  # If the value was cached, stop now.  We just wanted to have am__tar
9137
 
  # and am__untar set.
9138
 
  test -n "${am_cv_prog_tar_$1}" && break
9139
 
 
9140
 
  # tar/untar a dummy directory, and stop if the command works
9141
 
  rm -rf conftest.dir
9142
 
  mkdir conftest.dir
9143
 
  echo GrepMe > conftest.dir/file
9144
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9145
 
  rm -rf conftest.dir
9146
 
  if test -s conftest.tar; then
9147
 
    AM_RUN_LOG([$am__untar <conftest.tar])
9148
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9149
 
  fi
9150
 
done
9151
 
rm -rf conftest.dir
9152
 
 
9153
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9154
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9155
 
AC_SUBST([am__tar])
9156
 
AC_SUBST([am__untar])
9157
 
]) # _AM_PROG_TAR
9158
 
 
9159
 
dnl AM_GCONF_SOURCE_2
9160
 
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
9161
 
dnl  (i.e. pass to gconftool-2
9162
 
dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
9163
 
dnl  you should install foo.schemas files
9164
 
dnl
9165
 
 
9166
 
AC_DEFUN([AM_GCONF_SOURCE_2],
9167
 
[
9168
 
  if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
9169
 
    GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
9170
 
  else
9171
 
    GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
9172
 
  fi
9173
 
 
9174
 
  AC_ARG_WITH([gconf-source],
9175
 
              AC_HELP_STRING([--with-gconf-source=sourceaddress],
9176
 
                             [Config database for installing schema files.]),
9177
 
              [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
9178
 
 
9179
 
  AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
9180
 
  AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
9181
 
 
9182
 
  if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
9183
 
    GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
9184
 
  fi
9185
 
 
9186
 
  AC_ARG_WITH([gconf-schema-file-dir],
9187
 
              AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
9188
 
                             [Directory for installing schema files.]),
9189
 
              [GCONF_SCHEMA_FILE_DIR="$withval"],)
9190
 
 
9191
 
  AC_SUBST(GCONF_SCHEMA_FILE_DIR)
9192
 
  AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
9193
 
 
9194
 
  AC_ARG_ENABLE(schemas-install,
9195
 
        AC_HELP_STRING([--disable-schemas-install],
9196
 
                       [Disable the schemas installation]),
9197
 
     [case ${enableval} in
9198
 
       yes|no) ;;
9199
 
       *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
9200
 
      esac])
9201
 
  AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
9202
 
])
9203
 
 
9204
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
9205
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
9206
 
#
9207
 
# This file is free software, distributed under the terms of the GNU
9208
 
# General Public License.  As a special exception to the GNU General
9209
 
# Public License, this file may be distributed as part of a program
9210
 
# that contains a configuration script generated by Autoconf, under
9211
 
# the same distribution terms as the rest of that program.
9212
 
#
9213
 
# This file can be copied and used freely without restrictions.  It can
9214
 
# be used in projects which are not available under the GNU Public License
9215
 
# but which still want to provide support for the GNU gettext functionality.
9216
 
#
9217
 
# Macro to add for using GNU gettext.
9218
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
9219
 
#
9220
 
# Modified to never use included libintl. 
9221
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
9222
 
#
9223
 
# Major rework to remove unused code
9224
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
9225
 
#
9226
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
9227
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
9228
 
#
9229
 
# Modified to require ngettext
9230
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
9231
 
#
9232
 
# We need this here as well, since someone might use autoconf-2.5x
9233
 
# to configure GLib then an older version to configure a package
9234
 
# using AM_GLIB_GNU_GETTEXT
9235
 
AC_PREREQ(2.53)
9236
 
 
9237
 
dnl
9238
 
dnl We go to great lengths to make sure that aclocal won't 
9239
 
dnl try to pull in the installed version of these macros
9240
 
dnl when running aclocal in the glib directory.
9241
 
dnl
9242
 
m4_copy([AC_DEFUN],[glib_DEFUN])
9243
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
9244
 
dnl
9245
 
dnl At the end, if we're not within glib, we'll define the public
9246
 
dnl definitions in terms of our private definitions.
9247
 
dnl
9248
 
 
9249
 
# GLIB_LC_MESSAGES
9250
 
#--------------------
9251
 
glib_DEFUN([GLIB_LC_MESSAGES],
9252
 
  [AC_CHECK_HEADERS([locale.h])
9253
 
    if test $ac_cv_header_locale_h = yes; then
9254
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
9255
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
9256
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
9257
 
    if test $am_cv_val_LC_MESSAGES = yes; then
9258
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
9259
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
9260
 
    fi
9261
 
  fi])
9262
 
 
9263
 
# GLIB_PATH_PROG_WITH_TEST
9264
 
#----------------------------
9265
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
9266
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
9267
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
9268
 
[# Extract the first word of "$2", so it can be a program name with args.
9269
 
set dummy $2; ac_word=[$]2
9270
 
AC_MSG_CHECKING([for $ac_word])
9271
 
AC_CACHE_VAL(ac_cv_path_$1,
9272
 
[case "[$]$1" in
9273
 
  /*)
9274
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
9275
 
  ;;
9276
 
  *)
9277
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9278
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
9279
 
    test -z "$ac_dir" && ac_dir=.
9280
 
    if test -f $ac_dir/$ac_word; then
9281
 
      if [$3]; then
9282
 
        ac_cv_path_$1="$ac_dir/$ac_word"
9283
 
        break
9284
 
      fi
9285
 
    fi
9286
 
  done
9287
 
  IFS="$ac_save_ifs"
9288
 
dnl If no 4th arg is given, leave the cache variable unset,
9289
 
dnl so AC_PATH_PROGS will keep looking.
9290
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
9291
 
])dnl
9292
 
  ;;
9293
 
esac])dnl
9294
 
$1="$ac_cv_path_$1"
9295
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
9296
 
  AC_MSG_RESULT([$]$1)
9297
 
else
9298
 
  AC_MSG_RESULT(no)
9299
 
fi
9300
 
AC_SUBST($1)dnl
9301
 
])
9302
 
 
9303
 
# GLIB_WITH_NLS
9304
 
#-----------------
9305
 
glib_DEFUN([GLIB_WITH_NLS],
9306
 
  dnl NLS is obligatory
9307
 
  [USE_NLS=yes
9308
 
    AC_SUBST(USE_NLS)
9309
 
 
9310
 
    gt_cv_have_gettext=no
9311
 
 
9312
 
    CATOBJEXT=NONE
9313
 
    XGETTEXT=:
9314
 
    INTLLIBS=
9315
 
 
9316
 
    AC_CHECK_HEADER(libintl.h,
9317
 
     [gt_cv_func_dgettext_libintl="no"
9318
 
      libintl_extra_libs=""
9319
 
 
9320
 
      #
9321
 
      # First check in libc
9322
 
      #
9323
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
9324
 
        [AC_TRY_LINK([
9325
 
#include <libintl.h>
9326
 
],
9327
 
         [return !ngettext ("","", 1)],
9328
 
          gt_cv_func_ngettext_libc=yes,
9329
 
          gt_cv_func_ngettext_libc=no)
9330
 
        ])
9331
 
  
9332
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
9333
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
9334
 
                [AC_TRY_LINK([
9335
 
#include <libintl.h>
9336
 
],
9337
 
                  [return !dgettext ("","")],
9338
 
                  gt_cv_func_dgettext_libc=yes,
9339
 
                  gt_cv_func_dgettext_libc=no)
9340
 
                ])
9341
 
      fi
9342
 
  
9343
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
9344
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
9345
 
      fi
9346
 
 
9347
 
      #
9348
 
      # If we don't have everything we want, check in libintl
9349
 
      #
9350
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
9351
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
9352
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
9353
 
        
9354
 
        AC_CHECK_LIB(intl, bindtextdomain,
9355
 
            [AC_CHECK_LIB(intl, ngettext,
9356
 
                    [AC_CHECK_LIB(intl, dgettext,
9357
 
                                  gt_cv_func_dgettext_libintl=yes)])])
9358
 
 
9359
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
9360
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
9361
 
          AC_MSG_RESULT([])
9362
 
          AC_CHECK_LIB(intl, ngettext,
9363
 
                [AC_CHECK_LIB(intl, dcgettext,
9364
 
                       [gt_cv_func_dgettext_libintl=yes
9365
 
                        libintl_extra_libs=-liconv],
9366
 
                        :,-liconv)],
9367
 
                :,-liconv)
9368
 
        fi
9369
 
 
9370
 
        #
9371
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
9372
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
9373
 
        # and both have dgettext and ngettext
9374
 
        #
9375
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
9376
 
          glib_save_LIBS="$LIBS"
9377
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
9378
 
          unset ac_cv_func_bind_textdomain_codeset
9379
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
9380
 
          LIBS="$glib_save_LIBS"
9381
 
 
9382
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
9383
 
            gt_cv_func_dgettext_libc=no
9384
 
          else
9385
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
9386
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
9387
 
              gt_cv_func_dgettext_libintl=no
9388
 
            fi
9389
 
          fi
9390
 
        fi
9391
 
      fi
9392
 
 
9393
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
9394
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
9395
 
        gt_cv_have_gettext=yes
9396
 
      fi
9397
 
  
9398
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9399
 
        INTLLIBS="-lintl $libintl_extra_libs"
9400
 
      fi
9401
 
  
9402
 
      if test "$gt_cv_have_gettext" = "yes"; then
9403
 
        AC_DEFINE(HAVE_GETTEXT,1,
9404
 
          [Define if the GNU gettext() function is already present or preinstalled.])
9405
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
9406
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
9407
 
        if test "$MSGFMT" != "no"; then
9408
 
          glib_save_LIBS="$LIBS"
9409
 
          LIBS="$LIBS $INTLLIBS"
9410
 
          AC_CHECK_FUNCS(dcgettext)
9411
 
          MSGFMT_OPTS=
9412
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
9413
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
9414
 
msgid ""
9415
 
msgstr ""
9416
 
"Content-Type: text/plain; charset=UTF-8\n"
9417
 
"Project-Id-Version: test 1.0\n"
9418
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
9419
 
"Last-Translator: test <foo@bar.xx>\n"
9420
 
"Language-Team: C <LL@li.org>\n"
9421
 
"MIME-Version: 1.0\n"
9422
 
"Content-Transfer-Encoding: 8bit\n"
9423
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
9424
 
          AC_SUBST(MSGFMT_OPTS)
9425
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
9426
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
9427
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
9428
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
9429
 
                         return _nl_msg_cat_cntr],
9430
 
            [CATOBJEXT=.gmo 
9431
 
             DATADIRNAME=share],
9432
 
            [case $host in
9433
 
            *-*-solaris*)
9434
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
9435
 
            dnl GNU format message catalog is always supported,
9436
 
            dnl since both are added to the libc all together.
9437
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
9438
 
            dnl and CATOBJEXT=.gmo in this case.
9439
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
9440
 
              [CATOBJEXT=.gmo 
9441
 
               DATADIRNAME=share],
9442
 
              [CATOBJEXT=.mo
9443
 
               DATADIRNAME=lib])
9444
 
            ;;
9445
 
            *)
9446
 
            CATOBJEXT=.mo
9447
 
            DATADIRNAME=lib
9448
 
            ;;
9449
 
            esac])
9450
 
          LIBS="$glib_save_LIBS"
9451
 
          INSTOBJEXT=.mo
9452
 
        else
9453
 
          gt_cv_have_gettext=no
9454
 
        fi
9455
 
      fi
9456
 
    ])
9457
 
 
9458
 
    if test "$gt_cv_have_gettext" = "yes" ; then
9459
 
      AC_DEFINE(ENABLE_NLS, 1,
9460
 
        [always defined to indicate that i18n is enabled])
9461
 
    fi
9462
 
 
9463
 
    dnl Test whether we really found GNU xgettext.
9464
 
    if test "$XGETTEXT" != ":"; then
9465
 
      dnl If it is not GNU xgettext we define it as : so that the
9466
 
      dnl Makefiles still can work.
9467
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9468
 
        : ;
9469
 
      else
9470
 
        AC_MSG_RESULT(
9471
 
          [found xgettext program is not GNU xgettext; ignore it])
9472
 
        XGETTEXT=":"
9473
 
      fi
9474
 
    fi
9475
 
 
9476
 
    # We need to process the po/ directory.
9477
 
    POSUB=po
9478
 
 
9479
 
    AC_OUTPUT_COMMANDS(
9480
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
9481
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
9482
 
      esac])
9483
 
 
9484
 
    dnl These rules are solely for the distribution goal.  While doing this
9485
 
    dnl we only have to keep exactly one list of the available catalogs
9486
 
    dnl in configure.in.
9487
 
    for lang in $ALL_LINGUAS; do
9488
 
      GMOFILES="$GMOFILES $lang.gmo"
9489
 
      POFILES="$POFILES $lang.po"
9490
 
    done
9491
 
 
9492
 
    dnl Make all variables we use known to autoconf.
9493
 
    AC_SUBST(CATALOGS)
9494
 
    AC_SUBST(CATOBJEXT)
9495
 
    AC_SUBST(DATADIRNAME)
9496
 
    AC_SUBST(GMOFILES)
9497
 
    AC_SUBST(INSTOBJEXT)
9498
 
    AC_SUBST(INTLLIBS)
9499
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
9500
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
9501
 
    AC_SUBST(POFILES)
9502
 
    AC_SUBST(POSUB)
9503
 
  ])
9504
 
 
9505
 
# AM_GLIB_GNU_GETTEXT
9506
 
# -------------------
9507
 
# Do checks necessary for use of gettext. If a suitable implementation 
9508
 
# of gettext is found in either in libintl or in the C library,
9509
 
# it will set INTLLIBS to the libraries needed for use of gettext
9510
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
9511
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
9512
 
# on various variables needed by the Makefile.in.in installed by 
9513
 
# glib-gettextize.
9514
 
dnl
9515
 
glib_DEFUN([GLIB_GNU_GETTEXT],
9516
 
  [AC_REQUIRE([AC_PROG_CC])dnl
9517
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
9518
 
   
9519
 
   GLIB_LC_MESSAGES
9520
 
   GLIB_WITH_NLS
9521
 
 
9522
 
   if test "$gt_cv_have_gettext" = "yes"; then
9523
 
     if test "x$ALL_LINGUAS" = "x"; then
9524
 
       LINGUAS=
9525
 
     else
9526
 
       AC_MSG_CHECKING(for catalogs to be installed)
9527
 
       NEW_LINGUAS=
9528
 
       for presentlang in $ALL_LINGUAS; do
9529
 
         useit=no
9530
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
9531
 
           desiredlanguages="$LINGUAS"
9532
 
         else
9533
 
           desiredlanguages="$ALL_LINGUAS"
9534
 
         fi
9535
 
         for desiredlang in $desiredlanguages; do
9536
 
           # Use the presentlang catalog if desiredlang is
9537
 
           #   a. equal to presentlang, or
9538
 
           #   b. a variant of presentlang (because in this case,
9539
 
           #      presentlang can be used as a fallback for messages
9540
 
           #      which are not translated in the desiredlang catalog).
9541
 
           case "$desiredlang" in
9542
 
             "$presentlang"*) useit=yes;;
9543
 
           esac
9544
 
         done
9545
 
         if test $useit = yes; then
9546
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
9547
 
         fi
9548
 
       done
9549
 
       LINGUAS=$NEW_LINGUAS
9550
 
       AC_MSG_RESULT($LINGUAS)
9551
 
     fi
9552
 
 
9553
 
     dnl Construct list of names of catalog files to be constructed.
9554
 
     if test -n "$LINGUAS"; then
9555
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9556
 
     fi
9557
 
   fi
9558
 
 
9559
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
9560
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
9561
 
   dnl Try to locate is.
9562
 
   MKINSTALLDIRS=
9563
 
   if test -n "$ac_aux_dir"; then
9564
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9565
 
   fi
9566
 
   if test -z "$MKINSTALLDIRS"; then
9567
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9568
 
   fi
9569
 
   AC_SUBST(MKINSTALLDIRS)
9570
 
 
9571
 
   dnl Generate list of files to be processed by xgettext which will
9572
 
   dnl be included in po/Makefile.
9573
 
   test -d po || mkdir po
9574
 
   if test "x$srcdir" != "x."; then
9575
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9576
 
       posrcprefix="$srcdir/"
9577
 
     else
9578
 
       posrcprefix="../$srcdir/"
9579
 
     fi
9580
 
   else
9581
 
     posrcprefix="../"
9582
 
   fi
9583
 
   rm -f po/POTFILES
9584
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
9585
 
        < $srcdir/po/POTFILES.in > po/POTFILES
9586
 
  ])
9587
 
 
9588
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
9589
 
# -------------------------------
9590
 
# Define VARIABLE to the location where catalog files will
9591
 
# be installed by po/Makefile.
9592
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
9593
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
9594
 
glib_save_prefix="$prefix"
9595
 
glib_save_exec_prefix="$exec_prefix"
9596
 
glib_save_datarootdir="$datarootdir"
9597
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
9598
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
9599
 
datarootdir=`eval echo "${datarootdir}"`
9600
 
if test "x$CATOBJEXT" = "x.mo" ; then
9601
 
  localedir=`eval echo "${libdir}/locale"`
9602
 
else
9603
 
  localedir=`eval echo "${datadir}/locale"`
9604
 
fi
9605
 
prefix="$glib_save_prefix"
9606
 
exec_prefix="$glib_save_exec_prefix"
9607
 
datarootdir="$glib_save_datarootdir"
9608
 
AC_DEFINE_UNQUOTED($1, "$localedir",
9609
 
  [Define the location where the catalogs will be installed])
9610
 
])
9611
 
 
9612
 
dnl
9613
 
dnl Now the definitions that aclocal will find
9614
 
dnl
9615
 
ifdef(glib_configure_in,[],[
9616
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
9617
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
9618
 
])dnl
9619
 
 
9620
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
9621
 
9622
 
# Create a temporary file with TEST-FILE as its contents and pass the
9623
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
9624
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
9625
 
AC_DEFUN([GLIB_RUN_PROG],
9626
 
[cat >conftest.foo <<_ACEOF
9627
 
$2
9628
 
_ACEOF
9629
 
if AC_RUN_LOG([$1 conftest.foo]); then
9630
 
  m4_ifval([$3], [$3], [:])
9631
 
m4_ifvaln([$4], [else $4])dnl
9632
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
9633
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
9634
 
fi])
9635
 
 
9636
 
 
9637
 
dnl GNOME_COMPILE_WARNINGS
9638
 
dnl Turn on many useful compiler warnings
9639
 
dnl For now, only works on GCC
9640
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
9641
 
    dnl ******************************
9642
 
    dnl More compiler warnings
9643
 
    dnl ******************************
9644
 
 
9645
 
    AC_ARG_ENABLE(compile-warnings, 
9646
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
9647
 
                                 [Turn on compiler warnings]),,
9648
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
9649
 
 
9650
 
    warnCFLAGS=
9651
 
    if test "x$GCC" != xyes; then
9652
 
        enable_compile_warnings=no
9653
 
    fi
9654
 
 
9655
 
    warning_flags=
9656
 
    realsave_CFLAGS="$CFLAGS"
9657
 
 
9658
 
    case "$enable_compile_warnings" in
9659
 
    no)
9660
 
        warning_flags=
9661
 
        ;;
9662
 
    minimum)
9663
 
        warning_flags="-Wall"
9664
 
        ;;
9665
 
    yes)
9666
 
        warning_flags="-Wall -Wmissing-prototypes"
9667
 
        ;;
9668
 
    maximum|error)
9669
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
9670
 
        CFLAGS="$warning_flags $CFLAGS"
9671
 
        for option in -Wno-sign-compare; do
9672
 
                SAVE_CFLAGS="$CFLAGS"
9673
 
                CFLAGS="$CFLAGS $option"
9674
 
                AC_MSG_CHECKING([whether gcc understands $option])
9675
 
                AC_TRY_COMPILE([], [],
9676
 
                        has_option=yes,
9677
 
                        has_option=no,)
9678
 
                CFLAGS="$SAVE_CFLAGS"
9679
 
                AC_MSG_RESULT($has_option)
9680
 
                if test $has_option = yes; then
9681
 
                  warning_flags="$warning_flags $option"
9682
 
                fi
9683
 
                unset has_option
9684
 
                unset SAVE_CFLAGS
9685
 
        done
9686
 
        unset option
9687
 
        if test "$enable_compile_warnings" = "error" ; then
9688
 
            warning_flags="$warning_flags -Werror"
9689
 
        fi
9690
 
        ;;
9691
 
    *)
9692
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
9693
 
        ;;
9694
 
    esac
9695
 
    CFLAGS="$realsave_CFLAGS"
9696
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
9697
 
    AC_MSG_RESULT($warning_flags)
9698
 
 
9699
 
    AC_ARG_ENABLE(iso-c,
9700
 
                  AC_HELP_STRING([--enable-iso-c],
9701
 
                                 [Try to warn if code is not ISO C ]),,
9702
 
                  [enable_iso_c=no])
9703
 
 
9704
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
9705
 
    complCFLAGS=
9706
 
    if test "x$enable_iso_c" != "xno"; then
9707
 
        if test "x$GCC" = "xyes"; then
9708
 
        case " $CFLAGS " in
9709
 
            *[\ \       ]-ansi[\ \      ]*) ;;
9710
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
9711
 
        esac
9712
 
        case " $CFLAGS " in
9713
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
9714
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
9715
 
        esac
9716
 
        fi
9717
 
    fi
9718
 
    AC_MSG_RESULT($complCFLAGS)
9719
 
 
9720
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
9721
 
    AC_SUBST(WARN_CFLAGS)
9722
 
])
9723
 
 
9724
 
dnl For C++, do basically the same thing.
9725
 
 
9726
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
9727
 
  AC_ARG_ENABLE(cxx-warnings,
9728
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
9729
 
                               [Turn on compiler warnings.]),,
9730
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
9731
 
 
9732
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
9733
 
  warnCXXFLAGS=
9734
 
  if test "x$GXX" != xyes; then
9735
 
    enable_cxx_warnings=no
9736
 
  fi
9737
 
  if test "x$enable_cxx_warnings" != "xno"; then
9738
 
    if test "x$GXX" = "xyes"; then
9739
 
      case " $CXXFLAGS " in
9740
 
      *[\ \     ]-Wall[\ \      ]*) ;;
9741
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
9742
 
      esac
9743
 
 
9744
 
      ## -W is not all that useful.  And it cannot be controlled
9745
 
      ## with individual -Wno-xxx flags, unlike -Wall
9746
 
      if test "x$enable_cxx_warnings" = "xyes"; then
9747
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
9748
 
      fi
9749
 
    fi
9750
 
  fi
9751
 
  AC_MSG_RESULT($warnCXXFLAGS)
9752
 
 
9753
 
   AC_ARG_ENABLE(iso-cxx,
9754
 
                 AC_HELP_STRING([--enable-iso-cxx],
9755
 
                                [Try to warn if code is not ISO C++ ]),,
9756
 
                 [enable_iso_cxx=no])
9757
 
 
9758
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
9759
 
   complCXXFLAGS=
9760
 
   if test "x$enable_iso_cxx" != "xno"; then
9761
 
     if test "x$GXX" = "xyes"; then
9762
 
      case " $CXXFLAGS " in
9763
 
      *[\ \     ]-ansi[\ \      ]*) ;;
9764
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
9765
 
      esac
9766
 
 
9767
 
      case " $CXXFLAGS " in
9768
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
9769
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
9770
 
      esac
9771
 
     fi
9772
 
   fi
9773
 
  AC_MSG_RESULT($complCXXFLAGS)
9774
 
 
9775
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
9776
 
  AC_SUBST(WARN_CXXFLAGS)
9777
 
])
9778
 
 
9779
 
dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
9780
 
dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
9781
 
AC_DEFUN([GNOME_DOC_DEFINES],
9782
 
[
9783
 
AC_ARG_WITH([help-dir],
9784
 
  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
9785
 
  [with_help_dir='${datadir}/gnome/help'])
9786
 
HELP_DIR="$with_help_dir"
9787
 
AC_SUBST(HELP_DIR)
9788
 
 
9789
 
AC_ARG_WITH([omf-dir],
9790
 
  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
9791
 
  [with_omf_dir='${datadir}/omf'])
9792
 
OMF_DIR="$with_omf_dir"
9793
 
AC_SUBST(OMF_DIR)
9794
 
 
9795
 
AC_ARG_WITH([help-formats],
9796
 
  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
9797
 
  [with_help_formats=''])
9798
 
DOC_USER_FORMATS="$with_help_formats"
9799
 
AC_SUBST(DOC_USER_FORMATS)
9800
 
 
9801
 
AC_ARG_ENABLE([scrollkeeper],
9802
 
        [AC_HELP_STRING([--disable-scrollkeeper],
9803
 
                        [do not make updates to the scrollkeeper database])],,
9804
 
        enable_scrollkeeper=yes)
9805
 
AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
9806
 
 
9807
 
dnl disable scrollkeeper automatically for distcheck
9808
 
DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
9809
 
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
9810
 
 
9811
 
AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
9812
 
])
9813
 
 
9814
 
# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
9815
 
#
9816
 
AC_DEFUN([GNOME_DOC_INIT],
9817
 
[AC_REQUIRE([AC_PROG_LN_S])dnl
9818
 
 
9819
 
ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
9820
 
 
9821
 
AC_MSG_CHECKING([gnome-doc-utils >= $gdu_cv_version_required])
9822
 
PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
9823
 
        [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
9824
 
 
9825
 
if test "$gdu_cv_have_gdu" = "yes"; then
9826
 
        AC_MSG_RESULT([yes])
9827
 
        ifelse([$2],,[:],[$2])
9828
 
else
9829
 
        AC_MSG_RESULT([no])
9830
 
        ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
9831
 
fi
9832
 
 
9833
 
GNOME_DOC_DEFINES
9834
 
])
9835
 
 
9836
 
 
9837
 
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
9838
 
# serial 40 IT_PROG_INTLTOOL
9839
 
AC_DEFUN([IT_PROG_INTLTOOL], [
9840
 
AC_PREREQ([2.50])dnl
9841
 
AC_REQUIRE([AM_NLS])dnl
9842
 
 
9843
 
case "$am__api_version" in
9844
 
    1.[01234])
9845
 
        AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
9846
 
    ;;
9847
 
    *)
9848
 
    ;;
9849
 
esac
9850
 
 
9851
 
if test -n "$1"; then
9852
 
    AC_MSG_CHECKING([for intltool >= $1])
9853
 
 
9854
 
    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
9855
 
    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
9856
 
    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
9857
 
    ]
9858
 
    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
9859
 
    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
9860
 
        AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
9861
 
fi
9862
 
 
9863
 
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
9864
 
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
9865
 
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
9866
 
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
9867
 
    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
9868
 
fi
9869
 
 
9870
 
  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 $< [$]@' 
9871
 
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 $< [$]@' 
9872
 
     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 $< [$]@' 
9873
 
     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 $< [$]@' 
9874
 
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
9875
 
     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 $< [$]@' 
9876
 
   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 $< [$]@' 
9877
 
    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 $< [$]@' 
9878
 
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 $< [$]@' 
9879
 
       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 $< [$]@' 
9880
 
      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 $< [$]@' 
9881
 
      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
9882
 
      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 $< [$]@' 
9883
 
      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 $< [$]@' 
9884
 
    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 $< [$]@' 
9885
 
  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 $< [$]@' 
9886
 
    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 $< [$]@' 
9887
 
    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 $< [$]@'
9888
 
   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 $< [$]@'
9889
 
 
9890
 
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
9891
 
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
9892
 
_IT_SUBST(INTLTOOL_KEYS_RULE)
9893
 
_IT_SUBST(INTLTOOL_PROP_RULE)
9894
 
_IT_SUBST(INTLTOOL_OAF_RULE)
9895
 
_IT_SUBST(INTLTOOL_PONG_RULE)
9896
 
_IT_SUBST(INTLTOOL_SERVER_RULE)
9897
 
_IT_SUBST(INTLTOOL_SHEET_RULE)
9898
 
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
9899
 
_IT_SUBST(INTLTOOL_UI_RULE)
9900
 
_IT_SUBST(INTLTOOL_XAM_RULE)
9901
 
_IT_SUBST(INTLTOOL_KBD_RULE)
9902
 
_IT_SUBST(INTLTOOL_XML_RULE)
9903
 
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
9904
 
_IT_SUBST(INTLTOOL_CAVES_RULE)
9905
 
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
9906
 
_IT_SUBST(INTLTOOL_THEME_RULE)
9907
 
_IT_SUBST(INTLTOOL_SERVICE_RULE)
9908
 
_IT_SUBST(INTLTOOL_POLICY_RULE)
9909
 
 
9910
 
# Check the gettext tools to make sure they are GNU
9911
 
AC_PATH_PROG(XGETTEXT, xgettext)
9912
 
AC_PATH_PROG(MSGMERGE, msgmerge)
9913
 
AC_PATH_PROG(MSGFMT, msgfmt)
9914
 
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
9915
 
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
9916
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
9917
 
fi
9918
 
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
9919
 
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
9920
 
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
9921
 
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
9922
 
    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
9923
 
fi
9924
 
 
9925
 
AC_PATH_PROG(INTLTOOL_PERL, perl)
9926
 
if test -z "$INTLTOOL_PERL"; then
9927
 
   AC_MSG_ERROR([perl not found])
9928
 
fi
9929
 
AC_MSG_CHECKING([for perl >= 5.8.1])
9930
 
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
9931
 
if test $? -ne 0; then
9932
 
   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
9933
 
else
9934
 
   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
9935
 
   AC_MSG_RESULT([$IT_PERL_VERSION])
9936
 
fi
9937
 
if test "x$2" != "xno-xml"; then
9938
 
   AC_MSG_CHECKING([for XML::Parser])
9939
 
   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
9940
 
       AC_MSG_RESULT([ok])
9941
 
   else
9942
 
       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
9943
 
   fi
9944
 
fi
9945
 
 
9946
 
# Substitute ALL_LINGUAS so we can use it in po/Makefile
9947
 
AC_SUBST(ALL_LINGUAS)
9948
 
 
9949
 
# Set DATADIRNAME correctly if it is not set yet
9950
 
# (copied from glib-gettext.m4)
9951
 
if test -z "$DATADIRNAME"; then
9952
 
  AC_LINK_IFELSE(
9953
 
    [AC_LANG_PROGRAM([[]],
9954
 
                     [[extern int _nl_msg_cat_cntr;
9955
 
                       return _nl_msg_cat_cntr]])],
9956
 
    [DATADIRNAME=share],
9957
 
    [case $host in
9958
 
    *-*-solaris*)
9959
 
    dnl On Solaris, if bind_textdomain_codeset is in libc,
9960
 
    dnl GNU format message catalog is always supported,
9961
 
    dnl since both are added to the libc all together.
9962
 
    dnl Hence, we'd like to go with DATADIRNAME=share
9963
 
    dnl in this case.
9964
 
    AC_CHECK_FUNC(bind_textdomain_codeset,
9965
 
      [DATADIRNAME=share], [DATADIRNAME=lib])
9966
 
    ;;
9967
 
    *)
9968
 
    [DATADIRNAME=lib]
9969
 
    ;;
9970
 
    esac])
9971
 
fi
9972
 
AC_SUBST(DATADIRNAME)
9973
 
 
9974
 
IT_PO_SUBDIR([po])
9975
 
 
9976
 
])
9977
 
 
9978
 
 
9979
 
# IT_PO_SUBDIR(DIRNAME)
9980
 
# ---------------------
9981
 
# All po subdirs have to be declared with this macro; the subdir "po" is
9982
 
# declared by IT_PROG_INTLTOOL.
9983
 
#
9984
 
AC_DEFUN([IT_PO_SUBDIR],
9985
 
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
9986
 
dnl
9987
 
dnl The following CONFIG_COMMANDS should be exetuted at the very end
9988
 
dnl of config.status.
9989
 
AC_CONFIG_COMMANDS_PRE([
9990
 
  AC_CONFIG_COMMANDS([$1/stamp-it], [
9991
 
    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
9992
 
       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
9993
 
    fi
9994
 
    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
9995
 
    >"$1/stamp-it.tmp"
9996
 
    [sed '/^#/d
9997
 
         s/^[[].*] *//
9998
 
         /^[    ]*$/d
9999
 
        '"s|^|  $ac_top_srcdir/|" \
10000
 
      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
10001
 
    ]
10002
 
    [sed '/^POTFILES =/,/[^\\]$/ {
10003
 
                /^POTFILES =/!d
10004
 
                r $1/POTFILES
10005
 
          }
10006
 
         ' "$1/Makefile.in" >"$1/Makefile"]
10007
 
    rm -f "$1/Makefile.tmp"
10008
 
    mv "$1/stamp-it.tmp" "$1/stamp-it"
10009
 
  ])
10010
 
])dnl
10011
 
])
10012
 
 
10013
 
# _IT_SUBST(VARIABLE)
10014
 
# -------------------
10015
 
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
10016
 
#
10017
 
AC_DEFUN([_IT_SUBST],
10018
 
[
10019
 
AC_SUBST([$1])
10020
 
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
10021
 
]
10022
 
)
10023
 
 
10024
 
# deprecated macros
10025
 
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
10026
 
# A hint is needed for aclocal from Automake <= 1.9.4:
10027
 
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
10028
 
 
10029