~ubuntu-branches/ubuntu/karmic/x11-xserver-utils/karmic

« back to all changes in this revision

Viewing changes to xhost/aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Brice Goglin, Julien Cristau, Brice Goglin
  • Date: 2007-08-17 09:58:34 UTC
  • Revision ID: james.westby@ubuntu.com-20070817095834-ywge2nyzj1s3rqnd
Tags: 7.3+1
[ Julien Cristau ]
* iceauth 1.0.2.
  + removes blank line in the manpage (closes: #25285).
* xmodmap 1.0.3.
  + manpage updated to state that -pm is the default (closes: #236198)
* xgamma 1.0.2.
  + the manpage now explains how to print the gamma value more clearly
    (closes: #296021).
* xsetroot 1.0.2.
* xrdb 1.0.4.
  + fixes manpage typo (closes: #276286).
* Add upstream URL to debian/copyright, and update it from xgamma's COPYING
  file.

[ Brice Goglin ]
* Add menu entries for xrefresh and xvidtune.
* sessreg 1.0.3.
* xset 1.0.3.
* Add myself to Uploaders, and remove Branden with his permission.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# generated automatically by aclocal 1.10 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005, 2006  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
m4_if(m4_PACKAGE_VERSION, [2.61],,
 
15
[m4_fatal([this file was generated for autoconf 2.61.
 
16
You have another version of autoconf.  If you want to use that,
 
17
you should regenerate the build system entirely.], [63])])
 
18
 
 
19
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
20
 
21
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
22
#
 
23
# This program is free software; you can redistribute it and/or modify
 
24
# it under the terms of the GNU General Public License as published by
 
25
# the Free Software Foundation; either version 2 of the License, or
 
26
# (at your option) any later version.
 
27
#
 
28
# This program is distributed in the hope that it will be useful, but
 
29
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
30
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
31
# General Public License for more details.
 
32
#
 
33
# You should have received a copy of the GNU General Public License
 
34
# along with this program; if not, write to the Free Software
 
35
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
36
#
 
37
# As a special exception to the GNU General Public License, if you
 
38
# distribute this file as part of a program that contains a
 
39
# configuration script generated by Autoconf, you may include it under
 
40
# the same distribution terms that you use for the rest of that program.
 
41
 
 
42
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
43
# ----------------------------------
 
44
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
45
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
46
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
47
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
48
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
49
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
50
fi
 
51
if test -n "$PKG_CONFIG"; then
 
52
        _pkg_min_version=m4_default([$1], [0.9.0])
 
53
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
54
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
55
                AC_MSG_RESULT([yes])
 
56
        else
 
57
                AC_MSG_RESULT([no])
 
58
                PKG_CONFIG=""
 
59
        fi
 
60
                
 
61
fi[]dnl
 
62
])# PKG_PROG_PKG_CONFIG
 
63
 
 
64
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
65
#
 
66
# Check to see whether a particular set of modules exists.  Similar
 
67
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
68
#
 
69
#
 
70
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
71
# this or PKG_CHECK_MODULES is called, or make sure to call
 
72
# PKG_CHECK_EXISTS manually
 
73
# --------------------------------------------------------------
 
74
AC_DEFUN([PKG_CHECK_EXISTS],
 
75
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
76
if test -n "$PKG_CONFIG" && \
 
77
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
78
  m4_ifval([$2], [$2], [:])
 
79
m4_ifvaln([$3], [else
 
80
  $3])dnl
 
81
fi])
 
82
 
 
83
 
 
84
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
85
# ---------------------------------------------
 
86
m4_define([_PKG_CONFIG],
 
87
[if test -n "$PKG_CONFIG"; then
 
88
    if test -n "$$1"; then
 
89
        pkg_cv_[]$1="$$1"
 
90
    else
 
91
        PKG_CHECK_EXISTS([$3],
 
92
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
93
                         [pkg_failed=yes])
 
94
    fi
 
95
else
 
96
        pkg_failed=untried
 
97
fi[]dnl
 
98
])# _PKG_CONFIG
 
99
 
 
100
# _PKG_SHORT_ERRORS_SUPPORTED
 
101
# -----------------------------
 
102
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
103
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
104
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
105
        _pkg_short_errors_supported=yes
 
106
else
 
107
        _pkg_short_errors_supported=no
 
108
fi[]dnl
 
109
])# _PKG_SHORT_ERRORS_SUPPORTED
 
110
 
 
111
 
 
112
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
113
# [ACTION-IF-NOT-FOUND])
 
114
#
 
115
#
 
116
# Note that if there is a possibility the first call to
 
117
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
118
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
119
#
 
120
#
 
121
# --------------------------------------------------------------
 
122
AC_DEFUN([PKG_CHECK_MODULES],
 
123
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
124
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
125
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
126
 
 
127
pkg_failed=no
 
128
AC_MSG_CHECKING([for $1])
 
129
 
 
130
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
131
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
132
 
 
133
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
134
and $1[]_LIBS to avoid the need to call pkg-config.
 
135
See the pkg-config man page for more details.])
 
136
 
 
137
if test $pkg_failed = yes; then
 
138
        _PKG_SHORT_ERRORS_SUPPORTED
 
139
        if test $_pkg_short_errors_supported = yes; then
 
140
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
141
        else 
 
142
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
143
        fi
 
144
        # Put the nasty error message in config.log where it belongs
 
145
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
146
 
 
147
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
148
[Package requirements ($2) were not met:
 
149
 
 
150
$$1_PKG_ERRORS
 
151
 
 
152
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
153
installed software in a non-standard prefix.
 
154
 
 
155
_PKG_TEXT
 
156
])],
 
157
                [AC_MSG_RESULT([no])
 
158
                $4])
 
159
elif test $pkg_failed = untried; then
 
160
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
161
[The pkg-config script could not be found or is too old.  Make sure it
 
162
is in your PATH or set the PKG_CONFIG environment variable to the full
 
163
path to pkg-config.
 
164
 
 
165
_PKG_TEXT
 
166
 
 
167
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
 
168
                [$4])
 
169
else
 
170
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
171
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
172
        AC_MSG_RESULT([yes])
 
173
        ifelse([$3], , :, [$3])
 
174
fi[]dnl
 
175
])# PKG_CHECK_MODULES
 
176
 
 
177
dnl
 
178
dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
 
179
dnl 
 
180
dnl Permission is hereby granted, free of charge, to any person obtaining a
 
181
dnl copy of this software and associated documentation files (the
 
182
dnl "Software"), to deal in the Software without restriction, including
 
183
dnl without limitation the rights to use, copy, modify, merge, publish,
 
184
dnl distribute, and/or sell copies of the Software, and to permit persons
 
185
dnl to whom the Software is furnished to do so, provided that the above
 
186
dnl copyright notice(s) and this permission notice appear in all copies of
 
187
dnl the Software and that both the above copyright notice(s) and this
 
188
dnl permission notice appear in supporting documentation.
 
189
dnl
 
190
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
191
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
192
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
 
193
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
 
194
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
 
195
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
 
196
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 
197
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 
198
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
199
dnl
 
200
dnl Except as contained in this notice, the name of a copyright holder
 
201
dnl shall not be used in advertising or otherwise to promote the sale, use
 
202
dnl or other dealings in this Software without prior written authorization
 
203
dnl of the copyright holder.
 
204
 
 
205
# XORG_MACROS_VERSION(required-version)
 
206
# -------------------------------------
 
207
# Minimum version: 1.1.0
 
208
#
 
209
# If you're using a macro added in Version 1.1 or newer, include this in
 
210
# your configure.ac with the minimum required version, such as:
 
211
# XORG_MACROS_VERSION(1.1)
 
212
#
 
213
# To force at least a version with this macro defined, also add:
 
214
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
 
215
#
 
216
#
 
217
# See the "minimum version" comment for each macro you use to see what 
 
218
# version you require.
 
219
AC_DEFUN([XORG_MACROS_VERSION],[
 
220
        [XORG_MACROS_needed_version=$1
 
221
        XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
 
222
        XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
 
223
        AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
 
224
        [XORG_MACROS_version=1.1.5
 
225
        XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
 
226
        XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
 
227
        if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
 
228
                AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
 
229
        fi
 
230
        if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
 
231
                AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
 
232
        fi
 
233
        AC_MSG_RESULT([yes, $XORG_MACROS_version])
 
234
]) # XORG_MACROS_VERSION
 
235
 
 
236
# XORG_PROG_RAWCPP()
 
237
# ------------------
 
238
# Minimum version: 1.0.0
 
239
#
 
240
# Find cpp program and necessary flags for use in pre-processing text files
 
241
# such as man pages and config files
 
242
AC_DEFUN([XORG_PROG_RAWCPP],[
 
243
AC_REQUIRE([AC_PROG_CPP])
 
244
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
 
245
   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
 
246
 
 
247
# Check for flag to avoid builtin definitions - assumes unix is predefined,
 
248
# which is not the best choice for supporting other OS'es, but covers most
 
249
# of the ones we need for now.
 
250
AC_MSG_CHECKING([if $RAWCPP requires -undef])
 
251
AC_LANG_CONFTEST([Does cpp redefine unix ?])
 
252
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
 
253
        AC_MSG_RESULT([no])
 
254
else
 
255
        if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
 
256
                RAWCPPFLAGS=-undef
 
257
                AC_MSG_RESULT([yes])
 
258
        else
 
259
                AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
 
260
        fi
 
261
fi
 
262
rm -f conftest.$ac_ext
 
263
 
 
264
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
 
265
AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
 
266
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
 
267
        AC_MSG_RESULT([no])
 
268
else
 
269
        if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
 
270
                RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
 
271
                AC_MSG_RESULT([yes])
 
272
        else
 
273
                AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
 
274
        fi
 
275
fi
 
276
rm -f conftest.$ac_ext
 
277
AC_SUBST(RAWCPPFLAGS)
 
278
]) # XORG_PROG_RAWCPP
 
279
 
 
280
# XORG_MANPAGE_SECTIONS()
 
281
# -----------------------
 
282
# Minimum version: 1.0.0
 
283
#
 
284
# Determine which sections man pages go in for the different man page types
 
285
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
 
286
# Not sure if there's any better way than just hardcoding by OS name.
 
287
# Override default settings by setting environment variables
 
288
 
 
289
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
 
290
AC_REQUIRE([AC_CANONICAL_HOST])
 
291
 
 
292
if test x$APP_MAN_SUFFIX = x    ; then
 
293
    APP_MAN_SUFFIX=1
 
294
fi
 
295
if test x$APP_MAN_DIR = x    ; then
 
296
    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
 
297
fi
 
298
 
 
299
if test x$LIB_MAN_SUFFIX = x    ; then
 
300
    LIB_MAN_SUFFIX=3
 
301
fi
 
302
if test x$LIB_MAN_DIR = x    ; then
 
303
    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
 
304
fi
 
305
 
 
306
if test x$FILE_MAN_SUFFIX = x    ; then
 
307
    case $host_os in
 
308
        solaris*)       FILE_MAN_SUFFIX=4  ;;
 
309
        *)              FILE_MAN_SUFFIX=5  ;;
 
310
    esac
 
311
fi
 
312
if test x$FILE_MAN_DIR = x    ; then
 
313
    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
 
314
fi
 
315
 
 
316
if test x$MISC_MAN_SUFFIX = x    ; then
 
317
    case $host_os in
 
318
        solaris*)       MISC_MAN_SUFFIX=5  ;;
 
319
        *)              MISC_MAN_SUFFIX=7  ;;
 
320
    esac
 
321
fi
 
322
if test x$MISC_MAN_DIR = x    ; then
 
323
    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
 
324
fi
 
325
 
 
326
if test x$DRIVER_MAN_SUFFIX = x    ; then
 
327
    case $host_os in
 
328
        solaris*)       DRIVER_MAN_SUFFIX=7  ;;
 
329
        *)              DRIVER_MAN_SUFFIX=4  ;;
 
330
    esac
 
331
fi
 
332
if test x$DRIVER_MAN_DIR = x    ; then
 
333
    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
 
334
fi
 
335
 
 
336
if test x$ADMIN_MAN_SUFFIX = x    ; then
 
337
    case $host_os in
 
338
        solaris*)       ADMIN_MAN_SUFFIX=1m ;;
 
339
        *)              ADMIN_MAN_SUFFIX=8  ;;
 
340
    esac
 
341
fi
 
342
if test x$ADMIN_MAN_DIR = x    ; then
 
343
    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
 
344
fi
 
345
 
 
346
 
 
347
AC_SUBST([APP_MAN_SUFFIX])
 
348
AC_SUBST([LIB_MAN_SUFFIX])
 
349
AC_SUBST([FILE_MAN_SUFFIX])
 
350
AC_SUBST([MISC_MAN_SUFFIX])
 
351
AC_SUBST([DRIVER_MAN_SUFFIX])
 
352
AC_SUBST([ADMIN_MAN_SUFFIX])
 
353
AC_SUBST([APP_MAN_DIR])
 
354
AC_SUBST([LIB_MAN_DIR])
 
355
AC_SUBST([FILE_MAN_DIR])
 
356
AC_SUBST([MISC_MAN_DIR])
 
357
AC_SUBST([DRIVER_MAN_DIR])
 
358
AC_SUBST([ADMIN_MAN_DIR])
 
359
]) # XORG_MANPAGE_SECTIONS
 
360
 
 
361
# XORG_CHECK_LINUXDOC
 
362
# -------------------
 
363
# Minimum version: 1.0.0
 
364
#
 
365
# Defines the variable MAKE_TEXT if the necessary tools and
 
366
# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
 
367
# Whether or not the necessary tools and files are found can be checked
 
368
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
 
369
AC_DEFUN([XORG_CHECK_LINUXDOC],[
 
370
XORG_SGML_PATH=$prefix/share/sgml
 
371
HAVE_DEFS_ENT=
 
372
 
 
373
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 
374
 
 
375
AC_PATH_PROG(LINUXDOC, linuxdoc)
 
376
AC_PATH_PROG(PS2PDF, ps2pdf)
 
377
 
 
378
AC_MSG_CHECKING([Whether to build documentation])
 
379
 
 
380
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
 
381
   BUILDDOC=yes
 
382
else
 
383
   BUILDDOC=no
 
384
fi
 
385
 
 
386
AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
 
387
 
 
388
AC_MSG_RESULT([$BUILDDOC])
 
389
 
 
390
AC_MSG_CHECKING([Whether to build pdf documentation])
 
391
 
 
392
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
 
393
   BUILDPDFDOC=yes
 
394
else
 
395
   BUILDPDFDOC=no
 
396
fi
 
397
 
 
398
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
399
 
 
400
AC_MSG_RESULT([$BUILDPDFDOC])
 
401
 
 
402
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
 
403
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
 
404
MAKE_PDF="$PS2PDF"
 
405
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
 
406
 
 
407
AC_SUBST(MAKE_TEXT)
 
408
AC_SUBST(MAKE_PS)
 
409
AC_SUBST(MAKE_PDF)
 
410
AC_SUBST(MAKE_HTML)
 
411
]) # XORG_CHECK_LINUXDOC
 
412
 
 
413
# XORG_CHECK_DOCBOOK
 
414
# -------------------
 
415
# Minimum version: 1.0.0
 
416
#
 
417
# Checks for the ability to build output formats from SGML DocBook source.
 
418
# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
 
419
# indicates whether the necessary tools and files are found and, if set,
 
420
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
 
421
AC_DEFUN([XORG_CHECK_DOCBOOK],[
 
422
XORG_SGML_PATH=$prefix/share/sgml
 
423
HAVE_DEFS_ENT=
 
424
BUILDTXTDOC=no
 
425
BUILDPDFDOC=no
 
426
BUILDPSDOC=no
 
427
BUILDHTMLDOC=no
 
428
 
 
429
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
 
430
 
 
431
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
 
432
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
 
433
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
 
434
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
 
435
 
 
436
AC_MSG_CHECKING([Whether to build text documentation])
 
437
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
 
438
   test x$BUILD_TXTDOC != xno; then
 
439
        BUILDTXTDOC=yes
 
440
fi
 
441
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
 
442
AC_MSG_RESULT([$BUILDTXTDOC])
 
443
 
 
444
AC_MSG_CHECKING([Whether to build PDF documentation])
 
445
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
 
446
   test x$BUILD_PDFDOC != xno; then
 
447
        BUILDPDFDOC=yes
 
448
fi
 
449
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
 
450
AC_MSG_RESULT([$BUILDPDFDOC])
 
451
 
 
452
AC_MSG_CHECKING([Whether to build PostScript documentation])
 
453
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
 
454
   test x$BUILD_PSDOC != xno; then
 
455
        BUILDPSDOC=yes
 
456
fi
 
457
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
 
458
AC_MSG_RESULT([$BUILDPSDOC])
 
459
 
 
460
AC_MSG_CHECKING([Whether to build HTML documentation])
 
461
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
 
462
   test x$BUILD_HTMLDOC != xno; then
 
463
        BUILDHTMLDOC=yes
 
464
fi
 
465
AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
 
466
AC_MSG_RESULT([$BUILDHTMLDOC])
 
467
 
 
468
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
 
469
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
 
470
MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
 
471
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
 
472
 
 
473
AC_SUBST(MAKE_TEXT)
 
474
AC_SUBST(MAKE_PS)
 
475
AC_SUBST(MAKE_PDF)
 
476
AC_SUBST(MAKE_HTML)
 
477
]) # XORG_CHECK_DOCBOOK
 
478
 
 
479
# XORG_CHECK_MALLOC_ZERO
 
480
# ----------------------
 
481
# Minimum version: 1.0.0
 
482
#
 
483
# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
 
484
# malloc(0) returns NULL.  Packages should add one of these cflags to
 
485
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
 
486
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
 
487
AC_ARG_ENABLE(malloc0returnsnull,
 
488
        AC_HELP_STRING([--enable-malloc0returnsnull],
 
489
                       [malloc(0) returns NULL (default: auto)]),
 
490
        [MALLOC_ZERO_RETURNS_NULL=$enableval],
 
491
        [MALLOC_ZERO_RETURNS_NULL=auto])
 
492
 
 
493
AC_MSG_CHECKING([whether malloc(0) returns NULL])
 
494
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
 
495
        AC_RUN_IFELSE([
 
496
char *malloc();
 
497
char *realloc();
 
498
char *calloc();
 
499
main() {
 
500
    char *m0, *r0, *c0, *p;
 
501
    m0 = malloc(0);
 
502
    p = malloc(10);
 
503
    r0 = realloc(p,0);
 
504
    c0 = calloc(0);
 
505
    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 
506
}],
 
507
                [MALLOC_ZERO_RETURNS_NULL=yes],
 
508
                [MALLOC_ZERO_RETURNS_NULL=no])
 
509
fi
 
510
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
511
 
 
512
if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
 
513
        MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
 
514
        XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
 
515
        XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
 
516
else
 
517
        MALLOC_ZERO_CFLAGS=""
 
518
        XMALLOC_ZERO_CFLAGS=""
 
519
        XTMALLOC_ZERO_CFLAGS=""
 
520
fi
 
521
 
 
522
AC_SUBST([MALLOC_ZERO_CFLAGS])
 
523
AC_SUBST([XMALLOC_ZERO_CFLAGS])
 
524
AC_SUBST([XTMALLOC_ZERO_CFLAGS])
 
525
]) # XORG_CHECK_MALLOC_ZERO
 
526
 
 
527
# XORG_WITH_LINT()
 
528
# ----------------
 
529
# Minimum version: 1.1.0
 
530
#
 
531
# Sets up flags for source checkers such as lint and sparse if --with-lint
 
532
# is specified.   (Use --with-lint=sparse for sparse.)
 
533
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
 
534
# Sets $LINT_FLAGS to flags to pass to source checker
 
535
# Sets LINT automake conditional if enabled (default: disabled)
 
536
#
 
537
AC_DEFUN([XORG_WITH_LINT],[
 
538
 
 
539
# Allow checking code with lint, sparse, etc.
 
540
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
 
541
                [Use a lint-style source code checker (default: disabled)])],
 
542
                [use_lint=$withval], [use_lint=no])
 
543
if test "x$use_lint" = "xyes" ; then
 
544
        LINT="lint"
 
545
else
 
546
        LINT="$use_lint"
 
547
fi
 
548
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
 
549
    case $LINT in
 
550
        lint|*/lint)
 
551
            case $host_os in
 
552
                solaris*)
 
553
                        LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
 
554
                        ;;
 
555
            esac
 
556
            ;;
 
557
    esac
 
558
fi
 
559
 
 
560
AC_SUBST(LINT)
 
561
AC_SUBST(LINT_FLAGS)
 
562
AM_CONDITIONAL(LINT, [test x$LINT != xno])
 
563
 
 
564
]) # XORG_WITH_LINT
 
565
 
 
566
# XORG_LINT_LIBRARY(LIBNAME)
 
567
# --------------------------
 
568
# Minimum version: 1.1.0
 
569
#
 
570
# Sets up flags for building lint libraries for checking programs that call
 
571
# functions in the library.
 
572
# Disabled by default, enable with --enable-lint-library
 
573
# Sets: 
 
574
#       @LINTLIB@               - name of lint library file to make
 
575
#       MAKE_LINT_LIB           - automake conditional
 
576
#
 
577
 
 
578
AC_DEFUN([XORG_LINT_LIBRARY],[
 
579
AC_REQUIRE([XORG_WITH_LINT])
 
580
# Build lint "library" for more indepth checks of programs calling this library
 
581
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
 
582
        [Create lint library (default: disabled)])],
 
583
        [make_lint_lib=$enableval], [make_lint_lib=no])
 
584
if test "x$make_lint_lib" != "xno" ; then
 
585
        if test "x$LINT" = "xno" ; then
 
586
                AC_MSG_ERROR([Cannot make lint library without --with-lint])
 
587
        fi
 
588
        if test "x$make_lint_lib" = "xyes" ; then
 
589
                LINTLIB=llib-l$1.ln
 
590
        else
 
591
                LINTLIB=$make_lint_lib
 
592
        fi
 
593
fi
 
594
AC_SUBST(LINTLIB)
 
595
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 
596
 
 
597
]) # XORG_LINT_LIBRARY
 
598
 
 
599
dnl Copyright 2005 Red Hat, Inc
 
600
dnl
 
601
dnl Permission to use, copy, modify, distribute, and sell this software and its
 
602
dnl documentation for any purpose is hereby granted without fee, provided that
 
603
dnl the above copyright notice appear in all copies and that both that
 
604
dnl copyright notice and this permission notice appear in supporting
 
605
dnl documentation.
 
606
dnl
 
607
dnl The above copyright notice and this permission notice shall be included
 
608
dnl in all copies or substantial portions of the Software.
 
609
dnl
 
610
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
611
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
612
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
613
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
614
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
615
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
616
dnl OTHER DEALINGS IN THE SOFTWARE.
 
617
dnl
 
618
dnl Except as contained in this notice, the name of the copyright holders shall
 
619
dnl not be used in advertising or otherwise to promote the sale, use or
 
620
dnl other dealings in this Software without prior written authorization
 
621
dnl from the copyright holders.
 
622
dnl
 
623
 
 
624
# XORG_RELEASE_VERSION
 
625
# --------------------
 
626
# Adds --with/without-release-string and changes the PACKAGE and
 
627
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
 
628
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
 
629
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
 
630
 
 
631
AC_DEFUN([XORG_RELEASE_VERSION],[
 
632
        AC_ARG_WITH(release-version,
 
633
                        AC_HELP_STRING([--with-release-version=STRING],
 
634
                                [Use release version string in package name]),
 
635
                        [RELEASE_VERSION="$withval"],
 
636
                        [RELEASE_VERSION=""])
 
637
        if test "x$RELEASE_VERSION" != "x"; then
 
638
                PACKAGE="$PACKAGE-$RELEASE_VERSION"
 
639
                PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
 
640
                AC_MSG_NOTICE([Building with package name set to $PACKAGE])
 
641
        fi
 
642
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
 
643
                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
 
644
                [Major version of this package])
 
645
        PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
 
646
        if test "x$PVM" = "x"; then
 
647
                PVM="0"
 
648
        fi
 
649
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
 
650
                [$PVM],
 
651
                [Minor version of this package])
 
652
        PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
 
653
        if test "x$PVP" = "x"; then
 
654
                PVP="0"
 
655
        fi
 
656
        AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
 
657
                [$PVP],
 
658
                [Patch version of this package])
 
659
])
 
660
 
 
661
dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
 
662
dnl
 
663
dnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 
664
dnl 
 
665
dnl Permission to use, copy, modify, distribute, and sell this software and its
 
666
dnl documentation for any purpose is hereby granted without fee, provided that
 
667
dnl the above copyright notice appear in all copies and that both that
 
668
dnl copyright notice and this permission notice appear in supporting
 
669
dnl documentation.
 
670
dnl 
 
671
dnl The above copyright notice and this permission notice shall be included
 
672
dnl in all copies or substantial portions of the Software.
 
673
dnl 
 
674
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
675
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
676
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
677
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
678
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
679
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
680
dnl OTHER DEALINGS IN THE SOFTWARE.
 
681
dnl 
 
682
dnl Except as contained in this notice, the name of the copyright holders shall
 
683
dnl not be used in advertising or otherwise to promote the sale, use or
 
684
dnl other dealings in this Software without prior written authorization
 
685
dnl from the copyright holders.
 
686
dnl 
 
687
 
 
688
# XTRANS_TCP_FLAGS()
 
689
# ------------------
 
690
# Find needed libraries for TCP sockets, and check for IPv6 support
 
691
AC_DEFUN([XTRANS_TCP_FLAGS],[
 
692
 # SVR4 hides these in libraries other than libc
 
693
 AC_SEARCH_LIBS(socket, [socket])
 
694
 AC_SEARCH_LIBS(gethostbyname, [nsl])
 
695
 
 
696
 # Needs to come after above checks for libsocket & libnsl for SVR4 systems
 
697
 AC_ARG_ENABLE(ipv6, 
 
698
        AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]),
 
699
        [IPV6CONN=$enableval], 
 
700
        [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
 
701
 AC_MSG_CHECKING([if IPv6 support should be built])
 
702
 if test "$IPV6CONN" = "yes"; then
 
703
        AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
 
704
 fi
 
705
 AC_MSG_RESULT($IPV6CONN)
 
706
 
 
707
 # 4.3BSD-Reno added a new member to struct sockaddr_in
 
708
 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
 
709
        AC_DEFINE([BSD44SOCKETS],1,
 
710
            [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
 
711
#include <sys/types.h>
 
712
#include <sys/socket.h>
 
713
#include <netinet/in.h>
 
714
 ])
 
715
]) # XTRANS_TCP_FLAGS
 
716
 
 
717
# XTRANS_CONNECTION_FLAGS()
 
718
# -------------------------
 
719
# Standard checks for which Xtrans transports to use by the Xorg packages
 
720
# that use Xtrans functions
 
721
AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
 
722
 AC_REQUIRE([AC_CANONICAL_HOST])
 
723
 AC_REQUIRE([AC_TYPE_SIGNAL])
 
724
 AC_ARG_ENABLE(unix-transport,
 
725
        AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
 
726
        [UNIXCONN=$enableval], [UNIXCONN=yes])
 
727
 AC_ARG_ENABLE(tcp-transport, 
 
728
        AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
 
729
        [TCPCONN=$enableval], [TCPCONN=yes])
 
730
 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
 
731
 if test "$UNIXCONN" = "yes"; then
 
732
        AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
 
733
 fi
 
734
 AC_MSG_RESULT($UNIXCONN)
 
735
 AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
 
736
 AC_MSG_RESULT($TCPCONN)
 
737
 if test "$TCPCONN" = "yes"; then
 
738
        AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
 
739
        XTRANS_TCP_FLAGS
 
740
 fi
 
741
 [case $host_os in
 
742
        solaris*|sco*|sysv4*)   localdef="yes" ;;
 
743
        *)                      localdef="no"  ;;
 
744
 esac]
 
745
 AC_ARG_ENABLE(local-transport,
 
746
        AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
 
747
        [LOCALCONN=$enableval], [LOCALCONN=$localdef])
 
748
 AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
 
749
 AC_MSG_RESULT($LOCALCONN)
 
750
 if test "$LOCALCONN" = "yes"; then
 
751
        AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
 
752
 fi
 
753
 
 
754
]) # XTRANS_CONNECTION_FLAGS
 
755
 
 
756
 
 
757
# XTRANS_SECURE_RPC_FLAGS()
 
758
# -------------------------
 
759
# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
 
760
# so that any necessary networking libraries are already found
 
761
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
 
762
[AC_REQUIRE([XTRANS_TCP_FLAGS])
 
763
 AC_ARG_ENABLE(secure-rpc, 
 
764
        AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
 
765
        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
 
766
 
 
767
 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
 
768
        FOUND_SECURE_RPC="no"
 
769
        AC_CHECK_FUNCS([authdes_seccreate authdes_create],
 
770
                        [FOUND_SECURE_RPC="yes"])
 
771
        if test "x$FOUND_SECURE_RPC" = "xno" ; then
 
772
                if test "x$SECURE_RPC" = "xyes" ; then
 
773
        AC_MSG_ERROR([Secure RPC requested, but required functions not found])
 
774
                fi      
 
775
                SECURE_RPC="no"
 
776
        else
 
777
                dnl FreeBSD keeps getsecretkey in librpcsvc
 
778
                AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
 
779
                SECURE_RPC="yes"
 
780
        fi
 
781
 fi
 
782
 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
 
783
 if test "x$SECURE_RPC" = "xyes" ; then
 
784
        AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
 
785
 fi
 
786
 AC_MSG_RESULT($SECURE_RPC)
 
787
]) # XTRANS_SECURE_RPC_FLAGS
 
788
 
 
789
 
 
790
# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
 
791
#
 
792
# This file is free software; the Free Software Foundation
 
793
# gives unlimited permission to copy and/or distribute it,
 
794
# with or without modifications, as long as this notice is preserved.
 
795
 
 
796
# AM_AUTOMAKE_VERSION(VERSION)
 
797
# ----------------------------
 
798
# Automake X.Y traces this macro to ensure aclocal.m4 has been
 
799
# generated from the m4 files accompanying Automake X.Y.
 
800
# (This private macro should not be called outside this file.)
 
801
AC_DEFUN([AM_AUTOMAKE_VERSION],
 
802
[am__api_version='1.10'
 
803
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 
804
dnl require some minimum version.  Point them to the right macro.
 
805
m4_if([$1], [1.10], [],
 
806
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 
807
])
 
808
 
 
809
# _AM_AUTOCONF_VERSION(VERSION)
 
810
# -----------------------------
 
811
# aclocal traces this macro to find the Autoconf version.
 
812
# This is a private macro too.  Using m4_define simplifies
 
813
# the logic in aclocal, which can simply ignore this definition.
 
814
m4_define([_AM_AUTOCONF_VERSION], [])
 
815
 
 
816
# AM_SET_CURRENT_AUTOMAKE_VERSION
 
817
# -------------------------------
 
818
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 
819
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 
820
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 
821
[AM_AUTOMAKE_VERSION([1.10])dnl
 
822
_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
 
823
 
 
824
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
825
 
 
826
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
827
#
 
828
# This file is free software; the Free Software Foundation
 
829
# gives unlimited permission to copy and/or distribute it,
 
830
# with or without modifications, as long as this notice is preserved.
 
831
 
 
832
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 
833
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 
834
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
 
835
#
 
836
# Of course, Automake must honor this variable whenever it calls a
 
837
# tool from the auxiliary directory.  The problem is that $srcdir (and
 
838
# therefore $ac_aux_dir as well) can be either absolute or relative,
 
839
# depending on how configure is run.  This is pretty annoying, since
 
840
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
 
841
# source directory, any form will work fine, but in subdirectories a
 
842
# relative path needs to be adjusted first.
 
843
#
 
844
# $ac_aux_dir/missing
 
845
#    fails when called from a subdirectory if $ac_aux_dir is relative
 
846
# $top_srcdir/$ac_aux_dir/missing
 
847
#    fails if $ac_aux_dir is absolute,
 
848
#    fails when called from a subdirectory in a VPATH build with
 
849
#          a relative $ac_aux_dir
 
850
#
 
851
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 
852
# are both prefixed by $srcdir.  In an in-source build this is usually
 
853
# harmless because $srcdir is `.', but things will broke when you
 
854
# start a VPATH build or use an absolute $srcdir.
 
855
#
 
856
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
 
857
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
 
858
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 
859
# and then we would define $MISSING as
 
860
#   MISSING="\${SHELL} $am_aux_dir/missing"
 
861
# This will work as long as MISSING is not called from configure, because
 
862
# unfortunately $(top_srcdir) has no meaning in configure.
 
863
# However there are other variables, like CC, which are often used in
 
864
# configure, and could therefore not use this "fixed" $ac_aux_dir.
 
865
#
 
866
# Another solution, used here, is to always expand $ac_aux_dir to an
 
867
# absolute PATH.  The drawback is that using absolute paths prevent a
 
868
# configured tree to be moved without reconfiguration.
 
869
 
 
870
AC_DEFUN([AM_AUX_DIR_EXPAND],
 
871
[dnl Rely on autoconf to set up CDPATH properly.
 
872
AC_PREREQ([2.50])dnl
 
873
# expand $ac_aux_dir to an absolute path
 
874
am_aux_dir=`cd $ac_aux_dir && pwd`
 
875
])
 
876
 
 
877
# AM_CONDITIONAL                                            -*- Autoconf -*-
 
878
 
 
879
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
 
880
# Free Software Foundation, Inc.
 
881
#
 
882
# This file is free software; the Free Software Foundation
 
883
# gives unlimited permission to copy and/or distribute it,
 
884
# with or without modifications, as long as this notice is preserved.
 
885
 
 
886
# serial 8
 
887
 
 
888
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
 
889
# -------------------------------------
 
890
# Define a conditional.
 
891
AC_DEFUN([AM_CONDITIONAL],
 
892
[AC_PREREQ(2.52)dnl
 
893
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 
894
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 
895
AC_SUBST([$1_TRUE])dnl
 
896
AC_SUBST([$1_FALSE])dnl
 
897
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
 
898
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
 
899
if $2; then
 
900
  $1_TRUE=
 
901
  $1_FALSE='#'
 
902
else
 
903
  $1_TRUE='#'
 
904
  $1_FALSE=
 
905
fi
 
906
AC_CONFIG_COMMANDS_PRE(
 
907
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
 
908
  AC_MSG_ERROR([[conditional "$1" was never defined.
 
909
Usually this means the macro was only invoked conditionally.]])
 
910
fi])])
 
911
 
 
912
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 
913
# Free Software Foundation, Inc.
 
914
#
 
915
# This file is free software; the Free Software Foundation
 
916
# gives unlimited permission to copy and/or distribute it,
 
917
# with or without modifications, as long as this notice is preserved.
 
918
 
 
919
# serial 9
 
920
 
 
921
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 
922
# written in clear, in which case automake, when reading aclocal.m4,
 
923
# will think it sees a *use*, and therefore will trigger all it's
 
924
# C support machinery.  Also note that it means that autoscan, seeing
 
925
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
 
926
 
 
927
 
 
928
# _AM_DEPENDENCIES(NAME)
 
929
# ----------------------
 
930
# See how the compiler implements dependency checking.
 
931
# NAME is "CC", "CXX", "GCJ", or "OBJC".
 
932
# We try a few techniques and use that to set a single cache variable.
 
933
#
 
934
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
 
935
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
 
936
# dependency, and given that the user is not expected to run this macro,
 
937
# just rely on AC_PROG_CC.
 
938
AC_DEFUN([_AM_DEPENDENCIES],
 
939
[AC_REQUIRE([AM_SET_DEPDIR])dnl
 
940
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 
941
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 
942
AC_REQUIRE([AM_DEP_TRACK])dnl
 
943
 
 
944
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
 
945
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
 
946
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
 
947
       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
 
948
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
 
949
                   [depcc="$$1"   am_compiler_list=])
 
950
 
 
951
AC_CACHE_CHECK([dependency style of $depcc],
 
952
               [am_cv_$1_dependencies_compiler_type],
 
953
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
 
954
  # We make a subdir and do the tests there.  Otherwise we can end up
 
955
  # making bogus files that we don't know about and never remove.  For
 
956
  # instance it was reported that on HP-UX the gcc test will end up
 
957
  # making a dummy file named `D' -- because `-MD' means `put the output
 
958
  # in D'.
 
959
  mkdir conftest.dir
 
960
  # Copy depcomp to subdir because otherwise we won't find it if we're
 
961
  # using a relative directory.
 
962
  cp "$am_depcomp" conftest.dir
 
963
  cd conftest.dir
 
964
  # We will build objects and dependencies in a subdirectory because
 
965
  # it helps to detect inapplicable dependency modes.  For instance
 
966
  # both Tru64's cc and ICC support -MD to output dependencies as a
 
967
  # side effect of compilation, but ICC will put the dependencies in
 
968
  # the current directory while Tru64 will put them in the object
 
969
  # directory.
 
970
  mkdir sub
 
971
 
 
972
  am_cv_$1_dependencies_compiler_type=none
 
973
  if test "$am_compiler_list" = ""; then
 
974
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
 
975
  fi
 
976
  for depmode in $am_compiler_list; do
 
977
    # Setup a source with many dependencies, because some compilers
 
978
    # like to wrap large dependency lists on column 80 (with \), and
 
979
    # we should not choose a depcomp mode which is confused by this.
 
980
    #
 
981
    # We need to recreate these files for each test, as the compiler may
 
982
    # overwrite some of them when testing with obscure command lines.
 
983
    # This happens at least with the AIX C compiler.
 
984
    : > sub/conftest.c
 
985
    for i in 1 2 3 4 5 6; do
 
986
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
 
987
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
 
988
      # Solaris 8's {/usr,}/bin/sh.
 
989
      touch sub/conftst$i.h
 
990
    done
 
991
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
992
 
 
993
    case $depmode in
 
994
    nosideeffect)
 
995
      # after this tag, mechanisms are not by side-effect, so they'll
 
996
      # only be used when explicitly requested
 
997
      if test "x$enable_dependency_tracking" = xyes; then
 
998
        continue
 
999
      else
 
1000
        break
 
1001
      fi
 
1002
      ;;
 
1003
    none) break ;;
 
1004
    esac
 
1005
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
 
1006
    # mode.  It turns out that the SunPro C++ compiler does not properly
 
1007
    # handle `-M -o', and we need to detect this.
 
1008
    if depmode=$depmode \
 
1009
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
 
1010
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
 
1011
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
 
1012
         >/dev/null 2>conftest.err &&
 
1013
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
 
1014
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
 
1015
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
 
1016
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
 
1017
      # icc doesn't choke on unknown options, it will just issue warnings
 
1018
      # or remarks (even with -Werror).  So we grep stderr for any message
 
1019
      # that says an option was ignored or not supported.
 
1020
      # When given -MP, icc 7.0 and 7.1 complain thusly:
 
1021
      #   icc: Command line warning: ignoring option '-M'; no argument required
 
1022
      # The diagnosis changed in icc 8.0:
 
1023
      #   icc: Command line remark: option '-MP' not supported
 
1024
      if (grep 'ignoring option' conftest.err ||
 
1025
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
 
1026
        am_cv_$1_dependencies_compiler_type=$depmode
 
1027
        break
 
1028
      fi
 
1029
    fi
 
1030
  done
 
1031
 
 
1032
  cd ..
 
1033
  rm -rf conftest.dir
 
1034
else
 
1035
  am_cv_$1_dependencies_compiler_type=none
 
1036
fi
 
1037
])
 
1038
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
 
1039
AM_CONDITIONAL([am__fastdep$1], [
 
1040
  test "x$enable_dependency_tracking" != xno \
 
1041
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
 
1042
])
 
1043
 
 
1044
 
 
1045
# AM_SET_DEPDIR
 
1046
# -------------
 
1047
# Choose a directory name for dependency files.
 
1048
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
 
1049
AC_DEFUN([AM_SET_DEPDIR],
 
1050
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1051
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 
1052
])
 
1053
 
 
1054
 
 
1055
# AM_DEP_TRACK
 
1056
# ------------
 
1057
AC_DEFUN([AM_DEP_TRACK],
 
1058
[AC_ARG_ENABLE(dependency-tracking,
 
1059
[  --disable-dependency-tracking  speeds up one-time build
 
1060
  --enable-dependency-tracking   do not reject slow dependency extractors])
 
1061
if test "x$enable_dependency_tracking" != xno; then
 
1062
  am_depcomp="$ac_aux_dir/depcomp"
 
1063
  AMDEPBACKSLASH='\'
 
1064
fi
 
1065
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 
1066
AC_SUBST([AMDEPBACKSLASH])dnl
 
1067
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
1068
])
 
1069
 
 
1070
# Generate code to set up dependency tracking.              -*- Autoconf -*-
 
1071
 
 
1072
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
1073
# Free Software Foundation, Inc.
 
1074
#
 
1075
# This file is free software; the Free Software Foundation
 
1076
# gives unlimited permission to copy and/or distribute it,
 
1077
# with or without modifications, as long as this notice is preserved.
 
1078
 
 
1079
#serial 3
 
1080
 
 
1081
# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1082
# ------------------------------
 
1083
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1084
[for mf in $CONFIG_FILES; do
 
1085
  # Strip MF so we end up with the name of the file.
 
1086
  mf=`echo "$mf" | sed -e 's/:.*$//'`
 
1087
  # Check whether this is an Automake generated Makefile or not.
 
1088
  # We used to match only the files named `Makefile.in', but
 
1089
  # some people rename them; so instead we look at the file content.
 
1090
  # Grep'ing the first line is not enough: some people post-process
 
1091
  # each Makefile.in and add a new line on top of each file to say so.
 
1092
  # Grep'ing the whole file is not good either: AIX grep has a line
 
1093
  # limit of 2048, but all sed's we know have understand at least 4000.
 
1094
  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
 
1095
    dirpart=`AS_DIRNAME("$mf")`
 
1096
  else
 
1097
    continue
 
1098
  fi
 
1099
  # Extract the definition of DEPDIR, am__include, and am__quote
 
1100
  # from the Makefile without running `make'.
 
1101
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
 
1102
  test -z "$DEPDIR" && continue
 
1103
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
 
1104
  test -z "am__include" && continue
 
1105
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
 
1106
  # When using ansi2knr, U may be empty or an underscore; expand it
 
1107
  U=`sed -n 's/^U = //p' < "$mf"`
 
1108
  # Find all dependency output files, they are included files with
 
1109
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
 
1110
  # simplest approach to changing $(DEPDIR) to its actual value in the
 
1111
  # expansion.
 
1112
  for file in `sed -n "
 
1113
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
 
1114
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
 
1115
    # Make sure the directory exists.
 
1116
    test -f "$dirpart/$file" && continue
 
1117
    fdir=`AS_DIRNAME(["$file"])`
 
1118
    AS_MKDIR_P([$dirpart/$fdir])
 
1119
    # echo "creating $dirpart/$file"
 
1120
    echo '# dummy' > "$dirpart/$file"
 
1121
  done
 
1122
done
 
1123
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
1124
 
 
1125
 
 
1126
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
1127
# -----------------------------
 
1128
# This macro should only be invoked once -- use via AC_REQUIRE.
 
1129
#
 
1130
# This code is only required when automatic dependency tracking
 
1131
# is enabled.  FIXME.  This creates each `.P' file that we will
 
1132
# need in order to bootstrap the dependency handling code.
 
1133
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1134
[AC_CONFIG_COMMANDS([depfiles],
 
1135
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
 
1136
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
 
1137
])
 
1138
 
 
1139
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
1140
# Free Software Foundation, Inc.
 
1141
#
 
1142
# This file is free software; the Free Software Foundation
 
1143
# gives unlimited permission to copy and/or distribute it,
 
1144
# with or without modifications, as long as this notice is preserved.
 
1145
 
 
1146
# serial 8
 
1147
 
 
1148
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 
1149
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
 
1150
 
 
1151
# Do all the work for Automake.                             -*- Autoconf -*-
 
1152
 
 
1153
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
1154
# 2005, 2006 Free Software Foundation, Inc.
 
1155
#
 
1156
# This file is free software; the Free Software Foundation
 
1157
# gives unlimited permission to copy and/or distribute it,
 
1158
# with or without modifications, as long as this notice is preserved.
 
1159
 
 
1160
# serial 12
 
1161
 
 
1162
# This macro actually does too much.  Some checks are only needed if
 
1163
# your package does certain things.  But this isn't really a big deal.
 
1164
 
 
1165
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 
1166
# AM_INIT_AUTOMAKE([OPTIONS])
 
1167
# -----------------------------------------------
 
1168
# The call with PACKAGE and VERSION arguments is the old style
 
1169
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
 
1170
# and VERSION should now be passed to AC_INIT and removed from
 
1171
# the call to AM_INIT_AUTOMAKE.
 
1172
# We support both call styles for the transition.  After
 
1173
# the next Automake release, Autoconf can make the AC_INIT
 
1174
# arguments mandatory, and then we can depend on a new Autoconf
 
1175
# release and drop the old call support.
 
1176
AC_DEFUN([AM_INIT_AUTOMAKE],
 
1177
[AC_PREREQ([2.60])dnl
 
1178
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 
1179
dnl the ones we care about.
 
1180
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 
1181
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 
1182
AC_REQUIRE([AC_PROG_INSTALL])dnl
 
1183
if test "`cd $srcdir && pwd`" != "`pwd`"; then
 
1184
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
 
1185
  # is not polluted with repeated "-I."
 
1186
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
 
1187
  # test to see if srcdir already configured
 
1188
  if test -f $srcdir/config.status; then
 
1189
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
1190
  fi
 
1191
fi
 
1192
 
 
1193
# test whether we have cygpath
 
1194
if test -z "$CYGPATH_W"; then
 
1195
  if (cygpath --version) >/dev/null 2>/dev/null; then
 
1196
    CYGPATH_W='cygpath -w'
 
1197
  else
 
1198
    CYGPATH_W=echo
 
1199
  fi
 
1200
fi
 
1201
AC_SUBST([CYGPATH_W])
 
1202
 
 
1203
# Define the identity of the package.
 
1204
dnl Distinguish between old-style and new-style calls.
 
1205
m4_ifval([$2],
 
1206
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 
1207
 AC_SUBST([PACKAGE], [$1])dnl
 
1208
 AC_SUBST([VERSION], [$2])],
 
1209
[_AM_SET_OPTIONS([$1])dnl
 
1210
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 
1211
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
 
1212
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
 
1213
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
 
1214
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
1215
 
 
1216
_AM_IF_OPTION([no-define],,
 
1217
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
1218
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
 
1219
 
 
1220
# Some tools Automake needs.
 
1221
AC_REQUIRE([AM_SANITY_CHECK])dnl
 
1222
AC_REQUIRE([AC_ARG_PROGRAM])dnl
 
1223
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
 
1224
AM_MISSING_PROG(AUTOCONF, autoconf)
 
1225
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 
1226
AM_MISSING_PROG(AUTOHEADER, autoheader)
 
1227
AM_MISSING_PROG(MAKEINFO, makeinfo)
 
1228
AM_PROG_INSTALL_SH
 
1229
AM_PROG_INSTALL_STRIP
 
1230
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 
1231
# We need awk for the "check" target.  The system "awk" is bad on
 
1232
# some platforms.
 
1233
AC_REQUIRE([AC_PROG_AWK])dnl
 
1234
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
1235
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 
1236
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 
1237
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
 
1238
                             [_AM_PROG_TAR([v7])])])
 
1239
_AM_IF_OPTION([no-dependencies],,
 
1240
[AC_PROVIDE_IFELSE([AC_PROG_CC],
 
1241
                  [_AM_DEPENDENCIES(CC)],
 
1242
                  [define([AC_PROG_CC],
 
1243
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 
1244
AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
1245
                  [_AM_DEPENDENCIES(CXX)],
 
1246
                  [define([AC_PROG_CXX],
 
1247
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 
1248
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
 
1249
                  [_AM_DEPENDENCIES(OBJC)],
 
1250
                  [define([AC_PROG_OBJC],
 
1251
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 
1252
])
 
1253
])
 
1254
 
 
1255
 
 
1256
# When config.status generates a header, we must update the stamp-h file.
 
1257
# This file resides in the same directory as the config header
 
1258
# that is generated.  The stamp files are numbered to have different names.
 
1259
 
 
1260
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
 
1261
# loop where config.status creates the headers, so we can generate
 
1262
# our stamp files there.
 
1263
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 
1264
[# Compute $1's index in $config_headers.
 
1265
_am_stamp_count=1
 
1266
for _am_header in $config_headers :; do
 
1267
  case $_am_header in
 
1268
    $1 | $1:* )
 
1269
      break ;;
 
1270
    * )
 
1271
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
 
1272
  esac
 
1273
done
 
1274
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
1275
 
 
1276
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1277
#
 
1278
# This file is free software; the Free Software Foundation
 
1279
# gives unlimited permission to copy and/or distribute it,
 
1280
# with or without modifications, as long as this notice is preserved.
 
1281
 
 
1282
# AM_PROG_INSTALL_SH
 
1283
# ------------------
 
1284
# Define $install_sh.
 
1285
AC_DEFUN([AM_PROG_INSTALL_SH],
 
1286
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1287
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
 
1288
AC_SUBST(install_sh)])
 
1289
 
 
1290
# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 
1291
#
 
1292
# This file is free software; the Free Software Foundation
 
1293
# gives unlimited permission to copy and/or distribute it,
 
1294
# with or without modifications, as long as this notice is preserved.
 
1295
 
 
1296
# serial 2
 
1297
 
 
1298
# Check whether the underlying file-system supports filenames
 
1299
# with a leading dot.  For instance MS-DOS doesn't.
 
1300
AC_DEFUN([AM_SET_LEADING_DOT],
 
1301
[rm -rf .tst 2>/dev/null
 
1302
mkdir .tst 2>/dev/null
 
1303
if test -d .tst; then
 
1304
  am__leading_dot=.
 
1305
else
 
1306
  am__leading_dot=_
 
1307
fi
 
1308
rmdir .tst 2>/dev/null
 
1309
AC_SUBST([am__leading_dot])])
 
1310
 
 
1311
# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 
1312
# From Jim Meyering
 
1313
 
 
1314
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
 
1315
# Free Software Foundation, Inc.
 
1316
#
 
1317
# This file is free software; the Free Software Foundation
 
1318
# gives unlimited permission to copy and/or distribute it,
 
1319
# with or without modifications, as long as this notice is preserved.
 
1320
 
 
1321
# serial 4
 
1322
 
 
1323
AC_DEFUN([AM_MAINTAINER_MODE],
 
1324
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
1325
  dnl maintainer-mode is disabled by default
 
1326
  AC_ARG_ENABLE(maintainer-mode,
 
1327
[  --enable-maintainer-mode  enable make rules and dependencies not useful
 
1328
                          (and sometimes confusing) to the casual installer],
 
1329
      USE_MAINTAINER_MODE=$enableval,
 
1330
      USE_MAINTAINER_MODE=no)
 
1331
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
 
1332
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
 
1333
  MAINT=$MAINTAINER_MODE_TRUE
 
1334
  AC_SUBST(MAINT)dnl
 
1335
]
 
1336
)
 
1337
 
 
1338
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
 
1339
 
 
1340
# Check to see how 'make' treats includes.                  -*- Autoconf -*-
 
1341
 
 
1342
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1343
#
 
1344
# This file is free software; the Free Software Foundation
 
1345
# gives unlimited permission to copy and/or distribute it,
 
1346
# with or without modifications, as long as this notice is preserved.
 
1347
 
 
1348
# serial 3
 
1349
 
 
1350
# AM_MAKE_INCLUDE()
 
1351
# -----------------
 
1352
# Check to see how make treats includes.
 
1353
AC_DEFUN([AM_MAKE_INCLUDE],
 
1354
[am_make=${MAKE-make}
 
1355
cat > confinc << 'END'
 
1356
am__doit:
 
1357
        @echo done
 
1358
.PHONY: am__doit
 
1359
END
 
1360
# If we don't find an include directive, just comment out the code.
 
1361
AC_MSG_CHECKING([for style of include used by $am_make])
 
1362
am__include="#"
 
1363
am__quote=
 
1364
_am_result=none
 
1365
# First try GNU make style include.
 
1366
echo "include confinc" > confmf
 
1367
# We grep out `Entering directory' and `Leaving directory'
 
1368
# messages which can occur if `w' ends up in MAKEFLAGS.
 
1369
# In particular we don't look at `^make:' because GNU make might
 
1370
# be invoked under some other name (usually "gmake"), in which
 
1371
# case it prints its new name instead of `make'.
 
1372
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
 
1373
   am__include=include
 
1374
   am__quote=
 
1375
   _am_result=GNU
 
1376
fi
 
1377
# Now try BSD make style include.
 
1378
if test "$am__include" = "#"; then
 
1379
   echo '.include "confinc"' > confmf
 
1380
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
 
1381
      am__include=.include
 
1382
      am__quote="\""
 
1383
      _am_result=BSD
 
1384
   fi
 
1385
fi
 
1386
AC_SUBST([am__include])
 
1387
AC_SUBST([am__quote])
 
1388
AC_MSG_RESULT([$_am_result])
 
1389
rm -f confinc confmf
 
1390
])
 
1391
 
 
1392
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
1393
 
 
1394
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
 
1395
# Free Software Foundation, Inc.
 
1396
#
 
1397
# This file is free software; the Free Software Foundation
 
1398
# gives unlimited permission to copy and/or distribute it,
 
1399
# with or without modifications, as long as this notice is preserved.
 
1400
 
 
1401
# serial 5
 
1402
 
 
1403
# AM_MISSING_PROG(NAME, PROGRAM)
 
1404
# ------------------------------
 
1405
AC_DEFUN([AM_MISSING_PROG],
 
1406
[AC_REQUIRE([AM_MISSING_HAS_RUN])
 
1407
$1=${$1-"${am_missing_run}$2"}
 
1408
AC_SUBST($1)])
 
1409
 
 
1410
 
 
1411
# AM_MISSING_HAS_RUN
 
1412
# ------------------
 
1413
# Define MISSING if not defined so far and test if it supports --run.
 
1414
# If it does, set am_missing_run to use it, otherwise, to nothing.
 
1415
AC_DEFUN([AM_MISSING_HAS_RUN],
 
1416
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 
1417
AC_REQUIRE_AUX_FILE([missing])dnl
 
1418
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 
1419
# Use eval to expand $SHELL
 
1420
if eval "$MISSING --run true"; then
 
1421
  am_missing_run="$MISSING --run "
 
1422
else
 
1423
  am_missing_run=
 
1424
  AC_MSG_WARN([`missing' script is too old or missing])
 
1425
fi
 
1426
])
 
1427
 
 
1428
# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 
1429
#
 
1430
# This file is free software; the Free Software Foundation
 
1431
# gives unlimited permission to copy and/or distribute it,
 
1432
# with or without modifications, as long as this notice is preserved.
 
1433
 
 
1434
# AM_PROG_MKDIR_P
 
1435
# ---------------
 
1436
# Check for `mkdir -p'.
 
1437
AC_DEFUN([AM_PROG_MKDIR_P],
 
1438
[AC_PREREQ([2.60])dnl
 
1439
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 
1440
dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
 
1441
dnl while keeping a definition of mkdir_p for backward compatibility.
 
1442
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
 
1443
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
 
1444
dnl Makefile.ins that do not define MKDIR_P, so we do our own
 
1445
dnl adjustment using top_builddir (which is defined more often than
 
1446
dnl MKDIR_P).
 
1447
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
 
1448
case $mkdir_p in
 
1449
  [[\\/$]]* | ?:[[\\/]]*) ;;
 
1450
  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
 
1451
esac
 
1452
])
 
1453
 
 
1454
# Helper functions for option handling.                     -*- Autoconf -*-
 
1455
 
 
1456
# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
 
1457
#
 
1458
# This file is free software; the Free Software Foundation
 
1459
# gives unlimited permission to copy and/or distribute it,
 
1460
# with or without modifications, as long as this notice is preserved.
 
1461
 
 
1462
# serial 3
 
1463
 
 
1464
# _AM_MANGLE_OPTION(NAME)
 
1465
# -----------------------
 
1466
AC_DEFUN([_AM_MANGLE_OPTION],
 
1467
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
1468
 
 
1469
# _AM_SET_OPTION(NAME)
 
1470
# ------------------------------
 
1471
# Set option NAME.  Presently that only means defining a flag for this option.
 
1472
AC_DEFUN([_AM_SET_OPTION],
 
1473
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
1474
 
 
1475
# _AM_SET_OPTIONS(OPTIONS)
 
1476
# ----------------------------------
 
1477
# OPTIONS is a space-separated list of Automake options.
 
1478
AC_DEFUN([_AM_SET_OPTIONS],
 
1479
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
1480
 
 
1481
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 
1482
# -------------------------------------------
 
1483
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
 
1484
AC_DEFUN([_AM_IF_OPTION],
 
1485
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
1486
 
 
1487
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
1488
 
 
1489
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
 
1490
# Free Software Foundation, Inc.
 
1491
#
 
1492
# This file is free software; the Free Software Foundation
 
1493
# gives unlimited permission to copy and/or distribute it,
 
1494
# with or without modifications, as long as this notice is preserved.
 
1495
 
 
1496
# serial 4
 
1497
 
 
1498
# AM_SANITY_CHECK
 
1499
# ---------------
 
1500
AC_DEFUN([AM_SANITY_CHECK],
 
1501
[AC_MSG_CHECKING([whether build environment is sane])
 
1502
# Just in case
 
1503
sleep 1
 
1504
echo timestamp > conftest.file
 
1505
# Do `set' in a subshell so we don't clobber the current shell's
 
1506
# arguments.  Must try -L first in case configure is actually a
 
1507
# symlink; some systems play weird games with the mod time of symlinks
 
1508
# (eg FreeBSD returns the mod time of the symlink's containing
 
1509
# directory).
 
1510
if (
 
1511
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
 
1512
   if test "$[*]" = "X"; then
 
1513
      # -L didn't work.
 
1514
      set X `ls -t $srcdir/configure conftest.file`
 
1515
   fi
 
1516
   rm -f conftest.file
 
1517
   if test "$[*]" != "X $srcdir/configure conftest.file" \
 
1518
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
 
1519
 
 
1520
      # If neither matched, then we have a broken ls.  This can happen
 
1521
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
1522
      # broken ls alias from the environment.  This has actually
 
1523
      # happened.  Such a system could not be considered "sane".
 
1524
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
1525
alias in your environment])
 
1526
   fi
 
1527
 
 
1528
   test "$[2]" = conftest.file
 
1529
   )
 
1530
then
 
1531
   # Ok.
 
1532
   :
 
1533
else
 
1534
   AC_MSG_ERROR([newly created file is older than distributed files!
 
1535
Check your system clock])
 
1536
fi
 
1537
AC_MSG_RESULT(yes)])
 
1538
 
 
1539
# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
 
1540
#
 
1541
# This file is free software; the Free Software Foundation
 
1542
# gives unlimited permission to copy and/or distribute it,
 
1543
# with or without modifications, as long as this notice is preserved.
 
1544
 
 
1545
# AM_PROG_INSTALL_STRIP
 
1546
# ---------------------
 
1547
# One issue with vendor `install' (even GNU) is that you can't
 
1548
# specify the program used to strip binaries.  This is especially
 
1549
# annoying in cross-compiling environments, where the build's strip
 
1550
# is unlikely to handle the host's binaries.
 
1551
# Fortunately install-sh will honor a STRIPPROG variable, so we
 
1552
# always use install-sh in `make install-strip', and initialize
 
1553
# STRIPPROG with the value of the STRIP variable (set by the user).
 
1554
AC_DEFUN([AM_PROG_INSTALL_STRIP],
 
1555
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
 
1556
# Installed binaries are usually stripped using `strip' when the user
 
1557
# run `make install-strip'.  However `strip' might not be the right
 
1558
# tool to use in cross-compilation environments, therefore Automake
 
1559
# will honor the `STRIP' environment variable to overrule this program.
 
1560
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 
1561
if test "$cross_compiling" != no; then
 
1562
  AC_CHECK_TOOL([STRIP], [strip], :)
 
1563
fi
 
1564
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
1565
AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
1566
 
 
1567
# Copyright (C) 2006  Free Software Foundation, Inc.
 
1568
#
 
1569
# This file is free software; the Free Software Foundation
 
1570
# gives unlimited permission to copy and/or distribute it,
 
1571
# with or without modifications, as long as this notice is preserved.
 
1572
 
 
1573
# _AM_SUBST_NOTMAKE(VARIABLE)
 
1574
# ---------------------------
 
1575
# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
 
1576
# This macro is traced by Automake.
 
1577
AC_DEFUN([_AM_SUBST_NOTMAKE])
 
1578
 
 
1579
# Check how to create a tarball.                            -*- Autoconf -*-
 
1580
 
 
1581
# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
 
1582
#
 
1583
# This file is free software; the Free Software Foundation
 
1584
# gives unlimited permission to copy and/or distribute it,
 
1585
# with or without modifications, as long as this notice is preserved.
 
1586
 
 
1587
# serial 2
 
1588
 
 
1589
# _AM_PROG_TAR(FORMAT)
 
1590
# --------------------
 
1591
# Check how to create a tarball in format FORMAT.
 
1592
# FORMAT should be one of `v7', `ustar', or `pax'.
 
1593
#
 
1594
# Substitute a variable $(am__tar) that is a command
 
1595
# writing to stdout a FORMAT-tarball containing the directory
 
1596
# $tardir.
 
1597
#     tardir=directory && $(am__tar) > result.tar
 
1598
#
 
1599
# Substitute a variable $(am__untar) that extract such
 
1600
# a tarball read from stdin.
 
1601
#     $(am__untar) < result.tar
 
1602
AC_DEFUN([_AM_PROG_TAR],
 
1603
[# Always define AMTAR for backward compatibility.
 
1604
AM_MISSING_PROG([AMTAR], [tar])
 
1605
m4_if([$1], [v7],
 
1606
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
 
1607
     [m4_case([$1], [ustar],, [pax],,
 
1608
              [m4_fatal([Unknown tar format])])
 
1609
AC_MSG_CHECKING([how to create a $1 tar archive])
 
1610
# Loop over all known methods to create a tar archive until one works.
 
1611
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 
1612
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
 
1613
# Do not fold the above two line into one, because Tru64 sh and
 
1614
# Solaris sh will not grok spaces in the rhs of `-'.
 
1615
for _am_tool in $_am_tools
 
1616
do
 
1617
  case $_am_tool in
 
1618
  gnutar)
 
1619
    for _am_tar in tar gnutar gtar;
 
1620
    do
 
1621
      AM_RUN_LOG([$_am_tar --version]) && break
 
1622
    done
 
1623
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
 
1624
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
 
1625
    am__untar="$_am_tar -xf -"
 
1626
    ;;
 
1627
  plaintar)
 
1628
    # Must skip GNU tar: if it does not support --format= it doesn't create
 
1629
    # ustar tarball either.
 
1630
    (tar --version) >/dev/null 2>&1 && continue
 
1631
    am__tar='tar chf - "$$tardir"'
 
1632
    am__tar_='tar chf - "$tardir"'
 
1633
    am__untar='tar xf -'
 
1634
    ;;
 
1635
  pax)
 
1636
    am__tar='pax -L -x $1 -w "$$tardir"'
 
1637
    am__tar_='pax -L -x $1 -w "$tardir"'
 
1638
    am__untar='pax -r'
 
1639
    ;;
 
1640
  cpio)
 
1641
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
 
1642
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
 
1643
    am__untar='cpio -i -H $1 -d'
 
1644
    ;;
 
1645
  none)
 
1646
    am__tar=false
 
1647
    am__tar_=false
 
1648
    am__untar=false
 
1649
    ;;
 
1650
  esac
 
1651
 
 
1652
  # If the value was cached, stop now.  We just wanted to have am__tar
 
1653
  # and am__untar set.
 
1654
  test -n "${am_cv_prog_tar_$1}" && break
 
1655
 
 
1656
  # tar/untar a dummy directory, and stop if the command works
 
1657
  rm -rf conftest.dir
 
1658
  mkdir conftest.dir
 
1659
  echo GrepMe > conftest.dir/file
 
1660
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
 
1661
  rm -rf conftest.dir
 
1662
  if test -s conftest.tar; then
 
1663
    AM_RUN_LOG([$am__untar <conftest.tar])
 
1664
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
 
1665
  fi
 
1666
done
 
1667
rm -rf conftest.dir
 
1668
 
 
1669
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
 
1670
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 
1671
AC_SUBST([am__tar])
 
1672
AC_SUBST([am__untar])
 
1673
]) # _AM_PROG_TAR
 
1674