~ubuntu-branches/ubuntu/karmic/mono-addins/karmic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Mirco Bauer
  • Date: 2007-07-14 12:07:48 UTC
  • Revision ID: james.westby@ubuntu.com-20070714120748-2elczfsjlrdsrpms
Tags: upstream-0.2
ImportĀ upstreamĀ versionĀ 0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005  Free Software Foundation, Inc.
 
5
# This file is free software; the Free Software Foundation
 
6
# gives unlimited permission to copy and/or distribute it,
 
7
# with or without modifications, as long as this notice is preserved.
 
8
 
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
12
# PARTICULAR PURPOSE.
 
13
 
 
14
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
15
 
16
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
 
17
#
 
18
# This program is free software; you can redistribute it and/or modify
 
19
# it under the terms of the GNU General Public License as published by
 
20
# the Free Software Foundation; either version 2 of the License, or
 
21
# (at your option) any later version.
 
22
#
 
23
# This program is distributed in the hope that it will be useful, but
 
24
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
26
# General Public License for more details.
 
27
#
 
28
# You should have received a copy of the GNU General Public License
 
29
# along with this program; if not, write to the Free Software
 
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
31
#
 
32
# As a special exception to the GNU General Public License, if you
 
33
# distribute this file as part of a program that contains a
 
34
# configuration script generated by Autoconf, you may include it under
 
35
# the same distribution terms that you use for the rest of that program.
 
36
 
 
37
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
38
# ----------------------------------
 
39
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
40
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
41
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
42
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
43
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
44
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
45
fi
 
46
if test -n "$PKG_CONFIG"; then
 
47
        _pkg_min_version=m4_default([$1], [0.9.0])
 
48
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
49
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
50
                AC_MSG_RESULT([yes])
 
51
        else
 
52
                AC_MSG_RESULT([no])
 
53
                PKG_CONFIG=""
 
54
        fi
 
55
                
 
56
fi[]dnl
 
57
])# PKG_PROG_PKG_CONFIG
 
58
 
 
59
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
60
#
 
61
# Check to see whether a particular set of modules exists.  Similar
 
62
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
63
#
 
64
#
 
65
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
66
# this or PKG_CHECK_MODULES is called, or make sure to call
 
67
# PKG_CHECK_EXISTS manually
 
68
# --------------------------------------------------------------
 
69
AC_DEFUN([PKG_CHECK_EXISTS],
 
70
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
71
if test -n "$PKG_CONFIG" && \
 
72
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
73
  m4_ifval([$2], [$2], [:])
 
74
m4_ifvaln([$3], [else
 
75
  $3])dnl
 
76
fi])
 
77
 
 
78
 
 
79
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
80
# ---------------------------------------------
 
81
m4_define([_PKG_CONFIG],
 
82
[if test -n "$PKG_CONFIG"; then
 
83
    if test -n "$$1"; then
 
84
        pkg_cv_[]$1="$$1"
 
85
    else
 
86
        PKG_CHECK_EXISTS([$3],
 
87
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
88
                         [pkg_failed=yes])
 
89
    fi
 
90
else
 
91
        pkg_failed=untried
 
92
fi[]dnl
 
93
])# _PKG_CONFIG
 
94
 
 
95
# _PKG_SHORT_ERRORS_SUPPORTED
 
96
# -----------------------------
 
97
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
98
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
99
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
100
        _pkg_short_errors_supported=yes
 
101
else
 
102
        _pkg_short_errors_supported=no
 
103
fi[]dnl
 
104
])# _PKG_SHORT_ERRORS_SUPPORTED
 
105
 
 
106
 
 
107
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
108
# [ACTION-IF-NOT-FOUND])
 
109
#
 
110
#
 
111
# Note that if there is a possibility the first call to
 
112
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
113
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
114
#
 
115
#
 
116
# --------------------------------------------------------------
 
117
AC_DEFUN([PKG_CHECK_MODULES],
 
118
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
119
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
120
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
121
 
 
122
pkg_failed=no
 
123
AC_MSG_CHECKING([for $1])
 
124
 
 
125
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
126
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
127
 
 
128
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
129
and $1[]_LIBS to avoid the need to call pkg-config.
 
130
See the pkg-config man page for more details.])
 
131
 
 
132
if test $pkg_failed = yes; then
 
133
        _PKG_SHORT_ERRORS_SUPPORTED
 
134
        if test $_pkg_short_errors_supported = yes; then
 
135
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
136
        else 
 
137
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
138
        fi
 
139
        # Put the nasty error message in config.log where it belongs
 
140
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
141
 
 
142
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
143
[Package requirements ($2) were not met:
 
144
 
 
145
$$1_PKG_ERRORS
 
146
 
 
147
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
148
installed software in a non-standard prefix.
 
149
 
 
150
_PKG_TEXT
 
151
])],
 
152
                [$4])
 
153
elif test $pkg_failed = untried; then
 
154
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
155
[The pkg-config script could not be found or is too old.  Make sure it
 
156
is in your PATH or set the PKG_CONFIG environment variable to the full
 
157
path to pkg-config.
 
158
 
 
159
_PKG_TEXT
 
160
 
 
161
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
162
                [$4])
 
163
else
 
164
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
165
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
166
        AC_MSG_RESULT([yes])
 
167
        ifelse([$3], , :, [$3])
 
168
fi[]dnl
 
169
])# PKG_CHECK_MODULES
 
170
 
 
171
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
172
#
 
173
# This file is free software; the Free Software Foundation
 
174
# gives unlimited permission to copy and/or distribute it,
 
175
# with or without modifications, as long as this notice is preserved.
 
176
 
 
177
# AM_AUTOMAKE_VERSION(VERSION)
 
178
# ----------------------------
 
179
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
180
# generated from the m4 files accompanying Automake X.Y.
 
181
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
182
 
 
183
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
184
# -------------------------------
 
185
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
186
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
187
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
188
         [AM_AUTOMAKE_VERSION([1.9.6])])
 
189
 
 
190
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
191
 
 
192
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
193
#
 
194
# This file is free software; the Free Software Foundation
 
195
# gives unlimited permission to copy and/or distribute it,
 
196
# with or without modifications, as long as this notice is preserved.
 
197
 
 
198
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
199
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
200
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
201
#
 
202
# Of course, Automake must honor this variable whenever it calls a
 
203
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
204
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
205
# depending on how configure is run.  This is pretty annoying, since
 
206
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
207
# source directory, any form will work fine, but in subdirectories a
 
208
# relative path needs to be adjusted first.
 
209
#
 
210
# $ac_aux_dir/missing
 
211
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
212
# $top_srcdir/$ac_aux_dir/missing
 
213
#    fails if $ac_aux_dir is absolute,
 
214
#    fails when called from a subdirectory in a VPATH build with
 
215
#          a relative $ac_aux_dir
 
216
#
 
217
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
218
# are both prefixed by $srcdir.  In an in-source build this is usually
 
219
# harmless because $srcdir is `.', but things will broke when you
 
220
# start a VPATH build or use an absolute $srcdir.
 
221
#
 
222
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
223
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
224
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
225
# and then we would define $MISSING as
 
226
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
227
# This will work as long as MISSING is not called from configure, because
 
228
# unfortunately $(top_srcdir) has no meaning in configure.
 
229
# However there are other variables, like CC, which are often used in
 
230
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
231
#
 
232
# Another solution, used here, is to always expand $ac_aux_dir to an
 
233
# absolute PATH.  The drawback is that using absolute paths prevent a
 
234
# configured tree to be moved without reconfiguration.
 
235
 
 
236
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
237
[dnl Rely on autoconf to set up CDPATH properly.
 
238
AC_PREREQ([2.50])dnl
 
239
# expand $ac_aux_dir to an absolute path
 
240
am_aux_dir=`cd $ac_aux_dir && pwd`
 
241
])
 
242
 
 
243
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
244
 
 
245
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
246
# Free Software Foundation, Inc.
 
247
#
 
248
# This file is free software; the Free Software Foundation
 
249
# gives unlimited permission to copy and/or distribute it,
 
250
# with or without modifications, as long as this notice is preserved.
 
251
 
 
252
# serial 7
 
253
 
 
254
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
255
# -------------------------------------
 
256
# Define a conditional.
 
257
AC_DEFUN([AM_CONDITIONAL],
 
258
[AC_PREREQ(2.52)dnl
 
259
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
260
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
261
AC_SUBST([$1_TRUE])
 
262
AC_SUBST([$1_FALSE])
 
263
if $2; then
 
264
  $1_TRUE=
 
265
  $1_FALSE='#'
 
266
else
 
267
  $1_TRUE='#'
 
268
  $1_FALSE=
 
269
fi
 
270
AC_CONFIG_COMMANDS_PRE(
 
271
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
272
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
273
Usually this means the macro was only invoked conditionally.]])
 
274
fi])])
 
275
 
 
276
# Do all the work for Automake.                             -*- Autoconf -*-
 
277
 
 
278
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
279
# Free Software Foundation, Inc.
 
280
#
 
281
# This file is free software; the Free Software Foundation
 
282
# gives unlimited permission to copy and/or distribute it,
 
283
# with or without modifications, as long as this notice is preserved.
 
284
 
 
285
# serial 12
 
286
 
 
287
# This macro actually does too much.  Some checks are only needed if
 
288
# your package does certain things.  But this isn't really a big deal.
 
289
 
 
290
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
291
# AM_INIT_AUTOMAKE([OPTIONS])
 
292
# -----------------------------------------------
 
293
# The call with PACKAGE and VERSION arguments is the old style
 
294
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
295
# and VERSION should now be passed to AC_INIT and removed from
 
296
# the call to AM_INIT_AUTOMAKE.
 
297
# We support both call styles for the transition.  After
 
298
# the next Automake release, Autoconf can make the AC_INIT
 
299
# arguments mandatory, and then we can depend on a new Autoconf
 
300
# release and drop the old call support.
 
301
AC_DEFUN([AM_INIT_AUTOMAKE],
 
302
[AC_PREREQ([2.58])dnl
 
303
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
304
dnl the ones we care about.
 
305
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
306
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
307
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
308
# test to see if srcdir already configured
 
309
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
310
   test -f $srcdir/config.status; then
 
311
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
312
fi
 
313
 
 
314
# test whether we have cygpath
 
315
if test -z "$CYGPATH_W"; then
 
316
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
317
    CYGPATH_W='cygpath -w'
 
318
  else
 
319
    CYGPATH_W=echo
 
320
  fi
 
321
fi
 
322
AC_SUBST([CYGPATH_W])
 
323
 
 
324
# Define the identity of the package.
 
325
dnl Distinguish between old-style and new-style calls.
 
326
m4_ifval([$2],
 
327
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
328
 AC_SUBST([PACKAGE], [$1])dnl
 
329
 AC_SUBST([VERSION], [$2])],
 
330
[_AM_SET_OPTIONS([$1])dnl
 
331
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
332
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
333
 
 
334
_AM_IF_OPTION([no-define],,
 
335
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
336
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
337
 
 
338
# Some tools Automake needs.
 
339
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
340
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
341
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
342
AM_MISSING_PROG(AUTOCONF, autoconf)
 
343
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
344
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
345
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
346
AM_PROG_INSTALL_SH
 
347
AM_PROG_INSTALL_STRIP
 
348
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
349
# We need awk for the "check" target.  The system "awk" is bad on
 
350
# some platforms.
 
351
AC_REQUIRE([AC_PROG_AWK])dnl
 
352
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
353
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
354
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
355
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
356
                             [_AM_PROG_TAR([v7])])])
 
357
_AM_IF_OPTION([no-dependencies],,
 
358
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
359
                  [_AM_DEPENDENCIES(CC)],
 
360
                  [define([AC_PROG_CC],
 
361
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
362
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
363
                  [_AM_DEPENDENCIES(CXX)],
 
364
                  [define([AC_PROG_CXX],
 
365
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
366
])
 
367
])
 
368
 
 
369
 
 
370
# When config.status generates a header, we must update the stamp-h file.
 
371
# This file resides in the same directory as the config header
 
372
# that is generated.  The stamp files are numbered to have different names.
 
373
 
 
374
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
375
# loop where config.status creates the headers, so we can generate
 
376
# our stamp files there.
 
377
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
378
[# Compute $1's index in $config_headers.
 
379
_am_stamp_count=1
 
380
for _am_header in $config_headers :; do
 
381
  case $_am_header in
 
382
    $1 | $1:* )
 
383
      break ;;
 
384
    * )
 
385
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
386
  esac
 
387
done
 
388
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
389
 
 
390
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
391
#
 
392
# This file is free software; the Free Software Foundation
 
393
# gives unlimited permission to copy and/or distribute it,
 
394
# with or without modifications, as long as this notice is preserved.
 
395
 
 
396
# AM_PROG_INSTALL_SH
 
397
# ------------------
 
398
# Define $install_sh.
 
399
AC_DEFUN([AM_PROG_INSTALL_SH],
 
400
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
401
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
402
AC_SUBST(install_sh)])
 
403
 
 
404
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
405
#
 
406
# This file is free software; the Free Software Foundation
 
407
# gives unlimited permission to copy and/or distribute it,
 
408
# with or without modifications, as long as this notice is preserved.
 
409
 
 
410
# serial 2
 
411
 
 
412
# Check whether the underlying file-system supports filenames
 
413
# with a leading dot.  For instance MS-DOS doesn't.
 
414
AC_DEFUN([AM_SET_LEADING_DOT],
 
415
[rm -rf .tst 2>/dev/null
 
416
mkdir .tst 2>/dev/null
 
417
if test -d .tst; then
 
418
  am__leading_dot=.
 
419
else
 
420
  am__leading_dot=_
 
421
fi
 
422
rmdir .tst 2>/dev/null
 
423
AC_SUBST([am__leading_dot])])
 
424
 
 
425
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
426
 
 
427
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
428
# Free Software Foundation, Inc.
 
429
#
 
430
# This file is free software; the Free Software Foundation
 
431
# gives unlimited permission to copy and/or distribute it,
 
432
# with or without modifications, as long as this notice is preserved.
 
433
 
 
434
# serial 4
 
435
 
 
436
# AM_MISSING_PROG(NAME, PROGRAM)
 
437
# ------------------------------
 
438
AC_DEFUN([AM_MISSING_PROG],
 
439
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
440
$1=${$1-"${am_missing_run}$2"}
 
441
AC_SUBST($1)])
 
442
 
 
443
 
 
444
# AM_MISSING_HAS_RUN
 
445
# ------------------
 
446
# Define MISSING if not defined so far and test if it supports --run.
 
447
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
448
AC_DEFUN([AM_MISSING_HAS_RUN],
 
449
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
450
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
451
# Use eval to expand $SHELL
 
452
if eval "$MISSING --run true"; then
 
453
  am_missing_run="$MISSING --run "
 
454
else
 
455
  am_missing_run=
 
456
  AC_MSG_WARN([`missing' script is too old or missing])
 
457
fi
 
458
])
 
459
 
 
460
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
461
#
 
462
# This file is free software; the Free Software Foundation
 
463
# gives unlimited permission to copy and/or distribute it,
 
464
# with or without modifications, as long as this notice is preserved.
 
465
 
 
466
# AM_PROG_MKDIR_P
 
467
# ---------------
 
468
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
469
#
 
470
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
471
# created by `make install' are always world readable, even if the
 
472
# installer happens to have an overly restrictive umask (e.g. 077).
 
473
# This was a mistake.  There are at least two reasons why we must not
 
474
# use `-m 0755':
 
475
#   - it causes special bits like SGID to be ignored,
 
476
#   - it may be too restrictive (some setups expect 775 directories).
 
477
#
 
478
# Do not use -m 0755 and let people choose whatever they expect by
 
479
# setting umask.
 
480
#
 
481
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
482
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
483
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
484
# concurrently, both version can detect that a/ is missing, but only
 
485
# one can create it and the other will error out.  Consequently we
 
486
# restrict ourselves to GNU make (using the --version option ensures
 
487
# this.)
 
488
AC_DEFUN([AM_PROG_MKDIR_P],
 
489
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
490
  # We used to keeping the `.' as first argument, in order to
 
491
  # allow $(mkdir_p) to be used without argument.  As in
 
492
  #   $(mkdir_p) $(somedir)
 
493
  # where $(somedir) is conditionally defined.  However this is wrong
 
494
  # for two reasons:
 
495
  #  1. if the package is installed by a user who cannot write `.'
 
496
  #     make install will fail,
 
497
  #  2. the above comment should most certainly read
 
498
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
499
  #     so it does not work when $(somedir) is undefined and
 
500
  #     $(DESTDIR) is not.
 
501
  #  To support the latter case, we have to write
 
502
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
503
  #  so the `.' trick is pointless.
 
504
  mkdir_p='mkdir -p --'
 
505
else
 
506
  # On NextStep and OpenStep, the `mkdir' command does not
 
507
  # recognize any option.  It will interpret all options as
 
508
  # directories to create, and then abort because `.' already
 
509
  # exists.
 
510
  for d in ./-p ./--version;
 
511
  do
 
512
    test -d $d && rmdir $d
 
513
  done
 
514
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
515
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
516
    mkdir_p='$(mkinstalldirs)'
 
517
  else
 
518
    mkdir_p='$(install_sh) -d'
 
519
  fi
 
520
fi
 
521
AC_SUBST([mkdir_p])])
 
522
 
 
523
# Helper functions for option handling.                     -*- Autoconf -*-
 
524
 
 
525
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
526
#
 
527
# This file is free software; the Free Software Foundation
 
528
# gives unlimited permission to copy and/or distribute it,
 
529
# with or without modifications, as long as this notice is preserved.
 
530
 
 
531
# serial 3
 
532
 
 
533
# _AM_MANGLE_OPTION(NAME)
 
534
# -----------------------
 
535
AC_DEFUN([_AM_MANGLE_OPTION],
 
536
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
537
 
 
538
# _AM_SET_OPTION(NAME)
 
539
# ------------------------------
 
540
# Set option NAME.  Presently that only means defining a flag for this option.
 
541
AC_DEFUN([_AM_SET_OPTION],
 
542
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
543
 
 
544
# _AM_SET_OPTIONS(OPTIONS)
 
545
# ----------------------------------
 
546
# OPTIONS is a space-separated list of Automake options.
 
547
AC_DEFUN([_AM_SET_OPTIONS],
 
548
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
549
 
 
550
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
551
# -------------------------------------------
 
552
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
553
AC_DEFUN([_AM_IF_OPTION],
 
554
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
555
 
 
556
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
557
 
 
558
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
559
# Free Software Foundation, Inc.
 
560
#
 
561
# This file is free software; the Free Software Foundation
 
562
# gives unlimited permission to copy and/or distribute it,
 
563
# with or without modifications, as long as this notice is preserved.
 
564
 
 
565
# serial 4
 
566
 
 
567
# AM_SANITY_CHECK
 
568
# ---------------
 
569
AC_DEFUN([AM_SANITY_CHECK],
 
570
[AC_MSG_CHECKING([whether build environment is sane])
 
571
# Just in case
 
572
sleep 1
 
573
echo timestamp > conftest.file
 
574
# Do `set' in a subshell so we don't clobber the current shell's
 
575
# arguments.  Must try -L first in case configure is actually a
 
576
# symlink; some systems play weird games with the mod time of symlinks
 
577
# (eg FreeBSD returns the mod time of the symlink's containing
 
578
# directory).
 
579
if (
 
580
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
581
   if test "$[*]" = "X"; then
 
582
      # -L didn't work.
 
583
      set X `ls -t $srcdir/configure conftest.file`
 
584
   fi
 
585
   rm -f conftest.file
 
586
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
587
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
588
 
 
589
      # If neither matched, then we have a broken ls.  This can happen
 
590
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
591
      # broken ls alias from the environment.  This has actually
 
592
      # happened.  Such a system could not be considered "sane".
 
593
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
594
alias in your environment])
 
595
   fi
 
596
 
 
597
   test "$[2]" = conftest.file
 
598
   )
 
599
then
 
600
   # Ok.
 
601
   :
 
602
else
 
603
   AC_MSG_ERROR([newly created file is older than distributed files!
 
604
Check your system clock])
 
605
fi
 
606
AC_MSG_RESULT(yes)])
 
607
 
 
608
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
609
#
 
610
# This file is free software; the Free Software Foundation
 
611
# gives unlimited permission to copy and/or distribute it,
 
612
# with or without modifications, as long as this notice is preserved.
 
613
 
 
614
# AM_PROG_INSTALL_STRIP
 
615
# ---------------------
 
616
# One issue with vendor `install' (even GNU) is that you can't
 
617
# specify the program used to strip binaries.  This is especially
 
618
# annoying in cross-compiling environments, where the build's strip
 
619
# is unlikely to handle the host's binaries.
 
620
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
621
# always use install-sh in `make install-strip', and initialize
 
622
# STRIPPROG with the value of the STRIP variable (set by the user).
 
623
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
624
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
625
# Installed binaries are usually stripped using `strip' when the user
 
626
# run `make install-strip'.  However `strip' might not be the right
 
627
# tool to use in cross-compilation environments, therefore Automake
 
628
# will honor the `STRIP' environment variable to overrule this program.
 
629
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
630
if test "$cross_compiling" != no; then
 
631
  AC_CHECK_TOOL([STRIP], [strip], :)
 
632
fi
 
633
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
634
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
635
 
 
636
# Check how to create a tarball.                            -*- Autoconf -*-
 
637
 
 
638
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
639
#
 
640
# This file is free software; the Free Software Foundation
 
641
# gives unlimited permission to copy and/or distribute it,
 
642
# with or without modifications, as long as this notice is preserved.
 
643
 
 
644
# serial 2
 
645
 
 
646
# _AM_PROG_TAR(FORMAT)
 
647
# --------------------
 
648
# Check how to create a tarball in format FORMAT.
 
649
# FORMAT should be one of `v7', `ustar', or `pax'.
 
650
#
 
651
# Substitute a variable $(am__tar) that is a command
 
652
# writing to stdout a FORMAT-tarball containing the directory
 
653
# $tardir.
 
654
#     tardir=directory && $(am__tar) > result.tar
 
655
#
 
656
# Substitute a variable $(am__untar) that extract such
 
657
# a tarball read from stdin.
 
658
#     $(am__untar) < result.tar
 
659
AC_DEFUN([_AM_PROG_TAR],
 
660
[# Always define AMTAR for backward compatibility.
 
661
AM_MISSING_PROG([AMTAR], [tar])
 
662
m4_if([$1], [v7],
 
663
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
664
     [m4_case([$1], [ustar],, [pax],,
 
665
              [m4_fatal([Unknown tar format])])
 
666
AC_MSG_CHECKING([how to create a $1 tar archive])
 
667
# Loop over all known methods to create a tar archive until one works.
 
668
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
669
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
670
# Do not fold the above two line into one, because Tru64 sh and
 
671
# Solaris sh will not grok spaces in the rhs of `-'.
 
672
for _am_tool in $_am_tools
 
673
do
 
674
  case $_am_tool in
 
675
  gnutar)
 
676
    for _am_tar in tar gnutar gtar;
 
677
    do
 
678
      AM_RUN_LOG([$_am_tar --version]) && break
 
679
    done
 
680
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
681
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
682
    am__untar="$_am_tar -xf -"
 
683
    ;;
 
684
  plaintar)
 
685
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
686
    # ustar tarball either.
 
687
    (tar --version) >/dev/null 2>&1 && continue
 
688
    am__tar='tar chf - "$$tardir"'
 
689
    am__tar_='tar chf - "$tardir"'
 
690
    am__untar='tar xf -'
 
691
    ;;
 
692
  pax)
 
693
    am__tar='pax -L -x $1 -w "$$tardir"'
 
694
    am__tar_='pax -L -x $1 -w "$tardir"'
 
695
    am__untar='pax -r'
 
696
    ;;
 
697
  cpio)
 
698
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
699
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
700
    am__untar='cpio -i -H $1 -d'
 
701
    ;;
 
702
  none)
 
703
    am__tar=false
 
704
    am__tar_=false
 
705
    am__untar=false
 
706
    ;;
 
707
  esac
 
708
 
 
709
  # If the value was cached, stop now.  We just wanted to have am__tar
 
710
  # and am__untar set.
 
711
  test -n "${am_cv_prog_tar_$1}" && break
 
712
 
 
713
  # tar/untar a dummy directory, and stop if the command works
 
714
  rm -rf conftest.dir
 
715
  mkdir conftest.dir
 
716
  echo GrepMe > conftest.dir/file
 
717
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
718
  rm -rf conftest.dir
 
719
  if test -s conftest.tar; then
 
720
    AM_RUN_LOG([$am__untar <conftest.tar])
 
721
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
722
  fi
 
723
done
 
724
rm -rf conftest.dir
 
725
 
 
726
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
727
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
728
AC_SUBST([am__tar])
 
729
AC_SUBST([am__untar])
 
730
]) # _AM_PROG_TAR
 
731