~ubuntu-branches/ubuntu/edgy/xauth/edgy

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2005-07-26 21:45:42 UTC
  • Revision ID: james.westby@ubuntu.com-20050726214542-0c1gsmulfz6f3fff
Tags: upstream-1.0.0
Import upstream version 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.9.5 -*- 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_ifval([$1], [$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
        PKG_CHECK_EXISTS([$3],
 
84
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
85
                         [pkg_failed=yes])
 
86
else
 
87
        pkg_failed=untried
 
88
fi[]dnl
 
89
])# _PKG_CONFIG
 
90
 
 
91
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
92
# [ACTION-IF-NOT-FOUND])
 
93
#
 
94
#
 
95
# Note that if there is a possibility the first call to
 
96
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
97
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
98
#
 
99
#
 
100
# --------------------------------------------------------------
 
101
AC_DEFUN([PKG_CHECK_MODULES],
 
102
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
103
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
104
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
105
 
 
106
pkg_failed=no
 
107
AC_MSG_CHECKING([for $1])
 
108
 
 
109
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
110
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
111
 
 
112
if test $pkg_failed = yes; then
 
113
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
114
        # Put the nasty error message in config.log where it belongs
 
115
        echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
 
116
 
 
117
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
118
[Package requirements ($2) were not met.
 
119
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
120
installed software in a non-standard prefix.
 
121
 
 
122
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
 
123
to avoid the need to call pkg-config.  See the pkg-config man page for
 
124
more details.])],
 
125
                [$4])
 
126
elif test $pkg_failed = untried; then
 
127
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
128
[The pkg-config script could not be found or is too old.  Make sure it
 
129
is in your PATH or set the PKG_CONFIG environment variable to the full
 
130
path to pkg-config.
 
131
 
 
132
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
 
133
to avoid the need to call pkg-config.  See the pkg-config man page for
 
134
more details.
 
135
 
 
136
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
137
                [$4])
 
138
else
 
139
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
140
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
141
        AC_MSG_RESULT([yes])
 
142
        ifelse([$3], , :, [$3])
 
143
fi[]dnl
 
144
])# PKG_CHECK_MODULES
 
145
 
 
146
dnl $XdotOrg: $
 
147
dnl
 
148
dnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 
149
dnl 
 
150
dnl Permission to use, copy, modify, distribute, and sell this software and its
 
151
dnl documentation for any purpose is hereby granted without fee, provided that
 
152
dnl the above copyright notice appear in all copies and that both that
 
153
dnl copyright notice and this permission notice appear in supporting
 
154
dnl documentation.
 
155
dnl 
 
156
dnl The above copyright notice and this permission notice shall be included
 
157
dnl in all copies or substantial portions of the Software.
 
158
dnl 
 
159
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
160
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
161
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
162
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
163
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
164
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
165
dnl OTHER DEALINGS IN THE SOFTWARE.
 
166
dnl 
 
167
dnl Except as contained in this notice, the name of the copyright holders shall
 
168
dnl not be used in advertising or otherwise to promote the sale, use or
 
169
dnl other dealings in this Software without prior written authorization
 
170
dnl from the copyright holders.
 
171
dnl 
 
172
 
 
173
# XTRANS_CONNECTION_FLAGS()
 
174
# -------------------------
 
175
# Standard checks for Xtrans transport flags used by the Xorg packages
 
176
# that use Xtrans functions
 
177
AC_DEFUN([XTRANS_CONNECTION_FLAGS],
 
178
[AC_ARG_ENABLE(unix-transport,[  --disable-unix-transport ], 
 
179
        [UNIXCONN=$enableval], [UNIXCONN=yes])
 
180
 AC_ARG_ENABLE(tcp-transport, [  --disable-tcp-transport ], 
 
181
        [TCPCONN=$enableval], [TCPCONN=yes])
 
182
 if test "$UNIXCONN" = "yes"; then
 
183
        AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
 
184
 fi
 
185
 if test "$TCPCONN" = "yes"; then
 
186
        AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
 
187
        # SVR4 hides these in libraries other than libc
 
188
        AC_SEARCH_LIBS(socket, [socket])
 
189
        AC_SEARCH_LIBS(gethostbyname, [nsl])
 
190
 fi
 
191
 # Needs to come after above checks for libsocket & libnsl for SVR4 systems
 
192
 AC_ARG_ENABLE(ipv6,          [  --disable-ipv6 ], [IPV6CONN=$enableval], 
 
193
        [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
 
194
 if test "$IPV6CONN" = "yes"; then
 
195
        AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
 
196
 fi
 
197
]) # XTRANS_CONNECTION_FLAGS
 
198
 
 
199
 
 
200
# XTRANS_SECURE_RPC_FLAGS()
 
201
# -------------------------
 
202
# Check for Secure RPC functions - must come after XTRANS_CONNECTION_FLAGS
 
203
# so that any necessary networking libraries are already found
 
204
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
 
205
[AC_REQUIRE([XTRANS_CONNECTION_FLAGS])
 
206
 AC_ARG_ENABLE(secure-rpc, 
 
207
        AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
 
208
        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
 
209
 
 
210
 if test "x$SECURE_RPC" == "xyes" -o "x$SECURE_RPC" == "xtry" ; then
 
211
        FOUND_SECURE_RPC="no"
 
212
        AC_CHECK_FUNCS([authdes_seccreate authdes_create],
 
213
                        [FOUND_SECURE_RPC="yes"])
 
214
        if test "x$FOUND_SECURE_RPC" == "xno" ; then
 
215
                if test "x$SECURE_RPC" == "xyes" ; then
 
216
        AC_MSG_ERROR([Secure RPC requested, but required functions not found])
 
217
                fi      
 
218
                SECURE_RPC="no"
 
219
        else
 
220
                SECURE_RPC="yes"
 
221
        fi
 
222
 fi
 
223
 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported for X11 clients])
 
224
 if test "x$SECURE_RPC" == "xyes" ; then
 
225
        AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
 
226
 fi
 
227
 AC_MSG_RESULT($SECURE_RPC)
 
228
]) # XTRANS_SECURE_RPC_FLAGS
 
229
 
 
230
 
 
231
# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 
232
#
 
233
# This file is free software; the Free Software Foundation
 
234
# gives unlimited permission to copy and/or distribute it,
 
235
# with or without modifications, as long as this notice is preserved.
 
236
 
 
237
# AM_AUTOMAKE_VERSION(VERSION)
 
238
# ----------------------------
 
239
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
240
# generated from the m4 files accompanying Automake X.Y.
 
241
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 
242
 
 
243
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
244
# -------------------------------
 
245
# Call AM_AUTOMAKE_VERSION so it can be traced.
 
246
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
247
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
248
         [AM_AUTOMAKE_VERSION([1.9.5])])
 
249
 
 
250
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
251
 
 
252
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
253
#
 
254
# This file is free software; the Free Software Foundation
 
255
# gives unlimited permission to copy and/or distribute it,
 
256
# with or without modifications, as long as this notice is preserved.
 
257
 
 
258
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
259
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
260
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
261
#
 
262
# Of course, Automake must honor this variable whenever it calls a
 
263
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
264
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
265
# depending on how configure is run.  This is pretty annoying, since
 
266
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
267
# source directory, any form will work fine, but in subdirectories a
 
268
# relative path needs to be adjusted first.
 
269
#
 
270
# $ac_aux_dir/missing
 
271
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
272
# $top_srcdir/$ac_aux_dir/missing
 
273
#    fails if $ac_aux_dir is absolute,
 
274
#    fails when called from a subdirectory in a VPATH build with
 
275
#          a relative $ac_aux_dir
 
276
#
 
277
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
278
# are both prefixed by $srcdir.  In an in-source build this is usually
 
279
# harmless because $srcdir is `.', but things will broke when you
 
280
# start a VPATH build or use an absolute $srcdir.
 
281
#
 
282
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
283
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
284
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
285
# and then we would define $MISSING as
 
286
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
287
# This will work as long as MISSING is not called from configure, because
 
288
# unfortunately $(top_srcdir) has no meaning in configure.
 
289
# However there are other variables, like CC, which are often used in
 
290
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
291
#
 
292
# Another solution, used here, is to always expand $ac_aux_dir to an
 
293
# absolute PATH.  The drawback is that using absolute paths prevent a
 
294
# configured tree to be moved without reconfiguration.
 
295
 
 
296
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
297
[dnl Rely on autoconf to set up CDPATH properly.
 
298
AC_PREREQ([2.50])dnl
 
299
# expand $ac_aux_dir to an absolute path
 
300
am_aux_dir=`cd $ac_aux_dir && pwd`
 
301
])
 
302
 
 
303
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
304
 
 
305
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
 
306
# Free Software Foundation, Inc.
 
307
#
 
308
# This file is free software; the Free Software Foundation
 
309
# gives unlimited permission to copy and/or distribute it,
 
310
# with or without modifications, as long as this notice is preserved.
 
311
 
 
312
# serial 7
 
313
 
 
314
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
315
# -------------------------------------
 
316
# Define a conditional.
 
317
AC_DEFUN([AM_CONDITIONAL],
 
318
[AC_PREREQ(2.52)dnl
 
319
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
320
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
321
AC_SUBST([$1_TRUE])
 
322
AC_SUBST([$1_FALSE])
 
323
if $2; then
 
324
  $1_TRUE=
 
325
  $1_FALSE='#'
 
326
else
 
327
  $1_TRUE='#'
 
328
  $1_FALSE=
 
329
fi
 
330
AC_CONFIG_COMMANDS_PRE(
 
331
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
332
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
333
Usually this means the macro was only invoked conditionally.]])
 
334
fi])])
 
335
 
 
336
 
 
337
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
338
# Free Software Foundation, Inc.
 
339
#
 
340
# This file is free software; the Free Software Foundation
 
341
# gives unlimited permission to copy and/or distribute it,
 
342
# with or without modifications, as long as this notice is preserved.
 
343
 
 
344
# serial 8
 
345
 
 
346
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
347
# written in clear, in which case automake, when reading aclocal.m4,
 
348
# will think it sees a *use*, and therefore will trigger all it's
 
349
# C support machinery.  Also note that it means that autoscan, seeing
 
350
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
351
 
 
352
 
 
353
# _AM_DEPENDENCIES(NAME)
 
354
# ----------------------
 
355
# See how the compiler implements dependency checking.
 
356
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
357
# We try a few techniques and use that to set a single cache variable.
 
358
#
 
359
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
360
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
361
# dependency, and given that the user is not expected to run this macro,
 
362
# just rely on AC_PROG_CC.
 
363
AC_DEFUN([_AM_DEPENDENCIES],
 
364
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
365
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
366
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
367
AC_REQUIRE([AM_DEP_TRACK])dnl
 
368
 
 
369
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
370
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
371
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
372
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
373
                   [depcc="$$1"   am_compiler_list=])
 
374
 
 
375
AC_CACHE_CHECK([dependency style of $depcc],
 
376
               [am_cv_$1_dependencies_compiler_type],
 
377
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
378
  # We make a subdir and do the tests there.  Otherwise we can end up
 
379
  # making bogus files that we don't know about and never remove.  For
 
380
  # instance it was reported that on HP-UX the gcc test will end up
 
381
  # making a dummy file named `D' -- because `-MD' means `put the output
 
382
  # in D'.
 
383
  mkdir conftest.dir
 
384
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
385
  # using a relative directory.
 
386
  cp "$am_depcomp" conftest.dir
 
387
  cd conftest.dir
 
388
  # We will build objects and dependencies in a subdirectory because
 
389
  # it helps to detect inapplicable dependency modes.  For instance
 
390
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
391
  # side effect of compilation, but ICC will put the dependencies in
 
392
  # the current directory while Tru64 will put them in the object
 
393
  # directory.
 
394
  mkdir sub
 
395
 
 
396
  am_cv_$1_dependencies_compiler_type=none
 
397
  if test "$am_compiler_list" = ""; then
 
398
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
399
  fi
 
400
  for depmode in $am_compiler_list; do
 
401
    # Setup a source with many dependencies, because some compilers
 
402
    # like to wrap large dependency lists on column 80 (with \), and
 
403
    # we should not choose a depcomp mode which is confused by this.
 
404
    #
 
405
    # We need to recreate these files for each test, as the compiler may
 
406
    # overwrite some of them when testing with obscure command lines.
 
407
    # This happens at least with the AIX C compiler.
 
408
    : > sub/conftest.c
 
409
    for i in 1 2 3 4 5 6; do
 
410
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
411
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
412
      # Solaris 8's {/usr,}/bin/sh.
 
413
      touch sub/conftst$i.h
 
414
    done
 
415
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
416
 
 
417
    case $depmode in
 
418
    nosideeffect)
 
419
      # after this tag, mechanisms are not by side-effect, so they'll
 
420
      # only be used when explicitly requested
 
421
      if test "x$enable_dependency_tracking" = xyes; then
 
422
        continue
 
423
      else
 
424
        break
 
425
      fi
 
426
      ;;
 
427
    none) break ;;
 
428
    esac
 
429
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
430
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
431
    # handle `-M -o', and we need to detect this.
 
432
    if depmode=$depmode \
 
433
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
434
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
435
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
436
         >/dev/null 2>conftest.err &&
 
437
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
438
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
439
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
440
      # icc doesn't choke on unknown options, it will just issue warnings
 
441
      # or remarks (even with -Werror).  So we grep stderr for any message
 
442
      # that says an option was ignored or not supported.
 
443
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
444
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
445
      # The diagnosis changed in icc 8.0:
 
446
      #   icc: Command line remark: option '-MP' not supported
 
447
      if (grep 'ignoring option' conftest.err ||
 
448
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
449
        am_cv_$1_dependencies_compiler_type=$depmode
 
450
        break
 
451
      fi
 
452
    fi
 
453
  done
 
454
 
 
455
  cd ..
 
456
  rm -rf conftest.dir
 
457
else
 
458
  am_cv_$1_dependencies_compiler_type=none
 
459
fi
 
460
])
 
461
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
462
AM_CONDITIONAL([am__fastdep$1], [
 
463
  test "x$enable_dependency_tracking" != xno \
 
464
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
465
])
 
466
 
 
467
 
 
468
# AM_SET_DEPDIR
 
469
# -------------
 
470
# Choose a directory name for dependency files.
 
471
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
472
AC_DEFUN([AM_SET_DEPDIR],
 
473
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
474
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
475
])
 
476
 
 
477
 
 
478
# AM_DEP_TRACK
 
479
# ------------
 
480
AC_DEFUN([AM_DEP_TRACK],
 
481
[AC_ARG_ENABLE(dependency-tracking,
 
482
[  --disable-dependency-tracking  speeds up one-time build
 
483
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
484
if test "x$enable_dependency_tracking" != xno; then
 
485
  am_depcomp="$ac_aux_dir/depcomp"
 
486
  AMDEPBACKSLASH='\'
 
487
fi
 
488
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
489
AC_SUBST([AMDEPBACKSLASH])
 
490
])
 
491
 
 
492
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
493
 
 
494
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
495
# Free Software Foundation, Inc.
 
496
#
 
497
# This file is free software; the Free Software Foundation
 
498
# gives unlimited permission to copy and/or distribute it,
 
499
# with or without modifications, as long as this notice is preserved.
 
500
 
 
501
#serial 3
 
502
 
 
503
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
504
# ------------------------------
 
505
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
506
[for mf in $CONFIG_FILES; do
 
507
  # Strip MF so we end up with the name of the file.
 
508
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
509
  # Check whether this is an Automake generated Makefile or not.
 
510
  # We used to match only the files named `Makefile.in', but
 
511
  # some people rename them; so instead we look at the file content.
 
512
  # Grep'ing the first line is not enough: some people post-process
 
513
  # each Makefile.in and add a new line on top of each file to say so.
 
514
  # So let's grep whole file.
 
515
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
 
516
    dirpart=`AS_DIRNAME("$mf")`
 
517
  else
 
518
    continue
 
519
  fi
 
520
  # Extract the definition of DEPDIR, am__include, and am__quote
 
521
  # from the Makefile without running `make'.
 
522
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
523
  test -z "$DEPDIR" && continue
 
524
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
525
  test -z "am__include" && continue
 
526
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
527
  # When using ansi2knr, U may be empty or an underscore; expand it
 
528
  U=`sed -n 's/^U = //p' < "$mf"`
 
529
  # Find all dependency output files, they are included files with
 
530
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
531
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
532
  # expansion.
 
533
  for file in `sed -n "
 
534
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
535
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
536
    # Make sure the directory exists.
 
537
    test -f "$dirpart/$file" && continue
 
538
    fdir=`AS_DIRNAME(["$file"])`
 
539
    AS_MKDIR_P([$dirpart/$fdir])
 
540
    # echo "creating $dirpart/$file"
 
541
    echo '# dummy' > "$dirpart/$file"
 
542
  done
 
543
done
 
544
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
545
 
 
546
 
 
547
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
548
# -----------------------------
 
549
# This macro should only be invoked once -- use via AC_REQUIRE.
 
550
#
 
551
# This code is only required when automatic dependency tracking
 
552
# is enabled.  FIXME.  This creates each `.P' file that we will
 
553
# need in order to bootstrap the dependency handling code.
 
554
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
555
[AC_CONFIG_COMMANDS([depfiles],
 
556
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
557
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
558
])
 
559
 
 
560
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
561
# Free Software Foundation, Inc.
 
562
#
 
563
# This file is free software; the Free Software Foundation
 
564
# gives unlimited permission to copy and/or distribute it,
 
565
# with or without modifications, as long as this notice is preserved.
 
566
 
 
567
# serial 8
 
568
 
 
569
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
570
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
571
 
 
572
# Do all the work for Automake.                             -*- Autoconf -*-
 
573
 
 
574
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
575
# Free Software Foundation, Inc.
 
576
#
 
577
# This file is free software; the Free Software Foundation
 
578
# gives unlimited permission to copy and/or distribute it,
 
579
# with or without modifications, as long as this notice is preserved.
 
580
 
 
581
# serial 12
 
582
 
 
583
# This macro actually does too much.  Some checks are only needed if
 
584
# your package does certain things.  But this isn't really a big deal.
 
585
 
 
586
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
587
# AM_INIT_AUTOMAKE([OPTIONS])
 
588
# -----------------------------------------------
 
589
# The call with PACKAGE and VERSION arguments is the old style
 
590
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
591
# and VERSION should now be passed to AC_INIT and removed from
 
592
# the call to AM_INIT_AUTOMAKE.
 
593
# We support both call styles for the transition.  After
 
594
# the next Automake release, Autoconf can make the AC_INIT
 
595
# arguments mandatory, and then we can depend on a new Autoconf
 
596
# release and drop the old call support.
 
597
AC_DEFUN([AM_INIT_AUTOMAKE],
 
598
[AC_PREREQ([2.58])dnl
 
599
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
600
dnl the ones we care about.
 
601
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
602
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
603
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
604
# test to see if srcdir already configured
 
605
if test "`cd $srcdir && pwd`" != "`pwd`" &&
 
606
   test -f $srcdir/config.status; then
 
607
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
608
fi
 
609
 
 
610
# test whether we have cygpath
 
611
if test -z "$CYGPATH_W"; then
 
612
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
613
    CYGPATH_W='cygpath -w'
 
614
  else
 
615
    CYGPATH_W=echo
 
616
  fi
 
617
fi
 
618
AC_SUBST([CYGPATH_W])
 
619
 
 
620
# Define the identity of the package.
 
621
dnl Distinguish between old-style and new-style calls.
 
622
m4_ifval([$2],
 
623
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
624
 AC_SUBST([PACKAGE], [$1])dnl
 
625
 AC_SUBST([VERSION], [$2])],
 
626
[_AM_SET_OPTIONS([$1])dnl
 
627
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
628
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
629
 
 
630
_AM_IF_OPTION([no-define],,
 
631
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
632
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
633
 
 
634
# Some tools Automake needs.
 
635
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
636
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
637
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
638
AM_MISSING_PROG(AUTOCONF, autoconf)
 
639
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
640
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
641
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
642
AM_PROG_INSTALL_SH
 
643
AM_PROG_INSTALL_STRIP
 
644
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
645
# We need awk for the "check" target.  The system "awk" is bad on
 
646
# some platforms.
 
647
AC_REQUIRE([AC_PROG_AWK])dnl
 
648
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
649
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
650
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
651
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
652
                             [_AM_PROG_TAR([v7])])])
 
653
_AM_IF_OPTION([no-dependencies],,
 
654
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
655
                  [_AM_DEPENDENCIES(CC)],
 
656
                  [define([AC_PROG_CC],
 
657
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
658
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
659
                  [_AM_DEPENDENCIES(CXX)],
 
660
                  [define([AC_PROG_CXX],
 
661
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
662
])
 
663
])
 
664
 
 
665
 
 
666
# When config.status generates a header, we must update the stamp-h file.
 
667
# This file resides in the same directory as the config header
 
668
# that is generated.  The stamp files are numbered to have different names.
 
669
 
 
670
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
671
# loop where config.status creates the headers, so we can generate
 
672
# our stamp files there.
 
673
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
674
[# Compute $1's index in $config_headers.
 
675
_am_stamp_count=1
 
676
for _am_header in $config_headers :; do
 
677
  case $_am_header in
 
678
    $1 | $1:* )
 
679
      break ;;
 
680
    * )
 
681
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
682
  esac
 
683
done
 
684
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
685
 
 
686
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
687
#
 
688
# This file is free software; the Free Software Foundation
 
689
# gives unlimited permission to copy and/or distribute it,
 
690
# with or without modifications, as long as this notice is preserved.
 
691
 
 
692
# AM_PROG_INSTALL_SH
 
693
# ------------------
 
694
# Define $install_sh.
 
695
AC_DEFUN([AM_PROG_INSTALL_SH],
 
696
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
697
install_sh=${install_sh-"$am_aux_dir/install-sh"}
 
698
AC_SUBST(install_sh)])
 
699
 
 
700
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
701
#
 
702
# This file is free software; the Free Software Foundation
 
703
# gives unlimited permission to copy and/or distribute it,
 
704
# with or without modifications, as long as this notice is preserved.
 
705
 
 
706
# serial 2
 
707
 
 
708
# Check whether the underlying file-system supports filenames
 
709
# with a leading dot.  For instance MS-DOS doesn't.
 
710
AC_DEFUN([AM_SET_LEADING_DOT],
 
711
[rm -rf .tst 2>/dev/null
 
712
mkdir .tst 2>/dev/null
 
713
if test -d .tst; then
 
714
  am__leading_dot=.
 
715
else
 
716
  am__leading_dot=_
 
717
fi
 
718
rmdir .tst 2>/dev/null
 
719
AC_SUBST([am__leading_dot])])
 
720
 
 
721
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
722
# From Jim Meyering
 
723
 
 
724
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
 
725
# Free Software Foundation, Inc.
 
726
#
 
727
# This file is free software; the Free Software Foundation
 
728
# gives unlimited permission to copy and/or distribute it,
 
729
# with or without modifications, as long as this notice is preserved.
 
730
 
 
731
# serial 4
 
732
 
 
733
AC_DEFUN([AM_MAINTAINER_MODE],
 
734
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
735
  dnl maintainer-mode is disabled by default
 
736
  AC_ARG_ENABLE(maintainer-mode,
 
737
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
738
                          (and sometimes confusing) to the casual installer],
 
739
      USE_MAINTAINER_MODE=$enableval,
 
740
      USE_MAINTAINER_MODE=no)
 
741
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
742
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
743
  MAINT=$MAINTAINER_MODE_TRUE
 
744
  AC_SUBST(MAINT)dnl
 
745
]
 
746
)
 
747
 
 
748
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
749
 
 
750
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
751
 
 
752
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
753
#
 
754
# This file is free software; the Free Software Foundation
 
755
# gives unlimited permission to copy and/or distribute it,
 
756
# with or without modifications, as long as this notice is preserved.
 
757
 
 
758
# serial 3
 
759
 
 
760
# AM_MAKE_INCLUDE()
 
761
# -----------------
 
762
# Check to see how make treats includes.
 
763
AC_DEFUN([AM_MAKE_INCLUDE],
 
764
[am_make=${MAKE-make}
 
765
cat > confinc << 'END'
 
766
am__doit:
 
767
        @echo done
 
768
.PHONY: am__doit
 
769
END
 
770
# If we don't find an include directive, just comment out the code.
 
771
AC_MSG_CHECKING([for style of include used by $am_make])
 
772
am__include="#"
 
773
am__quote=
 
774
_am_result=none
 
775
# First try GNU make style include.
 
776
echo "include confinc" > confmf
 
777
# We grep out `Entering directory' and `Leaving directory'
 
778
# messages which can occur if `w' ends up in MAKEFLAGS.
 
779
# In particular we don't look at `^make:' because GNU make might
 
780
# be invoked under some other name (usually "gmake"), in which
 
781
# case it prints its new name instead of `make'.
 
782
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
783
   am__include=include
 
784
   am__quote=
 
785
   _am_result=GNU
 
786
fi
 
787
# Now try BSD make style include.
 
788
if test "$am__include" = "#"; then
 
789
   echo '.include "confinc"' > confmf
 
790
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
791
      am__include=.include
 
792
      am__quote="\""
 
793
      _am_result=BSD
 
794
   fi
 
795
fi
 
796
AC_SUBST([am__include])
 
797
AC_SUBST([am__quote])
 
798
AC_MSG_RESULT([$_am_result])
 
799
rm -f confinc confmf
 
800
])
 
801
 
 
802
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
803
 
 
804
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
 
805
# Free Software Foundation, Inc.
 
806
#
 
807
# This file is free software; the Free Software Foundation
 
808
# gives unlimited permission to copy and/or distribute it,
 
809
# with or without modifications, as long as this notice is preserved.
 
810
 
 
811
# serial 4
 
812
 
 
813
# AM_MISSING_PROG(NAME, PROGRAM)
 
814
# ------------------------------
 
815
AC_DEFUN([AM_MISSING_PROG],
 
816
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
817
$1=${$1-"${am_missing_run}$2"}
 
818
AC_SUBST($1)])
 
819
 
 
820
 
 
821
# AM_MISSING_HAS_RUN
 
822
# ------------------
 
823
# Define MISSING if not defined so far and test if it supports --run.
 
824
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
825
AC_DEFUN([AM_MISSING_HAS_RUN],
 
826
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
827
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
828
# Use eval to expand $SHELL
 
829
if eval "$MISSING --run true"; then
 
830
  am_missing_run="$MISSING --run "
 
831
else
 
832
  am_missing_run=
 
833
  AC_MSG_WARN([`missing' script is too old or missing])
 
834
fi
 
835
])
 
836
 
 
837
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
838
#
 
839
# This file is free software; the Free Software Foundation
 
840
# gives unlimited permission to copy and/or distribute it,
 
841
# with or without modifications, as long as this notice is preserved.
 
842
 
 
843
# AM_PROG_MKDIR_P
 
844
# ---------------
 
845
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
 
846
#
 
847
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 
848
# created by `make install' are always world readable, even if the
 
849
# installer happens to have an overly restrictive umask (e.g. 077).
 
850
# This was a mistake.  There are at least two reasons why we must not
 
851
# use `-m 0755':
 
852
#   - it causes special bits like SGID to be ignored,
 
853
#   - it may be too restrictive (some setups expect 775 directories).
 
854
#
 
855
# Do not use -m 0755 and let people choose whatever they expect by
 
856
# setting umask.
 
857
#
 
858
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
 
859
# Some implementations (such as Solaris 8's) are not thread-safe: if a
 
860
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
 
861
# concurrently, both version can detect that a/ is missing, but only
 
862
# one can create it and the other will error out.  Consequently we
 
863
# restrict ourselves to GNU make (using the --version option ensures
 
864
# this.)
 
865
AC_DEFUN([AM_PROG_MKDIR_P],
 
866
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
 
867
  # We used to keeping the `.' as first argument, in order to
 
868
  # allow $(mkdir_p) to be used without argument.  As in
 
869
  #   $(mkdir_p) $(somedir)
 
870
  # where $(somedir) is conditionally defined.  However this is wrong
 
871
  # for two reasons:
 
872
  #  1. if the package is installed by a user who cannot write `.'
 
873
  #     make install will fail,
 
874
  #  2. the above comment should most certainly read
 
875
  #     $(mkdir_p) $(DESTDIR)$(somedir)
 
876
  #     so it does not work when $(somedir) is undefined and
 
877
  #     $(DESTDIR) is not.
 
878
  #  To support the latter case, we have to write
 
879
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
 
880
  #  so the `.' trick is pointless.
 
881
  mkdir_p='mkdir -p --'
 
882
else
 
883
  # On NextStep and OpenStep, the `mkdir' command does not
 
884
  # recognize any option.  It will interpret all options as
 
885
  # directories to create, and then abort because `.' already
 
886
  # exists.
 
887
  for d in ./-p ./--version;
 
888
  do
 
889
    test -d $d && rmdir $d
 
890
  done
 
891
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
 
892
  if test -f "$ac_aux_dir/mkinstalldirs"; then
 
893
    mkdir_p='$(mkinstalldirs)'
 
894
  else
 
895
    mkdir_p='$(install_sh) -d'
 
896
  fi
 
897
fi
 
898
AC_SUBST([mkdir_p])])
 
899
 
 
900
# Helper functions for option handling.                     -*- Autoconf -*-
 
901
 
 
902
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
903
#
 
904
# This file is free software; the Free Software Foundation
 
905
# gives unlimited permission to copy and/or distribute it,
 
906
# with or without modifications, as long as this notice is preserved.
 
907
 
 
908
# serial 3
 
909
 
 
910
# _AM_MANGLE_OPTION(NAME)
 
911
# -----------------------
 
912
AC_DEFUN([_AM_MANGLE_OPTION],
 
913
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
914
 
 
915
# _AM_SET_OPTION(NAME)
 
916
# ------------------------------
 
917
# Set option NAME.  Presently that only means defining a flag for this option.
 
918
AC_DEFUN([_AM_SET_OPTION],
 
919
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
920
 
 
921
# _AM_SET_OPTIONS(OPTIONS)
 
922
# ----------------------------------
 
923
# OPTIONS is a space-separated list of Automake options.
 
924
AC_DEFUN([_AM_SET_OPTIONS],
 
925
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
926
 
 
927
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
928
# -------------------------------------------
 
929
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
930
AC_DEFUN([_AM_IF_OPTION],
 
931
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
932
 
 
933
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
934
 
 
935
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
936
# Free Software Foundation, Inc.
 
937
#
 
938
# This file is free software; the Free Software Foundation
 
939
# gives unlimited permission to copy and/or distribute it,
 
940
# with or without modifications, as long as this notice is preserved.
 
941
 
 
942
# serial 4
 
943
 
 
944
# AM_SANITY_CHECK
 
945
# ---------------
 
946
AC_DEFUN([AM_SANITY_CHECK],
 
947
[AC_MSG_CHECKING([whether build environment is sane])
 
948
# Just in case
 
949
sleep 1
 
950
echo timestamp > conftest.file
 
951
# Do `set' in a subshell so we don't clobber the current shell's
 
952
# arguments.  Must try -L first in case configure is actually a
 
953
# symlink; some systems play weird games with the mod time of symlinks
 
954
# (eg FreeBSD returns the mod time of the symlink's containing
 
955
# directory).
 
956
if (
 
957
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
958
   if test "$[*]" = "X"; then
 
959
      # -L didn't work.
 
960
      set X `ls -t $srcdir/configure conftest.file`
 
961
   fi
 
962
   rm -f conftest.file
 
963
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
964
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
965
 
 
966
      # If neither matched, then we have a broken ls.  This can happen
 
967
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
968
      # broken ls alias from the environment.  This has actually
 
969
      # happened.  Such a system could not be considered "sane".
 
970
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
971
alias in your environment])
 
972
   fi
 
973
 
 
974
   test "$[2]" = conftest.file
 
975
   )
 
976
then
 
977
   # Ok.
 
978
   :
 
979
else
 
980
   AC_MSG_ERROR([newly created file is older than distributed files!
 
981
Check your system clock])
 
982
fi
 
983
AC_MSG_RESULT(yes)])
 
984
 
 
985
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
986
#
 
987
# This file is free software; the Free Software Foundation
 
988
# gives unlimited permission to copy and/or distribute it,
 
989
# with or without modifications, as long as this notice is preserved.
 
990
 
 
991
# AM_PROG_INSTALL_STRIP
 
992
# ---------------------
 
993
# One issue with vendor `install' (even GNU) is that you can't
 
994
# specify the program used to strip binaries.  This is especially
 
995
# annoying in cross-compiling environments, where the build's strip
 
996
# is unlikely to handle the host's binaries.
 
997
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
998
# always use install-sh in `make install-strip', and initialize
 
999
# STRIPPROG with the value of the STRIP variable (set by the user).
 
1000
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
1001
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1002
# Installed binaries are usually stripped using `strip' when the user
 
1003
# run `make install-strip'.  However `strip' might not be the right
 
1004
# tool to use in cross-compilation environments, therefore Automake
 
1005
# will honor the `STRIP' environment variable to overrule this program.
 
1006
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
1007
if test "$cross_compiling" != no; then
 
1008
  AC_CHECK_TOOL([STRIP], [strip], :)
 
1009
fi
 
1010
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 
1011
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
1012
 
 
1013
# Check how to create a tarball.                            -*- Autoconf -*-
 
1014
 
 
1015
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1016
#
 
1017
# This file is free software; the Free Software Foundation
 
1018
# gives unlimited permission to copy and/or distribute it,
 
1019
# with or without modifications, as long as this notice is preserved.
 
1020
 
 
1021
# serial 2
 
1022
 
 
1023
# _AM_PROG_TAR(FORMAT)
 
1024
# --------------------
 
1025
# Check how to create a tarball in format FORMAT.
 
1026
# FORMAT should be one of `v7', `ustar', or `pax'.
 
1027
#
 
1028
# Substitute a variable $(am__tar) that is a command
 
1029
# writing to stdout a FORMAT-tarball containing the directory
 
1030
# $tardir.
 
1031
#     tardir=directory && $(am__tar) > result.tar
 
1032
#
 
1033
# Substitute a variable $(am__untar) that extract such
 
1034
# a tarball read from stdin.
 
1035
#     $(am__untar) < result.tar
 
1036
AC_DEFUN([_AM_PROG_TAR],
 
1037
[# Always define AMTAR for backward compatibility.
 
1038
AM_MISSING_PROG([AMTAR], [tar])
 
1039
m4_if([$1], [v7],
 
1040
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
1041
     [m4_case([$1], [ustar],, [pax],,
 
1042
              [m4_fatal([Unknown tar format])])
 
1043
AC_MSG_CHECKING([how to create a $1 tar archive])
 
1044
# Loop over all known methods to create a tar archive until one works.
 
1045
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
1046
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
1047
# Do not fold the above two line into one, because Tru64 sh and
 
1048
# Solaris sh will not grok spaces in the rhs of `-'.
 
1049
for _am_tool in $_am_tools
 
1050
do
 
1051
  case $_am_tool in
 
1052
  gnutar)
 
1053
    for _am_tar in tar gnutar gtar;
 
1054
    do
 
1055
      AM_RUN_LOG([$_am_tar --version]) && break
 
1056
    done
 
1057
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
1058
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
1059
    am__untar="$_am_tar -xf -"
 
1060
    ;;
 
1061
  plaintar)
 
1062
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
1063
    # ustar tarball either.
 
1064
    (tar --version) >/dev/null 2>&1 && continue
 
1065
    am__tar='tar chf - "$$tardir"'
 
1066
    am__tar_='tar chf - "$tardir"'
 
1067
    am__untar='tar xf -'
 
1068
    ;;
 
1069
  pax)
 
1070
    am__tar='pax -L -x $1 -w "$$tardir"'
 
1071
    am__tar_='pax -L -x $1 -w "$tardir"'
 
1072
    am__untar='pax -r'
 
1073
    ;;
 
1074
  cpio)
 
1075
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1076
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1077
    am__untar='cpio -i -H $1 -d'
 
1078
    ;;
 
1079
  none)
 
1080
    am__tar=false
 
1081
    am__tar_=false
 
1082
    am__untar=false
 
1083
    ;;
 
1084
  esac
 
1085
 
 
1086
  # If the value was cached, stop now.  We just wanted to have am__tar
 
1087
  # and am__untar set.
 
1088
  test -n "${am_cv_prog_tar_$1}" && break
 
1089
 
 
1090
  # tar/untar a dummy directory, and stop if the command works
 
1091
  rm -rf conftest.dir
 
1092
  mkdir conftest.dir
 
1093
  echo GrepMe > conftest.dir/file
 
1094
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1095
  rm -rf conftest.dir
 
1096
  if test -s conftest.tar; then
 
1097
    AM_RUN_LOG([$am__untar <conftest.tar])
 
1098
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1099
  fi
 
1100
done
 
1101
rm -rf conftest.dir
 
1102
 
 
1103
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1104
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1105
AC_SUBST([am__tar])
 
1106
AC_SUBST([am__untar])
 
1107
]) # _AM_PROG_TAR
 
1108