aclocal.m4 revision 5dfecf96
15dfecf96Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
25dfecf96Smrg
35dfecf96Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
45dfecf96Smrg# 2005  Free Software Foundation, Inc.
55dfecf96Smrg# This file is free software; the Free Software Foundation
65dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
75dfecf96Smrg# with or without modifications, as long as this notice is preserved.
85dfecf96Smrg
95dfecf96Smrg# This program is distributed in the hope that it will be useful,
105dfecf96Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
115dfecf96Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
125dfecf96Smrg# PARTICULAR PURPOSE.
135dfecf96Smrg
145dfecf96Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
155dfecf96Smrg# 
165dfecf96Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
175dfecf96Smrg#
185dfecf96Smrg# This program is free software; you can redistribute it and/or modify
195dfecf96Smrg# it under the terms of the GNU General Public License as published by
205dfecf96Smrg# the Free Software Foundation; either version 2 of the License, or
215dfecf96Smrg# (at your option) any later version.
225dfecf96Smrg#
235dfecf96Smrg# This program is distributed in the hope that it will be useful, but
245dfecf96Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
255dfecf96Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
265dfecf96Smrg# General Public License for more details.
275dfecf96Smrg#
285dfecf96Smrg# You should have received a copy of the GNU General Public License
295dfecf96Smrg# along with this program; if not, write to the Free Software
305dfecf96Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
315dfecf96Smrg#
325dfecf96Smrg# As a special exception to the GNU General Public License, if you
335dfecf96Smrg# distribute this file as part of a program that contains a
345dfecf96Smrg# configuration script generated by Autoconf, you may include it under
355dfecf96Smrg# the same distribution terms that you use for the rest of that program.
365dfecf96Smrg
375dfecf96Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
385dfecf96Smrg# ----------------------------------
395dfecf96SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
405dfecf96Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
415dfecf96Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
425dfecf96SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
435dfecf96Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
445dfecf96Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
455dfecf96Smrgfi
465dfecf96Smrgif test -n "$PKG_CONFIG"; then
475dfecf96Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
485dfecf96Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
495dfecf96Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
505dfecf96Smrg		AC_MSG_RESULT([yes])
515dfecf96Smrg	else
525dfecf96Smrg		AC_MSG_RESULT([no])
535dfecf96Smrg		PKG_CONFIG=""
545dfecf96Smrg	fi
555dfecf96Smrg		
565dfecf96Smrgfi[]dnl
575dfecf96Smrg])# PKG_PROG_PKG_CONFIG
585dfecf96Smrg
595dfecf96Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
605dfecf96Smrg#
615dfecf96Smrg# Check to see whether a particular set of modules exists.  Similar
625dfecf96Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
635dfecf96Smrg#
645dfecf96Smrg#
655dfecf96Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
665dfecf96Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
675dfecf96Smrg# PKG_CHECK_EXISTS manually
685dfecf96Smrg# --------------------------------------------------------------
695dfecf96SmrgAC_DEFUN([PKG_CHECK_EXISTS],
705dfecf96Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
715dfecf96Smrgif test -n "$PKG_CONFIG" && \
725dfecf96Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
735dfecf96Smrg  m4_ifval([$2], [$2], [:])
745dfecf96Smrgm4_ifvaln([$3], [else
755dfecf96Smrg  $3])dnl
765dfecf96Smrgfi])
775dfecf96Smrg
785dfecf96Smrg
795dfecf96Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
805dfecf96Smrg# ---------------------------------------------
815dfecf96Smrgm4_define([_PKG_CONFIG],
825dfecf96Smrg[if test -n "$PKG_CONFIG"; then
835dfecf96Smrg    if test -n "$$1"; then
845dfecf96Smrg        pkg_cv_[]$1="$$1"
855dfecf96Smrg    else
865dfecf96Smrg        PKG_CHECK_EXISTS([$3],
875dfecf96Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
885dfecf96Smrg			 [pkg_failed=yes])
895dfecf96Smrg    fi
905dfecf96Smrgelse
915dfecf96Smrg	pkg_failed=untried
925dfecf96Smrgfi[]dnl
935dfecf96Smrg])# _PKG_CONFIG
945dfecf96Smrg
955dfecf96Smrg# _PKG_SHORT_ERRORS_SUPPORTED
965dfecf96Smrg# -----------------------------
975dfecf96SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
985dfecf96Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
995dfecf96Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1005dfecf96Smrg        _pkg_short_errors_supported=yes
1015dfecf96Smrgelse
1025dfecf96Smrg        _pkg_short_errors_supported=no
1035dfecf96Smrgfi[]dnl
1045dfecf96Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
1055dfecf96Smrg
1065dfecf96Smrg
1075dfecf96Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1085dfecf96Smrg# [ACTION-IF-NOT-FOUND])
1095dfecf96Smrg#
1105dfecf96Smrg#
1115dfecf96Smrg# Note that if there is a possibility the first call to
1125dfecf96Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
1135dfecf96Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1145dfecf96Smrg#
1155dfecf96Smrg#
1165dfecf96Smrg# --------------------------------------------------------------
1175dfecf96SmrgAC_DEFUN([PKG_CHECK_MODULES],
1185dfecf96Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1195dfecf96SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1205dfecf96SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1215dfecf96Smrg
1225dfecf96Smrgpkg_failed=no
1235dfecf96SmrgAC_MSG_CHECKING([for $1])
1245dfecf96Smrg
1255dfecf96Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1265dfecf96Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1275dfecf96Smrg
1285dfecf96Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1295dfecf96Smrgand $1[]_LIBS to avoid the need to call pkg-config.
1305dfecf96SmrgSee the pkg-config man page for more details.])
1315dfecf96Smrg
1325dfecf96Smrgif test $pkg_failed = yes; then
1335dfecf96Smrg        _PKG_SHORT_ERRORS_SUPPORTED
1345dfecf96Smrg        if test $_pkg_short_errors_supported = yes; then
1355dfecf96Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
1365dfecf96Smrg        else 
1375dfecf96Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1385dfecf96Smrg        fi
1395dfecf96Smrg	# Put the nasty error message in config.log where it belongs
1405dfecf96Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1415dfecf96Smrg
1425dfecf96Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
1435dfecf96Smrg[Package requirements ($2) were not met:
1445dfecf96Smrg
1455dfecf96Smrg$$1_PKG_ERRORS
1465dfecf96Smrg
1475dfecf96SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
1485dfecf96Smrginstalled software in a non-standard prefix.
1495dfecf96Smrg
1505dfecf96Smrg_PKG_TEXT
1515dfecf96Smrg])],
1525dfecf96Smrg		[$4])
1535dfecf96Smrgelif test $pkg_failed = untried; then
1545dfecf96Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
1555dfecf96Smrg[The pkg-config script could not be found or is too old.  Make sure it
1565dfecf96Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
1575dfecf96Smrgpath to pkg-config.
1585dfecf96Smrg
1595dfecf96Smrg_PKG_TEXT
1605dfecf96Smrg
1615dfecf96SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1625dfecf96Smrg		[$4])
1635dfecf96Smrgelse
1645dfecf96Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1655dfecf96Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1665dfecf96Smrg        AC_MSG_RESULT([yes])
1675dfecf96Smrg	ifelse([$3], , :, [$3])
1685dfecf96Smrgfi[]dnl
1695dfecf96Smrg])# PKG_CHECK_MODULES
1705dfecf96Smrg
1715dfecf96Smrgdnl Copyright 2005 Red Hat, Inc
1725dfecf96Smrgdnl 
1735dfecf96Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1745dfecf96Smrgdnl documentation for any purpose is hereby granted without fee, provided that
1755dfecf96Smrgdnl the above copyright notice appear in all copies and that both that
1765dfecf96Smrgdnl copyright notice and this permission notice appear in supporting
1775dfecf96Smrgdnl documentation.
1785dfecf96Smrgdnl 
1795dfecf96Smrgdnl The above copyright notice and this permission notice shall be included
1805dfecf96Smrgdnl in all copies or substantial portions of the Software.
1815dfecf96Smrgdnl 
1825dfecf96Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1835dfecf96Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1845dfecf96Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1855dfecf96Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1865dfecf96Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1875dfecf96Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1885dfecf96Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
1895dfecf96Smrgdnl 
1905dfecf96Smrgdnl Except as contained in this notice, the name of the copyright holders shall
1915dfecf96Smrgdnl not be used in advertising or otherwise to promote the sale, use or
1925dfecf96Smrgdnl other dealings in this Software without prior written authorization
1935dfecf96Smrgdnl from the copyright holders.
1945dfecf96Smrgdnl 
1955dfecf96Smrg
1965dfecf96Smrg# XAW_CHECK_XPRINT_SUPPORT()
1975dfecf96Smrg# --------------------------
1985dfecf96Smrg# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 
1995dfecf96Smrg# library. If neither --enable-xprint nor --disable-xprint are given, 
2005dfecf96Smrg# the presence of an Xaw with Xprint support will be auto detected
2015dfecf96Smrg
2025dfecf96SmrgAC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[
2035dfecf96Smrg	AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]),
2045dfecf96Smrg			[use_xprint=$enableval],[use_xprint=auto])
2055dfecf96Smrg	if test "x$use_xprint" = "xyes"; then
2065dfecf96Smrg		TMP_CHECK1=xaw8
2075dfecf96Smrg		TMP_CHECK2=
2085dfecf96Smrg		xaw_use_xprint=yes
2095dfecf96Smrg	elif test "x$use_xprint" = "xno"; then
2105dfecf96Smrg		TMP_CHECK1=xaw7
2115dfecf96Smrg		TMP_CHECK2=
2125dfecf96Smrg		xaw_use_xprint=no
2135dfecf96Smrg	else
2145dfecf96Smrg		TMP_CHECK1=xaw8
2155dfecf96Smrg		TMP_CHECK2=xaw7
2165dfecf96Smrg		xaw_use_xprint=yes
2175dfecf96Smrg	fi
2185dfecf96Smrg
2195dfecf96Smrg	PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no)
2205dfecf96Smrg	if [[ ! -z $TMP_CHECK2 ]] ; then
2215dfecf96Smrg		if test $success = no ; then
2225dfecf96Smrg			PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no)
2235dfecf96Smrg			xaw_use_xprint=no
2245dfecf96Smrg		fi
2255dfecf96Smrg	fi
2265dfecf96Smrg
2275dfecf96Smrg	if test "x$success" = "xyes"; then
2285dfecf96Smrg		$1_CFLAGS=$TMP_XAW_CFLAGS
2295dfecf96Smrg		$1_LIBS=$TMP_XAW_LIBS
2305dfecf96Smrg
2315dfecf96Smrg		AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"])
2325dfecf96Smrg	else
2335dfecf96Smrg		AC_MSG_ERROR([No suitable version of Xaw found])
2345dfecf96Smrg	fi
2355dfecf96Smrg])
2365dfecf96Smrg
2375dfecf96Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:16:21 mrg Exp $
2385dfecf96Smrgdnl
2395dfecf96Smrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2405dfecf96Smrgdnl 
2415dfecf96Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
2425dfecf96Smrgdnl documentation for any purpose is hereby granted without fee, provided that
2435dfecf96Smrgdnl the above copyright notice appear in all copies and that both that
2445dfecf96Smrgdnl copyright notice and this permission notice appear in supporting
2455dfecf96Smrgdnl documentation.
2465dfecf96Smrgdnl 
2475dfecf96Smrgdnl The above copyright notice and this permission notice shall be included
2485dfecf96Smrgdnl in all copies or substantial portions of the Software.
2495dfecf96Smrgdnl 
2505dfecf96Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2515dfecf96Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2525dfecf96Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2535dfecf96Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2545dfecf96Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2555dfecf96Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2565dfecf96Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
2575dfecf96Smrgdnl 
2585dfecf96Smrgdnl Except as contained in this notice, the name of the copyright holders shall
2595dfecf96Smrgdnl not be used in advertising or otherwise to promote the sale, use or
2605dfecf96Smrgdnl other dealings in this Software without prior written authorization
2615dfecf96Smrgdnl from the copyright holders.
2625dfecf96Smrgdnl 
2635dfecf96Smrg
2645dfecf96Smrg# XORG_PROG_RAWCPP()
2655dfecf96Smrg# ------------------
2665dfecf96Smrg# Find cpp program and necessary flags for use in pre-processing text files
2675dfecf96Smrg# such as man pages and config files
2685dfecf96SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
2695dfecf96SmrgAC_REQUIRE([AC_PROG_CPP])
2705dfecf96SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
2715dfecf96Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
2725dfecf96Smrg
2735dfecf96Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
2745dfecf96Smrg# which is not the best choice for supporting other OS'es, but covers most
2755dfecf96Smrg# of the ones we need for now.
2765dfecf96SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
2775dfecf96SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
2785dfecf96Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
2795dfecf96Smrg	AC_MSG_RESULT([no])
2805dfecf96Smrgelse
2815dfecf96Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
2825dfecf96Smrg		RAWCPPFLAGS=-undef
2835dfecf96Smrg		AC_MSG_RESULT([yes])
2845dfecf96Smrg	else
2855dfecf96Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
2865dfecf96Smrg	fi
2875dfecf96Smrgfi
2885dfecf96Smrgrm -f conftest.$ac_ext
2895dfecf96Smrg
2905dfecf96SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
2915dfecf96SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
2925dfecf96Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
2935dfecf96Smrg	AC_MSG_RESULT([no])
2945dfecf96Smrgelse
2955dfecf96Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
2965dfecf96Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
2975dfecf96Smrg		AC_MSG_RESULT([yes])
2985dfecf96Smrg	else
2995dfecf96Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
3005dfecf96Smrg	fi
3015dfecf96Smrgfi
3025dfecf96Smrgrm -f conftest.$ac_ext
3035dfecf96SmrgAC_SUBST(RAWCPPFLAGS)
3045dfecf96Smrg]) # XORG_PROG_RAWCPP
3055dfecf96Smrg
3065dfecf96Smrg# XORG_MANPAGE_SECTIONS()
3075dfecf96Smrg# -----------------------
3085dfecf96Smrg# Determine which sections man pages go in for the different man page types
3095dfecf96Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
3105dfecf96Smrg# Not sure if there's any better way than just hardcoding by OS name.
3115dfecf96Smrg# Override default settings by setting environment variables
3125dfecf96Smrg
3135dfecf96SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
3145dfecf96SmrgAC_REQUIRE([AC_CANONICAL_HOST])
3155dfecf96Smrg
3165dfecf96Smrgif test x$APP_MAN_SUFFIX = x    ; then
3175dfecf96Smrg    case $host_os in
3185dfecf96Smrg	linux*)	APP_MAN_SUFFIX=1x ;;
3195dfecf96Smrg	*)	APP_MAN_SUFFIX=1  ;;
3205dfecf96Smrg    esac
3215dfecf96Smrgfi
3225dfecf96Smrgif test x$APP_MAN_DIR = x    ; then
3235dfecf96Smrg    case $host_os in
3245dfecf96Smrg	linux*)	APP_MAN_DIR='$(mandir)/man1' ;;
3255dfecf96Smrg	*)	APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
3265dfecf96Smrg    esac
3275dfecf96Smrgfi
3285dfecf96Smrg
3295dfecf96Smrgif test x$LIB_MAN_SUFFIX = x    ; then
3305dfecf96Smrg    case $host_os in
3315dfecf96Smrg	linux*)	LIB_MAN_SUFFIX=3x ;;
3325dfecf96Smrg	*)	LIB_MAN_SUFFIX=3  ;;
3335dfecf96Smrg    esac
3345dfecf96Smrgfi
3355dfecf96Smrgif test x$LIB_MAN_DIR = x    ; then
3365dfecf96Smrg    case $host_os in
3375dfecf96Smrg	linux*)	LIB_MAN_DIR='$(mandir)/man3' ;;
3385dfecf96Smrg	*)	LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
3395dfecf96Smrg    esac
3405dfecf96Smrgfi
3415dfecf96Smrg
3425dfecf96Smrgif test x$FILE_MAN_SUFFIX = x    ; then
3435dfecf96Smrg    case $host_os in
3445dfecf96Smrg	linux*)		FILE_MAN_SUFFIX=5x ;;
3455dfecf96Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
3465dfecf96Smrg	*)		FILE_MAN_SUFFIX=5  ;;
3475dfecf96Smrg    esac
3485dfecf96Smrgfi
3495dfecf96Smrgif test x$FILE_MAN_DIR = x    ; then
3505dfecf96Smrg    case $host_os in
3515dfecf96Smrg	linux*)	FILE_MAN_DIR='$(mandir)/man5' ;;
3525dfecf96Smrg	*)	FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
3535dfecf96Smrg    esac
3545dfecf96Smrgfi
3555dfecf96Smrg
3565dfecf96Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 
3575dfecf96Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
3585dfecf96Smrgif test x$MISC_MAN_SUFFIX = x    ; then
3595dfecf96Smrg    case $host_os in
3605dfecf96Smrg#	linux*)		MISC_MAN_SUFFIX=7x ;;
3615dfecf96Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
3625dfecf96Smrg	*)		MISC_MAN_SUFFIX=7  ;;
3635dfecf96Smrg    esac
3645dfecf96Smrgfi
3655dfecf96Smrgif test x$MISC_MAN_DIR = x    ; then
3665dfecf96Smrg    case $host_os in
3675dfecf96Smrg#	linux*)	MISC_MAN_DIR='$(mandir)/man7' ;;
3685dfecf96Smrg	*)	MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
3695dfecf96Smrg    esac
3705dfecf96Smrgfi
3715dfecf96Smrg
3725dfecf96Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 
3735dfecf96Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
3745dfecf96Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
3755dfecf96Smrg    case $host_os in
3765dfecf96Smrg#	linux*)		DRIVER_MAN_SUFFIX=4x ;;
3775dfecf96Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
3785dfecf96Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
3795dfecf96Smrg    esac
3805dfecf96Smrgfi
3815dfecf96Smrgif test x$DRIVER_MAN_DIR = x    ; then
3825dfecf96Smrg    case $host_os in
3835dfecf96Smrg#	linux*)	DRIVER_MAN_DIR='$(mandir)/man4' ;;
3845dfecf96Smrg	*)	DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
3855dfecf96Smrg    esac
3865dfecf96Smrgfi
3875dfecf96Smrg
3885dfecf96Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
3895dfecf96Smrg    case $host_os in
3905dfecf96Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
3915dfecf96Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
3925dfecf96Smrg    esac
3935dfecf96Smrgfi
3945dfecf96Smrgif test x$ADMIN_MAN_DIR = x    ; then
3955dfecf96Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
3965dfecf96Smrgfi
3975dfecf96Smrg
3985dfecf96Smrg
3995dfecf96SmrgAC_SUBST([APP_MAN_SUFFIX])
4005dfecf96SmrgAC_SUBST([LIB_MAN_SUFFIX])
4015dfecf96SmrgAC_SUBST([FILE_MAN_SUFFIX])
4025dfecf96SmrgAC_SUBST([MISC_MAN_SUFFIX])
4035dfecf96SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
4045dfecf96SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
4055dfecf96SmrgAC_SUBST([APP_MAN_DIR])
4065dfecf96SmrgAC_SUBST([LIB_MAN_DIR])
4075dfecf96SmrgAC_SUBST([FILE_MAN_DIR])
4085dfecf96SmrgAC_SUBST([MISC_MAN_DIR])
4095dfecf96SmrgAC_SUBST([DRIVER_MAN_DIR])
4105dfecf96SmrgAC_SUBST([ADMIN_MAN_DIR])
4115dfecf96Smrg]) # XORG_MANPAGE_SECTIONS
4125dfecf96Smrg
4135dfecf96Smrg# XORG_CHECK_LINUXDOC
4145dfecf96Smrg# -------------------
4155dfecf96Smrg# Defines the variable MAKE_TEXT if the necessary tools and
4165dfecf96Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
4175dfecf96Smrg# Whether or not the necessary tools and files are found can be checked
4185dfecf96Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
4195dfecf96SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
4205dfecf96SmrgAC_CHECK_FILE(
4215dfecf96Smrg	[$prefix/share/X11/sgml/defs.ent], 
4225dfecf96Smrg	[DEFS_ENT_PATH=$prefix/share/X11/sgml],
4235dfecf96Smrg	[DEFS_ENT_PATH=]
4245dfecf96Smrg)
4255dfecf96Smrg
4265dfecf96SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
4275dfecf96SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
4285dfecf96Smrg
4295dfecf96SmrgAC_MSG_CHECKING([Whether to build documentation])
4305dfecf96Smrg
4315dfecf96Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
4325dfecf96Smrg   BUILDDOC=yes
4335dfecf96Smrgelse
4345dfecf96Smrg   BUILDDOC=no
4355dfecf96Smrgfi
4365dfecf96Smrg
4375dfecf96SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
4385dfecf96Smrg
4395dfecf96SmrgAC_MSG_RESULT([$BUILDDOC])
4405dfecf96Smrg
4415dfecf96SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
4425dfecf96Smrg
4435dfecf96Smrgif test x$PS2PDF != x ; then
4445dfecf96Smrg   BUILDPDFDOC=yes
4455dfecf96Smrgelse
4465dfecf96Smrg   BUILDPDFDOC=no
4475dfecf96Smrgfi
4485dfecf96Smrg
4495dfecf96SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
4505dfecf96Smrg
4515dfecf96SmrgAC_MSG_RESULT([$BUILDPDFDOC])
4525dfecf96Smrg
4535dfecf96SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
4545dfecf96SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
4555dfecf96SmrgMAKE_PDF="$PS2PDF"
4565dfecf96SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
4575dfecf96Smrg
4585dfecf96SmrgAC_SUBST(MAKE_TEXT)
4595dfecf96SmrgAC_SUBST(MAKE_PS)
4605dfecf96SmrgAC_SUBST(MAKE_PDF)
4615dfecf96SmrgAC_SUBST(MAKE_HTML)
4625dfecf96Smrg]) # XORG_CHECK_LINUXDOC
4635dfecf96Smrg
4645dfecf96Smrg# XORG_CHECK_MALLOC_ZERO
4655dfecf96Smrg# ----------------------
4665dfecf96Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
4675dfecf96Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
4685dfecf96Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
4695dfecf96SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
4705dfecf96SmrgAC_ARG_ENABLE(malloc0returnsnull,
4715dfecf96Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
4725dfecf96Smrg		       [malloc(0) returns NULL (default: auto)]),
4735dfecf96Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
4745dfecf96Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
4755dfecf96Smrg
4765dfecf96SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
4775dfecf96Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
4785dfecf96Smrg	AC_RUN_IFELSE([
4795dfecf96Smrgchar *malloc();
4805dfecf96Smrgchar *realloc();
4815dfecf96Smrgchar *calloc();
4825dfecf96Smrgmain() {
4835dfecf96Smrg    char *m0, *r0, *c0, *p;
4845dfecf96Smrg    m0 = malloc(0);
4855dfecf96Smrg    p = malloc(10);
4865dfecf96Smrg    r0 = realloc(p,0);
4875dfecf96Smrg    c0 = calloc(0);
4885dfecf96Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
4895dfecf96Smrg}],
4905dfecf96Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
4915dfecf96Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
4925dfecf96Smrgfi
4935dfecf96SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
4945dfecf96Smrg
4955dfecf96Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
4965dfecf96Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
4975dfecf96Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
4985dfecf96Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
4995dfecf96Smrgelse
5005dfecf96Smrg	MALLOC_ZERO_CFLAGS=""
5015dfecf96Smrg	XMALLOC_ZERO_CFLAGS=""
5025dfecf96Smrg	XTMALLOC_ZERO_CFLAGS=""
5035dfecf96Smrgfi
5045dfecf96Smrg
5055dfecf96SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
5065dfecf96SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
5075dfecf96SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
5085dfecf96Smrg]) # XORG_CHECK_MALLOC_ZERO
5095dfecf96Smrg
5105dfecf96Smrgdnl Copyright 2005 Red Hat, Inc
5115dfecf96Smrgdnl
5125dfecf96Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
5135dfecf96Smrgdnl documentation for any purpose is hereby granted without fee, provided that
5145dfecf96Smrgdnl the above copyright notice appear in all copies and that both that
5155dfecf96Smrgdnl copyright notice and this permission notice appear in supporting
5165dfecf96Smrgdnl documentation.
5175dfecf96Smrgdnl
5185dfecf96Smrgdnl The above copyright notice and this permission notice shall be included
5195dfecf96Smrgdnl in all copies or substantial portions of the Software.
5205dfecf96Smrgdnl
5215dfecf96Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
5225dfecf96Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5235dfecf96Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
5245dfecf96Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
5255dfecf96Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
5265dfecf96Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
5275dfecf96Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
5285dfecf96Smrgdnl
5295dfecf96Smrgdnl Except as contained in this notice, the name of the copyright holders shall
5305dfecf96Smrgdnl not be used in advertising or otherwise to promote the sale, use or
5315dfecf96Smrgdnl other dealings in this Software without prior written authorization
5325dfecf96Smrgdnl from the copyright holders.
5335dfecf96Smrgdnl
5345dfecf96Smrg
5355dfecf96Smrg# XORG_RELEASE_VERSION
5365dfecf96Smrg# --------------------
5375dfecf96Smrg# Adds --with/without-release-string and changes the PACKAGE and
5385dfecf96Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
5395dfecf96Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
5405dfecf96Smrg 
5415dfecf96SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
5425dfecf96Smrg	AC_ARG_WITH(release-version,
5435dfecf96Smrg			AC_HELP_STRING([--with-release-version=STRING],
5445dfecf96Smrg				[Use release version string in package name]),
5455dfecf96Smrg			[RELEASE_VERSION="$withval"],
5465dfecf96Smrg			[RELEASE_VERSION=""])
5475dfecf96Smrg	if test "x$RELEASE_VERSION" != "x"; then
5485dfecf96Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
5495dfecf96Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
5505dfecf96Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
5515dfecf96Smrg	fi
5525dfecf96Smrg])
5535dfecf96Smrg
5545dfecf96Smrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
5555dfecf96Smrg#
5565dfecf96Smrg# This file is free software; the Free Software Foundation
5575dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
5585dfecf96Smrg# with or without modifications, as long as this notice is preserved.
5595dfecf96Smrg
5605dfecf96Smrg# AM_AUTOMAKE_VERSION(VERSION)
5615dfecf96Smrg# ----------------------------
5625dfecf96Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
5635dfecf96Smrg# generated from the m4 files accompanying Automake X.Y.
5645dfecf96SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
5655dfecf96Smrg
5665dfecf96Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
5675dfecf96Smrg# -------------------------------
5685dfecf96Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
5695dfecf96Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
5705dfecf96SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5715dfecf96Smrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
5725dfecf96Smrg
5735dfecf96Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
5745dfecf96Smrg
5755dfecf96Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
5765dfecf96Smrg#
5775dfecf96Smrg# This file is free software; the Free Software Foundation
5785dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
5795dfecf96Smrg# with or without modifications, as long as this notice is preserved.
5805dfecf96Smrg
5815dfecf96Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
5825dfecf96Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
5835dfecf96Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
5845dfecf96Smrg#
5855dfecf96Smrg# Of course, Automake must honor this variable whenever it calls a
5865dfecf96Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
5875dfecf96Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
5885dfecf96Smrg# depending on how configure is run.  This is pretty annoying, since
5895dfecf96Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
5905dfecf96Smrg# source directory, any form will work fine, but in subdirectories a
5915dfecf96Smrg# relative path needs to be adjusted first.
5925dfecf96Smrg#
5935dfecf96Smrg# $ac_aux_dir/missing
5945dfecf96Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
5955dfecf96Smrg# $top_srcdir/$ac_aux_dir/missing
5965dfecf96Smrg#    fails if $ac_aux_dir is absolute,
5975dfecf96Smrg#    fails when called from a subdirectory in a VPATH build with
5985dfecf96Smrg#          a relative $ac_aux_dir
5995dfecf96Smrg#
6005dfecf96Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6015dfecf96Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
6025dfecf96Smrg# harmless because $srcdir is `.', but things will broke when you
6035dfecf96Smrg# start a VPATH build or use an absolute $srcdir.
6045dfecf96Smrg#
6055dfecf96Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6065dfecf96Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6075dfecf96Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6085dfecf96Smrg# and then we would define $MISSING as
6095dfecf96Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
6105dfecf96Smrg# This will work as long as MISSING is not called from configure, because
6115dfecf96Smrg# unfortunately $(top_srcdir) has no meaning in configure.
6125dfecf96Smrg# However there are other variables, like CC, which are often used in
6135dfecf96Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
6145dfecf96Smrg#
6155dfecf96Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
6165dfecf96Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
6175dfecf96Smrg# configured tree to be moved without reconfiguration.
6185dfecf96Smrg
6195dfecf96SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
6205dfecf96Smrg[dnl Rely on autoconf to set up CDPATH properly.
6215dfecf96SmrgAC_PREREQ([2.50])dnl
6225dfecf96Smrg# expand $ac_aux_dir to an absolute path
6235dfecf96Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
6245dfecf96Smrg])
6255dfecf96Smrg
6265dfecf96Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
6275dfecf96Smrg
6285dfecf96Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6295dfecf96Smrg# Free Software Foundation, Inc.
6305dfecf96Smrg#
6315dfecf96Smrg# This file is free software; the Free Software Foundation
6325dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
6335dfecf96Smrg# with or without modifications, as long as this notice is preserved.
6345dfecf96Smrg
6355dfecf96Smrg# serial 7
6365dfecf96Smrg
6375dfecf96Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6385dfecf96Smrg# -------------------------------------
6395dfecf96Smrg# Define a conditional.
6405dfecf96SmrgAC_DEFUN([AM_CONDITIONAL],
6415dfecf96Smrg[AC_PREREQ(2.52)dnl
6425dfecf96Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6435dfecf96Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6445dfecf96SmrgAC_SUBST([$1_TRUE])
6455dfecf96SmrgAC_SUBST([$1_FALSE])
6465dfecf96Smrgif $2; then
6475dfecf96Smrg  $1_TRUE=
6485dfecf96Smrg  $1_FALSE='#'
6495dfecf96Smrgelse
6505dfecf96Smrg  $1_TRUE='#'
6515dfecf96Smrg  $1_FALSE=
6525dfecf96Smrgfi
6535dfecf96SmrgAC_CONFIG_COMMANDS_PRE(
6545dfecf96Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6555dfecf96Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
6565dfecf96SmrgUsually this means the macro was only invoked conditionally.]])
6575dfecf96Smrgfi])])
6585dfecf96Smrg
6595dfecf96Smrg
6605dfecf96Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6615dfecf96Smrg# Free Software Foundation, Inc.
6625dfecf96Smrg#
6635dfecf96Smrg# This file is free software; the Free Software Foundation
6645dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
6655dfecf96Smrg# with or without modifications, as long as this notice is preserved.
6665dfecf96Smrg
6675dfecf96Smrg# serial 8
6685dfecf96Smrg
6695dfecf96Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6705dfecf96Smrg# written in clear, in which case automake, when reading aclocal.m4,
6715dfecf96Smrg# will think it sees a *use*, and therefore will trigger all it's
6725dfecf96Smrg# C support machinery.  Also note that it means that autoscan, seeing
6735dfecf96Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6745dfecf96Smrg
6755dfecf96Smrg
6765dfecf96Smrg# _AM_DEPENDENCIES(NAME)
6775dfecf96Smrg# ----------------------
6785dfecf96Smrg# See how the compiler implements dependency checking.
6795dfecf96Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
6805dfecf96Smrg# We try a few techniques and use that to set a single cache variable.
6815dfecf96Smrg#
6825dfecf96Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6835dfecf96Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6845dfecf96Smrg# dependency, and given that the user is not expected to run this macro,
6855dfecf96Smrg# just rely on AC_PROG_CC.
6865dfecf96SmrgAC_DEFUN([_AM_DEPENDENCIES],
6875dfecf96Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
6885dfecf96SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6895dfecf96SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
6905dfecf96SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
6915dfecf96Smrg
6925dfecf96Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6935dfecf96Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6945dfecf96Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6955dfecf96Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6965dfecf96Smrg                   [depcc="$$1"   am_compiler_list=])
6975dfecf96Smrg
6985dfecf96SmrgAC_CACHE_CHECK([dependency style of $depcc],
6995dfecf96Smrg               [am_cv_$1_dependencies_compiler_type],
7005dfecf96Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7015dfecf96Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
7025dfecf96Smrg  # making bogus files that we don't know about and never remove.  For
7035dfecf96Smrg  # instance it was reported that on HP-UX the gcc test will end up
7045dfecf96Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
7055dfecf96Smrg  # in D'.
7065dfecf96Smrg  mkdir conftest.dir
7075dfecf96Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
7085dfecf96Smrg  # using a relative directory.
7095dfecf96Smrg  cp "$am_depcomp" conftest.dir
7105dfecf96Smrg  cd conftest.dir
7115dfecf96Smrg  # We will build objects and dependencies in a subdirectory because
7125dfecf96Smrg  # it helps to detect inapplicable dependency modes.  For instance
7135dfecf96Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
7145dfecf96Smrg  # side effect of compilation, but ICC will put the dependencies in
7155dfecf96Smrg  # the current directory while Tru64 will put them in the object
7165dfecf96Smrg  # directory.
7175dfecf96Smrg  mkdir sub
7185dfecf96Smrg
7195dfecf96Smrg  am_cv_$1_dependencies_compiler_type=none
7205dfecf96Smrg  if test "$am_compiler_list" = ""; then
7215dfecf96Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7225dfecf96Smrg  fi
7235dfecf96Smrg  for depmode in $am_compiler_list; do
7245dfecf96Smrg    # Setup a source with many dependencies, because some compilers
7255dfecf96Smrg    # like to wrap large dependency lists on column 80 (with \), and
7265dfecf96Smrg    # we should not choose a depcomp mode which is confused by this.
7275dfecf96Smrg    #
7285dfecf96Smrg    # We need to recreate these files for each test, as the compiler may
7295dfecf96Smrg    # overwrite some of them when testing with obscure command lines.
7305dfecf96Smrg    # This happens at least with the AIX C compiler.
7315dfecf96Smrg    : > sub/conftest.c
7325dfecf96Smrg    for i in 1 2 3 4 5 6; do
7335dfecf96Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
7345dfecf96Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7355dfecf96Smrg      # Solaris 8's {/usr,}/bin/sh.
7365dfecf96Smrg      touch sub/conftst$i.h
7375dfecf96Smrg    done
7385dfecf96Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7395dfecf96Smrg
7405dfecf96Smrg    case $depmode in
7415dfecf96Smrg    nosideeffect)
7425dfecf96Smrg      # after this tag, mechanisms are not by side-effect, so they'll
7435dfecf96Smrg      # only be used when explicitly requested
7445dfecf96Smrg      if test "x$enable_dependency_tracking" = xyes; then
7455dfecf96Smrg	continue
7465dfecf96Smrg      else
7475dfecf96Smrg	break
7485dfecf96Smrg      fi
7495dfecf96Smrg      ;;
7505dfecf96Smrg    none) break ;;
7515dfecf96Smrg    esac
7525dfecf96Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
7535dfecf96Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
7545dfecf96Smrg    # handle `-M -o', and we need to detect this.
7555dfecf96Smrg    if depmode=$depmode \
7565dfecf96Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7575dfecf96Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7585dfecf96Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7595dfecf96Smrg         >/dev/null 2>conftest.err &&
7605dfecf96Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7615dfecf96Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7625dfecf96Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7635dfecf96Smrg      # icc doesn't choke on unknown options, it will just issue warnings
7645dfecf96Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
7655dfecf96Smrg      # that says an option was ignored or not supported.
7665dfecf96Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
7675dfecf96Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
7685dfecf96Smrg      # The diagnosis changed in icc 8.0:
7695dfecf96Smrg      #   icc: Command line remark: option '-MP' not supported
7705dfecf96Smrg      if (grep 'ignoring option' conftest.err ||
7715dfecf96Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7725dfecf96Smrg        am_cv_$1_dependencies_compiler_type=$depmode
7735dfecf96Smrg        break
7745dfecf96Smrg      fi
7755dfecf96Smrg    fi
7765dfecf96Smrg  done
7775dfecf96Smrg
7785dfecf96Smrg  cd ..
7795dfecf96Smrg  rm -rf conftest.dir
7805dfecf96Smrgelse
7815dfecf96Smrg  am_cv_$1_dependencies_compiler_type=none
7825dfecf96Smrgfi
7835dfecf96Smrg])
7845dfecf96SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7855dfecf96SmrgAM_CONDITIONAL([am__fastdep$1], [
7865dfecf96Smrg  test "x$enable_dependency_tracking" != xno \
7875dfecf96Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7885dfecf96Smrg])
7895dfecf96Smrg
7905dfecf96Smrg
7915dfecf96Smrg# AM_SET_DEPDIR
7925dfecf96Smrg# -------------
7935dfecf96Smrg# Choose a directory name for dependency files.
7945dfecf96Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
7955dfecf96SmrgAC_DEFUN([AM_SET_DEPDIR],
7965dfecf96Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7975dfecf96SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7985dfecf96Smrg])
7995dfecf96Smrg
8005dfecf96Smrg
8015dfecf96Smrg# AM_DEP_TRACK
8025dfecf96Smrg# ------------
8035dfecf96SmrgAC_DEFUN([AM_DEP_TRACK],
8045dfecf96Smrg[AC_ARG_ENABLE(dependency-tracking,
8055dfecf96Smrg[  --disable-dependency-tracking  speeds up one-time build
8065dfecf96Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
8075dfecf96Smrgif test "x$enable_dependency_tracking" != xno; then
8085dfecf96Smrg  am_depcomp="$ac_aux_dir/depcomp"
8095dfecf96Smrg  AMDEPBACKSLASH='\'
8105dfecf96Smrgfi
8115dfecf96SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8125dfecf96SmrgAC_SUBST([AMDEPBACKSLASH])
8135dfecf96Smrg])
8145dfecf96Smrg
8155dfecf96Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
8165dfecf96Smrg
8175dfecf96Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
8185dfecf96Smrg# Free Software Foundation, Inc.
8195dfecf96Smrg#
8205dfecf96Smrg# This file is free software; the Free Software Foundation
8215dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
8225dfecf96Smrg# with or without modifications, as long as this notice is preserved.
8235dfecf96Smrg
8245dfecf96Smrg#serial 3
8255dfecf96Smrg
8265dfecf96Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
8275dfecf96Smrg# ------------------------------
8285dfecf96SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8295dfecf96Smrg[for mf in $CONFIG_FILES; do
8305dfecf96Smrg  # Strip MF so we end up with the name of the file.
8315dfecf96Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
8325dfecf96Smrg  # Check whether this is an Automake generated Makefile or not.
8335dfecf96Smrg  # We used to match only the files named `Makefile.in', but
8345dfecf96Smrg  # some people rename them; so instead we look at the file content.
8355dfecf96Smrg  # Grep'ing the first line is not enough: some people post-process
8365dfecf96Smrg  # each Makefile.in and add a new line on top of each file to say so.
8375dfecf96Smrg  # So let's grep whole file.
8385dfecf96Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
8395dfecf96Smrg    dirpart=`AS_DIRNAME("$mf")`
8405dfecf96Smrg  else
8415dfecf96Smrg    continue
8425dfecf96Smrg  fi
8435dfecf96Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
8445dfecf96Smrg  # from the Makefile without running `make'.
8455dfecf96Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8465dfecf96Smrg  test -z "$DEPDIR" && continue
8475dfecf96Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
8485dfecf96Smrg  test -z "am__include" && continue
8495dfecf96Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8505dfecf96Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
8515dfecf96Smrg  U=`sed -n 's/^U = //p' < "$mf"`
8525dfecf96Smrg  # Find all dependency output files, they are included files with
8535dfecf96Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
8545dfecf96Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
8555dfecf96Smrg  # expansion.
8565dfecf96Smrg  for file in `sed -n "
8575dfecf96Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8585dfecf96Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8595dfecf96Smrg    # Make sure the directory exists.
8605dfecf96Smrg    test -f "$dirpart/$file" && continue
8615dfecf96Smrg    fdir=`AS_DIRNAME(["$file"])`
8625dfecf96Smrg    AS_MKDIR_P([$dirpart/$fdir])
8635dfecf96Smrg    # echo "creating $dirpart/$file"
8645dfecf96Smrg    echo '# dummy' > "$dirpart/$file"
8655dfecf96Smrg  done
8665dfecf96Smrgdone
8675dfecf96Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8685dfecf96Smrg
8695dfecf96Smrg
8705dfecf96Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
8715dfecf96Smrg# -----------------------------
8725dfecf96Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
8735dfecf96Smrg#
8745dfecf96Smrg# This code is only required when automatic dependency tracking
8755dfecf96Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
8765dfecf96Smrg# need in order to bootstrap the dependency handling code.
8775dfecf96SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8785dfecf96Smrg[AC_CONFIG_COMMANDS([depfiles],
8795dfecf96Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8805dfecf96Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8815dfecf96Smrg])
8825dfecf96Smrg
8835dfecf96Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8845dfecf96Smrg# Free Software Foundation, Inc.
8855dfecf96Smrg#
8865dfecf96Smrg# This file is free software; the Free Software Foundation
8875dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
8885dfecf96Smrg# with or without modifications, as long as this notice is preserved.
8895dfecf96Smrg
8905dfecf96Smrg# serial 8
8915dfecf96Smrg
8925dfecf96Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
8935dfecf96SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
8945dfecf96Smrg
8955dfecf96Smrg# Do all the work for Automake.                             -*- Autoconf -*-
8965dfecf96Smrg
8975dfecf96Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
8985dfecf96Smrg# Free Software Foundation, Inc.
8995dfecf96Smrg#
9005dfecf96Smrg# This file is free software; the Free Software Foundation
9015dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
9025dfecf96Smrg# with or without modifications, as long as this notice is preserved.
9035dfecf96Smrg
9045dfecf96Smrg# serial 12
9055dfecf96Smrg
9065dfecf96Smrg# This macro actually does too much.  Some checks are only needed if
9075dfecf96Smrg# your package does certain things.  But this isn't really a big deal.
9085dfecf96Smrg
9095dfecf96Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9105dfecf96Smrg# AM_INIT_AUTOMAKE([OPTIONS])
9115dfecf96Smrg# -----------------------------------------------
9125dfecf96Smrg# The call with PACKAGE and VERSION arguments is the old style
9135dfecf96Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9145dfecf96Smrg# and VERSION should now be passed to AC_INIT and removed from
9155dfecf96Smrg# the call to AM_INIT_AUTOMAKE.
9165dfecf96Smrg# We support both call styles for the transition.  After
9175dfecf96Smrg# the next Automake release, Autoconf can make the AC_INIT
9185dfecf96Smrg# arguments mandatory, and then we can depend on a new Autoconf
9195dfecf96Smrg# release and drop the old call support.
9205dfecf96SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
9215dfecf96Smrg[AC_PREREQ([2.58])dnl
9225dfecf96Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
9235dfecf96Smrgdnl the ones we care about.
9245dfecf96Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9255dfecf96SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9265dfecf96SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
9275dfecf96Smrg# test to see if srcdir already configured
9285dfecf96Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
9295dfecf96Smrg   test -f $srcdir/config.status; then
9305dfecf96Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9315dfecf96Smrgfi
9325dfecf96Smrg
9335dfecf96Smrg# test whether we have cygpath
9345dfecf96Smrgif test -z "$CYGPATH_W"; then
9355dfecf96Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
9365dfecf96Smrg    CYGPATH_W='cygpath -w'
9375dfecf96Smrg  else
9385dfecf96Smrg    CYGPATH_W=echo
9395dfecf96Smrg  fi
9405dfecf96Smrgfi
9415dfecf96SmrgAC_SUBST([CYGPATH_W])
9425dfecf96Smrg
9435dfecf96Smrg# Define the identity of the package.
9445dfecf96Smrgdnl Distinguish between old-style and new-style calls.
9455dfecf96Smrgm4_ifval([$2],
9465dfecf96Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9475dfecf96Smrg AC_SUBST([PACKAGE], [$1])dnl
9485dfecf96Smrg AC_SUBST([VERSION], [$2])],
9495dfecf96Smrg[_AM_SET_OPTIONS([$1])dnl
9505dfecf96Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9515dfecf96Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9525dfecf96Smrg
9535dfecf96Smrg_AM_IF_OPTION([no-define],,
9545dfecf96Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9555dfecf96Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9565dfecf96Smrg
9575dfecf96Smrg# Some tools Automake needs.
9585dfecf96SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
9595dfecf96SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
9605dfecf96SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9615dfecf96SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
9625dfecf96SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9635dfecf96SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
9645dfecf96SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
9655dfecf96SmrgAM_PROG_INSTALL_SH
9665dfecf96SmrgAM_PROG_INSTALL_STRIP
9675dfecf96SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
9685dfecf96Smrg# We need awk for the "check" target.  The system "awk" is bad on
9695dfecf96Smrg# some platforms.
9705dfecf96SmrgAC_REQUIRE([AC_PROG_AWK])dnl
9715dfecf96SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
9725dfecf96SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
9735dfecf96Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9745dfecf96Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9755dfecf96Smrg	      		     [_AM_PROG_TAR([v7])])])
9765dfecf96Smrg_AM_IF_OPTION([no-dependencies],,
9775dfecf96Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
9785dfecf96Smrg                  [_AM_DEPENDENCIES(CC)],
9795dfecf96Smrg                  [define([AC_PROG_CC],
9805dfecf96Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9815dfecf96SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
9825dfecf96Smrg                  [_AM_DEPENDENCIES(CXX)],
9835dfecf96Smrg                  [define([AC_PROG_CXX],
9845dfecf96Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9855dfecf96Smrg])
9865dfecf96Smrg])
9875dfecf96Smrg
9885dfecf96Smrg
9895dfecf96Smrg# When config.status generates a header, we must update the stamp-h file.
9905dfecf96Smrg# This file resides in the same directory as the config header
9915dfecf96Smrg# that is generated.  The stamp files are numbered to have different names.
9925dfecf96Smrg
9935dfecf96Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9945dfecf96Smrg# loop where config.status creates the headers, so we can generate
9955dfecf96Smrg# our stamp files there.
9965dfecf96SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9975dfecf96Smrg[# Compute $1's index in $config_headers.
9985dfecf96Smrg_am_stamp_count=1
9995dfecf96Smrgfor _am_header in $config_headers :; do
10005dfecf96Smrg  case $_am_header in
10015dfecf96Smrg    $1 | $1:* )
10025dfecf96Smrg      break ;;
10035dfecf96Smrg    * )
10045dfecf96Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10055dfecf96Smrg  esac
10065dfecf96Smrgdone
10075dfecf96Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
10085dfecf96Smrg
10095dfecf96Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10105dfecf96Smrg#
10115dfecf96Smrg# This file is free software; the Free Software Foundation
10125dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
10135dfecf96Smrg# with or without modifications, as long as this notice is preserved.
10145dfecf96Smrg
10155dfecf96Smrg# AM_PROG_INSTALL_SH
10165dfecf96Smrg# ------------------
10175dfecf96Smrg# Define $install_sh.
10185dfecf96SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
10195dfecf96Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10205dfecf96Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
10215dfecf96SmrgAC_SUBST(install_sh)])
10225dfecf96Smrg
10235dfecf96Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10245dfecf96Smrg#
10255dfecf96Smrg# This file is free software; the Free Software Foundation
10265dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
10275dfecf96Smrg# with or without modifications, as long as this notice is preserved.
10285dfecf96Smrg
10295dfecf96Smrg# serial 2
10305dfecf96Smrg
10315dfecf96Smrg# Check whether the underlying file-system supports filenames
10325dfecf96Smrg# with a leading dot.  For instance MS-DOS doesn't.
10335dfecf96SmrgAC_DEFUN([AM_SET_LEADING_DOT],
10345dfecf96Smrg[rm -rf .tst 2>/dev/null
10355dfecf96Smrgmkdir .tst 2>/dev/null
10365dfecf96Smrgif test -d .tst; then
10375dfecf96Smrg  am__leading_dot=.
10385dfecf96Smrgelse
10395dfecf96Smrg  am__leading_dot=_
10405dfecf96Smrgfi
10415dfecf96Smrgrmdir .tst 2>/dev/null
10425dfecf96SmrgAC_SUBST([am__leading_dot])])
10435dfecf96Smrg
10445dfecf96Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10455dfecf96Smrg# From Jim Meyering
10465dfecf96Smrg
10475dfecf96Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
10485dfecf96Smrg# Free Software Foundation, Inc.
10495dfecf96Smrg#
10505dfecf96Smrg# This file is free software; the Free Software Foundation
10515dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
10525dfecf96Smrg# with or without modifications, as long as this notice is preserved.
10535dfecf96Smrg
10545dfecf96Smrg# serial 4
10555dfecf96Smrg
10565dfecf96SmrgAC_DEFUN([AM_MAINTAINER_MODE],
10575dfecf96Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10585dfecf96Smrg  dnl maintainer-mode is disabled by default
10595dfecf96Smrg  AC_ARG_ENABLE(maintainer-mode,
10605dfecf96Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
10615dfecf96Smrg			  (and sometimes confusing) to the casual installer],
10625dfecf96Smrg      USE_MAINTAINER_MODE=$enableval,
10635dfecf96Smrg      USE_MAINTAINER_MODE=no)
10645dfecf96Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10655dfecf96Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
10665dfecf96Smrg  MAINT=$MAINTAINER_MODE_TRUE
10675dfecf96Smrg  AC_SUBST(MAINT)dnl
10685dfecf96Smrg]
10695dfecf96Smrg)
10705dfecf96Smrg
10715dfecf96SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10725dfecf96Smrg
10735dfecf96Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10745dfecf96Smrg
10755dfecf96Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
10765dfecf96Smrg#
10775dfecf96Smrg# This file is free software; the Free Software Foundation
10785dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
10795dfecf96Smrg# with or without modifications, as long as this notice is preserved.
10805dfecf96Smrg
10815dfecf96Smrg# serial 3
10825dfecf96Smrg
10835dfecf96Smrg# AM_MAKE_INCLUDE()
10845dfecf96Smrg# -----------------
10855dfecf96Smrg# Check to see how make treats includes.
10865dfecf96SmrgAC_DEFUN([AM_MAKE_INCLUDE],
10875dfecf96Smrg[am_make=${MAKE-make}
10885dfecf96Smrgcat > confinc << 'END'
10895dfecf96Smrgam__doit:
10905dfecf96Smrg	@echo done
10915dfecf96Smrg.PHONY: am__doit
10925dfecf96SmrgEND
10935dfecf96Smrg# If we don't find an include directive, just comment out the code.
10945dfecf96SmrgAC_MSG_CHECKING([for style of include used by $am_make])
10955dfecf96Smrgam__include="#"
10965dfecf96Smrgam__quote=
10975dfecf96Smrg_am_result=none
10985dfecf96Smrg# First try GNU make style include.
10995dfecf96Smrgecho "include confinc" > confmf
11005dfecf96Smrg# We grep out `Entering directory' and `Leaving directory'
11015dfecf96Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
11025dfecf96Smrg# In particular we don't look at `^make:' because GNU make might
11035dfecf96Smrg# be invoked under some other name (usually "gmake"), in which
11045dfecf96Smrg# case it prints its new name instead of `make'.
11055dfecf96Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
11065dfecf96Smrg   am__include=include
11075dfecf96Smrg   am__quote=
11085dfecf96Smrg   _am_result=GNU
11095dfecf96Smrgfi
11105dfecf96Smrg# Now try BSD make style include.
11115dfecf96Smrgif test "$am__include" = "#"; then
11125dfecf96Smrg   echo '.include "confinc"' > confmf
11135dfecf96Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
11145dfecf96Smrg      am__include=.include
11155dfecf96Smrg      am__quote="\""
11165dfecf96Smrg      _am_result=BSD
11175dfecf96Smrg   fi
11185dfecf96Smrgfi
11195dfecf96SmrgAC_SUBST([am__include])
11205dfecf96SmrgAC_SUBST([am__quote])
11215dfecf96SmrgAC_MSG_RESULT([$_am_result])
11225dfecf96Smrgrm -f confinc confmf
11235dfecf96Smrg])
11245dfecf96Smrg
11255dfecf96Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
11265dfecf96Smrg
11275dfecf96Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
11285dfecf96Smrg# Free Software Foundation, Inc.
11295dfecf96Smrg#
11305dfecf96Smrg# This file is free software; the Free Software Foundation
11315dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
11325dfecf96Smrg# with or without modifications, as long as this notice is preserved.
11335dfecf96Smrg
11345dfecf96Smrg# serial 4
11355dfecf96Smrg
11365dfecf96Smrg# AM_MISSING_PROG(NAME, PROGRAM)
11375dfecf96Smrg# ------------------------------
11385dfecf96SmrgAC_DEFUN([AM_MISSING_PROG],
11395dfecf96Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
11405dfecf96Smrg$1=${$1-"${am_missing_run}$2"}
11415dfecf96SmrgAC_SUBST($1)])
11425dfecf96Smrg
11435dfecf96Smrg
11445dfecf96Smrg# AM_MISSING_HAS_RUN
11455dfecf96Smrg# ------------------
11465dfecf96Smrg# Define MISSING if not defined so far and test if it supports --run.
11475dfecf96Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
11485dfecf96SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
11495dfecf96Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11505dfecf96Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11515dfecf96Smrg# Use eval to expand $SHELL
11525dfecf96Smrgif eval "$MISSING --run true"; then
11535dfecf96Smrg  am_missing_run="$MISSING --run "
11545dfecf96Smrgelse
11555dfecf96Smrg  am_missing_run=
11565dfecf96Smrg  AC_MSG_WARN([`missing' script is too old or missing])
11575dfecf96Smrgfi
11585dfecf96Smrg])
11595dfecf96Smrg
11605dfecf96Smrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
11615dfecf96Smrg#
11625dfecf96Smrg# This file is free software; the Free Software Foundation
11635dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
11645dfecf96Smrg# with or without modifications, as long as this notice is preserved.
11655dfecf96Smrg
11665dfecf96Smrg# AM_PROG_MKDIR_P
11675dfecf96Smrg# ---------------
11685dfecf96Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
11695dfecf96Smrg#
11705dfecf96Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
11715dfecf96Smrg# created by `make install' are always world readable, even if the
11725dfecf96Smrg# installer happens to have an overly restrictive umask (e.g. 077).
11735dfecf96Smrg# This was a mistake.  There are at least two reasons why we must not
11745dfecf96Smrg# use `-m 0755':
11755dfecf96Smrg#   - it causes special bits like SGID to be ignored,
11765dfecf96Smrg#   - it may be too restrictive (some setups expect 775 directories).
11775dfecf96Smrg#
11785dfecf96Smrg# Do not use -m 0755 and let people choose whatever they expect by
11795dfecf96Smrg# setting umask.
11805dfecf96Smrg#
11815dfecf96Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
11825dfecf96Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
11835dfecf96Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
11845dfecf96Smrg# concurrently, both version can detect that a/ is missing, but only
11855dfecf96Smrg# one can create it and the other will error out.  Consequently we
11865dfecf96Smrg# restrict ourselves to GNU make (using the --version option ensures
11875dfecf96Smrg# this.)
11885dfecf96SmrgAC_DEFUN([AM_PROG_MKDIR_P],
11895dfecf96Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
11905dfecf96Smrg  # We used to keeping the `.' as first argument, in order to
11915dfecf96Smrg  # allow $(mkdir_p) to be used without argument.  As in
11925dfecf96Smrg  #   $(mkdir_p) $(somedir)
11935dfecf96Smrg  # where $(somedir) is conditionally defined.  However this is wrong
11945dfecf96Smrg  # for two reasons:
11955dfecf96Smrg  #  1. if the package is installed by a user who cannot write `.'
11965dfecf96Smrg  #     make install will fail,
11975dfecf96Smrg  #  2. the above comment should most certainly read
11985dfecf96Smrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
11995dfecf96Smrg  #     so it does not work when $(somedir) is undefined and
12005dfecf96Smrg  #     $(DESTDIR) is not.
12015dfecf96Smrg  #  To support the latter case, we have to write
12025dfecf96Smrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
12035dfecf96Smrg  #  so the `.' trick is pointless.
12045dfecf96Smrg  mkdir_p='mkdir -p --'
12055dfecf96Smrgelse
12065dfecf96Smrg  # On NextStep and OpenStep, the `mkdir' command does not
12075dfecf96Smrg  # recognize any option.  It will interpret all options as
12085dfecf96Smrg  # directories to create, and then abort because `.' already
12095dfecf96Smrg  # exists.
12105dfecf96Smrg  for d in ./-p ./--version;
12115dfecf96Smrg  do
12125dfecf96Smrg    test -d $d && rmdir $d
12135dfecf96Smrg  done
12145dfecf96Smrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
12155dfecf96Smrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
12165dfecf96Smrg    mkdir_p='$(mkinstalldirs)'
12175dfecf96Smrg  else
12185dfecf96Smrg    mkdir_p='$(install_sh) -d'
12195dfecf96Smrg  fi
12205dfecf96Smrgfi
12215dfecf96SmrgAC_SUBST([mkdir_p])])
12225dfecf96Smrg
12235dfecf96Smrg# Helper functions for option handling.                     -*- Autoconf -*-
12245dfecf96Smrg
12255dfecf96Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
12265dfecf96Smrg#
12275dfecf96Smrg# This file is free software; the Free Software Foundation
12285dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
12295dfecf96Smrg# with or without modifications, as long as this notice is preserved.
12305dfecf96Smrg
12315dfecf96Smrg# serial 3
12325dfecf96Smrg
12335dfecf96Smrg# _AM_MANGLE_OPTION(NAME)
12345dfecf96Smrg# -----------------------
12355dfecf96SmrgAC_DEFUN([_AM_MANGLE_OPTION],
12365dfecf96Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
12375dfecf96Smrg
12385dfecf96Smrg# _AM_SET_OPTION(NAME)
12395dfecf96Smrg# ------------------------------
12405dfecf96Smrg# Set option NAME.  Presently that only means defining a flag for this option.
12415dfecf96SmrgAC_DEFUN([_AM_SET_OPTION],
12425dfecf96Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
12435dfecf96Smrg
12445dfecf96Smrg# _AM_SET_OPTIONS(OPTIONS)
12455dfecf96Smrg# ----------------------------------
12465dfecf96Smrg# OPTIONS is a space-separated list of Automake options.
12475dfecf96SmrgAC_DEFUN([_AM_SET_OPTIONS],
12485dfecf96Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
12495dfecf96Smrg
12505dfecf96Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
12515dfecf96Smrg# -------------------------------------------
12525dfecf96Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
12535dfecf96SmrgAC_DEFUN([_AM_IF_OPTION],
12545dfecf96Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
12555dfecf96Smrg
12565dfecf96Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
12575dfecf96Smrg
12585dfecf96Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
12595dfecf96Smrg# Free Software Foundation, Inc.
12605dfecf96Smrg#
12615dfecf96Smrg# This file is free software; the Free Software Foundation
12625dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
12635dfecf96Smrg# with or without modifications, as long as this notice is preserved.
12645dfecf96Smrg
12655dfecf96Smrg# serial 4
12665dfecf96Smrg
12675dfecf96Smrg# AM_SANITY_CHECK
12685dfecf96Smrg# ---------------
12695dfecf96SmrgAC_DEFUN([AM_SANITY_CHECK],
12705dfecf96Smrg[AC_MSG_CHECKING([whether build environment is sane])
12715dfecf96Smrg# Just in case
12725dfecf96Smrgsleep 1
12735dfecf96Smrgecho timestamp > conftest.file
12745dfecf96Smrg# Do `set' in a subshell so we don't clobber the current shell's
12755dfecf96Smrg# arguments.  Must try -L first in case configure is actually a
12765dfecf96Smrg# symlink; some systems play weird games with the mod time of symlinks
12775dfecf96Smrg# (eg FreeBSD returns the mod time of the symlink's containing
12785dfecf96Smrg# directory).
12795dfecf96Smrgif (
12805dfecf96Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
12815dfecf96Smrg   if test "$[*]" = "X"; then
12825dfecf96Smrg      # -L didn't work.
12835dfecf96Smrg      set X `ls -t $srcdir/configure conftest.file`
12845dfecf96Smrg   fi
12855dfecf96Smrg   rm -f conftest.file
12865dfecf96Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
12875dfecf96Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
12885dfecf96Smrg
12895dfecf96Smrg      # If neither matched, then we have a broken ls.  This can happen
12905dfecf96Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
12915dfecf96Smrg      # broken ls alias from the environment.  This has actually
12925dfecf96Smrg      # happened.  Such a system could not be considered "sane".
12935dfecf96Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
12945dfecf96Smrgalias in your environment])
12955dfecf96Smrg   fi
12965dfecf96Smrg
12975dfecf96Smrg   test "$[2]" = conftest.file
12985dfecf96Smrg   )
12995dfecf96Smrgthen
13005dfecf96Smrg   # Ok.
13015dfecf96Smrg   :
13025dfecf96Smrgelse
13035dfecf96Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
13045dfecf96SmrgCheck your system clock])
13055dfecf96Smrgfi
13065dfecf96SmrgAC_MSG_RESULT(yes)])
13075dfecf96Smrg
13085dfecf96Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
13095dfecf96Smrg#
13105dfecf96Smrg# This file is free software; the Free Software Foundation
13115dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
13125dfecf96Smrg# with or without modifications, as long as this notice is preserved.
13135dfecf96Smrg
13145dfecf96Smrg# AM_PROG_INSTALL_STRIP
13155dfecf96Smrg# ---------------------
13165dfecf96Smrg# One issue with vendor `install' (even GNU) is that you can't
13175dfecf96Smrg# specify the program used to strip binaries.  This is especially
13185dfecf96Smrg# annoying in cross-compiling environments, where the build's strip
13195dfecf96Smrg# is unlikely to handle the host's binaries.
13205dfecf96Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
13215dfecf96Smrg# always use install-sh in `make install-strip', and initialize
13225dfecf96Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
13235dfecf96SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
13245dfecf96Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
13255dfecf96Smrg# Installed binaries are usually stripped using `strip' when the user
13265dfecf96Smrg# run `make install-strip'.  However `strip' might not be the right
13275dfecf96Smrg# tool to use in cross-compilation environments, therefore Automake
13285dfecf96Smrg# will honor the `STRIP' environment variable to overrule this program.
13295dfecf96Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
13305dfecf96Smrgif test "$cross_compiling" != no; then
13315dfecf96Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
13325dfecf96Smrgfi
13335dfecf96SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
13345dfecf96SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
13355dfecf96Smrg
13365dfecf96Smrg# Check how to create a tarball.                            -*- Autoconf -*-
13375dfecf96Smrg
13385dfecf96Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
13395dfecf96Smrg#
13405dfecf96Smrg# This file is free software; the Free Software Foundation
13415dfecf96Smrg# gives unlimited permission to copy and/or distribute it,
13425dfecf96Smrg# with or without modifications, as long as this notice is preserved.
13435dfecf96Smrg
13445dfecf96Smrg# serial 2
13455dfecf96Smrg
13465dfecf96Smrg# _AM_PROG_TAR(FORMAT)
13475dfecf96Smrg# --------------------
13485dfecf96Smrg# Check how to create a tarball in format FORMAT.
13495dfecf96Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
13505dfecf96Smrg#
13515dfecf96Smrg# Substitute a variable $(am__tar) that is a command
13525dfecf96Smrg# writing to stdout a FORMAT-tarball containing the directory
13535dfecf96Smrg# $tardir.
13545dfecf96Smrg#     tardir=directory && $(am__tar) > result.tar
13555dfecf96Smrg#
13565dfecf96Smrg# Substitute a variable $(am__untar) that extract such
13575dfecf96Smrg# a tarball read from stdin.
13585dfecf96Smrg#     $(am__untar) < result.tar
13595dfecf96SmrgAC_DEFUN([_AM_PROG_TAR],
13605dfecf96Smrg[# Always define AMTAR for backward compatibility.
13615dfecf96SmrgAM_MISSING_PROG([AMTAR], [tar])
13625dfecf96Smrgm4_if([$1], [v7],
13635dfecf96Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
13645dfecf96Smrg     [m4_case([$1], [ustar],, [pax],,
13655dfecf96Smrg              [m4_fatal([Unknown tar format])])
13665dfecf96SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
13675dfecf96Smrg# Loop over all known methods to create a tar archive until one works.
13685dfecf96Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
13695dfecf96Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
13705dfecf96Smrg# Do not fold the above two line into one, because Tru64 sh and
13715dfecf96Smrg# Solaris sh will not grok spaces in the rhs of `-'.
13725dfecf96Smrgfor _am_tool in $_am_tools
13735dfecf96Smrgdo
13745dfecf96Smrg  case $_am_tool in
13755dfecf96Smrg  gnutar)
13765dfecf96Smrg    for _am_tar in tar gnutar gtar;
13775dfecf96Smrg    do
13785dfecf96Smrg      AM_RUN_LOG([$_am_tar --version]) && break
13795dfecf96Smrg    done
13805dfecf96Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
13815dfecf96Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
13825dfecf96Smrg    am__untar="$_am_tar -xf -"
13835dfecf96Smrg    ;;
13845dfecf96Smrg  plaintar)
13855dfecf96Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
13865dfecf96Smrg    # ustar tarball either.
13875dfecf96Smrg    (tar --version) >/dev/null 2>&1 && continue
13885dfecf96Smrg    am__tar='tar chf - "$$tardir"'
13895dfecf96Smrg    am__tar_='tar chf - "$tardir"'
13905dfecf96Smrg    am__untar='tar xf -'
13915dfecf96Smrg    ;;
13925dfecf96Smrg  pax)
13935dfecf96Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
13945dfecf96Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
13955dfecf96Smrg    am__untar='pax -r'
13965dfecf96Smrg    ;;
13975dfecf96Smrg  cpio)
13985dfecf96Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
13995dfecf96Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
14005dfecf96Smrg    am__untar='cpio -i -H $1 -d'
14015dfecf96Smrg    ;;
14025dfecf96Smrg  none)
14035dfecf96Smrg    am__tar=false
14045dfecf96Smrg    am__tar_=false
14055dfecf96Smrg    am__untar=false
14065dfecf96Smrg    ;;
14075dfecf96Smrg  esac
14085dfecf96Smrg
14095dfecf96Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
14105dfecf96Smrg  # and am__untar set.
14115dfecf96Smrg  test -n "${am_cv_prog_tar_$1}" && break
14125dfecf96Smrg
14135dfecf96Smrg  # tar/untar a dummy directory, and stop if the command works
14145dfecf96Smrg  rm -rf conftest.dir
14155dfecf96Smrg  mkdir conftest.dir
14165dfecf96Smrg  echo GrepMe > conftest.dir/file
14175dfecf96Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
14185dfecf96Smrg  rm -rf conftest.dir
14195dfecf96Smrg  if test -s conftest.tar; then
14205dfecf96Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
14215dfecf96Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
14225dfecf96Smrg  fi
14235dfecf96Smrgdone
14245dfecf96Smrgrm -rf conftest.dir
14255dfecf96Smrg
14265dfecf96SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
14275dfecf96SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
14285dfecf96SmrgAC_SUBST([am__tar])
14295dfecf96SmrgAC_SUBST([am__untar])
14305dfecf96Smrg]) # _AM_PROG_TAR
14315dfecf96Smrg
1432