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