~ubuntu-branches/ubuntu/hardy/gdm/hardy-updates

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-03-11 22:31:15 UTC
  • mfrom: (1.4.24 upstream)
  • Revision ID: james.westby@ubuntu.com-20080311223115-px728qtz2e2sgs3o
Tags: 2.20.4-0ubuntu1
* New upstream version:
  - The Custom Widgetry code in gdmgreeter was broken, and would not create
    the /var/lib/$DISPLAY.GreeterInfo file properly.  Due to the move away
    from vicious-extensions and towards GKeyFile, the format of this file
    changed slightly to INI format with the [GreeterInfo] group.  The docs
    were modified to explain this change.
  - Now the default local and remote welcome strings ("Welcome" and
    "Welcome to %n") are translated.
  - If the user picks the default local welcome string to be used as the
    remote welcome string, or vice versa, then the strings will be
    translated also.
  - Get default locale from LC_MESSAGES rather than from g_get_language_names.
  - Honor GTK+ default password character rather than hardcoding to '*'.  The
    docs were modified to explain this change.  Fixes bug #477881.
  - Provide better tooltip for entry field in gdmgreeter.
  - Get the environment variable XDG_DATA_DIRS before clearing the 
    environment variables.  This way if the user sets XDG_DATA_DIRS before
    running GDM, this should now be honored.
  - Fix gdmsetup bug that was causing the Welcome (local and remote)
    message to not be saved properly when changed.
  - Fix the setting of the custom command NOTIFY key to avoid crashing when
    changing the label values of a custom command in gdmsetup.
  - Add include of "gdm-log.h" to daemon/verify-crypt.c and
    daemon/verify-shadow.c to fix compile issue on some platforms.
* debian/patches/11_powermanagement.patch:
  - new version update
* debian/patches/35_gdm.conf.patch:
  - new version update
* debian/patches/36_use_correct_locale.patch:
  - dropped, fixed in the new version
* debian/patches/70_mandatory-relibtoolize.patch:
  - new version update

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
You have another version of autoconf.  If you want to use that,
17
17
you should regenerate the build system entirely.], [63])])
18
18
 
19
 
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
20
 
#
21
 
# This file is free software; the Free Software Foundation
22
 
# gives unlimited permission to copy and/or distribute it,
23
 
# with or without modifications, as long as this notice is preserved.
24
 
 
25
 
# AM_AUTOMAKE_VERSION(VERSION)
26
 
# ----------------------------
27
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
28
 
# generated from the m4 files accompanying Automake X.Y.
29
 
# (This private macro should not be called outside this file.)
30
 
AC_DEFUN([AM_AUTOMAKE_VERSION],
31
 
[am__api_version='1.10'
32
 
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
33
 
dnl require some minimum version.  Point them to the right macro.
34
 
m4_if([$1], [1.10], [],
35
 
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
36
 
])
37
 
 
38
 
# _AM_AUTOCONF_VERSION(VERSION)
39
 
# -----------------------------
40
 
# aclocal traces this macro to find the Autoconf version.
41
 
# This is a private macro too.  Using m4_define simplifies
42
 
# the logic in aclocal, which can simply ignore this definition.
43
 
m4_define([_AM_AUTOCONF_VERSION], [])
44
 
 
45
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
46
 
# -------------------------------
47
 
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
48
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
49
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
50
 
[AM_AUTOMAKE_VERSION([1.10])dnl
51
 
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
52
 
 
53
 
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
54
 
 
55
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
56
 
#
57
 
# This file is free software; the Free Software Foundation
58
 
# gives unlimited permission to copy and/or distribute it,
59
 
# with or without modifications, as long as this notice is preserved.
60
 
 
61
 
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
62
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
63
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
64
 
#
65
 
# Of course, Automake must honor this variable whenever it calls a
66
 
# tool from the auxiliary directory.  The problem is that $srcdir (and
67
 
# therefore $ac_aux_dir as well) can be either absolute or relative,
68
 
# depending on how configure is run.  This is pretty annoying, since
69
 
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
70
 
# source directory, any form will work fine, but in subdirectories a
71
 
# relative path needs to be adjusted first.
72
 
#
73
 
# $ac_aux_dir/missing
74
 
#    fails when called from a subdirectory if $ac_aux_dir is relative
75
 
# $top_srcdir/$ac_aux_dir/missing
76
 
#    fails if $ac_aux_dir is absolute,
77
 
#    fails when called from a subdirectory in a VPATH build with
78
 
#          a relative $ac_aux_dir
79
 
#
80
 
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
81
 
# are both prefixed by $srcdir.  In an in-source build this is usually
82
 
# harmless because $srcdir is `.', but things will broke when you
83
 
# start a VPATH build or use an absolute $srcdir.
84
 
#
85
 
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
86
 
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
87
 
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
88
 
# and then we would define $MISSING as
89
 
#   MISSING="\${SHELL} $am_aux_dir/missing"
90
 
# This will work as long as MISSING is not called from configure, because
91
 
# unfortunately $(top_srcdir) has no meaning in configure.
92
 
# However there are other variables, like CC, which are often used in
93
 
# configure, and could therefore not use this "fixed" $ac_aux_dir.
94
 
#
95
 
# Another solution, used here, is to always expand $ac_aux_dir to an
96
 
# absolute PATH.  The drawback is that using absolute paths prevent a
97
 
# configured tree to be moved without reconfiguration.
98
 
 
99
 
AC_DEFUN([AM_AUX_DIR_EXPAND],
100
 
[dnl Rely on autoconf to set up CDPATH properly.
101
 
AC_PREREQ([2.50])dnl
102
 
# expand $ac_aux_dir to an absolute path
103
 
am_aux_dir=`cd $ac_aux_dir && pwd`
104
 
])
105
 
 
106
 
# AM_CONDITIONAL                                            -*- Autoconf -*-
107
 
 
108
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
109
 
# Free Software Foundation, Inc.
110
 
#
111
 
# This file is free software; the Free Software Foundation
112
 
# gives unlimited permission to copy and/or distribute it,
113
 
# with or without modifications, as long as this notice is preserved.
114
 
 
115
 
# serial 8
116
 
 
117
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
118
 
# -------------------------------------
119
 
# Define a conditional.
120
 
AC_DEFUN([AM_CONDITIONAL],
121
 
[AC_PREREQ(2.52)dnl
122
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
123
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
124
 
AC_SUBST([$1_TRUE])dnl
125
 
AC_SUBST([$1_FALSE])dnl
126
 
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
127
 
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
128
 
if $2; then
129
 
  $1_TRUE=
130
 
  $1_FALSE='#'
131
 
else
132
 
  $1_TRUE='#'
133
 
  $1_FALSE=
134
 
fi
135
 
AC_CONFIG_COMMANDS_PRE(
136
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
137
 
  AC_MSG_ERROR([[conditional "$1" was never defined.
138
 
Usually this means the macro was only invoked conditionally.]])
139
 
fi])])
140
 
 
141
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
142
 
# Free Software Foundation, Inc.
143
 
#
144
 
# This file is free software; the Free Software Foundation
145
 
# gives unlimited permission to copy and/or distribute it,
146
 
# with or without modifications, as long as this notice is preserved.
147
 
 
148
 
# serial 9
149
 
 
150
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
151
 
# written in clear, in which case automake, when reading aclocal.m4,
152
 
# will think it sees a *use*, and therefore will trigger all it's
153
 
# C support machinery.  Also note that it means that autoscan, seeing
154
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
155
 
 
156
 
 
157
 
# _AM_DEPENDENCIES(NAME)
158
 
# ----------------------
159
 
# See how the compiler implements dependency checking.
160
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
161
 
# We try a few techniques and use that to set a single cache variable.
162
 
#
163
 
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
164
 
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
165
 
# dependency, and given that the user is not expected to run this macro,
166
 
# just rely on AC_PROG_CC.
167
 
AC_DEFUN([_AM_DEPENDENCIES],
168
 
[AC_REQUIRE([AM_SET_DEPDIR])dnl
169
 
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
170
 
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
171
 
AC_REQUIRE([AM_DEP_TRACK])dnl
172
 
 
173
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
174
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
175
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
176
 
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
177
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
178
 
                   [depcc="$$1"   am_compiler_list=])
179
 
 
180
 
AC_CACHE_CHECK([dependency style of $depcc],
181
 
               [am_cv_$1_dependencies_compiler_type],
182
 
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
183
 
  # We make a subdir and do the tests there.  Otherwise we can end up
184
 
  # making bogus files that we don't know about and never remove.  For
185
 
  # instance it was reported that on HP-UX the gcc test will end up
186
 
  # making a dummy file named `D' -- because `-MD' means `put the output
187
 
  # in D'.
188
 
  mkdir conftest.dir
189
 
  # Copy depcomp to subdir because otherwise we won't find it if we're
190
 
  # using a relative directory.
191
 
  cp "$am_depcomp" conftest.dir
192
 
  cd conftest.dir
193
 
  # We will build objects and dependencies in a subdirectory because
194
 
  # it helps to detect inapplicable dependency modes.  For instance
195
 
  # both Tru64's cc and ICC support -MD to output dependencies as a
196
 
  # side effect of compilation, but ICC will put the dependencies in
197
 
  # the current directory while Tru64 will put them in the object
198
 
  # directory.
199
 
  mkdir sub
200
 
 
201
 
  am_cv_$1_dependencies_compiler_type=none
202
 
  if test "$am_compiler_list" = ""; then
203
 
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
204
 
  fi
205
 
  for depmode in $am_compiler_list; do
206
 
    # Setup a source with many dependencies, because some compilers
207
 
    # like to wrap large dependency lists on column 80 (with \), and
208
 
    # we should not choose a depcomp mode which is confused by this.
209
 
    #
210
 
    # We need to recreate these files for each test, as the compiler may
211
 
    # overwrite some of them when testing with obscure command lines.
212
 
    # This happens at least with the AIX C compiler.
213
 
    : > sub/conftest.c
214
 
    for i in 1 2 3 4 5 6; do
215
 
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
216
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
217
 
      # Solaris 8's {/usr,}/bin/sh.
218
 
      touch sub/conftst$i.h
219
 
    done
220
 
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
221
 
 
222
 
    case $depmode in
223
 
    nosideeffect)
224
 
      # after this tag, mechanisms are not by side-effect, so they'll
225
 
      # only be used when explicitly requested
226
 
      if test "x$enable_dependency_tracking" = xyes; then
227
 
        continue
228
 
      else
229
 
        break
230
 
      fi
231
 
      ;;
232
 
    none) break ;;
233
 
    esac
234
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
235
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
236
 
    # handle `-M -o', and we need to detect this.
237
 
    if depmode=$depmode \
238
 
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
239
 
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
240
 
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
241
 
         >/dev/null 2>conftest.err &&
242
 
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
243
 
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
244
 
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
245
 
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
246
 
      # icc doesn't choke on unknown options, it will just issue warnings
247
 
      # or remarks (even with -Werror).  So we grep stderr for any message
248
 
      # that says an option was ignored or not supported.
249
 
      # When given -MP, icc 7.0 and 7.1 complain thusly:
250
 
      #   icc: Command line warning: ignoring option '-M'; no argument required
251
 
      # The diagnosis changed in icc 8.0:
252
 
      #   icc: Command line remark: option '-MP' not supported
253
 
      if (grep 'ignoring option' conftest.err ||
254
 
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
255
 
        am_cv_$1_dependencies_compiler_type=$depmode
256
 
        break
257
 
      fi
258
 
    fi
259
 
  done
260
 
 
261
 
  cd ..
262
 
  rm -rf conftest.dir
263
 
else
264
 
  am_cv_$1_dependencies_compiler_type=none
265
 
fi
266
 
])
267
 
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
268
 
AM_CONDITIONAL([am__fastdep$1], [
269
 
  test "x$enable_dependency_tracking" != xno \
270
 
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
271
 
])
272
 
 
273
 
 
274
 
# AM_SET_DEPDIR
275
 
# -------------
276
 
# Choose a directory name for dependency files.
277
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
278
 
AC_DEFUN([AM_SET_DEPDIR],
279
 
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
280
 
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
281
 
])
282
 
 
283
 
 
284
 
# AM_DEP_TRACK
285
 
# ------------
286
 
AC_DEFUN([AM_DEP_TRACK],
287
 
[AC_ARG_ENABLE(dependency-tracking,
288
 
[  --disable-dependency-tracking  speeds up one-time build
289
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
290
 
if test "x$enable_dependency_tracking" != xno; then
291
 
  am_depcomp="$ac_aux_dir/depcomp"
292
 
  AMDEPBACKSLASH='\'
293
 
fi
294
 
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
295
 
AC_SUBST([AMDEPBACKSLASH])dnl
296
 
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
297
 
])
298
 
 
299
 
# Generate code to set up dependency tracking.              -*- Autoconf -*-
300
 
 
301
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
302
 
# Free Software Foundation, Inc.
303
 
#
304
 
# This file is free software; the Free Software Foundation
305
 
# gives unlimited permission to copy and/or distribute it,
306
 
# with or without modifications, as long as this notice is preserved.
307
 
 
308
 
#serial 3
309
 
 
310
 
# _AM_OUTPUT_DEPENDENCY_COMMANDS
311
 
# ------------------------------
312
 
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
313
 
[for mf in $CONFIG_FILES; do
314
 
  # Strip MF so we end up with the name of the file.
315
 
  mf=`echo "$mf" | sed -e 's/:.*$//'`
316
 
  # Check whether this is an Automake generated Makefile or not.
317
 
  # We used to match only the files named `Makefile.in', but
318
 
  # some people rename them; so instead we look at the file content.
319
 
  # Grep'ing the first line is not enough: some people post-process
320
 
  # each Makefile.in and add a new line on top of each file to say so.
321
 
  # Grep'ing the whole file is not good either: AIX grep has a line
322
 
  # limit of 2048, but all sed's we know have understand at least 4000.
323
 
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
324
 
    dirpart=`AS_DIRNAME("$mf")`
325
 
  else
326
 
    continue
327
 
  fi
328
 
  # Extract the definition of DEPDIR, am__include, and am__quote
329
 
  # from the Makefile without running `make'.
330
 
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
331
 
  test -z "$DEPDIR" && continue
332
 
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
333
 
  test -z "am__include" && continue
334
 
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
335
 
  # When using ansi2knr, U may be empty or an underscore; expand it
336
 
  U=`sed -n 's/^U = //p' < "$mf"`
337
 
  # Find all dependency output files, they are included files with
338
 
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
339
 
  # simplest approach to changing $(DEPDIR) to its actual value in the
340
 
  # expansion.
341
 
  for file in `sed -n "
342
 
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
343
 
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
344
 
    # Make sure the directory exists.
345
 
    test -f "$dirpart/$file" && continue
346
 
    fdir=`AS_DIRNAME(["$file"])`
347
 
    AS_MKDIR_P([$dirpart/$fdir])
348
 
    # echo "creating $dirpart/$file"
349
 
    echo '# dummy' > "$dirpart/$file"
350
 
  done
351
 
done
352
 
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
353
 
 
354
 
 
355
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
356
 
# -----------------------------
357
 
# This macro should only be invoked once -- use via AC_REQUIRE.
358
 
#
359
 
# This code is only required when automatic dependency tracking
360
 
# is enabled.  FIXME.  This creates each `.P' file that we will
361
 
# need in order to bootstrap the dependency handling code.
362
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
363
 
[AC_CONFIG_COMMANDS([depfiles],
364
 
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
365
 
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
366
 
])
367
 
 
368
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
369
 
# Free Software Foundation, Inc.
370
 
#
371
 
# This file is free software; the Free Software Foundation
372
 
# gives unlimited permission to copy and/or distribute it,
373
 
# with or without modifications, as long as this notice is preserved.
374
 
 
375
 
# serial 8
376
 
 
377
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
378
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
379
 
 
380
 
# Do all the work for Automake.                             -*- Autoconf -*-
381
 
 
382
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
383
 
# 2005, 2006 Free Software Foundation, Inc.
384
 
#
385
 
# This file is free software; the Free Software Foundation
386
 
# gives unlimited permission to copy and/or distribute it,
387
 
# with or without modifications, as long as this notice is preserved.
388
 
 
389
 
# serial 12
390
 
 
391
 
# This macro actually does too much.  Some checks are only needed if
392
 
# your package does certain things.  But this isn't really a big deal.
393
 
 
394
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
395
 
# AM_INIT_AUTOMAKE([OPTIONS])
396
 
# -----------------------------------------------
397
 
# The call with PACKAGE and VERSION arguments is the old style
398
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
399
 
# and VERSION should now be passed to AC_INIT and removed from
400
 
# the call to AM_INIT_AUTOMAKE.
401
 
# We support both call styles for the transition.  After
402
 
# the next Automake release, Autoconf can make the AC_INIT
403
 
# arguments mandatory, and then we can depend on a new Autoconf
404
 
# release and drop the old call support.
405
 
AC_DEFUN([AM_INIT_AUTOMAKE],
406
 
[AC_PREREQ([2.60])dnl
407
 
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
408
 
dnl the ones we care about.
409
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
410
 
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
411
 
AC_REQUIRE([AC_PROG_INSTALL])dnl
412
 
if test "`cd $srcdir && pwd`" != "`pwd`"; then
413
 
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
414
 
  # is not polluted with repeated "-I."
415
 
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
416
 
  # test to see if srcdir already configured
417
 
  if test -f $srcdir/config.status; then
418
 
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
419
 
  fi
420
 
fi
421
 
 
422
 
# test whether we have cygpath
423
 
if test -z "$CYGPATH_W"; then
424
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
425
 
    CYGPATH_W='cygpath -w'
426
 
  else
427
 
    CYGPATH_W=echo
428
 
  fi
429
 
fi
430
 
AC_SUBST([CYGPATH_W])
431
 
 
432
 
# Define the identity of the package.
433
 
dnl Distinguish between old-style and new-style calls.
434
 
m4_ifval([$2],
435
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
436
 
 AC_SUBST([PACKAGE], [$1])dnl
437
 
 AC_SUBST([VERSION], [$2])],
438
 
[_AM_SET_OPTIONS([$1])dnl
439
 
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
440
 
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
441
 
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
442
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
443
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
444
 
 
445
 
_AM_IF_OPTION([no-define],,
446
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
447
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
448
 
 
449
 
# Some tools Automake needs.
450
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
451
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
452
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
453
 
AM_MISSING_PROG(AUTOCONF, autoconf)
454
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
455
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
456
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
457
 
AM_PROG_INSTALL_SH
458
 
AM_PROG_INSTALL_STRIP
459
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
460
 
# We need awk for the "check" target.  The system "awk" is bad on
461
 
# some platforms.
462
 
AC_REQUIRE([AC_PROG_AWK])dnl
463
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
464
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
465
 
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
466
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
467
 
                             [_AM_PROG_TAR([v7])])])
468
 
_AM_IF_OPTION([no-dependencies],,
469
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
470
 
                  [_AM_DEPENDENCIES(CC)],
471
 
                  [define([AC_PROG_CC],
472
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
473
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
474
 
                  [_AM_DEPENDENCIES(CXX)],
475
 
                  [define([AC_PROG_CXX],
476
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
477
 
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
478
 
                  [_AM_DEPENDENCIES(OBJC)],
479
 
                  [define([AC_PROG_OBJC],
480
 
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
481
 
])
482
 
])
483
 
 
484
 
 
485
 
# When config.status generates a header, we must update the stamp-h file.
486
 
# This file resides in the same directory as the config header
487
 
# that is generated.  The stamp files are numbered to have different names.
488
 
 
489
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
490
 
# loop where config.status creates the headers, so we can generate
491
 
# our stamp files there.
492
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
493
 
[# Compute $1's index in $config_headers.
494
 
_am_stamp_count=1
495
 
for _am_header in $config_headers :; do
496
 
  case $_am_header in
497
 
    $1 | $1:* )
498
 
      break ;;
499
 
    * )
500
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
501
 
  esac
502
 
done
503
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
504
 
 
505
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
506
 
#
507
 
# This file is free software; the Free Software Foundation
508
 
# gives unlimited permission to copy and/or distribute it,
509
 
# with or without modifications, as long as this notice is preserved.
510
 
 
511
 
# AM_PROG_INSTALL_SH
512
 
# ------------------
513
 
# Define $install_sh.
514
 
AC_DEFUN([AM_PROG_INSTALL_SH],
515
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
516
 
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
517
 
AC_SUBST(install_sh)])
518
 
 
519
 
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
520
 
#
521
 
# This file is free software; the Free Software Foundation
522
 
# gives unlimited permission to copy and/or distribute it,
523
 
# with or without modifications, as long as this notice is preserved.
524
 
 
525
 
# serial 2
526
 
 
527
 
# Check whether the underlying file-system supports filenames
528
 
# with a leading dot.  For instance MS-DOS doesn't.
529
 
AC_DEFUN([AM_SET_LEADING_DOT],
530
 
[rm -rf .tst 2>/dev/null
531
 
mkdir .tst 2>/dev/null
532
 
if test -d .tst; then
533
 
  am__leading_dot=.
534
 
else
535
 
  am__leading_dot=_
536
 
fi
537
 
rmdir .tst 2>/dev/null
538
 
AC_SUBST([am__leading_dot])])
539
 
 
540
 
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
541
 
# From Jim Meyering
542
 
 
543
 
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
544
 
# Free Software Foundation, Inc.
545
 
#
546
 
# This file is free software; the Free Software Foundation
547
 
# gives unlimited permission to copy and/or distribute it,
548
 
# with or without modifications, as long as this notice is preserved.
549
 
 
550
 
# serial 4
551
 
 
552
 
AC_DEFUN([AM_MAINTAINER_MODE],
553
 
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
554
 
  dnl maintainer-mode is disabled by default
555
 
  AC_ARG_ENABLE(maintainer-mode,
556
 
[  --enable-maintainer-mode  enable make rules and dependencies not useful
557
 
                          (and sometimes confusing) to the casual installer],
558
 
      USE_MAINTAINER_MODE=$enableval,
559
 
      USE_MAINTAINER_MODE=no)
560
 
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
561
 
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
562
 
  MAINT=$MAINTAINER_MODE_TRUE
563
 
  AC_SUBST(MAINT)dnl
564
 
]
565
 
)
566
 
 
567
 
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
568
 
 
569
 
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
570
 
 
571
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
572
 
#
573
 
# This file is free software; the Free Software Foundation
574
 
# gives unlimited permission to copy and/or distribute it,
575
 
# with or without modifications, as long as this notice is preserved.
576
 
 
577
 
# serial 3
578
 
 
579
 
# AM_MAKE_INCLUDE()
580
 
# -----------------
581
 
# Check to see how make treats includes.
582
 
AC_DEFUN([AM_MAKE_INCLUDE],
583
 
[am_make=${MAKE-make}
584
 
cat > confinc << 'END'
585
 
am__doit:
586
 
        @echo done
587
 
.PHONY: am__doit
588
 
END
589
 
# If we don't find an include directive, just comment out the code.
590
 
AC_MSG_CHECKING([for style of include used by $am_make])
591
 
am__include="#"
592
 
am__quote=
593
 
_am_result=none
594
 
# First try GNU make style include.
595
 
echo "include confinc" > confmf
596
 
# We grep out `Entering directory' and `Leaving directory'
597
 
# messages which can occur if `w' ends up in MAKEFLAGS.
598
 
# In particular we don't look at `^make:' because GNU make might
599
 
# be invoked under some other name (usually "gmake"), in which
600
 
# case it prints its new name instead of `make'.
601
 
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
602
 
   am__include=include
603
 
   am__quote=
604
 
   _am_result=GNU
605
 
fi
606
 
# Now try BSD make style include.
607
 
if test "$am__include" = "#"; then
608
 
   echo '.include "confinc"' > confmf
609
 
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
610
 
      am__include=.include
611
 
      am__quote="\""
612
 
      _am_result=BSD
613
 
   fi
614
 
fi
615
 
AC_SUBST([am__include])
616
 
AC_SUBST([am__quote])
617
 
AC_MSG_RESULT([$_am_result])
618
 
rm -f confinc confmf
619
 
])
620
 
 
621
 
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
622
 
 
623
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
624
 
# Free Software Foundation, Inc.
625
 
#
626
 
# This file is free software; the Free Software Foundation
627
 
# gives unlimited permission to copy and/or distribute it,
628
 
# with or without modifications, as long as this notice is preserved.
629
 
 
630
 
# serial 5
631
 
 
632
 
# AM_MISSING_PROG(NAME, PROGRAM)
633
 
# ------------------------------
634
 
AC_DEFUN([AM_MISSING_PROG],
635
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
636
 
$1=${$1-"${am_missing_run}$2"}
637
 
AC_SUBST($1)])
638
 
 
639
 
 
640
 
# AM_MISSING_HAS_RUN
641
 
# ------------------
642
 
# Define MISSING if not defined so far and test if it supports --run.
643
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
644
 
AC_DEFUN([AM_MISSING_HAS_RUN],
645
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
646
 
AC_REQUIRE_AUX_FILE([missing])dnl
647
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
648
 
# Use eval to expand $SHELL
649
 
if eval "$MISSING --run true"; then
650
 
  am_missing_run="$MISSING --run "
651
 
else
652
 
  am_missing_run=
653
 
  AC_MSG_WARN([`missing' script is too old or missing])
654
 
fi
655
 
])
656
 
 
657
 
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
658
 
#
659
 
# This file is free software; the Free Software Foundation
660
 
# gives unlimited permission to copy and/or distribute it,
661
 
# with or without modifications, as long as this notice is preserved.
662
 
 
663
 
# AM_PROG_MKDIR_P
664
 
# ---------------
665
 
# Check for `mkdir -p'.
666
 
AC_DEFUN([AM_PROG_MKDIR_P],
667
 
[AC_PREREQ([2.60])dnl
668
 
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
669
 
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
670
 
dnl while keeping a definition of mkdir_p for backward compatibility.
671
 
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
672
 
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
673
 
dnl Makefile.ins that do not define MKDIR_P, so we do our own
674
 
dnl adjustment using top_builddir (which is defined more often than
675
 
dnl MKDIR_P).
676
 
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
677
 
case $mkdir_p in
678
 
  [[\\/$]]* | ?:[[\\/]]*) ;;
679
 
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
680
 
esac
681
 
])
682
 
 
683
 
# Helper functions for option handling.                     -*- Autoconf -*-
684
 
 
685
 
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
686
 
#
687
 
# This file is free software; the Free Software Foundation
688
 
# gives unlimited permission to copy and/or distribute it,
689
 
# with or without modifications, as long as this notice is preserved.
690
 
 
691
 
# serial 3
692
 
 
693
 
# _AM_MANGLE_OPTION(NAME)
694
 
# -----------------------
695
 
AC_DEFUN([_AM_MANGLE_OPTION],
696
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
697
 
 
698
 
# _AM_SET_OPTION(NAME)
699
 
# ------------------------------
700
 
# Set option NAME.  Presently that only means defining a flag for this option.
701
 
AC_DEFUN([_AM_SET_OPTION],
702
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
703
 
 
704
 
# _AM_SET_OPTIONS(OPTIONS)
705
 
# ----------------------------------
706
 
# OPTIONS is a space-separated list of Automake options.
707
 
AC_DEFUN([_AM_SET_OPTIONS],
708
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
709
 
 
710
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
711
 
# -------------------------------------------
712
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
713
 
AC_DEFUN([_AM_IF_OPTION],
714
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
715
 
 
716
 
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
717
 
 
718
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
719
 
# Free Software Foundation, Inc.
720
 
#
721
 
# This file is free software; the Free Software Foundation
722
 
# gives unlimited permission to copy and/or distribute it,
723
 
# with or without modifications, as long as this notice is preserved.
724
 
 
725
 
# serial 4
726
 
 
727
 
# AM_SANITY_CHECK
728
 
# ---------------
729
 
AC_DEFUN([AM_SANITY_CHECK],
730
 
[AC_MSG_CHECKING([whether build environment is sane])
731
 
# Just in case
732
 
sleep 1
733
 
echo timestamp > conftest.file
734
 
# Do `set' in a subshell so we don't clobber the current shell's
735
 
# arguments.  Must try -L first in case configure is actually a
736
 
# symlink; some systems play weird games with the mod time of symlinks
737
 
# (eg FreeBSD returns the mod time of the symlink's containing
738
 
# directory).
739
 
if (
740
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
741
 
   if test "$[*]" = "X"; then
742
 
      # -L didn't work.
743
 
      set X `ls -t $srcdir/configure conftest.file`
744
 
   fi
745
 
   rm -f conftest.file
746
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
747
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
748
 
 
749
 
      # If neither matched, then we have a broken ls.  This can happen
750
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
751
 
      # broken ls alias from the environment.  This has actually
752
 
      # happened.  Such a system could not be considered "sane".
753
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
754
 
alias in your environment])
755
 
   fi
756
 
 
757
 
   test "$[2]" = conftest.file
758
 
   )
759
 
then
760
 
   # Ok.
761
 
   :
762
 
else
763
 
   AC_MSG_ERROR([newly created file is older than distributed files!
764
 
Check your system clock])
765
 
fi
766
 
AC_MSG_RESULT(yes)])
767
 
 
768
 
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
769
 
#
770
 
# This file is free software; the Free Software Foundation
771
 
# gives unlimited permission to copy and/or distribute it,
772
 
# with or without modifications, as long as this notice is preserved.
773
 
 
774
 
# AM_PROG_INSTALL_STRIP
775
 
# ---------------------
776
 
# One issue with vendor `install' (even GNU) is that you can't
777
 
# specify the program used to strip binaries.  This is especially
778
 
# annoying in cross-compiling environments, where the build's strip
779
 
# is unlikely to handle the host's binaries.
780
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
781
 
# always use install-sh in `make install-strip', and initialize
782
 
# STRIPPROG with the value of the STRIP variable (set by the user).
783
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
784
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
785
 
# Installed binaries are usually stripped using `strip' when the user
786
 
# run `make install-strip'.  However `strip' might not be the right
787
 
# tool to use in cross-compilation environments, therefore Automake
788
 
# will honor the `STRIP' environment variable to overrule this program.
789
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
790
 
if test "$cross_compiling" != no; then
791
 
  AC_CHECK_TOOL([STRIP], [strip], :)
792
 
fi
793
 
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
794
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
795
 
 
796
 
# Copyright (C) 2006  Free Software Foundation, Inc.
797
 
#
798
 
# This file is free software; the Free Software Foundation
799
 
# gives unlimited permission to copy and/or distribute it,
800
 
# with or without modifications, as long as this notice is preserved.
801
 
 
802
 
# _AM_SUBST_NOTMAKE(VARIABLE)
803
 
# ---------------------------
804
 
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
805
 
# This macro is traced by Automake.
806
 
AC_DEFUN([_AM_SUBST_NOTMAKE])
807
 
 
808
 
# Check how to create a tarball.                            -*- Autoconf -*-
809
 
 
810
 
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
811
 
#
812
 
# This file is free software; the Free Software Foundation
813
 
# gives unlimited permission to copy and/or distribute it,
814
 
# with or without modifications, as long as this notice is preserved.
815
 
 
816
 
# serial 2
817
 
 
818
 
# _AM_PROG_TAR(FORMAT)
819
 
# --------------------
820
 
# Check how to create a tarball in format FORMAT.
821
 
# FORMAT should be one of `v7', `ustar', or `pax'.
822
 
#
823
 
# Substitute a variable $(am__tar) that is a command
824
 
# writing to stdout a FORMAT-tarball containing the directory
825
 
# $tardir.
826
 
#     tardir=directory && $(am__tar) > result.tar
827
 
#
828
 
# Substitute a variable $(am__untar) that extract such
829
 
# a tarball read from stdin.
830
 
#     $(am__untar) < result.tar
831
 
AC_DEFUN([_AM_PROG_TAR],
832
 
[# Always define AMTAR for backward compatibility.
833
 
AM_MISSING_PROG([AMTAR], [tar])
834
 
m4_if([$1], [v7],
835
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
836
 
     [m4_case([$1], [ustar],, [pax],,
837
 
              [m4_fatal([Unknown tar format])])
838
 
AC_MSG_CHECKING([how to create a $1 tar archive])
839
 
# Loop over all known methods to create a tar archive until one works.
840
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
841
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
842
 
# Do not fold the above two line into one, because Tru64 sh and
843
 
# Solaris sh will not grok spaces in the rhs of `-'.
844
 
for _am_tool in $_am_tools
845
 
do
846
 
  case $_am_tool in
847
 
  gnutar)
848
 
    for _am_tar in tar gnutar gtar;
849
 
    do
850
 
      AM_RUN_LOG([$_am_tar --version]) && break
851
 
    done
852
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
853
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
854
 
    am__untar="$_am_tar -xf -"
855
 
    ;;
856
 
  plaintar)
857
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
858
 
    # ustar tarball either.
859
 
    (tar --version) >/dev/null 2>&1 && continue
860
 
    am__tar='tar chf - "$$tardir"'
861
 
    am__tar_='tar chf - "$tardir"'
862
 
    am__untar='tar xf -'
863
 
    ;;
864
 
  pax)
865
 
    am__tar='pax -L -x $1 -w "$$tardir"'
866
 
    am__tar_='pax -L -x $1 -w "$tardir"'
867
 
    am__untar='pax -r'
868
 
    ;;
869
 
  cpio)
870
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
871
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
872
 
    am__untar='cpio -i -H $1 -d'
873
 
    ;;
874
 
  none)
875
 
    am__tar=false
876
 
    am__tar_=false
877
 
    am__untar=false
878
 
    ;;
879
 
  esac
880
 
 
881
 
  # If the value was cached, stop now.  We just wanted to have am__tar
882
 
  # and am__untar set.
883
 
  test -n "${am_cv_prog_tar_$1}" && break
884
 
 
885
 
  # tar/untar a dummy directory, and stop if the command works
886
 
  rm -rf conftest.dir
887
 
  mkdir conftest.dir
888
 
  echo GrepMe > conftest.dir/file
889
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
890
 
  rm -rf conftest.dir
891
 
  if test -s conftest.tar; then
892
 
    AM_RUN_LOG([$am__untar <conftest.tar])
893
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
894
 
  fi
895
 
done
896
 
rm -rf conftest.dir
897
 
 
898
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
899
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
900
 
AC_SUBST([am__tar])
901
 
AC_SUBST([am__untar])
902
 
]) # _AM_PROG_TAR
903
 
 
904
 
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
905
 
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
906
 
#
907
 
# This file is free software, distributed under the terms of the GNU
908
 
# General Public License.  As a special exception to the GNU General
909
 
# Public License, this file may be distributed as part of a program
910
 
# that contains a configuration script generated by Autoconf, under
911
 
# the same distribution terms as the rest of that program.
912
 
#
913
 
# This file can be copied and used freely without restrictions.  It can
914
 
# be used in projects which are not available under the GNU Public License
915
 
# but which still want to provide support for the GNU gettext functionality.
916
 
#
917
 
# Macro to add for using GNU gettext.
918
 
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
919
 
#
920
 
# Modified to never use included libintl. 
921
 
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
922
 
#
923
 
# Major rework to remove unused code
924
 
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
925
 
#
926
 
# Added better handling of ALL_LINGUAS from GNU gettext version 
927
 
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
928
 
#
929
 
# Modified to require ngettext
930
 
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
931
 
#
932
 
# We need this here as well, since someone might use autoconf-2.5x
933
 
# to configure GLib then an older version to configure a package
934
 
# using AM_GLIB_GNU_GETTEXT
935
 
AC_PREREQ(2.53)
936
 
 
937
 
dnl
938
 
dnl We go to great lengths to make sure that aclocal won't 
939
 
dnl try to pull in the installed version of these macros
940
 
dnl when running aclocal in the glib directory.
941
 
dnl
942
 
m4_copy([AC_DEFUN],[glib_DEFUN])
943
 
m4_copy([AC_REQUIRE],[glib_REQUIRE])
944
 
dnl
945
 
dnl At the end, if we're not within glib, we'll define the public
946
 
dnl definitions in terms of our private definitions.
947
 
dnl
948
 
 
949
 
# GLIB_LC_MESSAGES
950
 
#--------------------
951
 
glib_DEFUN([GLIB_LC_MESSAGES],
952
 
  [AC_CHECK_HEADERS([locale.h])
953
 
    if test $ac_cv_header_locale_h = yes; then
954
 
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
955
 
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
956
 
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
957
 
    if test $am_cv_val_LC_MESSAGES = yes; then
958
 
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
959
 
        [Define if your <locale.h> file defines LC_MESSAGES.])
960
 
    fi
961
 
  fi])
962
 
 
963
 
# GLIB_PATH_PROG_WITH_TEST
964
 
#----------------------------
965
 
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
966
 
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
967
 
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
968
 
[# Extract the first word of "$2", so it can be a program name with args.
969
 
set dummy $2; ac_word=[$]2
970
 
AC_MSG_CHECKING([for $ac_word])
971
 
AC_CACHE_VAL(ac_cv_path_$1,
972
 
[case "[$]$1" in
973
 
  /*)
974
 
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
975
 
  ;;
976
 
  *)
977
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
978
 
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
979
 
    test -z "$ac_dir" && ac_dir=.
980
 
    if test -f $ac_dir/$ac_word; then
981
 
      if [$3]; then
982
 
        ac_cv_path_$1="$ac_dir/$ac_word"
983
 
        break
984
 
      fi
985
 
    fi
986
 
  done
987
 
  IFS="$ac_save_ifs"
988
 
dnl If no 4th arg is given, leave the cache variable unset,
989
 
dnl so AC_PATH_PROGS will keep looking.
990
 
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
991
 
])dnl
992
 
  ;;
993
 
esac])dnl
994
 
$1="$ac_cv_path_$1"
995
 
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
996
 
  AC_MSG_RESULT([$]$1)
997
 
else
998
 
  AC_MSG_RESULT(no)
999
 
fi
1000
 
AC_SUBST($1)dnl
1001
 
])
1002
 
 
1003
 
# GLIB_WITH_NLS
1004
 
#-----------------
1005
 
glib_DEFUN([GLIB_WITH_NLS],
1006
 
  dnl NLS is obligatory
1007
 
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1008
 
    USE_NLS=yes
1009
 
    AC_SUBST(USE_NLS)
1010
 
 
1011
 
    gt_cv_have_gettext=no
1012
 
 
1013
 
    CATOBJEXT=NONE
1014
 
    XGETTEXT=:
1015
 
    INTLLIBS=
1016
 
 
1017
 
    AC_CHECK_HEADER(libintl.h,
1018
 
     [gt_cv_func_dgettext_libintl="no"
1019
 
      libintl_extra_libs=""
1020
 
 
1021
 
      #
1022
 
      # First check in libc
1023
 
      #
1024
 
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1025
 
        [AC_TRY_LINK([
1026
 
#include <libintl.h>
1027
 
],
1028
 
         [return !ngettext ("","", 1)],
1029
 
          gt_cv_func_ngettext_libc=yes,
1030
 
          gt_cv_func_ngettext_libc=no)
1031
 
        ])
1032
 
  
1033
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1034
 
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1035
 
                [AC_TRY_LINK([
1036
 
#include <libintl.h>
1037
 
],
1038
 
                  [return !dgettext ("","")],
1039
 
                  gt_cv_func_dgettext_libc=yes,
1040
 
                  gt_cv_func_dgettext_libc=no)
1041
 
                ])
1042
 
      fi
1043
 
  
1044
 
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1045
 
        AC_CHECK_FUNCS(bind_textdomain_codeset)
1046
 
      fi
1047
 
 
1048
 
      #
1049
 
      # If we don't have everything we want, check in libintl
1050
 
      #
1051
 
      if test "$gt_cv_func_dgettext_libc" != "yes" \
1052
 
         || test "$gt_cv_func_ngettext_libc" != "yes" \
1053
 
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1054
 
        
1055
 
        AC_CHECK_LIB(intl, bindtextdomain,
1056
 
            [AC_CHECK_LIB(intl, ngettext,
1057
 
                    [AC_CHECK_LIB(intl, dgettext,
1058
 
                                  gt_cv_func_dgettext_libintl=yes)])])
1059
 
 
1060
 
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1061
 
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
1062
 
          AC_MSG_RESULT([])
1063
 
          AC_CHECK_LIB(intl, ngettext,
1064
 
                [AC_CHECK_LIB(intl, dcgettext,
1065
 
                       [gt_cv_func_dgettext_libintl=yes
1066
 
                        libintl_extra_libs=-liconv],
1067
 
                        :,-liconv)],
1068
 
                :,-liconv)
1069
 
        fi
1070
 
 
1071
 
        #
1072
 
        # If we found libintl, then check in it for bind_textdomain_codeset();
1073
 
        # we'll prefer libc if neither have bind_textdomain_codeset(),
1074
 
        # and both have dgettext and ngettext
1075
 
        #
1076
 
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1077
 
          glib_save_LIBS="$LIBS"
1078
 
          LIBS="$LIBS -lintl $libintl_extra_libs"
1079
 
          unset ac_cv_func_bind_textdomain_codeset
1080
 
          AC_CHECK_FUNCS(bind_textdomain_codeset)
1081
 
          LIBS="$glib_save_LIBS"
1082
 
 
1083
 
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1084
 
            gt_cv_func_dgettext_libc=no
1085
 
          else
1086
 
            if test "$gt_cv_func_dgettext_libc" = "yes" \
1087
 
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
1088
 
              gt_cv_func_dgettext_libintl=no
1089
 
            fi
1090
 
          fi
1091
 
        fi
1092
 
      fi
1093
 
 
1094
 
      if test "$gt_cv_func_dgettext_libc" = "yes" \
1095
 
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1096
 
        gt_cv_have_gettext=yes
1097
 
      fi
1098
 
  
1099
 
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1100
 
        INTLLIBS="-lintl $libintl_extra_libs"
1101
 
      fi
1102
 
  
1103
 
      if test "$gt_cv_have_gettext" = "yes"; then
1104
 
        AC_DEFINE(HAVE_GETTEXT,1,
1105
 
          [Define if the GNU gettext() function is already present or preinstalled.])
1106
 
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1107
 
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1108
 
        if test "$MSGFMT" != "no"; then
1109
 
          glib_save_LIBS="$LIBS"
1110
 
          LIBS="$LIBS $INTLLIBS"
1111
 
          AC_CHECK_FUNCS(dcgettext)
1112
 
          MSGFMT_OPTS=
1113
 
          AC_MSG_CHECKING([if msgfmt accepts -c])
1114
 
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1115
 
msgid ""
1116
 
msgstr ""
1117
 
"Content-Type: text/plain; charset=UTF-8\n"
1118
 
"Project-Id-Version: test 1.0\n"
1119
 
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1120
 
"Last-Translator: test <foo@bar.xx>\n"
1121
 
"Language-Team: C <LL@li.org>\n"
1122
 
"MIME-Version: 1.0\n"
1123
 
"Content-Transfer-Encoding: 8bit\n"
1124
 
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1125
 
          AC_SUBST(MSGFMT_OPTS)
1126
 
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1127
 
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1128
 
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1129
 
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1130
 
                         return _nl_msg_cat_cntr],
1131
 
            [CATOBJEXT=.gmo 
1132
 
             DATADIRNAME=share],
1133
 
            [case $host in
1134
 
            *-*-solaris*)
1135
 
            dnl On Solaris, if bind_textdomain_codeset is in libc,
1136
 
            dnl GNU format message catalog is always supported,
1137
 
            dnl since both are added to the libc all together.
1138
 
            dnl Hence, we'd like to go with DATADIRNAME=share and
1139
 
            dnl and CATOBJEXT=.gmo in this case.
1140
 
            AC_CHECK_FUNC(bind_textdomain_codeset,
1141
 
              [CATOBJEXT=.gmo 
1142
 
               DATADIRNAME=share],
1143
 
              [CATOBJEXT=.mo
1144
 
               DATADIRNAME=lib])
1145
 
            ;;
1146
 
            *)
1147
 
            CATOBJEXT=.mo
1148
 
            DATADIRNAME=lib
1149
 
            ;;
1150
 
            esac])
1151
 
          LIBS="$glib_save_LIBS"
1152
 
          INSTOBJEXT=.mo
1153
 
        else
1154
 
          gt_cv_have_gettext=no
1155
 
        fi
1156
 
      fi
1157
 
    ])
1158
 
 
1159
 
    if test "$gt_cv_have_gettext" = "yes" ; then
1160
 
      AC_DEFINE(ENABLE_NLS, 1,
1161
 
        [always defined to indicate that i18n is enabled])
1162
 
    fi
1163
 
 
1164
 
    dnl Test whether we really found GNU xgettext.
1165
 
    if test "$XGETTEXT" != ":"; then
1166
 
      dnl If it is not GNU xgettext we define it as : so that the
1167
 
      dnl Makefiles still can work.
1168
 
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1169
 
        : ;
1170
 
      else
1171
 
        AC_MSG_RESULT(
1172
 
          [found xgettext program is not GNU xgettext; ignore it])
1173
 
        XGETTEXT=":"
1174
 
      fi
1175
 
    fi
1176
 
 
1177
 
    # We need to process the po/ directory.
1178
 
    POSUB=po
1179
 
 
1180
 
    AC_OUTPUT_COMMANDS(
1181
 
      [case "$CONFIG_FILES" in *po/Makefile.in*)
1182
 
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1183
 
      esac])
1184
 
 
1185
 
    dnl These rules are solely for the distribution goal.  While doing this
1186
 
    dnl we only have to keep exactly one list of the available catalogs
1187
 
    dnl in configure.in.
1188
 
    for lang in $ALL_LINGUAS; do
1189
 
      GMOFILES="$GMOFILES $lang.gmo"
1190
 
      POFILES="$POFILES $lang.po"
1191
 
    done
1192
 
 
1193
 
    dnl Make all variables we use known to autoconf.
1194
 
    AC_SUBST(CATALOGS)
1195
 
    AC_SUBST(CATOBJEXT)
1196
 
    AC_SUBST(DATADIRNAME)
1197
 
    AC_SUBST(GMOFILES)
1198
 
    AC_SUBST(INSTOBJEXT)
1199
 
    AC_SUBST(INTLLIBS)
1200
 
    AC_SUBST(PO_IN_DATADIR_TRUE)
1201
 
    AC_SUBST(PO_IN_DATADIR_FALSE)
1202
 
    AC_SUBST(POFILES)
1203
 
    AC_SUBST(POSUB)
1204
 
  ])
1205
 
 
1206
 
# AM_GLIB_GNU_GETTEXT
1207
 
# -------------------
1208
 
# Do checks necessary for use of gettext. If a suitable implementation 
1209
 
# of gettext is found in either in libintl or in the C library,
1210
 
# it will set INTLLIBS to the libraries needed for use of gettext
1211
 
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1212
 
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1213
 
# on various variables needed by the Makefile.in.in installed by 
1214
 
# glib-gettextize.
1215
 
dnl
1216
 
glib_DEFUN([GLIB_GNU_GETTEXT],
1217
 
  [AC_REQUIRE([AC_PROG_CC])dnl
1218
 
   AC_REQUIRE([AC_HEADER_STDC])dnl
1219
 
   
1220
 
   GLIB_LC_MESSAGES
1221
 
   GLIB_WITH_NLS
1222
 
 
1223
 
   if test "$gt_cv_have_gettext" = "yes"; then
1224
 
     if test "x$ALL_LINGUAS" = "x"; then
1225
 
       LINGUAS=
1226
 
     else
1227
 
       AC_MSG_CHECKING(for catalogs to be installed)
1228
 
       NEW_LINGUAS=
1229
 
       for presentlang in $ALL_LINGUAS; do
1230
 
         useit=no
1231
 
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1232
 
           desiredlanguages="$LINGUAS"
1233
 
         else
1234
 
           desiredlanguages="$ALL_LINGUAS"
1235
 
         fi
1236
 
         for desiredlang in $desiredlanguages; do
1237
 
           # Use the presentlang catalog if desiredlang is
1238
 
           #   a. equal to presentlang, or
1239
 
           #   b. a variant of presentlang (because in this case,
1240
 
           #      presentlang can be used as a fallback for messages
1241
 
           #      which are not translated in the desiredlang catalog).
1242
 
           case "$desiredlang" in
1243
 
             "$presentlang"*) useit=yes;;
1244
 
           esac
1245
 
         done
1246
 
         if test $useit = yes; then
1247
 
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1248
 
         fi
1249
 
       done
1250
 
       LINGUAS=$NEW_LINGUAS
1251
 
       AC_MSG_RESULT($LINGUAS)
1252
 
     fi
1253
 
 
1254
 
     dnl Construct list of names of catalog files to be constructed.
1255
 
     if test -n "$LINGUAS"; then
1256
 
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1257
 
     fi
1258
 
   fi
1259
 
 
1260
 
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1261
 
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1262
 
   dnl Try to locate is.
1263
 
   MKINSTALLDIRS=
1264
 
   if test -n "$ac_aux_dir"; then
1265
 
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1266
 
   fi
1267
 
   if test -z "$MKINSTALLDIRS"; then
1268
 
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1269
 
   fi
1270
 
   AC_SUBST(MKINSTALLDIRS)
1271
 
 
1272
 
   dnl Generate list of files to be processed by xgettext which will
1273
 
   dnl be included in po/Makefile.
1274
 
   test -d po || mkdir po
1275
 
   if test "x$srcdir" != "x."; then
1276
 
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1277
 
       posrcprefix="$srcdir/"
1278
 
     else
1279
 
       posrcprefix="../$srcdir/"
1280
 
     fi
1281
 
   else
1282
 
     posrcprefix="../"
1283
 
   fi
1284
 
   rm -f po/POTFILES
1285
 
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1286
 
        < $srcdir/po/POTFILES.in > po/POTFILES
1287
 
  ])
1288
 
 
1289
 
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1290
 
# -------------------------------
1291
 
# Define VARIABLE to the location where catalog files will
1292
 
# be installed by po/Makefile.
1293
 
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1294
 
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1295
 
glib_save_prefix="$prefix"
1296
 
glib_save_exec_prefix="$exec_prefix"
1297
 
glib_save_datarootdir="$datarootdir"
1298
 
test "x$prefix" = xNONE && prefix=$ac_default_prefix
1299
 
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1300
 
datarootdir=`eval echo "${datarootdir}"`
1301
 
if test "x$CATOBJEXT" = "x.mo" ; then
1302
 
  localedir=`eval echo "${libdir}/locale"`
1303
 
else
1304
 
  localedir=`eval echo "${datadir}/locale"`
1305
 
fi
1306
 
prefix="$glib_save_prefix"
1307
 
exec_prefix="$glib_save_exec_prefix"
1308
 
datarootdir="$glib_save_datarootdir"
1309
 
AC_DEFINE_UNQUOTED($1, "$localedir",
1310
 
  [Define the location where the catalogs will be installed])
1311
 
])
1312
 
 
1313
 
dnl
1314
 
dnl Now the definitions that aclocal will find
1315
 
dnl
1316
 
ifdef(glib_configure_in,[],[
1317
 
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1318
 
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1319
 
])dnl
1320
 
 
1321
 
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1322
 
1323
 
# Create a temporary file with TEST-FILE as its contents and pass the
1324
 
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
1325
 
# 0 and perform ACTION-IF-FAIL for any other exit status.
1326
 
AC_DEFUN([GLIB_RUN_PROG],
1327
 
[cat >conftest.foo <<_ACEOF
1328
 
$2
1329
 
_ACEOF
1330
 
if AC_RUN_LOG([$1 conftest.foo]); then
1331
 
  m4_ifval([$3], [$3], [:])
1332
 
m4_ifvaln([$4], [else $4])dnl
1333
 
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1334
 
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1335
 
fi])
1336
 
 
1337
 
 
1338
 
dnl GNOME_COMPILE_WARNINGS
1339
 
dnl Turn on many useful compiler warnings
1340
 
dnl For now, only works on GCC
1341
 
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1342
 
    dnl ******************************
1343
 
    dnl More compiler warnings
1344
 
    dnl ******************************
1345
 
 
1346
 
    AC_ARG_ENABLE(compile-warnings, 
1347
 
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1348
 
                                 [Turn on compiler warnings]),,
1349
 
                  [enable_compile_warnings="m4_default([$1],[yes])"])
1350
 
 
1351
 
    warnCFLAGS=
1352
 
    if test "x$GCC" != xyes; then
1353
 
        enable_compile_warnings=no
1354
 
    fi
1355
 
 
1356
 
    warning_flags=
1357
 
    realsave_CFLAGS="$CFLAGS"
1358
 
 
1359
 
    case "$enable_compile_warnings" in
1360
 
    no)
1361
 
        warning_flags=
1362
 
        ;;
1363
 
    minimum)
1364
 
        warning_flags="-Wall"
1365
 
        ;;
1366
 
    yes)
1367
 
        warning_flags="-Wall -Wmissing-prototypes"
1368
 
        ;;
1369
 
    maximum|error)
1370
 
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1371
 
        CFLAGS="$warning_flags $CFLAGS"
1372
 
        for option in -Wno-sign-compare; do
1373
 
                SAVE_CFLAGS="$CFLAGS"
1374
 
                CFLAGS="$CFLAGS $option"
1375
 
                AC_MSG_CHECKING([whether gcc understands $option])
1376
 
                AC_TRY_COMPILE([], [],
1377
 
                        has_option=yes,
1378
 
                        has_option=no,)
1379
 
                CFLAGS="$SAVE_CFLAGS"
1380
 
                AC_MSG_RESULT($has_option)
1381
 
                if test $has_option = yes; then
1382
 
                  warning_flags="$warning_flags $option"
1383
 
                fi
1384
 
                unset has_option
1385
 
                unset SAVE_CFLAGS
1386
 
        done
1387
 
        unset option
1388
 
        if test "$enable_compile_warnings" = "error" ; then
1389
 
            warning_flags="$warning_flags -Werror"
1390
 
        fi
1391
 
        ;;
1392
 
    *)
1393
 
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1394
 
        ;;
1395
 
    esac
1396
 
    CFLAGS="$realsave_CFLAGS"
1397
 
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1398
 
    AC_MSG_RESULT($warning_flags)
1399
 
 
1400
 
    AC_ARG_ENABLE(iso-c,
1401
 
                  AC_HELP_STRING([--enable-iso-c],
1402
 
                                 [Try to warn if code is not ISO C ]),,
1403
 
                  [enable_iso_c=no])
1404
 
 
1405
 
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1406
 
    complCFLAGS=
1407
 
    if test "x$enable_iso_c" != "xno"; then
1408
 
        if test "x$GCC" = "xyes"; then
1409
 
        case " $CFLAGS " in
1410
 
            *[\ \       ]-ansi[\ \      ]*) ;;
1411
 
            *) complCFLAGS="$complCFLAGS -ansi" ;;
1412
 
        esac
1413
 
        case " $CFLAGS " in
1414
 
            *[\ \       ]-pedantic[\ \  ]*) ;;
1415
 
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
1416
 
        esac
1417
 
        fi
1418
 
    fi
1419
 
    AC_MSG_RESULT($complCFLAGS)
1420
 
 
1421
 
    WARN_CFLAGS="$warning_flags $complCFLAGS"
1422
 
    AC_SUBST(WARN_CFLAGS)
1423
 
])
1424
 
 
1425
 
dnl For C++, do basically the same thing.
1426
 
 
1427
 
AC_DEFUN([GNOME_CXX_WARNINGS],[
1428
 
  AC_ARG_ENABLE(cxx-warnings,
1429
 
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1430
 
                               [Turn on compiler warnings.]),,
1431
 
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
1432
 
 
1433
 
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1434
 
  warnCXXFLAGS=
1435
 
  if test "x$GXX" != xyes; then
1436
 
    enable_cxx_warnings=no
1437
 
  fi
1438
 
  if test "x$enable_cxx_warnings" != "xno"; then
1439
 
    if test "x$GXX" = "xyes"; then
1440
 
      case " $CXXFLAGS " in
1441
 
      *[\ \     ]-Wall[\ \      ]*) ;;
1442
 
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
1443
 
      esac
1444
 
 
1445
 
      ## -W is not all that useful.  And it cannot be controlled
1446
 
      ## with individual -Wno-xxx flags, unlike -Wall
1447
 
      if test "x$enable_cxx_warnings" = "xyes"; then
1448
 
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1449
 
      fi
1450
 
    fi
1451
 
  fi
1452
 
  AC_MSG_RESULT($warnCXXFLAGS)
1453
 
 
1454
 
   AC_ARG_ENABLE(iso-cxx,
1455
 
                 AC_HELP_STRING([--enable-iso-cxx],
1456
 
                                [Try to warn if code is not ISO C++ ]),,
1457
 
                 [enable_iso_cxx=no])
1458
 
 
1459
 
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1460
 
   complCXXFLAGS=
1461
 
   if test "x$enable_iso_cxx" != "xno"; then
1462
 
     if test "x$GXX" = "xyes"; then
1463
 
      case " $CXXFLAGS " in
1464
 
      *[\ \     ]-ansi[\ \      ]*) ;;
1465
 
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1466
 
      esac
1467
 
 
1468
 
      case " $CXXFLAGS " in
1469
 
      *[\ \     ]-pedantic[\ \  ]*) ;;
1470
 
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1471
 
      esac
1472
 
     fi
1473
 
   fi
1474
 
  AC_MSG_RESULT($complCXXFLAGS)
1475
 
 
1476
 
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1477
 
  AC_SUBST(WARN_CXXFLAGS)
1478
 
])
1479
 
 
1480
19
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1481
20
 
1482
21
# serial 48 AC_PROG_LIBTOOL
5038
3577
            # cannot just pass the convience library names through
5039
3578
            # without $wl.
5040
3579
            # Supported since Solaris 2.6 (maybe 2.5.1?)
5041
 
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 
3580
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
5042
3581
            ;;
5043
3582
        esac
5044
3583
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7557
6096
        '')
7558
6097
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7559
6098
        *)
7560
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
 
6099
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7561
6100
        esac ;;
7562
6101
      esac
7563
6102
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7854
6393
AC_MSG_RESULT([$SED])
7855
6394
])
7856
6395
 
 
6396
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 
6397
#
 
6398
# This file is free software; the Free Software Foundation
 
6399
# gives unlimited permission to copy and/or distribute it,
 
6400
# with or without modifications, as long as this notice is preserved.
 
6401
 
 
6402
# AM_AUTOMAKE_VERSION(VERSION)
 
6403
# ----------------------------
 
6404
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
6405
# generated from the m4 files accompanying Automake X.Y.
 
6406
# (This private macro should not be called outside this file.)
 
6407
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
6408
[am__api_version='1.10'
 
6409
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
6410
dnl require some minimum version.  Point them to the right macro.
 
6411
m4_if([$1], [1.10], [],
 
6412
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
6413
])
 
6414
 
 
6415
# _AM_AUTOCONF_VERSION(VERSION)
 
6416
# -----------------------------
 
6417
# aclocal traces this macro to find the Autoconf version.
 
6418
# This is a private macro too.  Using m4_define simplifies
 
6419
# the logic in aclocal, which can simply ignore this definition.
 
6420
m4_define([_AM_AUTOCONF_VERSION], [])
 
6421
 
 
6422
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
6423
# -------------------------------
 
6424
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
6425
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
6426
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
6427
[AM_AUTOMAKE_VERSION([1.10])dnl
 
6428
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
 
6429
 
 
6430
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
6431
 
 
6432
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
6433
#
 
6434
# This file is free software; the Free Software Foundation
 
6435
# gives unlimited permission to copy and/or distribute it,
 
6436
# with or without modifications, as long as this notice is preserved.
 
6437
 
 
6438
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
6439
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
6440
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
6441
#
 
6442
# Of course, Automake must honor this variable whenever it calls a
 
6443
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
6444
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
6445
# depending on how configure is run.  This is pretty annoying, since
 
6446
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
6447
# source directory, any form will work fine, but in subdirectories a
 
6448
# relative path needs to be adjusted first.
 
6449
#
 
6450
# $ac_aux_dir/missing
 
6451
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
6452
# $top_srcdir/$ac_aux_dir/missing
 
6453
#    fails if $ac_aux_dir is absolute,
 
6454
#    fails when called from a subdirectory in a VPATH build with
 
6455
#          a relative $ac_aux_dir
 
6456
#
 
6457
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
6458
# are both prefixed by $srcdir.  In an in-source build this is usually
 
6459
# harmless because $srcdir is `.', but things will broke when you
 
6460
# start a VPATH build or use an absolute $srcdir.
 
6461
#
 
6462
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
6463
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
6464
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
6465
# and then we would define $MISSING as
 
6466
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
6467
# This will work as long as MISSING is not called from configure, because
 
6468
# unfortunately $(top_srcdir) has no meaning in configure.
 
6469
# However there are other variables, like CC, which are often used in
 
6470
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
6471
#
 
6472
# Another solution, used here, is to always expand $ac_aux_dir to an
 
6473
# absolute PATH.  The drawback is that using absolute paths prevent a
 
6474
# configured tree to be moved without reconfiguration.
 
6475
 
 
6476
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
6477
[dnl Rely on autoconf to set up CDPATH properly.
 
6478
AC_PREREQ([2.50])dnl
 
6479
# expand $ac_aux_dir to an absolute path
 
6480
am_aux_dir=`cd $ac_aux_dir && pwd`
 
6481
])
 
6482
 
 
6483
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
6484
 
 
6485
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 
6486
# Free Software Foundation, Inc.
 
6487
#
 
6488
# This file is free software; the Free Software Foundation
 
6489
# gives unlimited permission to copy and/or distribute it,
 
6490
# with or without modifications, as long as this notice is preserved.
 
6491
 
 
6492
# serial 8
 
6493
 
 
6494
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
6495
# -------------------------------------
 
6496
# Define a conditional.
 
6497
AC_DEFUN([AM_CONDITIONAL],
 
6498
[AC_PREREQ(2.52)dnl
 
6499
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
6500
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
6501
AC_SUBST([$1_TRUE])dnl
 
6502
AC_SUBST([$1_FALSE])dnl
 
6503
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
6504
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
6505
if $2; then
 
6506
  $1_TRUE=
 
6507
  $1_FALSE='#'
 
6508
else
 
6509
  $1_TRUE='#'
 
6510
  $1_FALSE=
 
6511
fi
 
6512
AC_CONFIG_COMMANDS_PRE(
 
6513
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
6514
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
6515
Usually this means the macro was only invoked conditionally.]])
 
6516
fi])])
 
6517
 
 
6518
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
6519
# Free Software Foundation, Inc.
 
6520
#
 
6521
# This file is free software; the Free Software Foundation
 
6522
# gives unlimited permission to copy and/or distribute it,
 
6523
# with or without modifications, as long as this notice is preserved.
 
6524
 
 
6525
# serial 9
 
6526
 
 
6527
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
6528
# written in clear, in which case automake, when reading aclocal.m4,
 
6529
# will think it sees a *use*, and therefore will trigger all it's
 
6530
# C support machinery.  Also note that it means that autoscan, seeing
 
6531
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
6532
 
 
6533
 
 
6534
# _AM_DEPENDENCIES(NAME)
 
6535
# ----------------------
 
6536
# See how the compiler implements dependency checking.
 
6537
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
6538
# We try a few techniques and use that to set a single cache variable.
 
6539
#
 
6540
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
6541
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
6542
# dependency, and given that the user is not expected to run this macro,
 
6543
# just rely on AC_PROG_CC.
 
6544
AC_DEFUN([_AM_DEPENDENCIES],
 
6545
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
6546
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
6547
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
6548
AC_REQUIRE([AM_DEP_TRACK])dnl
 
6549
 
 
6550
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
6551
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
6552
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
6553
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
6554
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
6555
                   [depcc="$$1"   am_compiler_list=])
 
6556
 
 
6557
AC_CACHE_CHECK([dependency style of $depcc],
 
6558
               [am_cv_$1_dependencies_compiler_type],
 
6559
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
6560
  # We make a subdir and do the tests there.  Otherwise we can end up
 
6561
  # making bogus files that we don't know about and never remove.  For
 
6562
  # instance it was reported that on HP-UX the gcc test will end up
 
6563
  # making a dummy file named `D' -- because `-MD' means `put the output
 
6564
  # in D'.
 
6565
  mkdir conftest.dir
 
6566
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
6567
  # using a relative directory.
 
6568
  cp "$am_depcomp" conftest.dir
 
6569
  cd conftest.dir
 
6570
  # We will build objects and dependencies in a subdirectory because
 
6571
  # it helps to detect inapplicable dependency modes.  For instance
 
6572
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
6573
  # side effect of compilation, but ICC will put the dependencies in
 
6574
  # the current directory while Tru64 will put them in the object
 
6575
  # directory.
 
6576
  mkdir sub
 
6577
 
 
6578
  am_cv_$1_dependencies_compiler_type=none
 
6579
  if test "$am_compiler_list" = ""; then
 
6580
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
6581
  fi
 
6582
  for depmode in $am_compiler_list; do
 
6583
    # Setup a source with many dependencies, because some compilers
 
6584
    # like to wrap large dependency lists on column 80 (with \), and
 
6585
    # we should not choose a depcomp mode which is confused by this.
 
6586
    #
 
6587
    # We need to recreate these files for each test, as the compiler may
 
6588
    # overwrite some of them when testing with obscure command lines.
 
6589
    # This happens at least with the AIX C compiler.
 
6590
    : > sub/conftest.c
 
6591
    for i in 1 2 3 4 5 6; do
 
6592
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
6593
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
6594
      # Solaris 8's {/usr,}/bin/sh.
 
6595
      touch sub/conftst$i.h
 
6596
    done
 
6597
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
6598
 
 
6599
    case $depmode in
 
6600
    nosideeffect)
 
6601
      # after this tag, mechanisms are not by side-effect, so they'll
 
6602
      # only be used when explicitly requested
 
6603
      if test "x$enable_dependency_tracking" = xyes; then
 
6604
        continue
 
6605
      else
 
6606
        break
 
6607
      fi
 
6608
      ;;
 
6609
    none) break ;;
 
6610
    esac
 
6611
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
6612
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
6613
    # handle `-M -o', and we need to detect this.
 
6614
    if depmode=$depmode \
 
6615
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
6616
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
6617
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
6618
         >/dev/null 2>conftest.err &&
 
6619
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
6620
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
6621
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
6622
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
6623
      # icc doesn't choke on unknown options, it will just issue warnings
 
6624
      # or remarks (even with -Werror).  So we grep stderr for any message
 
6625
      # that says an option was ignored or not supported.
 
6626
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
6627
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
6628
      # The diagnosis changed in icc 8.0:
 
6629
      #   icc: Command line remark: option '-MP' not supported
 
6630
      if (grep 'ignoring option' conftest.err ||
 
6631
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
6632
        am_cv_$1_dependencies_compiler_type=$depmode
 
6633
        break
 
6634
      fi
 
6635
    fi
 
6636
  done
 
6637
 
 
6638
  cd ..
 
6639
  rm -rf conftest.dir
 
6640
else
 
6641
  am_cv_$1_dependencies_compiler_type=none
 
6642
fi
 
6643
])
 
6644
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
6645
AM_CONDITIONAL([am__fastdep$1], [
 
6646
  test "x$enable_dependency_tracking" != xno \
 
6647
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
6648
])
 
6649
 
 
6650
 
 
6651
# AM_SET_DEPDIR
 
6652
# -------------
 
6653
# Choose a directory name for dependency files.
 
6654
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
6655
AC_DEFUN([AM_SET_DEPDIR],
 
6656
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
6657
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
6658
])
 
6659
 
 
6660
 
 
6661
# AM_DEP_TRACK
 
6662
# ------------
 
6663
AC_DEFUN([AM_DEP_TRACK],
 
6664
[AC_ARG_ENABLE(dependency-tracking,
 
6665
[  --disable-dependency-tracking  speeds up one-time build
 
6666
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
6667
if test "x$enable_dependency_tracking" != xno; then
 
6668
  am_depcomp="$ac_aux_dir/depcomp"
 
6669
  AMDEPBACKSLASH='\'
 
6670
fi
 
6671
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
6672
AC_SUBST([AMDEPBACKSLASH])dnl
 
6673
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
6674
])
 
6675
 
 
6676
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
6677
 
 
6678
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
6679
# Free Software Foundation, Inc.
 
6680
#
 
6681
# This file is free software; the Free Software Foundation
 
6682
# gives unlimited permission to copy and/or distribute it,
 
6683
# with or without modifications, as long as this notice is preserved.
 
6684
 
 
6685
#serial 3
 
6686
 
 
6687
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
6688
# ------------------------------
 
6689
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
6690
[for mf in $CONFIG_FILES; do
 
6691
  # Strip MF so we end up with the name of the file.
 
6692
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
6693
  # Check whether this is an Automake generated Makefile or not.
 
6694
  # We used to match only the files named `Makefile.in', but
 
6695
  # some people rename them; so instead we look at the file content.
 
6696
  # Grep'ing the first line is not enough: some people post-process
 
6697
  # each Makefile.in and add a new line on top of each file to say so.
 
6698
  # Grep'ing the whole file is not good either: AIX grep has a line
 
6699
  # limit of 2048, but all sed's we know have understand at least 4000.
 
6700
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
 
6701
    dirpart=`AS_DIRNAME("$mf")`
 
6702
  else
 
6703
    continue
 
6704
  fi
 
6705
  # Extract the definition of DEPDIR, am__include, and am__quote
 
6706
  # from the Makefile without running `make'.
 
6707
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
6708
  test -z "$DEPDIR" && continue
 
6709
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
6710
  test -z "am__include" && continue
 
6711
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
6712
  # When using ansi2knr, U may be empty or an underscore; expand it
 
6713
  U=`sed -n 's/^U = //p' < "$mf"`
 
6714
  # Find all dependency output files, they are included files with
 
6715
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
6716
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
6717
  # expansion.
 
6718
  for file in `sed -n "
 
6719
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
6720
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
6721
    # Make sure the directory exists.
 
6722
    test -f "$dirpart/$file" && continue
 
6723
    fdir=`AS_DIRNAME(["$file"])`
 
6724
    AS_MKDIR_P([$dirpart/$fdir])
 
6725
    # echo "creating $dirpart/$file"
 
6726
    echo '# dummy' > "$dirpart/$file"
 
6727
  done
 
6728
done
 
6729
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
6730
 
 
6731
 
 
6732
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
6733
# -----------------------------
 
6734
# This macro should only be invoked once -- use via AC_REQUIRE.
 
6735
#
 
6736
# This code is only required when automatic dependency tracking
 
6737
# is enabled.  FIXME.  This creates each `.P' file that we will
 
6738
# need in order to bootstrap the dependency handling code.
 
6739
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
6740
[AC_CONFIG_COMMANDS([depfiles],
 
6741
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
6742
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
6743
])
 
6744
 
 
6745
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
6746
# Free Software Foundation, Inc.
 
6747
#
 
6748
# This file is free software; the Free Software Foundation
 
6749
# gives unlimited permission to copy and/or distribute it,
 
6750
# with or without modifications, as long as this notice is preserved.
 
6751
 
 
6752
# serial 8
 
6753
 
 
6754
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
6755
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
6756
 
 
6757
# Do all the work for Automake.                             -*- Autoconf -*-
 
6758
 
 
6759
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
6760
# 2005, 2006 Free Software Foundation, Inc.
 
6761
#
 
6762
# This file is free software; the Free Software Foundation
 
6763
# gives unlimited permission to copy and/or distribute it,
 
6764
# with or without modifications, as long as this notice is preserved.
 
6765
 
 
6766
# serial 12
 
6767
 
 
6768
# This macro actually does too much.  Some checks are only needed if
 
6769
# your package does certain things.  But this isn't really a big deal.
 
6770
 
 
6771
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
6772
# AM_INIT_AUTOMAKE([OPTIONS])
 
6773
# -----------------------------------------------
 
6774
# The call with PACKAGE and VERSION arguments is the old style
 
6775
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
6776
# and VERSION should now be passed to AC_INIT and removed from
 
6777
# the call to AM_INIT_AUTOMAKE.
 
6778
# We support both call styles for the transition.  After
 
6779
# the next Automake release, Autoconf can make the AC_INIT
 
6780
# arguments mandatory, and then we can depend on a new Autoconf
 
6781
# release and drop the old call support.
 
6782
AC_DEFUN([AM_INIT_AUTOMAKE],
 
6783
[AC_PREREQ([2.60])dnl
 
6784
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
6785
dnl the ones we care about.
 
6786
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
6787
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
6788
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
6789
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
6790
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
6791
  # is not polluted with repeated "-I."
 
6792
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
6793
  # test to see if srcdir already configured
 
6794
  if test -f $srcdir/config.status; then
 
6795
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
6796
  fi
 
6797
fi
 
6798
 
 
6799
# test whether we have cygpath
 
6800
if test -z "$CYGPATH_W"; then
 
6801
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
6802
    CYGPATH_W='cygpath -w'
 
6803
  else
 
6804
    CYGPATH_W=echo
 
6805
  fi
 
6806
fi
 
6807
AC_SUBST([CYGPATH_W])
 
6808
 
 
6809
# Define the identity of the package.
 
6810
dnl Distinguish between old-style and new-style calls.
 
6811
m4_ifval([$2],
 
6812
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
6813
 AC_SUBST([PACKAGE], [$1])dnl
 
6814
 AC_SUBST([VERSION], [$2])],
 
6815
[_AM_SET_OPTIONS([$1])dnl
 
6816
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
6817
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
6818
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
6819
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
6820
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
6821
 
 
6822
_AM_IF_OPTION([no-define],,
 
6823
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
6824
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
6825
 
 
6826
# Some tools Automake needs.
 
6827
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
6828
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
6829
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
6830
AM_MISSING_PROG(AUTOCONF, autoconf)
 
6831
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
6832
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
6833
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
6834
AM_PROG_INSTALL_SH
 
6835
AM_PROG_INSTALL_STRIP
 
6836
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
6837
# We need awk for the "check" target.  The system "awk" is bad on
 
6838
# some platforms.
 
6839
AC_REQUIRE([AC_PROG_AWK])dnl
 
6840
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
6841
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
6842
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
6843
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
6844
                             [_AM_PROG_TAR([v7])])])
 
6845
_AM_IF_OPTION([no-dependencies],,
 
6846
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
6847
                  [_AM_DEPENDENCIES(CC)],
 
6848
                  [define([AC_PROG_CC],
 
6849
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
6850
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
6851
                  [_AM_DEPENDENCIES(CXX)],
 
6852
                  [define([AC_PROG_CXX],
 
6853
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
6854
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
6855
                  [_AM_DEPENDENCIES(OBJC)],
 
6856
                  [define([AC_PROG_OBJC],
 
6857
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
6858
])
 
6859
])
 
6860
 
 
6861
 
 
6862
# When config.status generates a header, we must update the stamp-h file.
 
6863
# This file resides in the same directory as the config header
 
6864
# that is generated.  The stamp files are numbered to have different names.
 
6865
 
 
6866
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
6867
# loop where config.status creates the headers, so we can generate
 
6868
# our stamp files there.
 
6869
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
6870
[# Compute $1's index in $config_headers.
 
6871
_am_stamp_count=1
 
6872
for _am_header in $config_headers :; do
 
6873
  case $_am_header in
 
6874
    $1 | $1:* )
 
6875
      break ;;
 
6876
    * )
 
6877
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
6878
  esac
 
6879
done
 
6880
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
6881
 
 
6882
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
6883
#
 
6884
# This file is free software; the Free Software Foundation
 
6885
# gives unlimited permission to copy and/or distribute it,
 
6886
# with or without modifications, as long as this notice is preserved.
 
6887
 
 
6888
# AM_PROG_INSTALL_SH
 
6889
# ------------------
 
6890
# Define $install_sh.
 
6891
AC_DEFUN([AM_PROG_INSTALL_SH],
 
6892
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
6893
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 
6894
AC_SUBST(install_sh)])
 
6895
 
 
6896
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
6897
#
 
6898
# This file is free software; the Free Software Foundation
 
6899
# gives unlimited permission to copy and/or distribute it,
 
6900
# with or without modifications, as long as this notice is preserved.
 
6901
 
 
6902
# serial 2
 
6903
 
 
6904
# Check whether the underlying file-system supports filenames
 
6905
# with a leading dot.  For instance MS-DOS doesn't.
 
6906
AC_DEFUN([AM_SET_LEADING_DOT],
 
6907
[rm -rf .tst 2>/dev/null
 
6908
mkdir .tst 2>/dev/null
 
6909
if test -d .tst; then
 
6910
  am__leading_dot=.
 
6911
else
 
6912
  am__leading_dot=_
 
6913
fi
 
6914
rmdir .tst 2>/dev/null
 
6915
AC_SUBST([am__leading_dot])])
 
6916
 
 
6917
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
6918
# From Jim Meyering
 
6919
 
 
6920
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
 
6921
# Free Software Foundation, Inc.
 
6922
#
 
6923
# This file is free software; the Free Software Foundation
 
6924
# gives unlimited permission to copy and/or distribute it,
 
6925
# with or without modifications, as long as this notice is preserved.
 
6926
 
 
6927
# serial 4
 
6928
 
 
6929
AC_DEFUN([AM_MAINTAINER_MODE],
 
6930
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
6931
  dnl maintainer-mode is disabled by default
 
6932
  AC_ARG_ENABLE(maintainer-mode,
 
6933
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
6934
                          (and sometimes confusing) to the casual installer],
 
6935
      USE_MAINTAINER_MODE=$enableval,
 
6936
      USE_MAINTAINER_MODE=no)
 
6937
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
6938
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
6939
  MAINT=$MAINTAINER_MODE_TRUE
 
6940
  AC_SUBST(MAINT)dnl
 
6941
]
 
6942
)
 
6943
 
 
6944
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
6945
 
 
6946
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
6947
 
 
6948
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
6949
#
 
6950
# This file is free software; the Free Software Foundation
 
6951
# gives unlimited permission to copy and/or distribute it,
 
6952
# with or without modifications, as long as this notice is preserved.
 
6953
 
 
6954
# serial 3
 
6955
 
 
6956
# AM_MAKE_INCLUDE()
 
6957
# -----------------
 
6958
# Check to see how make treats includes.
 
6959
AC_DEFUN([AM_MAKE_INCLUDE],
 
6960
[am_make=${MAKE-make}
 
6961
cat > confinc << 'END'
 
6962
am__doit:
 
6963
        @echo done
 
6964
.PHONY: am__doit
 
6965
END
 
6966
# If we don't find an include directive, just comment out the code.
 
6967
AC_MSG_CHECKING([for style of include used by $am_make])
 
6968
am__include="#"
 
6969
am__quote=
 
6970
_am_result=none
 
6971
# First try GNU make style include.
 
6972
echo "include confinc" > confmf
 
6973
# We grep out `Entering directory' and `Leaving directory'
 
6974
# messages which can occur if `w' ends up in MAKEFLAGS.
 
6975
# In particular we don't look at `^make:' because GNU make might
 
6976
# be invoked under some other name (usually "gmake"), in which
 
6977
# case it prints its new name instead of `make'.
 
6978
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
6979
   am__include=include
 
6980
   am__quote=
 
6981
   _am_result=GNU
 
6982
fi
 
6983
# Now try BSD make style include.
 
6984
if test "$am__include" = "#"; then
 
6985
   echo '.include "confinc"' > confmf
 
6986
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
6987
      am__include=.include
 
6988
      am__quote="\""
 
6989
      _am_result=BSD
 
6990
   fi
 
6991
fi
 
6992
AC_SUBST([am__include])
 
6993
AC_SUBST([am__quote])
 
6994
AC_MSG_RESULT([$_am_result])
 
6995
rm -f confinc confmf
 
6996
])
 
6997
 
 
6998
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
6999
 
 
7000
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 
7001
# Free Software Foundation, Inc.
 
7002
#
 
7003
# This file is free software; the Free Software Foundation
 
7004
# gives unlimited permission to copy and/or distribute it,
 
7005
# with or without modifications, as long as this notice is preserved.
 
7006
 
 
7007
# serial 5
 
7008
 
 
7009
# AM_MISSING_PROG(NAME, PROGRAM)
 
7010
# ------------------------------
 
7011
AC_DEFUN([AM_MISSING_PROG],
 
7012
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
7013
$1=${$1-"${am_missing_run}$2"}
 
7014
AC_SUBST($1)])
 
7015
 
 
7016
 
 
7017
# AM_MISSING_HAS_RUN
 
7018
# ------------------
 
7019
# Define MISSING if not defined so far and test if it supports --run.
 
7020
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
7021
AC_DEFUN([AM_MISSING_HAS_RUN],
 
7022
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
7023
AC_REQUIRE_AUX_FILE([missing])dnl
 
7024
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
7025
# Use eval to expand $SHELL
 
7026
if eval "$MISSING --run true"; then
 
7027
  am_missing_run="$MISSING --run "
 
7028
else
 
7029
  am_missing_run=
 
7030
  AC_MSG_WARN([`missing' script is too old or missing])
 
7031
fi
 
7032
])
 
7033
 
 
7034
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
7035
#
 
7036
# This file is free software; the Free Software Foundation
 
7037
# gives unlimited permission to copy and/or distribute it,
 
7038
# with or without modifications, as long as this notice is preserved.
 
7039
 
 
7040
# AM_PROG_MKDIR_P
 
7041
# ---------------
 
7042
# Check for `mkdir -p'.
 
7043
AC_DEFUN([AM_PROG_MKDIR_P],
 
7044
[AC_PREREQ([2.60])dnl
 
7045
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
7046
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
7047
dnl while keeping a definition of mkdir_p for backward compatibility.
 
7048
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
7049
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
7050
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
7051
dnl adjustment using top_builddir (which is defined more often than
 
7052
dnl MKDIR_P).
 
7053
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
7054
case $mkdir_p in
 
7055
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
7056
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
7057
esac
 
7058
])
 
7059
 
 
7060
# Helper functions for option handling.                     -*- Autoconf -*-
 
7061
 
 
7062
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
7063
#
 
7064
# This file is free software; the Free Software Foundation
 
7065
# gives unlimited permission to copy and/or distribute it,
 
7066
# with or without modifications, as long as this notice is preserved.
 
7067
 
 
7068
# serial 3
 
7069
 
 
7070
# _AM_MANGLE_OPTION(NAME)
 
7071
# -----------------------
 
7072
AC_DEFUN([_AM_MANGLE_OPTION],
 
7073
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
7074
 
 
7075
# _AM_SET_OPTION(NAME)
 
7076
# ------------------------------
 
7077
# Set option NAME.  Presently that only means defining a flag for this option.
 
7078
AC_DEFUN([_AM_SET_OPTION],
 
7079
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
7080
 
 
7081
# _AM_SET_OPTIONS(OPTIONS)
 
7082
# ----------------------------------
 
7083
# OPTIONS is a space-separated list of Automake options.
 
7084
AC_DEFUN([_AM_SET_OPTIONS],
 
7085
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
7086
 
 
7087
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
7088
# -------------------------------------------
 
7089
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
7090
AC_DEFUN([_AM_IF_OPTION],
 
7091
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
7092
 
 
7093
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
7094
 
 
7095
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
7096
# Free Software Foundation, Inc.
 
7097
#
 
7098
# This file is free software; the Free Software Foundation
 
7099
# gives unlimited permission to copy and/or distribute it,
 
7100
# with or without modifications, as long as this notice is preserved.
 
7101
 
 
7102
# serial 4
 
7103
 
 
7104
# AM_SANITY_CHECK
 
7105
# ---------------
 
7106
AC_DEFUN([AM_SANITY_CHECK],
 
7107
[AC_MSG_CHECKING([whether build environment is sane])
 
7108
# Just in case
 
7109
sleep 1
 
7110
echo timestamp > conftest.file
 
7111
# Do `set' in a subshell so we don't clobber the current shell's
 
7112
# arguments.  Must try -L first in case configure is actually a
 
7113
# symlink; some systems play weird games with the mod time of symlinks
 
7114
# (eg FreeBSD returns the mod time of the symlink's containing
 
7115
# directory).
 
7116
if (
 
7117
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
7118
   if test "$[*]" = "X"; then
 
7119
      # -L didn't work.
 
7120
      set X `ls -t $srcdir/configure conftest.file`
 
7121
   fi
 
7122
   rm -f conftest.file
 
7123
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
7124
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
7125
 
 
7126
      # If neither matched, then we have a broken ls.  This can happen
 
7127
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
7128
      # broken ls alias from the environment.  This has actually
 
7129
      # happened.  Such a system could not be considered "sane".
 
7130
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
7131
alias in your environment])
 
7132
   fi
 
7133
 
 
7134
   test "$[2]" = conftest.file
 
7135
   )
 
7136
then
 
7137
   # Ok.
 
7138
   :
 
7139
else
 
7140
   AC_MSG_ERROR([newly created file is older than distributed files!
 
7141
Check your system clock])
 
7142
fi
 
7143
AC_MSG_RESULT(yes)])
 
7144
 
 
7145
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
7146
#
 
7147
# This file is free software; the Free Software Foundation
 
7148
# gives unlimited permission to copy and/or distribute it,
 
7149
# with or without modifications, as long as this notice is preserved.
 
7150
 
 
7151
# AM_PROG_INSTALL_STRIP
 
7152
# ---------------------
 
7153
# One issue with vendor `install' (even GNU) is that you can't
 
7154
# specify the program used to strip binaries.  This is especially
 
7155
# annoying in cross-compiling environments, where the build's strip
 
7156
# is unlikely to handle the host's binaries.
 
7157
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
7158
# always use install-sh in `make install-strip', and initialize
 
7159
# STRIPPROG with the value of the STRIP variable (set by the user).
 
7160
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
7161
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
7162
# Installed binaries are usually stripped using `strip' when the user
 
7163
# run `make install-strip'.  However `strip' might not be the right
 
7164
# tool to use in cross-compilation environments, therefore Automake
 
7165
# will honor the `STRIP' environment variable to overrule this program.
 
7166
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
7167
if test "$cross_compiling" != no; then
 
7168
  AC_CHECK_TOOL([STRIP], [strip], :)
 
7169
fi
 
7170
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
7171
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
7172
 
 
7173
# Copyright (C) 2006  Free Software Foundation, Inc.
 
7174
#
 
7175
# This file is free software; the Free Software Foundation
 
7176
# gives unlimited permission to copy and/or distribute it,
 
7177
# with or without modifications, as long as this notice is preserved.
 
7178
 
 
7179
# _AM_SUBST_NOTMAKE(VARIABLE)
 
7180
# ---------------------------
 
7181
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
7182
# This macro is traced by Automake.
 
7183
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
7184
 
 
7185
# Check how to create a tarball.                            -*- Autoconf -*-
 
7186
 
 
7187
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
7188
#
 
7189
# This file is free software; the Free Software Foundation
 
7190
# gives unlimited permission to copy and/or distribute it,
 
7191
# with or without modifications, as long as this notice is preserved.
 
7192
 
 
7193
# serial 2
 
7194
 
 
7195
# _AM_PROG_TAR(FORMAT)
 
7196
# --------------------
 
7197
# Check how to create a tarball in format FORMAT.
 
7198
# FORMAT should be one of `v7', `ustar', or `pax'.
 
7199
#
 
7200
# Substitute a variable $(am__tar) that is a command
 
7201
# writing to stdout a FORMAT-tarball containing the directory
 
7202
# $tardir.
 
7203
#     tardir=directory && $(am__tar) > result.tar
 
7204
#
 
7205
# Substitute a variable $(am__untar) that extract such
 
7206
# a tarball read from stdin.
 
7207
#     $(am__untar) < result.tar
 
7208
AC_DEFUN([_AM_PROG_TAR],
 
7209
[# Always define AMTAR for backward compatibility.
 
7210
AM_MISSING_PROG([AMTAR], [tar])
 
7211
m4_if([$1], [v7],
 
7212
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
7213
     [m4_case([$1], [ustar],, [pax],,
 
7214
              [m4_fatal([Unknown tar format])])
 
7215
AC_MSG_CHECKING([how to create a $1 tar archive])
 
7216
# Loop over all known methods to create a tar archive until one works.
 
7217
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
7218
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
7219
# Do not fold the above two line into one, because Tru64 sh and
 
7220
# Solaris sh will not grok spaces in the rhs of `-'.
 
7221
for _am_tool in $_am_tools
 
7222
do
 
7223
  case $_am_tool in
 
7224
  gnutar)
 
7225
    for _am_tar in tar gnutar gtar;
 
7226
    do
 
7227
      AM_RUN_LOG([$_am_tar --version]) && break
 
7228
    done
 
7229
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
7230
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
7231
    am__untar="$_am_tar -xf -"
 
7232
    ;;
 
7233
  plaintar)
 
7234
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
7235
    # ustar tarball either.
 
7236
    (tar --version) >/dev/null 2>&1 && continue
 
7237
    am__tar='tar chf - "$$tardir"'
 
7238
    am__tar_='tar chf - "$tardir"'
 
7239
    am__untar='tar xf -'
 
7240
    ;;
 
7241
  pax)
 
7242
    am__tar='pax -L -x $1 -w "$$tardir"'
 
7243
    am__tar_='pax -L -x $1 -w "$tardir"'
 
7244
    am__untar='pax -r'
 
7245
    ;;
 
7246
  cpio)
 
7247
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
7248
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
7249
    am__untar='cpio -i -H $1 -d'
 
7250
    ;;
 
7251
  none)
 
7252
    am__tar=false
 
7253
    am__tar_=false
 
7254
    am__untar=false
 
7255
    ;;
 
7256
  esac
 
7257
 
 
7258
  # If the value was cached, stop now.  We just wanted to have am__tar
 
7259
  # and am__untar set.
 
7260
  test -n "${am_cv_prog_tar_$1}" && break
 
7261
 
 
7262
  # tar/untar a dummy directory, and stop if the command works
 
7263
  rm -rf conftest.dir
 
7264
  mkdir conftest.dir
 
7265
  echo GrepMe > conftest.dir/file
 
7266
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
7267
  rm -rf conftest.dir
 
7268
  if test -s conftest.tar; then
 
7269
    AM_RUN_LOG([$am__untar <conftest.tar])
 
7270
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
7271
  fi
 
7272
done
 
7273
rm -rf conftest.dir
 
7274
 
 
7275
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
7276
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
7277
AC_SUBST([am__tar])
 
7278
AC_SUBST([am__untar])
 
7279
]) # _AM_PROG_TAR
 
7280
 
 
7281
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
 
7282
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
 
7283
#
 
7284
# This file is free software, distributed under the terms of the GNU
 
7285
# General Public License.  As a special exception to the GNU General
 
7286
# Public License, this file may be distributed as part of a program
 
7287
# that contains a configuration script generated by Autoconf, under
 
7288
# the same distribution terms as the rest of that program.
 
7289
#
 
7290
# This file can be copied and used freely without restrictions.  It can
 
7291
# be used in projects which are not available under the GNU Public License
 
7292
# but which still want to provide support for the GNU gettext functionality.
 
7293
#
 
7294
# Macro to add for using GNU gettext.
 
7295
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
 
7296
#
 
7297
# Modified to never use included libintl. 
 
7298
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
 
7299
#
 
7300
# Major rework to remove unused code
 
7301
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
 
7302
#
 
7303
# Added better handling of ALL_LINGUAS from GNU gettext version 
 
7304
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
 
7305
#
 
7306
# Modified to require ngettext
 
7307
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
 
7308
#
 
7309
# We need this here as well, since someone might use autoconf-2.5x
 
7310
# to configure GLib then an older version to configure a package
 
7311
# using AM_GLIB_GNU_GETTEXT
 
7312
AC_PREREQ(2.53)
 
7313
 
 
7314
dnl
 
7315
dnl We go to great lengths to make sure that aclocal won't 
 
7316
dnl try to pull in the installed version of these macros
 
7317
dnl when running aclocal in the glib directory.
 
7318
dnl
 
7319
m4_copy([AC_DEFUN],[glib_DEFUN])
 
7320
m4_copy([AC_REQUIRE],[glib_REQUIRE])
 
7321
dnl
 
7322
dnl At the end, if we're not within glib, we'll define the public
 
7323
dnl definitions in terms of our private definitions.
 
7324
dnl
 
7325
 
 
7326
# GLIB_LC_MESSAGES
 
7327
#--------------------
 
7328
glib_DEFUN([GLIB_LC_MESSAGES],
 
7329
  [AC_CHECK_HEADERS([locale.h])
 
7330
    if test $ac_cv_header_locale_h = yes; then
 
7331
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
7332
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
7333
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
7334
    if test $am_cv_val_LC_MESSAGES = yes; then
 
7335
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
7336
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
7337
    fi
 
7338
  fi])
 
7339
 
 
7340
# GLIB_PATH_PROG_WITH_TEST
 
7341
#----------------------------
 
7342
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
7343
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
7344
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
 
7345
[# Extract the first word of "$2", so it can be a program name with args.
 
7346
set dummy $2; ac_word=[$]2
 
7347
AC_MSG_CHECKING([for $ac_word])
 
7348
AC_CACHE_VAL(ac_cv_path_$1,
 
7349
[case "[$]$1" in
 
7350
  /*)
 
7351
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
7352
  ;;
 
7353
  *)
 
7354
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
7355
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
7356
    test -z "$ac_dir" && ac_dir=.
 
7357
    if test -f $ac_dir/$ac_word; then
 
7358
      if [$3]; then
 
7359
        ac_cv_path_$1="$ac_dir/$ac_word"
 
7360
        break
 
7361
      fi
 
7362
    fi
 
7363
  done
 
7364
  IFS="$ac_save_ifs"
 
7365
dnl If no 4th arg is given, leave the cache variable unset,
 
7366
dnl so AC_PATH_PROGS will keep looking.
 
7367
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
7368
])dnl
 
7369
  ;;
 
7370
esac])dnl
 
7371
$1="$ac_cv_path_$1"
 
7372
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
7373
  AC_MSG_RESULT([$]$1)
 
7374
else
 
7375
  AC_MSG_RESULT(no)
 
7376
fi
 
7377
AC_SUBST($1)dnl
 
7378
])
 
7379
 
 
7380
# GLIB_WITH_NLS
 
7381
#-----------------
 
7382
glib_DEFUN([GLIB_WITH_NLS],
 
7383
  dnl NLS is obligatory
 
7384
  [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
7385
    USE_NLS=yes
 
7386
    AC_SUBST(USE_NLS)
 
7387
 
 
7388
    gt_cv_have_gettext=no
 
7389
 
 
7390
    CATOBJEXT=NONE
 
7391
    XGETTEXT=:
 
7392
    INTLLIBS=
 
7393
 
 
7394
    AC_CHECK_HEADER(libintl.h,
 
7395
     [gt_cv_func_dgettext_libintl="no"
 
7396
      libintl_extra_libs=""
 
7397
 
 
7398
      #
 
7399
      # First check in libc
 
7400
      #
 
7401
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
 
7402
        [AC_TRY_LINK([
 
7403
#include <libintl.h>
 
7404
],
 
7405
         [return !ngettext ("","", 1)],
 
7406
          gt_cv_func_ngettext_libc=yes,
 
7407
          gt_cv_func_ngettext_libc=no)
 
7408
        ])
 
7409
  
 
7410
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
7411
              AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
 
7412
                [AC_TRY_LINK([
 
7413
#include <libintl.h>
 
7414
],
 
7415
                  [return !dgettext ("","")],
 
7416
                  gt_cv_func_dgettext_libc=yes,
 
7417
                  gt_cv_func_dgettext_libc=no)
 
7418
                ])
 
7419
      fi
 
7420
  
 
7421
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
 
7422
        AC_CHECK_FUNCS(bind_textdomain_codeset)
 
7423
      fi
 
7424
 
 
7425
      #
 
7426
      # If we don't have everything we want, check in libintl
 
7427
      #
 
7428
      if test "$gt_cv_func_dgettext_libc" != "yes" \
 
7429
         || test "$gt_cv_func_ngettext_libc" != "yes" \
 
7430
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
 
7431
        
 
7432
        AC_CHECK_LIB(intl, bindtextdomain,
 
7433
            [AC_CHECK_LIB(intl, ngettext,
 
7434
                    [AC_CHECK_LIB(intl, dgettext,
 
7435
                                  gt_cv_func_dgettext_libintl=yes)])])
 
7436
 
 
7437
        if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
 
7438
          AC_MSG_CHECKING([if -liconv is needed to use gettext])
 
7439
          AC_MSG_RESULT([])
 
7440
          AC_CHECK_LIB(intl, ngettext,
 
7441
                [AC_CHECK_LIB(intl, dcgettext,
 
7442
                       [gt_cv_func_dgettext_libintl=yes
 
7443
                        libintl_extra_libs=-liconv],
 
7444
                        :,-liconv)],
 
7445
                :,-liconv)
 
7446
        fi
 
7447
 
 
7448
        #
 
7449
        # If we found libintl, then check in it for bind_textdomain_codeset();
 
7450
        # we'll prefer libc if neither have bind_textdomain_codeset(),
 
7451
        # and both have dgettext and ngettext
 
7452
        #
 
7453
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
 
7454
          glib_save_LIBS="$LIBS"
 
7455
          LIBS="$LIBS -lintl $libintl_extra_libs"
 
7456
          unset ac_cv_func_bind_textdomain_codeset
 
7457
          AC_CHECK_FUNCS(bind_textdomain_codeset)
 
7458
          LIBS="$glib_save_LIBS"
 
7459
 
 
7460
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
 
7461
            gt_cv_func_dgettext_libc=no
 
7462
          else
 
7463
            if test "$gt_cv_func_dgettext_libc" = "yes" \
 
7464
                && test "$gt_cv_func_ngettext_libc" = "yes"; then
 
7465
              gt_cv_func_dgettext_libintl=no
 
7466
            fi
 
7467
          fi
 
7468
        fi
 
7469
      fi
 
7470
 
 
7471
      if test "$gt_cv_func_dgettext_libc" = "yes" \
 
7472
        || test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
7473
        gt_cv_have_gettext=yes
 
7474
      fi
 
7475
  
 
7476
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
 
7477
        INTLLIBS="-lintl $libintl_extra_libs"
 
7478
      fi
 
7479
  
 
7480
      if test "$gt_cv_have_gettext" = "yes"; then
 
7481
        AC_DEFINE(HAVE_GETTEXT,1,
 
7482
          [Define if the GNU gettext() function is already present or preinstalled.])
 
7483
        GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
7484
          [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
 
7485
        if test "$MSGFMT" != "no"; then
 
7486
          glib_save_LIBS="$LIBS"
 
7487
          LIBS="$LIBS $INTLLIBS"
 
7488
          AC_CHECK_FUNCS(dcgettext)
 
7489
          MSGFMT_OPTS=
 
7490
          AC_MSG_CHECKING([if msgfmt accepts -c])
 
7491
          GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
 
7492
msgid ""
 
7493
msgstr ""
 
7494
"Content-Type: text/plain; charset=UTF-8\n"
 
7495
"Project-Id-Version: test 1.0\n"
 
7496
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
 
7497
"Last-Translator: test <foo@bar.xx>\n"
 
7498
"Language-Team: C <LL@li.org>\n"
 
7499
"MIME-Version: 1.0\n"
 
7500
"Content-Transfer-Encoding: 8bit\n"
 
7501
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
7502
          AC_SUBST(MSGFMT_OPTS)
 
7503
          AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
7504
          GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
7505
            [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
 
7506
          AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
 
7507
                         return _nl_msg_cat_cntr],
 
7508
            [CATOBJEXT=.gmo 
 
7509
             DATADIRNAME=share],
 
7510
            [case $host in
 
7511
            *-*-solaris*)
 
7512
            dnl On Solaris, if bind_textdomain_codeset is in libc,
 
7513
            dnl GNU format message catalog is always supported,
 
7514
            dnl since both are added to the libc all together.
 
7515
            dnl Hence, we'd like to go with DATADIRNAME=share and
 
7516
            dnl and CATOBJEXT=.gmo in this case.
 
7517
            AC_CHECK_FUNC(bind_textdomain_codeset,
 
7518
              [CATOBJEXT=.gmo 
 
7519
               DATADIRNAME=share],
 
7520
              [CATOBJEXT=.mo
 
7521
               DATADIRNAME=lib])
 
7522
            ;;
 
7523
            *)
 
7524
            CATOBJEXT=.mo
 
7525
            DATADIRNAME=lib
 
7526
            ;;
 
7527
            esac])
 
7528
          LIBS="$glib_save_LIBS"
 
7529
          INSTOBJEXT=.mo
 
7530
        else
 
7531
          gt_cv_have_gettext=no
 
7532
        fi
 
7533
      fi
 
7534
    ])
 
7535
 
 
7536
    if test "$gt_cv_have_gettext" = "yes" ; then
 
7537
      AC_DEFINE(ENABLE_NLS, 1,
 
7538
        [always defined to indicate that i18n is enabled])
 
7539
    fi
 
7540
 
 
7541
    dnl Test whether we really found GNU xgettext.
 
7542
    if test "$XGETTEXT" != ":"; then
 
7543
      dnl If it is not GNU xgettext we define it as : so that the
 
7544
      dnl Makefiles still can work.
 
7545
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
 
7546
        : ;
 
7547
      else
 
7548
        AC_MSG_RESULT(
 
7549
          [found xgettext program is not GNU xgettext; ignore it])
 
7550
        XGETTEXT=":"
 
7551
      fi
 
7552
    fi
 
7553
 
 
7554
    # We need to process the po/ directory.
 
7555
    POSUB=po
 
7556
 
 
7557
    AC_OUTPUT_COMMANDS(
 
7558
      [case "$CONFIG_FILES" in *po/Makefile.in*)
 
7559
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
 
7560
      esac])
 
7561
 
 
7562
    dnl These rules are solely for the distribution goal.  While doing this
 
7563
    dnl we only have to keep exactly one list of the available catalogs
 
7564
    dnl in configure.in.
 
7565
    for lang in $ALL_LINGUAS; do
 
7566
      GMOFILES="$GMOFILES $lang.gmo"
 
7567
      POFILES="$POFILES $lang.po"
 
7568
    done
 
7569
 
 
7570
    dnl Make all variables we use known to autoconf.
 
7571
    AC_SUBST(CATALOGS)
 
7572
    AC_SUBST(CATOBJEXT)
 
7573
    AC_SUBST(DATADIRNAME)
 
7574
    AC_SUBST(GMOFILES)
 
7575
    AC_SUBST(INSTOBJEXT)
 
7576
    AC_SUBST(INTLLIBS)
 
7577
    AC_SUBST(PO_IN_DATADIR_TRUE)
 
7578
    AC_SUBST(PO_IN_DATADIR_FALSE)
 
7579
    AC_SUBST(POFILES)
 
7580
    AC_SUBST(POSUB)
 
7581
  ])
 
7582
 
 
7583
# AM_GLIB_GNU_GETTEXT
 
7584
# -------------------
 
7585
# Do checks necessary for use of gettext. If a suitable implementation 
 
7586
# of gettext is found in either in libintl or in the C library,
 
7587
# it will set INTLLIBS to the libraries needed for use of gettext
 
7588
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
 
7589
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
 
7590
# on various variables needed by the Makefile.in.in installed by 
 
7591
# glib-gettextize.
 
7592
dnl
 
7593
glib_DEFUN([GLIB_GNU_GETTEXT],
 
7594
  [AC_REQUIRE([AC_PROG_CC])dnl
 
7595
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
7596
   
 
7597
   GLIB_LC_MESSAGES
 
7598
   GLIB_WITH_NLS
 
7599
 
 
7600
   if test "$gt_cv_have_gettext" = "yes"; then
 
7601
     if test "x$ALL_LINGUAS" = "x"; then
 
7602
       LINGUAS=
 
7603
     else
 
7604
       AC_MSG_CHECKING(for catalogs to be installed)
 
7605
       NEW_LINGUAS=
 
7606
       for presentlang in $ALL_LINGUAS; do
 
7607
         useit=no
 
7608
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
 
7609
           desiredlanguages="$LINGUAS"
 
7610
         else
 
7611
           desiredlanguages="$ALL_LINGUAS"
 
7612
         fi
 
7613
         for desiredlang in $desiredlanguages; do
 
7614
           # Use the presentlang catalog if desiredlang is
 
7615
           #   a. equal to presentlang, or
 
7616
           #   b. a variant of presentlang (because in this case,
 
7617
           #      presentlang can be used as a fallback for messages
 
7618
           #      which are not translated in the desiredlang catalog).
 
7619
           case "$desiredlang" in
 
7620
             "$presentlang"*) useit=yes;;
 
7621
           esac
 
7622
         done
 
7623
         if test $useit = yes; then
 
7624
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
7625
         fi
 
7626
       done
 
7627
       LINGUAS=$NEW_LINGUAS
 
7628
       AC_MSG_RESULT($LINGUAS)
 
7629
     fi
 
7630
 
 
7631
     dnl Construct list of names of catalog files to be constructed.
 
7632
     if test -n "$LINGUAS"; then
 
7633
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
7634
     fi
 
7635
   fi
 
7636
 
 
7637
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
7638
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
 
7639
   dnl Try to locate is.
 
7640
   MKINSTALLDIRS=
 
7641
   if test -n "$ac_aux_dir"; then
 
7642
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
7643
   fi
 
7644
   if test -z "$MKINSTALLDIRS"; then
 
7645
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
7646
   fi
 
7647
   AC_SUBST(MKINSTALLDIRS)
 
7648
 
 
7649
   dnl Generate list of files to be processed by xgettext which will
 
7650
   dnl be included in po/Makefile.
 
7651
   test -d po || mkdir po
 
7652
   if test "x$srcdir" != "x."; then
 
7653
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
 
7654
       posrcprefix="$srcdir/"
 
7655
     else
 
7656
       posrcprefix="../$srcdir/"
 
7657
     fi
 
7658
   else
 
7659
     posrcprefix="../"
 
7660
   fi
 
7661
   rm -f po/POTFILES
 
7662
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
 
7663
        < $srcdir/po/POTFILES.in > po/POTFILES
 
7664
  ])
 
7665
 
 
7666
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
 
7667
# -------------------------------
 
7668
# Define VARIABLE to the location where catalog files will
 
7669
# be installed by po/Makefile.
 
7670
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
 
7671
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
 
7672
glib_save_prefix="$prefix"
 
7673
glib_save_exec_prefix="$exec_prefix"
 
7674
glib_save_datarootdir="$datarootdir"
 
7675
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
7676
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
 
7677
datarootdir=`eval echo "${datarootdir}"`
 
7678
if test "x$CATOBJEXT" = "x.mo" ; then
 
7679
  localedir=`eval echo "${libdir}/locale"`
 
7680
else
 
7681
  localedir=`eval echo "${datadir}/locale"`
 
7682
fi
 
7683
prefix="$glib_save_prefix"
 
7684
exec_prefix="$glib_save_exec_prefix"
 
7685
datarootdir="$glib_save_datarootdir"
 
7686
AC_DEFINE_UNQUOTED($1, "$localedir",
 
7687
  [Define the location where the catalogs will be installed])
 
7688
])
 
7689
 
 
7690
dnl
 
7691
dnl Now the definitions that aclocal will find
 
7692
dnl
 
7693
ifdef(glib_configure_in,[],[
 
7694
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
 
7695
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
 
7696
])dnl
 
7697
 
 
7698
# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
 
7699
 
7700
# Create a temporary file with TEST-FILE as its contents and pass the
 
7701
# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
 
7702
# 0 and perform ACTION-IF-FAIL for any other exit status.
 
7703
AC_DEFUN([GLIB_RUN_PROG],
 
7704
[cat >conftest.foo <<_ACEOF
 
7705
$2
 
7706
_ACEOF
 
7707
if AC_RUN_LOG([$1 conftest.foo]); then
 
7708
  m4_ifval([$3], [$3], [:])
 
7709
m4_ifvaln([$4], [else $4])dnl
 
7710
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
 
7711
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
 
7712
fi])
 
7713
 
 
7714
 
 
7715
dnl GNOME_COMPILE_WARNINGS
 
7716
dnl Turn on many useful compiler warnings
 
7717
dnl For now, only works on GCC
 
7718
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
7719
    dnl ******************************
 
7720
    dnl More compiler warnings
 
7721
    dnl ******************************
 
7722
 
 
7723
    AC_ARG_ENABLE(compile-warnings, 
 
7724
                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
 
7725
                                 [Turn on compiler warnings]),,
 
7726
                  [enable_compile_warnings="m4_default([$1],[yes])"])
 
7727
 
 
7728
    warnCFLAGS=
 
7729
    if test "x$GCC" != xyes; then
 
7730
        enable_compile_warnings=no
 
7731
    fi
 
7732
 
 
7733
    warning_flags=
 
7734
    realsave_CFLAGS="$CFLAGS"
 
7735
 
 
7736
    case "$enable_compile_warnings" in
 
7737
    no)
 
7738
        warning_flags=
 
7739
        ;;
 
7740
    minimum)
 
7741
        warning_flags="-Wall"
 
7742
        ;;
 
7743
    yes)
 
7744
        warning_flags="-Wall -Wmissing-prototypes"
 
7745
        ;;
 
7746
    maximum|error)
 
7747
        warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
7748
        CFLAGS="$warning_flags $CFLAGS"
 
7749
        for option in -Wno-sign-compare; do
 
7750
                SAVE_CFLAGS="$CFLAGS"
 
7751
                CFLAGS="$CFLAGS $option"
 
7752
                AC_MSG_CHECKING([whether gcc understands $option])
 
7753
                AC_TRY_COMPILE([], [],
 
7754
                        has_option=yes,
 
7755
                        has_option=no,)
 
7756
                CFLAGS="$SAVE_CFLAGS"
 
7757
                AC_MSG_RESULT($has_option)
 
7758
                if test $has_option = yes; then
 
7759
                  warning_flags="$warning_flags $option"
 
7760
                fi
 
7761
                unset has_option
 
7762
                unset SAVE_CFLAGS
 
7763
        done
 
7764
        unset option
 
7765
        if test "$enable_compile_warnings" = "error" ; then
 
7766
            warning_flags="$warning_flags -Werror"
 
7767
        fi
 
7768
        ;;
 
7769
    *)
 
7770
        AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
 
7771
        ;;
 
7772
    esac
 
7773
    CFLAGS="$realsave_CFLAGS"
 
7774
    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
7775
    AC_MSG_RESULT($warning_flags)
 
7776
 
 
7777
    AC_ARG_ENABLE(iso-c,
 
7778
                  AC_HELP_STRING([--enable-iso-c],
 
7779
                                 [Try to warn if code is not ISO C ]),,
 
7780
                  [enable_iso_c=no])
 
7781
 
 
7782
    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
7783
    complCFLAGS=
 
7784
    if test "x$enable_iso_c" != "xno"; then
 
7785
        if test "x$GCC" = "xyes"; then
 
7786
        case " $CFLAGS " in
 
7787
            *[\ \       ]-ansi[\ \      ]*) ;;
 
7788
            *) complCFLAGS="$complCFLAGS -ansi" ;;
 
7789
        esac
 
7790
        case " $CFLAGS " in
 
7791
            *[\ \       ]-pedantic[\ \  ]*) ;;
 
7792
            *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
7793
        esac
 
7794
        fi
 
7795
    fi
 
7796
    AC_MSG_RESULT($complCFLAGS)
 
7797
 
 
7798
    WARN_CFLAGS="$warning_flags $complCFLAGS"
 
7799
    AC_SUBST(WARN_CFLAGS)
 
7800
])
 
7801
 
 
7802
dnl For C++, do basically the same thing.
 
7803
 
 
7804
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
7805
  AC_ARG_ENABLE(cxx-warnings,
 
7806
                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
 
7807
                               [Turn on compiler warnings.]),,
 
7808
                [enable_cxx_warnings="m4_default([$1],[minimum])"])
 
7809
 
 
7810
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
7811
  warnCXXFLAGS=
 
7812
  if test "x$GXX" != xyes; then
 
7813
    enable_cxx_warnings=no
 
7814
  fi
 
7815
  if test "x$enable_cxx_warnings" != "xno"; then
 
7816
    if test "x$GXX" = "xyes"; then
 
7817
      case " $CXXFLAGS " in
 
7818
      *[\ \     ]-Wall[\ \      ]*) ;;
 
7819
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
7820
      esac
 
7821
 
 
7822
      ## -W is not all that useful.  And it cannot be controlled
 
7823
      ## with individual -Wno-xxx flags, unlike -Wall
 
7824
      if test "x$enable_cxx_warnings" = "xyes"; then
 
7825
        warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
 
7826
      fi
 
7827
    fi
 
7828
  fi
 
7829
  AC_MSG_RESULT($warnCXXFLAGS)
 
7830
 
 
7831
   AC_ARG_ENABLE(iso-cxx,
 
7832
                 AC_HELP_STRING([--enable-iso-cxx],
 
7833
                                [Try to warn if code is not ISO C++ ]),,
 
7834
                 [enable_iso_cxx=no])
 
7835
 
 
7836
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
7837
   complCXXFLAGS=
 
7838
   if test "x$enable_iso_cxx" != "xno"; then
 
7839
     if test "x$GXX" = "xyes"; then
 
7840
      case " $CXXFLAGS " in
 
7841
      *[\ \     ]-ansi[\ \      ]*) ;;
 
7842
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
7843
      esac
 
7844
 
 
7845
      case " $CXXFLAGS " in
 
7846
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
7847
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
7848
      esac
 
7849
     fi
 
7850
   fi
 
7851
  AC_MSG_RESULT($complCXXFLAGS)
 
7852
 
 
7853
  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
7854
  AC_SUBST(WARN_CXXFLAGS)
 
7855
])
 
7856
 
7857
7857
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7858
7858
7859
7859
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7922
7922
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7923
7923
# ---------------------------------------------
7924
7924
m4_define([_PKG_CONFIG],
7925
 
[if test -n "$PKG_CONFIG"; then
7926
 
    if test -n "$$1"; then
7927
 
        pkg_cv_[]$1="$$1"
7928
 
    else
7929
 
        PKG_CHECK_EXISTS([$3],
7930
 
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7931
 
                         [pkg_failed=yes])
7932
 
    fi
7933
 
else
7934
 
        pkg_failed=untried
 
7925
[if test -n "$$1"; then
 
7926
    pkg_cv_[]$1="$$1"
 
7927
 elif test -n "$PKG_CONFIG"; then
 
7928
    PKG_CHECK_EXISTS([$3],
 
7929
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
7930
                     [pkg_failed=yes])
 
7931
 else
 
7932
    pkg_failed=untried
7935
7933
fi[]dnl
7936
7934
])# _PKG_CONFIG
7937
7935
 
7975
7973
if test $pkg_failed = yes; then
7976
7974
        _PKG_SHORT_ERRORS_SUPPORTED
7977
7975
        if test $_pkg_short_errors_supported = yes; then
7978
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
7976
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
7979
7977
        else 
7980
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
7978
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
7981
7979
        fi
7982
7980
        # Put the nasty error message in config.log where it belongs
7983
7981
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD