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