aclocal.m4 revision 53719b08
153719b08Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2b1297603Smrg 3b1297603Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 453719b08Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5b1297603Smrg# This file is free software; the Free Software Foundation 6b1297603Smrg# gives unlimited permission to copy and/or distribute it, 7b1297603Smrg# with or without modifications, as long as this notice is preserved. 8b1297603Smrg 9b1297603Smrg# This program is distributed in the hope that it will be useful, 10b1297603Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11b1297603Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12b1297603Smrg# PARTICULAR PURPOSE. 13b1297603Smrg 145b944e2aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 155b944e2aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16d3263506Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 175b944e2aSmrg[m4_warning([this file was generated for autoconf 2.63. 185b944e2aSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 195b944e2aSmrgIf you have problems, you may need to regenerate the build system entirely. 205b944e2aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 215b944e2aSmrg 22b1297603Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 23b1297603Smrg# 24b1297603Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 25b1297603Smrg# 26b1297603Smrg# This program is free software; you can redistribute it and/or modify 27b1297603Smrg# it under the terms of the GNU General Public License as published by 28b1297603Smrg# the Free Software Foundation; either version 2 of the License, or 29b1297603Smrg# (at your option) any later version. 30b1297603Smrg# 31b1297603Smrg# This program is distributed in the hope that it will be useful, but 32b1297603Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 33b1297603Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 34b1297603Smrg# General Public License for more details. 35b1297603Smrg# 36b1297603Smrg# You should have received a copy of the GNU General Public License 37b1297603Smrg# along with this program; if not, write to the Free Software 38b1297603Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 39b1297603Smrg# 40b1297603Smrg# As a special exception to the GNU General Public License, if you 41b1297603Smrg# distribute this file as part of a program that contains a 42b1297603Smrg# configuration script generated by Autoconf, you may include it under 43b1297603Smrg# the same distribution terms that you use for the rest of that program. 44b1297603Smrg 45b1297603Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 46b1297603Smrg# ---------------------------------- 47b1297603SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 48b1297603Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 49b1297603Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 50b1297603SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 51b1297603Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 52b1297603Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 53b1297603Smrgfi 54b1297603Smrgif test -n "$PKG_CONFIG"; then 55b1297603Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 56b1297603Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 57b1297603Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 58b1297603Smrg AC_MSG_RESULT([yes]) 59b1297603Smrg else 60b1297603Smrg AC_MSG_RESULT([no]) 61b1297603Smrg PKG_CONFIG="" 62b1297603Smrg fi 63b1297603Smrg 64b1297603Smrgfi[]dnl 65b1297603Smrg])# PKG_PROG_PKG_CONFIG 66b1297603Smrg 67b1297603Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 68b1297603Smrg# 69b1297603Smrg# Check to see whether a particular set of modules exists. Similar 70b1297603Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 71b1297603Smrg# 72b1297603Smrg# 73b1297603Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 74b1297603Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 75b1297603Smrg# PKG_CHECK_EXISTS manually 76b1297603Smrg# -------------------------------------------------------------- 77b1297603SmrgAC_DEFUN([PKG_CHECK_EXISTS], 78b1297603Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 79b1297603Smrgif test -n "$PKG_CONFIG" && \ 80b1297603Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 81b1297603Smrg m4_ifval([$2], [$2], [:]) 82b1297603Smrgm4_ifvaln([$3], [else 83b1297603Smrg $3])dnl 84b1297603Smrgfi]) 85b1297603Smrg 86b1297603Smrg 87b1297603Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 88b1297603Smrg# --------------------------------------------- 89b1297603Smrgm4_define([_PKG_CONFIG], 905b944e2aSmrg[if test -n "$$1"; then 915b944e2aSmrg pkg_cv_[]$1="$$1" 925b944e2aSmrg elif test -n "$PKG_CONFIG"; then 935b944e2aSmrg PKG_CHECK_EXISTS([$3], 945b944e2aSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 955b944e2aSmrg [pkg_failed=yes]) 965b944e2aSmrg else 975b944e2aSmrg pkg_failed=untried 98b1297603Smrgfi[]dnl 99b1297603Smrg])# _PKG_CONFIG 100b1297603Smrg 101b1297603Smrg# _PKG_SHORT_ERRORS_SUPPORTED 102b1297603Smrg# ----------------------------- 103b1297603SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 104b1297603Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 105b1297603Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 106b1297603Smrg _pkg_short_errors_supported=yes 107b1297603Smrgelse 108b1297603Smrg _pkg_short_errors_supported=no 109b1297603Smrgfi[]dnl 110b1297603Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 111b1297603Smrg 112b1297603Smrg 113b1297603Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 114b1297603Smrg# [ACTION-IF-NOT-FOUND]) 115b1297603Smrg# 116b1297603Smrg# 117b1297603Smrg# Note that if there is a possibility the first call to 118b1297603Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 119b1297603Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 120b1297603Smrg# 121b1297603Smrg# 122b1297603Smrg# -------------------------------------------------------------- 123b1297603SmrgAC_DEFUN([PKG_CHECK_MODULES], 124b1297603Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 125b1297603SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 126b1297603SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 127b1297603Smrg 128b1297603Smrgpkg_failed=no 129b1297603SmrgAC_MSG_CHECKING([for $1]) 130b1297603Smrg 131b1297603Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 132b1297603Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 133b1297603Smrg 134b1297603Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 135b1297603Smrgand $1[]_LIBS to avoid the need to call pkg-config. 136b1297603SmrgSee the pkg-config man page for more details.]) 137b1297603Smrg 138b1297603Smrgif test $pkg_failed = yes; then 139b1297603Smrg _PKG_SHORT_ERRORS_SUPPORTED 140b1297603Smrg if test $_pkg_short_errors_supported = yes; then 1415b944e2aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 142b1297603Smrg else 1435b944e2aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 144b1297603Smrg fi 145b1297603Smrg # Put the nasty error message in config.log where it belongs 146b1297603Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 147b1297603Smrg 148b1297603Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 149b1297603Smrg[Package requirements ($2) were not met: 150b1297603Smrg 151b1297603Smrg$$1_PKG_ERRORS 152b1297603Smrg 153b1297603SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 154b1297603Smrginstalled software in a non-standard prefix. 155b1297603Smrg 156b1297603Smrg_PKG_TEXT 157b1297603Smrg])], 158b1297603Smrg [AC_MSG_RESULT([no]) 159b1297603Smrg $4]) 160b1297603Smrgelif test $pkg_failed = untried; then 161b1297603Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 162b1297603Smrg[The pkg-config script could not be found or is too old. Make sure it 163b1297603Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 164b1297603Smrgpath to pkg-config. 165b1297603Smrg 166b1297603Smrg_PKG_TEXT 167b1297603Smrg 1685b944e2aSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 169b1297603Smrg [$4]) 170b1297603Smrgelse 171b1297603Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 172b1297603Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 173b1297603Smrg AC_MSG_RESULT([yes]) 174b1297603Smrg ifelse([$3], , :, [$3]) 175b1297603Smrgfi[]dnl 176b1297603Smrg])# PKG_CHECK_MODULES 177b1297603Smrg 17853719b08Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 17953719b08Smrgdnl 18053719b08Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 18153719b08Smrgdnl 18253719b08Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 18353719b08Smrgdnl copy of this software and associated documentation files (the "Software"), 18453719b08Smrgdnl to deal in the Software without restriction, including without limitation 18553719b08Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 18653719b08Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 18753719b08Smrgdnl Software is furnished to do so, subject to the following conditions: 18853719b08Smrgdnl 18953719b08Smrgdnl The above copyright notice and this permission notice (including the next 19053719b08Smrgdnl paragraph) shall be included in all copies or substantial portions of the 19153719b08Smrgdnl Software. 19253719b08Smrgdnl 19353719b08Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19453719b08Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19553719b08Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19653719b08Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19753719b08Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19853719b08Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19953719b08Smrgdnl DEALINGS IN THE SOFTWARE. 2005b944e2aSmrg 20153719b08Smrg# XORG_MACROS_VERSION(required-version) 20253719b08Smrg# ------------------------------------- 20353719b08Smrg# Minimum version: 1.1.0 204b1297603Smrg# 20553719b08Smrg# If you're using a macro added in Version 1.1 or newer, include this in 20653719b08Smrg# your configure.ac with the minimum required version, such as: 20753719b08Smrg# XORG_MACROS_VERSION(1.1) 208b1297603Smrg# 20953719b08Smrg# To ensure that this macro is defined, also add: 21053719b08Smrg# m4_ifndef([XORG_MACROS_VERSION], 21153719b08Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 2125b944e2aSmrg# 2135b944e2aSmrg# 21453719b08Smrg# See the "minimum version" comment for each macro you use to see what 21553719b08Smrg# version you require. 21653719b08Smrgm4_defun([XORG_MACROS_VERSION],[ 21753719b08Smrgm4_define([vers_have], [1.5.0]) 21853719b08Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 21953719b08Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 22053719b08Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 22153719b08Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 22253719b08Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 22353719b08Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 22453719b08Smrgm4_undefine([vers_have]) 22553719b08Smrgm4_undefine([maj_have]) 22653719b08Smrgm4_undefine([maj_needed]) 22753719b08Smrg]) # XORG_MACROS_VERSION 2285b944e2aSmrg 22953719b08Smrg# XORG_PROG_RAWCPP() 23053719b08Smrg# ------------------ 23153719b08Smrg# Minimum version: 1.0.0 232b1297603Smrg# 23353719b08Smrg# Find cpp program and necessary flags for use in pre-processing text files 23453719b08Smrg# such as man pages and config files 23553719b08SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 23653719b08SmrgAC_REQUIRE([AC_PROG_CPP]) 23753719b08SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 23853719b08Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 239b1297603Smrg 24053719b08Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 24153719b08Smrg# which is not the best choice for supporting other OS'es, but covers most 24253719b08Smrg# of the ones we need for now. 24353719b08SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 24453719b08SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 24553719b08Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 24653719b08Smrg AC_MSG_RESULT([no]) 24753719b08Smrgelse 24853719b08Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 24953719b08Smrg RAWCPPFLAGS=-undef 25053719b08Smrg AC_MSG_RESULT([yes]) 25153719b08Smrg # under Cygwin unix is still defined even with -undef 25253719b08Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 25353719b08Smrg RAWCPPFLAGS="-undef -ansi" 25453719b08Smrg AC_MSG_RESULT([yes, with -ansi]) 25553719b08Smrg else 25653719b08Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 25753719b08Smrg fi 25853719b08Smrgfi 25953719b08Smrgrm -f conftest.$ac_ext 260b1297603Smrg 26153719b08SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 26253719b08SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 26353719b08Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 26453719b08Smrg AC_MSG_RESULT([no]) 265b1297603Smrgelse 26653719b08Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 26753719b08Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 26853719b08Smrg AC_MSG_RESULT([yes]) 26953719b08Smrg else 27053719b08Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 27153719b08Smrg fi 272b1297603Smrgfi 27353719b08Smrgrm -f conftest.$ac_ext 27453719b08SmrgAC_SUBST(RAWCPPFLAGS) 27553719b08Smrg]) # XORG_PROG_RAWCPP 276b1297603Smrg 27753719b08Smrg# XORG_MANPAGE_SECTIONS() 27853719b08Smrg# ----------------------- 27953719b08Smrg# Minimum version: 1.0.0 280b1297603Smrg# 28153719b08Smrg# Determine which sections man pages go in for the different man page types 28253719b08Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 28353719b08Smrg# Not sure if there's any better way than just hardcoding by OS name. 28453719b08Smrg# Override default settings by setting environment variables 285b1297603Smrg 28653719b08SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 28753719b08SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 288b1297603Smrg 28953719b08Smrgif test x$APP_MAN_SUFFIX = x ; then 29053719b08Smrg APP_MAN_SUFFIX=1 29153719b08Smrgfi 29253719b08Smrgif test x$APP_MAN_DIR = x ; then 29353719b08Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 29453719b08Smrgfi 295b1297603Smrg 29653719b08Smrgif test x$LIB_MAN_SUFFIX = x ; then 29753719b08Smrg LIB_MAN_SUFFIX=3 29853719b08Smrgfi 29953719b08Smrgif test x$LIB_MAN_DIR = x ; then 30053719b08Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 30153719b08Smrgfi 302b1297603Smrg 30353719b08Smrgif test x$FILE_MAN_SUFFIX = x ; then 30453719b08Smrg case $host_os in 30553719b08Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 30653719b08Smrg *) FILE_MAN_SUFFIX=5 ;; 30753719b08Smrg esac 30853719b08Smrgfi 30953719b08Smrgif test x$FILE_MAN_DIR = x ; then 31053719b08Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 31153719b08Smrgfi 312b1297603Smrg 31353719b08Smrgif test x$MISC_MAN_SUFFIX = x ; then 31453719b08Smrg case $host_os in 31553719b08Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 31653719b08Smrg *) MISC_MAN_SUFFIX=7 ;; 31753719b08Smrg esac 31853719b08Smrgfi 31953719b08Smrgif test x$MISC_MAN_DIR = x ; then 32053719b08Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 32153719b08Smrgfi 322b1297603Smrg 32353719b08Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 32453719b08Smrg case $host_os in 32553719b08Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 32653719b08Smrg *) DRIVER_MAN_SUFFIX=4 ;; 3275b944e2aSmrg esac 32853719b08Smrgfi 32953719b08Smrgif test x$DRIVER_MAN_DIR = x ; then 33053719b08Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 33153719b08Smrgfi 332b1297603Smrg 33353719b08Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 33453719b08Smrg case $host_os in 33553719b08Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 33653719b08Smrg *) ADMIN_MAN_SUFFIX=8 ;; 33753719b08Smrg esac 33853719b08Smrgfi 33953719b08Smrgif test x$ADMIN_MAN_DIR = x ; then 34053719b08Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 341b1297603Smrgfi 342b1297603Smrg 343b1297603Smrg 34453719b08SmrgAC_SUBST([APP_MAN_SUFFIX]) 34553719b08SmrgAC_SUBST([LIB_MAN_SUFFIX]) 34653719b08SmrgAC_SUBST([FILE_MAN_SUFFIX]) 34753719b08SmrgAC_SUBST([MISC_MAN_SUFFIX]) 34853719b08SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 34953719b08SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 35053719b08SmrgAC_SUBST([APP_MAN_DIR]) 35153719b08SmrgAC_SUBST([LIB_MAN_DIR]) 35253719b08SmrgAC_SUBST([FILE_MAN_DIR]) 35353719b08SmrgAC_SUBST([MISC_MAN_DIR]) 35453719b08SmrgAC_SUBST([DRIVER_MAN_DIR]) 35553719b08SmrgAC_SUBST([ADMIN_MAN_DIR]) 35653719b08Smrg]) # XORG_MANPAGE_SECTIONS 357b1297603Smrg 35853719b08Smrg# XORG_CHECK_LINUXDOC 35953719b08Smrg# ------------------- 36053719b08Smrg# Minimum version: 1.0.0 36153719b08Smrg# 36253719b08Smrg# Defines the variable MAKE_TEXT if the necessary tools and 36353719b08Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 36453719b08Smrg# Whether or not the necessary tools and files are found can be checked 36553719b08Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 36653719b08SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 36753719b08Smrgif test x$XORG_SGML_PATH = x ; then 36853719b08Smrg XORG_SGML_PATH=$prefix/share/sgml 36953719b08Smrgfi 37053719b08SmrgHAVE_DEFS_ENT= 371b1297603Smrg 37253719b08Smrgif test x"$cross_compiling" = x"yes" ; then 37353719b08Smrg HAVE_DEFS_ENT=no 37453719b08Smrgelse 37553719b08Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 376b1297603Smrgfi 377b1297603Smrg 37853719b08SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 37953719b08SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 380b1297603Smrg 38153719b08SmrgAC_MSG_CHECKING([Whether to build documentation]) 382b1297603Smrg 38353719b08Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 38453719b08Smrg BUILDDOC=yes 38553719b08Smrgelse 38653719b08Smrg BUILDDOC=no 38753719b08Smrgfi 388b1297603Smrg 38953719b08SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 390b1297603Smrg 39153719b08SmrgAC_MSG_RESULT([$BUILDDOC]) 3925b944e2aSmrg 39353719b08SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 394b1297603Smrg 39553719b08Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 39653719b08Smrg BUILDPDFDOC=yes 39753719b08Smrgelse 39853719b08Smrg BUILDPDFDOC=no 39953719b08Smrgfi 400b1297603Smrg 40153719b08SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 402b1297603Smrg 40353719b08SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 404b1297603Smrg 40553719b08SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 40653719b08SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 40753719b08SmrgMAKE_PDF="$PS2PDF" 40853719b08SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 409b1297603Smrg 41053719b08SmrgAC_SUBST(MAKE_TEXT) 41153719b08SmrgAC_SUBST(MAKE_PS) 41253719b08SmrgAC_SUBST(MAKE_PDF) 41353719b08SmrgAC_SUBST(MAKE_HTML) 41453719b08Smrg]) # XORG_CHECK_LINUXDOC 41553719b08Smrg 41653719b08Smrg# XORG_CHECK_DOCBOOK 41753719b08Smrg# ------------------- 41853719b08Smrg# Minimum version: 1.0.0 4195b944e2aSmrg# 42053719b08Smrg# Checks for the ability to build output formats from SGML DocBook source. 42153719b08Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 42253719b08Smrg# indicates whether the necessary tools and files are found and, if set, 42353719b08Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 42453719b08SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 42553719b08Smrgif test x$XORG_SGML_PATH = x ; then 42653719b08Smrg XORG_SGML_PATH=$prefix/share/sgml 42753719b08Smrgfi 42853719b08SmrgHAVE_DEFS_ENT= 42953719b08SmrgBUILDTXTDOC=no 43053719b08SmrgBUILDPDFDOC=no 43153719b08SmrgBUILDPSDOC=no 43253719b08SmrgBUILDHTMLDOC=no 4335b944e2aSmrg 43453719b08SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 4355b944e2aSmrg 43653719b08SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 43753719b08SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 43853719b08SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 43953719b08SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 4405b944e2aSmrg 44153719b08SmrgAC_MSG_CHECKING([Whether to build text documentation]) 44253719b08Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 44353719b08Smrg test x$BUILD_TXTDOC != xno; then 44453719b08Smrg BUILDTXTDOC=yes 445b1297603Smrgfi 44653719b08SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 44753719b08SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 448b1297603Smrg 44953719b08SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 45053719b08Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 45153719b08Smrg test x$BUILD_PDFDOC != xno; then 45253719b08Smrg BUILDPDFDOC=yes 45353719b08Smrgfi 45453719b08SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 45553719b08SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 456b1297603Smrg 45753719b08SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 45853719b08Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 45953719b08Smrg test x$BUILD_PSDOC != xno; then 46053719b08Smrg BUILDPSDOC=yes 46153719b08Smrgfi 46253719b08SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 46353719b08SmrgAC_MSG_RESULT([$BUILDPSDOC]) 464b1297603Smrg 46553719b08SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 46653719b08Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 46753719b08Smrg test x$BUILD_HTMLDOC != xno; then 46853719b08Smrg BUILDHTMLDOC=yes 46953719b08Smrgfi 47053719b08SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 47153719b08SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 472b1297603Smrg 47353719b08SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 47453719b08SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 47553719b08SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 47653719b08SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 477b1297603Smrg 47853719b08SmrgAC_SUBST(MAKE_TEXT) 47953719b08SmrgAC_SUBST(MAKE_PS) 48053719b08SmrgAC_SUBST(MAKE_PDF) 48153719b08SmrgAC_SUBST(MAKE_HTML) 48253719b08Smrg]) # XORG_CHECK_DOCBOOK 483b1297603Smrg 48453719b08Smrg# XORG_WITH_XMLTO 48553719b08Smrg# ---------------- 48653719b08Smrg# Minimum version: 1.5.0 48753719b08Smrg# 48853719b08Smrg# Documentation tools are not always available on all platforms and sometimes 48953719b08Smrg# not at the appropriate level. This macro enables a module to test for the 49053719b08Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 49153719b08Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 49253719b08Smrg# as whether or not to use the xmlto package. 49353719b08Smrg# 49453719b08Smrg# Interface to module: 49553719b08Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 49653719b08Smrg# XMLTO: returns the path of the xmlto program found 49753719b08Smrg# returns the path set by the user in the environment 49853719b08Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 49953719b08Smrg# 'no' user instructs the module not to use xmlto 50053719b08Smrg# 50153719b08Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 50253719b08Smrg# 50353719b08SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 50453719b08SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 50553719b08SmrgAC_ARG_WITH(xmlto, 50653719b08Smrg AS_HELP_STRING([--with-xmlto], 50753719b08Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 50853719b08Smrg [use_xmlto=$withval], [use_xmlto=auto]) 50953719b08Smrg 51053719b08Smrgif test "x$use_xmlto" = x"auto"; then 51153719b08Smrg AC_PATH_PROG([XMLTO], [xmlto]) 51253719b08Smrg if test "x$XMLTO" = "x"; then 51353719b08Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 51453719b08Smrg have_xmlto=no 51553719b08Smrg else 51653719b08Smrg have_xmlto=yes 51753719b08Smrg fi 51853719b08Smrgelif test "x$use_xmlto" = x"yes" ; then 51953719b08Smrg AC_PATH_PROG([XMLTO], [xmlto]) 52053719b08Smrg if test "x$XMLTO" = "x"; then 52153719b08Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 52253719b08Smrg fi 52353719b08Smrg have_xmlto=yes 52453719b08Smrgelif test "x$use_xmlto" = x"no" ; then 52553719b08Smrg if test "x$XMLTO" != "x"; then 52653719b08Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 52753719b08Smrg fi 52853719b08Smrg have_xmlto=no 52953719b08Smrgelse 53053719b08Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 53153719b08Smrgfi 53253719b08SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 53353719b08Smrg]) # XORG_CHECK_XMLTO 534b1297603Smrg 53553719b08Smrg# XORG_WITH_ASCIIDOC 53653719b08Smrg# ---------------- 53753719b08Smrg# Minimum version: 1.5.0 538b1297603Smrg# 53953719b08Smrg# Documentation tools are not always available on all platforms and sometimes 54053719b08Smrg# not at the appropriate level. This macro enables a module to test for the 54153719b08Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 54253719b08Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 54353719b08Smrg# as whether or not to use the asciidoc package. 54453719b08Smrg# 54553719b08Smrg# Interface to module: 54653719b08Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 54753719b08Smrg# ASCIIDOC: returns the path of the asciidoc program found 54853719b08Smrg# returns the path set by the user in the environment 54953719b08Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 55053719b08Smrg# 'no' user instructs the module not to use asciidoc 55153719b08Smrg# 55253719b08Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 55353719b08Smrg# 55453719b08SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 55553719b08SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 55653719b08SmrgAC_ARG_WITH(asciidoc, 55753719b08Smrg AS_HELP_STRING([--with-asciidoc], 55853719b08Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 55953719b08Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 56053719b08Smrg 56153719b08Smrgif test "x$use_asciidoc" = x"auto"; then 56253719b08Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 56353719b08Smrg if test "x$ASCIIDOC" = "x"; then 56453719b08Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 56553719b08Smrg have_asciidoc=no 56653719b08Smrg else 56753719b08Smrg have_asciidoc=yes 56853719b08Smrg fi 56953719b08Smrgelif test "x$use_asciidoc" = x"yes" ; then 57053719b08Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 57153719b08Smrg if test "x$ASCIIDOC" = "x"; then 57253719b08Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 57353719b08Smrg fi 57453719b08Smrg have_asciidoc=yes 57553719b08Smrgelif test "x$use_asciidoc" = x"no" ; then 57653719b08Smrg if test "x$ASCIIDOC" != "x"; then 57753719b08Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 57853719b08Smrg fi 57953719b08Smrg have_asciidoc=no 58053719b08Smrgelse 58153719b08Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 58253719b08Smrgfi 58353719b08SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 58453719b08Smrg]) # XORG_CHECK_ASCIIDOC 5855b944e2aSmrg 58653719b08Smrg# XORG_WITH_DOXYGEN 58753719b08Smrg# ---------------- 58853719b08Smrg# Minimum version: 1.5.0 58953719b08Smrg# 59053719b08Smrg# Documentation tools are not always available on all platforms and sometimes 59153719b08Smrg# not at the appropriate level. This macro enables a module to test for the 59253719b08Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 59353719b08Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 59453719b08Smrg# as whether or not to use the doxygen package. 59553719b08Smrg# 59653719b08Smrg# Interface to module: 59753719b08Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 59853719b08Smrg# DOXYGEN: returns the path of the doxygen program found 59953719b08Smrg# returns the path set by the user in the environment 60053719b08Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 60153719b08Smrg# 'no' user instructs the module not to use doxygen 60253719b08Smrg# 60353719b08Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 60453719b08Smrg# 60553719b08SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 60653719b08SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 60753719b08SmrgAC_ARG_WITH(doxygen, 60853719b08Smrg AS_HELP_STRING([--with-doxygen], 60953719b08Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 61053719b08Smrg [use_doxygen=$withval], [use_doxygen=auto]) 61153719b08Smrg 61253719b08Smrgif test "x$use_doxygen" = x"auto"; then 61353719b08Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 61453719b08Smrg if test "x$DOXYGEN" = "x"; then 61553719b08Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 61653719b08Smrg have_doxygen=no 61753719b08Smrg else 61853719b08Smrg have_doxygen=yes 61953719b08Smrg fi 62053719b08Smrgelif test "x$use_doxygen" = x"yes" ; then 62153719b08Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 62253719b08Smrg if test "x$DOXYGEN" = "x"; then 62353719b08Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 62453719b08Smrg fi 62553719b08Smrg have_doxygen=yes 62653719b08Smrgelif test "x$use_doxygen" = x"no" ; then 62753719b08Smrg if test "x$DOXYGEN" != "x"; then 62853719b08Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 62953719b08Smrg fi 63053719b08Smrg have_doxygen=no 63153719b08Smrgelse 63253719b08Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 63353719b08Smrgfi 63453719b08SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 63553719b08Smrg]) # XORG_CHECK_DOXYGEN 6365b944e2aSmrg 63753719b08Smrg# XORG_CHECK_MALLOC_ZERO 63853719b08Smrg# ---------------------- 63953719b08Smrg# Minimum version: 1.0.0 640b1297603Smrg# 64153719b08Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 64253719b08Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 64353719b08Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 64453719b08SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 64553719b08SmrgAC_ARG_ENABLE(malloc0returnsnull, 64653719b08Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 64753719b08Smrg [malloc(0) returns NULL (default: auto)]), 64853719b08Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 64953719b08Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 650b1297603Smrg 65153719b08SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 65253719b08Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 65353719b08Smrg AC_RUN_IFELSE([ 65453719b08Smrgchar *malloc(); 65553719b08Smrgchar *realloc(); 65653719b08Smrgchar *calloc(); 65753719b08Smrgmain() { 65853719b08Smrg char *m0, *r0, *c0, *p; 65953719b08Smrg m0 = malloc(0); 66053719b08Smrg p = malloc(10); 66153719b08Smrg r0 = realloc(p,0); 66253719b08Smrg c0 = calloc(0); 66353719b08Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 66453719b08Smrg}], 66553719b08Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 66653719b08Smrg [MALLOC_ZERO_RETURNS_NULL=no], 66753719b08Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 66853719b08Smrgfi 66953719b08SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 6705b944e2aSmrg 67153719b08Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 67253719b08Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 67353719b08Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 67453719b08Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 675b1297603Smrgelse 67653719b08Smrg MALLOC_ZERO_CFLAGS="" 67753719b08Smrg XMALLOC_ZERO_CFLAGS="" 67853719b08Smrg XTMALLOC_ZERO_CFLAGS="" 679b1297603Smrgfi 680b1297603Smrg 68153719b08SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 68253719b08SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 68353719b08SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 68453719b08Smrg]) # XORG_CHECK_MALLOC_ZERO 685b1297603Smrg 68653719b08Smrg# XORG_WITH_LINT() 68753719b08Smrg# ---------------- 68853719b08Smrg# Minimum version: 1.1.0 689b1297603Smrg# 69053719b08Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 69153719b08Smrg# is specified. (Use --with-lint=sparse for sparse.) 69253719b08Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 69353719b08Smrg# Sets $LINT_FLAGS to flags to pass to source checker 69453719b08Smrg# Sets LINT automake conditional if enabled (default: disabled) 69553719b08Smrg# 69653719b08SmrgAC_DEFUN([XORG_WITH_LINT],[ 697b1297603Smrg 69853719b08Smrg# Allow checking code with lint, sparse, etc. 69953719b08SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 70053719b08Smrg [Use a lint-style source code checker (default: disabled)])], 70153719b08Smrg [use_lint=$withval], [use_lint=no]) 70253719b08Smrgif test "x$use_lint" = "xyes" ; then 70353719b08Smrg LINT="lint" 70453719b08Smrgelse 70553719b08Smrg LINT="$use_lint" 70653719b08Smrgfi 70753719b08Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 70853719b08Smrg case $LINT in 70953719b08Smrg lint|*/lint) 71053719b08Smrg case $host_os in 71153719b08Smrg solaris*) 71253719b08Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 71353719b08Smrg ;; 71453719b08Smrg esac 71553719b08Smrg ;; 71653719b08Smrg esac 71753719b08Smrgfi 718b1297603Smrg 71953719b08SmrgAC_SUBST(LINT) 72053719b08SmrgAC_SUBST(LINT_FLAGS) 72153719b08SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 722b1297603Smrg 72353719b08Smrg]) # XORG_WITH_LINT 724b1297603Smrg 72553719b08Smrg# XORG_LINT_LIBRARY(LIBNAME) 72653719b08Smrg# -------------------------- 72753719b08Smrg# Minimum version: 1.1.0 72853719b08Smrg# 72953719b08Smrg# Sets up flags for building lint libraries for checking programs that call 73053719b08Smrg# functions in the library. 73153719b08Smrg# Disabled by default, enable with --enable-lint-library 73253719b08Smrg# Sets: 73353719b08Smrg# @LINTLIB@ - name of lint library file to make 73453719b08Smrg# MAKE_LINT_LIB - automake conditional 735b1297603Smrg# 736b1297603Smrg 73753719b08SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 73853719b08SmrgAC_REQUIRE([XORG_WITH_LINT]) 73953719b08Smrg# Build lint "library" for more indepth checks of programs calling this library 74053719b08SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 74153719b08Smrg [Create lint library (default: disabled)])], 74253719b08Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 74353719b08Smrgif test "x$make_lint_lib" != "xno" ; then 74453719b08Smrg if test "x$LINT" = "xno" ; then 74553719b08Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 74653719b08Smrg fi 74753719b08Smrg if test "x$make_lint_lib" = "xyes" ; then 74853719b08Smrg LINTLIB=llib-l$1.ln 74953719b08Smrg else 75053719b08Smrg LINTLIB=$make_lint_lib 75153719b08Smrg fi 7525b944e2aSmrgfi 75353719b08SmrgAC_SUBST(LINTLIB) 75453719b08SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 755b1297603Smrg 75653719b08Smrg]) # XORG_LINT_LIBRARY 757b1297603Smrg 75853719b08Smrg# XORG_CWARNFLAGS 75953719b08Smrg# --------------- 76053719b08Smrg# Minimum version: 1.2.0 761b1297603Smrg# 76253719b08Smrg# Defines CWARNFLAGS to enable C compiler warnings. 76353719b08Smrg# 76453719b08SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 76553719b08SmrgAC_REQUIRE([AC_PROG_CC]) 76653719b08Smrgif test "x$GCC" = xyes ; then 76753719b08Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 76853719b08Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 76953719b08Smrg-Wbad-function-cast" 77053719b08Smrg case `$CC -dumpversion` in 77153719b08Smrg 3.4.* | 4.*) 77253719b08Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 77353719b08Smrg ;; 77453719b08Smrg esac 7755b944e2aSmrgelse 77653719b08Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 77753719b08Smrg if test "x$SUNCC" = "xyes"; then 77853719b08Smrg CWARNFLAGS="-v" 77953719b08Smrg fi 7805b944e2aSmrgfi 78153719b08SmrgAC_SUBST(CWARNFLAGS) 78253719b08Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 78353719b08Smrg]) # XORG_CWARNFLAGS 7845b944e2aSmrg 78553719b08Smrg# XORG_STRICT_OPTION 78653719b08Smrg# ----------------------- 78753719b08Smrg# Minimum version: 1.3.0 788b1297603Smrg# 78953719b08Smrg# Add configure option to enable strict compilation 79053719b08SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 79153719b08SmrgAC_REQUIRE([AC_PROG_CC]) 79253719b08SmrgAC_REQUIRE([AC_PROG_CC_C99]) 79353719b08SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 79453719b08Smrg 79553719b08SmrgAC_ARG_ENABLE(strict-compilation, 79653719b08Smrg AS_HELP_STRING([--enable-strict-compilation], 79753719b08Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 79853719b08Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 79953719b08Smrgif test "x$STRICT_COMPILE" = "xyes"; then 80053719b08Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 80153719b08Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 80253719b08Smrg if test "x$GCC" = xyes ; then 80353719b08Smrg STRICT_CFLAGS="-pedantic -Werror" 80453719b08Smrg elif test "x$SUNCC" = "xyes"; then 80553719b08Smrg STRICT_CFLAGS="-errwarn" 80653719b08Smrg elif test "x$INTELCC" = "xyes"; then 80753719b08Smrg STRICT_CFLAGS="-Werror" 80853719b08Smrg fi 80953719b08Smrgfi 81053719b08SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 81153719b08SmrgAC_SUBST([CWARNFLAGS]) 81253719b08Smrg]) # XORG_STRICT_OPTION 813b1297603Smrg 81453719b08Smrg# XORG_DEFAULT_OPTIONS 81553719b08Smrg# -------------------- 81653719b08Smrg# Minimum version: 1.3.0 81753719b08Smrg# 81853719b08Smrg# Defines default options for X.Org modules. 81953719b08Smrg# 82053719b08SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 82153719b08SmrgXORG_CWARNFLAGS 82253719b08SmrgXORG_STRICT_OPTION 82353719b08SmrgXORG_RELEASE_VERSION 82453719b08SmrgXORG_CHANGELOG 82553719b08SmrgXORG_INSTALL 82653719b08SmrgXORG_MANPAGE_SECTIONS 82753719b08Smrg]) # XORG_DEFAULT_OPTIONS 82853719b08Smrg 82953719b08Smrg# XORG_INSTALL() 83053719b08Smrg# ---------------- 83153719b08Smrg# Minimum version: 1.4.0 83253719b08Smrg# 83353719b08Smrg# Defines the variable INSTALL_CMD as the command to copy 83453719b08Smrg# INSTALL from $prefix/share/util-macros. 83553719b08Smrg# 83653719b08SmrgAC_DEFUN([XORG_INSTALL], [ 83753719b08SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 83853719b08Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 83953719b08SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 84053719b08Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 84153719b08Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 84253719b08Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 84353719b08SmrgAC_SUBST([INSTALL_CMD]) 84453719b08Smrg]) # XORG_INSTALL 84553719b08Smrgdnl Copyright 2005 Red Hat, Inc 84653719b08Smrgdnl 84753719b08Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 84853719b08Smrgdnl documentation for any purpose is hereby granted without fee, provided that 84953719b08Smrgdnl the above copyright notice appear in all copies and that both that 85053719b08Smrgdnl copyright notice and this permission notice appear in supporting 85153719b08Smrgdnl documentation. 85253719b08Smrgdnl 85353719b08Smrgdnl The above copyright notice and this permission notice shall be included 85453719b08Smrgdnl in all copies or substantial portions of the Software. 85553719b08Smrgdnl 85653719b08Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 85753719b08Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 85853719b08Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 85953719b08Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 86053719b08Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 86153719b08Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 86253719b08Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 86353719b08Smrgdnl 86453719b08Smrgdnl Except as contained in this notice, the name of the copyright holders shall 86553719b08Smrgdnl not be used in advertising or otherwise to promote the sale, use or 86653719b08Smrgdnl other dealings in this Software without prior written authorization 86753719b08Smrgdnl from the copyright holders. 86853719b08Smrgdnl 86953719b08Smrg 87053719b08Smrg# XORG_RELEASE_VERSION 87153719b08Smrg# -------------------- 87253719b08Smrg# Adds --with/without-release-string and changes the PACKAGE and 87353719b08Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 87453719b08Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 87553719b08Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 87653719b08Smrg 87753719b08SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 87853719b08Smrg AC_ARG_WITH(release-version, 87953719b08Smrg AS_HELP_STRING([--with-release-version=STRING], 88053719b08Smrg [Use release version string in package name]), 88153719b08Smrg [RELEASE_VERSION="$withval"], 88253719b08Smrg [RELEASE_VERSION=""]) 88353719b08Smrg if test "x$RELEASE_VERSION" != "x"; then 88453719b08Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 88553719b08Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 88653719b08Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 88753719b08Smrg fi 88853719b08Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 88953719b08Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 89053719b08Smrg [Major version of this package]) 89153719b08Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 89253719b08Smrg if test "x$PVM" = "x"; then 89353719b08Smrg PVM="0" 89453719b08Smrg fi 89553719b08Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 89653719b08Smrg [$PVM], 89753719b08Smrg [Minor version of this package]) 89853719b08Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 89953719b08Smrg if test "x$PVP" = "x"; then 90053719b08Smrg PVP="0" 90153719b08Smrg fi 90253719b08Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 90353719b08Smrg [$PVP], 90453719b08Smrg [Patch version of this package]) 9055b944e2aSmrg]) 906b1297603Smrg 90753719b08Smrg# XORG_CHANGELOG() 90853719b08Smrg# ---------------- 90953719b08Smrg# Minimum version: 1.2.0 91053719b08Smrg# 91153719b08Smrg# Defines the variable CHANGELOG_CMD as the command to generate 91253719b08Smrg# ChangeLog from git. 91353719b08Smrg# 91453719b08Smrg# 91553719b08SmrgAC_DEFUN([XORG_CHANGELOG], [ 91653719b08SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 91753719b08Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 91853719b08Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 91953719b08Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 92053719b08SmrgAC_SUBST([CHANGELOG_CMD]) 92153719b08Smrg]) # XORG_CHANGELOG 922b1297603Smrg 92353719b08Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 924b1297603Smrg# 925b1297603Smrg# This file is free software; the Free Software Foundation 926b1297603Smrg# gives unlimited permission to copy and/or distribute it, 927b1297603Smrg# with or without modifications, as long as this notice is preserved. 928b1297603Smrg 92953719b08Smrg# AM_AUTOMAKE_VERSION(VERSION) 93053719b08Smrg# ---------------------------- 93153719b08Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 93253719b08Smrg# generated from the m4 files accompanying Automake X.Y. 93353719b08Smrg# (This private macro should not be called outside this file.) 93453719b08SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 93553719b08Smrg[am__api_version='1.11' 93653719b08Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 93753719b08Smrgdnl require some minimum version. Point them to the right macro. 93853719b08Smrgm4_if([$1], [1.11.1], [], 93953719b08Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 94053719b08Smrg]) 941b1297603Smrg 94253719b08Smrg# _AM_AUTOCONF_VERSION(VERSION) 94353719b08Smrg# ----------------------------- 94453719b08Smrg# aclocal traces this macro to find the Autoconf version. 94553719b08Smrg# This is a private macro too. Using m4_define simplifies 94653719b08Smrg# the logic in aclocal, which can simply ignore this definition. 94753719b08Smrgm4_define([_AM_AUTOCONF_VERSION], []) 948b1297603Smrg 94953719b08Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 95053719b08Smrg# ------------------------------- 95153719b08Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 95253719b08Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 95353719b08SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 95453719b08Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 95553719b08Smrgm4_ifndef([AC_AUTOCONF_VERSION], 95653719b08Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 95753719b08Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 958b1297603Smrg 95953719b08Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 960b1297603Smrg 96153719b08Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9625b944e2aSmrg# 9635b944e2aSmrg# This file is free software; the Free Software Foundation 9645b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 9655b944e2aSmrg# with or without modifications, as long as this notice is preserved. 966b1297603Smrg 96753719b08Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 96853719b08Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 96953719b08Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 97053719b08Smrg# 97153719b08Smrg# Of course, Automake must honor this variable whenever it calls a 97253719b08Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 97353719b08Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 97453719b08Smrg# depending on how configure is run. This is pretty annoying, since 97553719b08Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 97653719b08Smrg# source directory, any form will work fine, but in subdirectories a 97753719b08Smrg# relative path needs to be adjusted first. 97853719b08Smrg# 97953719b08Smrg# $ac_aux_dir/missing 98053719b08Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 98153719b08Smrg# $top_srcdir/$ac_aux_dir/missing 98253719b08Smrg# fails if $ac_aux_dir is absolute, 98353719b08Smrg# fails when called from a subdirectory in a VPATH build with 98453719b08Smrg# a relative $ac_aux_dir 98553719b08Smrg# 98653719b08Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 98753719b08Smrg# are both prefixed by $srcdir. In an in-source build this is usually 98853719b08Smrg# harmless because $srcdir is `.', but things will broke when you 98953719b08Smrg# start a VPATH build or use an absolute $srcdir. 99053719b08Smrg# 99153719b08Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 99253719b08Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 99353719b08Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 99453719b08Smrg# and then we would define $MISSING as 99553719b08Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 99653719b08Smrg# This will work as long as MISSING is not called from configure, because 99753719b08Smrg# unfortunately $(top_srcdir) has no meaning in configure. 99853719b08Smrg# However there are other variables, like CC, which are often used in 99953719b08Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100053719b08Smrg# 100153719b08Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 100253719b08Smrg# absolute PATH. The drawback is that using absolute paths prevent a 100353719b08Smrg# configured tree to be moved without reconfiguration. 10045b944e2aSmrg 100553719b08SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 100653719b08Smrg[dnl Rely on autoconf to set up CDPATH properly. 100753719b08SmrgAC_PREREQ([2.50])dnl 100853719b08Smrg# expand $ac_aux_dir to an absolute path 100953719b08Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 101053719b08Smrg]) 10115b944e2aSmrg 101253719b08Smrg# AM_CONDITIONAL -*- Autoconf -*- 1013b1297603Smrg 101453719b08Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 101553719b08Smrg# Free Software Foundation, Inc. 10165b944e2aSmrg# 10175b944e2aSmrg# This file is free software; the Free Software Foundation 10185b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 10195b944e2aSmrg# with or without modifications, as long as this notice is preserved. 1020b1297603Smrg 102153719b08Smrg# serial 9 102253719b08Smrg 102353719b08Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 102453719b08Smrg# ------------------------------------- 102553719b08Smrg# Define a conditional. 102653719b08SmrgAC_DEFUN([AM_CONDITIONAL], 102753719b08Smrg[AC_PREREQ(2.52)dnl 102853719b08Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 102953719b08Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 103053719b08SmrgAC_SUBST([$1_TRUE])dnl 103153719b08SmrgAC_SUBST([$1_FALSE])dnl 103253719b08Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 103353719b08Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 103453719b08Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 103553719b08Smrgif $2; then 103653719b08Smrg $1_TRUE= 103753719b08Smrg $1_FALSE='#' 103853719b08Smrgelse 103953719b08Smrg $1_TRUE='#' 104053719b08Smrg $1_FALSE= 10415b944e2aSmrgfi 104253719b08SmrgAC_CONFIG_COMMANDS_PRE( 104353719b08Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 104453719b08Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 104553719b08SmrgUsually this means the macro was only invoked conditionally.]]) 104653719b08Smrgfi])]) 1047b1297603Smrg 104853719b08Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 104953719b08Smrg# Free Software Foundation, Inc. 10505b944e2aSmrg# 10515b944e2aSmrg# This file is free software; the Free Software Foundation 10525b944e2aSmrg# gives unlimited permission to copy and/or distribute it, 10535b944e2aSmrg# with or without modifications, as long as this notice is preserved. 1054b1297603Smrg 105553719b08Smrg# serial 10 1056b1297603Smrg 105753719b08Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 105853719b08Smrg# written in clear, in which case automake, when reading aclocal.m4, 105953719b08Smrg# will think it sees a *use*, and therefore will trigger all it's 106053719b08Smrg# C support machinery. Also note that it means that autoscan, seeing 106153719b08Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1062b1297603Smrg 1063b1297603Smrg 106453719b08Smrg# _AM_DEPENDENCIES(NAME) 106553719b08Smrg# ---------------------- 106653719b08Smrg# See how the compiler implements dependency checking. 106753719b08Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 106853719b08Smrg# We try a few techniques and use that to set a single cache variable. 10695b944e2aSmrg# 107053719b08Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 107153719b08Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 107253719b08Smrg# dependency, and given that the user is not expected to run this macro, 107353719b08Smrg# just rely on AC_PROG_CC. 107453719b08SmrgAC_DEFUN([_AM_DEPENDENCIES], 107553719b08Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 107653719b08SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 107753719b08SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 107853719b08SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 10795b944e2aSmrg 108053719b08Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 108153719b08Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 108253719b08Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 108353719b08Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 108453719b08Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 108553719b08Smrg [depcc="$$1" am_compiler_list=]) 10865b944e2aSmrg 108753719b08SmrgAC_CACHE_CHECK([dependency style of $depcc], 108853719b08Smrg [am_cv_$1_dependencies_compiler_type], 108953719b08Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 109053719b08Smrg # We make a subdir and do the tests there. Otherwise we can end up 109153719b08Smrg # making bogus files that we don't know about and never remove. For 109253719b08Smrg # instance it was reported that on HP-UX the gcc test will end up 109353719b08Smrg # making a dummy file named `D' -- because `-MD' means `put the output 109453719b08Smrg # in D'. 10955b944e2aSmrg mkdir conftest.dir 109653719b08Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 109753719b08Smrg # using a relative directory. 109853719b08Smrg cp "$am_depcomp" conftest.dir 109953719b08Smrg cd conftest.dir 110053719b08Smrg # We will build objects and dependencies in a subdirectory because 110153719b08Smrg # it helps to detect inapplicable dependency modes. For instance 110253719b08Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 110353719b08Smrg # side effect of compilation, but ICC will put the dependencies in 110453719b08Smrg # the current directory while Tru64 will put them in the object 110553719b08Smrg # directory. 110653719b08Smrg mkdir sub 1107b1297603Smrg 110853719b08Smrg am_cv_$1_dependencies_compiler_type=none 110953719b08Smrg if test "$am_compiler_list" = ""; then 111053719b08Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 111153719b08Smrg fi 111253719b08Smrg am__universal=false 111353719b08Smrg m4_case([$1], [CC], 111453719b08Smrg [case " $depcc " in #( 111553719b08Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 111653719b08Smrg esac], 111753719b08Smrg [CXX], 111853719b08Smrg [case " $depcc " in #( 111953719b08Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 112053719b08Smrg esac]) 1121b1297603Smrg 112253719b08Smrg for depmode in $am_compiler_list; do 112353719b08Smrg # Setup a source with many dependencies, because some compilers 112453719b08Smrg # like to wrap large dependency lists on column 80 (with \), and 112553719b08Smrg # we should not choose a depcomp mode which is confused by this. 112653719b08Smrg # 112753719b08Smrg # We need to recreate these files for each test, as the compiler may 112853719b08Smrg # overwrite some of them when testing with obscure command lines. 112953719b08Smrg # This happens at least with the AIX C compiler. 113053719b08Smrg : > sub/conftest.c 113153719b08Smrg for i in 1 2 3 4 5 6; do 113253719b08Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 113353719b08Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 113453719b08Smrg # Solaris 8's {/usr,}/bin/sh. 113553719b08Smrg touch sub/conftst$i.h 113653719b08Smrg done 113753719b08Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1138b1297603Smrg 113953719b08Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 114053719b08Smrg # mode. It turns out that the SunPro C++ compiler does not properly 114153719b08Smrg # handle `-M -o', and we need to detect this. Also, some Intel 114253719b08Smrg # versions had trouble with output in subdirs 114353719b08Smrg am__obj=sub/conftest.${OBJEXT-o} 114453719b08Smrg am__minus_obj="-o $am__obj" 114553719b08Smrg case $depmode in 114653719b08Smrg gcc) 114753719b08Smrg # This depmode causes a compiler race in universal mode. 114853719b08Smrg test "$am__universal" = false || continue 114953719b08Smrg ;; 115053719b08Smrg nosideeffect) 115153719b08Smrg # after this tag, mechanisms are not by side-effect, so they'll 115253719b08Smrg # only be used when explicitly requested 115353719b08Smrg if test "x$enable_dependency_tracking" = xyes; then 115453719b08Smrg continue 115553719b08Smrg else 115653719b08Smrg break 115753719b08Smrg fi 115853719b08Smrg ;; 115953719b08Smrg msvisualcpp | msvcmsys) 116053719b08Smrg # This compiler won't grok `-c -o', but also, the minuso test has 116153719b08Smrg # not run yet. These depmodes are late enough in the game, and 116253719b08Smrg # so weak that their functioning should not be impacted. 116353719b08Smrg am__obj=conftest.${OBJEXT-o} 116453719b08Smrg am__minus_obj= 116553719b08Smrg ;; 116653719b08Smrg none) break ;; 116753719b08Smrg esac 116853719b08Smrg if depmode=$depmode \ 116953719b08Smrg source=sub/conftest.c object=$am__obj \ 117053719b08Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 117153719b08Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 117253719b08Smrg >/dev/null 2>conftest.err && 117353719b08Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 117453719b08Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 117553719b08Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 117653719b08Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 117753719b08Smrg # icc doesn't choke on unknown options, it will just issue warnings 117853719b08Smrg # or remarks (even with -Werror). So we grep stderr for any message 117953719b08Smrg # that says an option was ignored or not supported. 118053719b08Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 118153719b08Smrg # icc: Command line warning: ignoring option '-M'; no argument required 118253719b08Smrg # The diagnosis changed in icc 8.0: 118353719b08Smrg # icc: Command line remark: option '-MP' not supported 118453719b08Smrg if (grep 'ignoring option' conftest.err || 118553719b08Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 118653719b08Smrg am_cv_$1_dependencies_compiler_type=$depmode 118753719b08Smrg break 118853719b08Smrg fi 118953719b08Smrg fi 119053719b08Smrg done 1191b1297603Smrg 119253719b08Smrg cd .. 119353719b08Smrg rm -rf conftest.dir 11945b944e2aSmrgelse 119553719b08Smrg am_cv_$1_dependencies_compiler_type=none 11965b944e2aSmrgfi 119753719b08Smrg]) 119853719b08SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 119953719b08SmrgAM_CONDITIONAL([am__fastdep$1], [ 120053719b08Smrg test "x$enable_dependency_tracking" != xno \ 120153719b08Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 120253719b08Smrg]) 1203b1297603Smrg 1204b1297603Smrg 120553719b08Smrg# AM_SET_DEPDIR 120653719b08Smrg# ------------- 120753719b08Smrg# Choose a directory name for dependency files. 120853719b08Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 120953719b08SmrgAC_DEFUN([AM_SET_DEPDIR], 121053719b08Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 121153719b08SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 121253719b08Smrg]) 1213b1297603Smrg 1214b1297603Smrg 121553719b08Smrg# AM_DEP_TRACK 121653719b08Smrg# ------------ 121753719b08SmrgAC_DEFUN([AM_DEP_TRACK], 121853719b08Smrg[AC_ARG_ENABLE(dependency-tracking, 121953719b08Smrg[ --disable-dependency-tracking speeds up one-time build 122053719b08Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 122153719b08Smrgif test "x$enable_dependency_tracking" != xno; then 122253719b08Smrg am_depcomp="$ac_aux_dir/depcomp" 122353719b08Smrg AMDEPBACKSLASH='\' 12245b944e2aSmrgfi 122553719b08SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 122653719b08SmrgAC_SUBST([AMDEPBACKSLASH])dnl 122753719b08Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 122853719b08Smrg]) 1229b1297603Smrg 123053719b08Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1231b1297603Smrg 123253719b08Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 123353719b08Smrg# Free Software Foundation, Inc. 123453719b08Smrg# 123553719b08Smrg# This file is free software; the Free Software Foundation 123653719b08Smrg# gives unlimited permission to copy and/or distribute it, 123753719b08Smrg# with or without modifications, as long as this notice is preserved. 1238b1297603Smrg 123953719b08Smrg#serial 5 1240b1297603Smrg 124153719b08Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 124253719b08Smrg# ------------------------------ 124353719b08SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 124453719b08Smrg[{ 124553719b08Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 124653719b08Smrg # are listed without --file. Let's play safe and only enable the eval 124753719b08Smrg # if we detect the quoting. 124853719b08Smrg case $CONFIG_FILES in 124953719b08Smrg *\'*) eval set x "$CONFIG_FILES" ;; 125053719b08Smrg *) set x $CONFIG_FILES ;; 125153719b08Smrg esac 125253719b08Smrg shift 125353719b08Smrg for mf 125453719b08Smrg do 125553719b08Smrg # Strip MF so we end up with the name of the file. 125653719b08Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 125753719b08Smrg # Check whether this is an Automake generated Makefile or not. 125853719b08Smrg # We used to match only the files named `Makefile.in', but 125953719b08Smrg # some people rename them; so instead we look at the file content. 126053719b08Smrg # Grep'ing the first line is not enough: some people post-process 126153719b08Smrg # each Makefile.in and add a new line on top of each file to say so. 126253719b08Smrg # Grep'ing the whole file is not good either: AIX grep has a line 126353719b08Smrg # limit of 2048, but all sed's we know have understand at least 4000. 126453719b08Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 126553719b08Smrg dirpart=`AS_DIRNAME("$mf")` 126653719b08Smrg else 126753719b08Smrg continue 126853719b08Smrg fi 126953719b08Smrg # Extract the definition of DEPDIR, am__include, and am__quote 127053719b08Smrg # from the Makefile without running `make'. 127153719b08Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 127253719b08Smrg test -z "$DEPDIR" && continue 127353719b08Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 127453719b08Smrg test -z "am__include" && continue 127553719b08Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 127653719b08Smrg # When using ansi2knr, U may be empty or an underscore; expand it 127753719b08Smrg U=`sed -n 's/^U = //p' < "$mf"` 127853719b08Smrg # Find all dependency output files, they are included files with 127953719b08Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 128053719b08Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 128153719b08Smrg # expansion. 128253719b08Smrg for file in `sed -n " 128353719b08Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 128453719b08Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 128553719b08Smrg # Make sure the directory exists. 128653719b08Smrg test -f "$dirpart/$file" && continue 128753719b08Smrg fdir=`AS_DIRNAME(["$file"])` 128853719b08Smrg AS_MKDIR_P([$dirpart/$fdir]) 128953719b08Smrg # echo "creating $dirpart/$file" 129053719b08Smrg echo '# dummy' > "$dirpart/$file" 129153719b08Smrg done 129253719b08Smrg done 129353719b08Smrg} 129453719b08Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1295b1297603Smrg 1296b1297603Smrg 129753719b08Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 129853719b08Smrg# ----------------------------- 129953719b08Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1300b1297603Smrg# 130153719b08Smrg# This code is only required when automatic dependency tracking 130253719b08Smrg# is enabled. FIXME. This creates each `.P' file that we will 130353719b08Smrg# need in order to bootstrap the dependency handling code. 130453719b08SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 130553719b08Smrg[AC_CONFIG_COMMANDS([depfiles], 130653719b08Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 130753719b08Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 130853719b08Smrg]) 1309b1297603Smrg 131053719b08Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 131153719b08Smrg# Free Software Foundation, Inc. 131253719b08Smrg# 131353719b08Smrg# This file is free software; the Free Software Foundation 131453719b08Smrg# gives unlimited permission to copy and/or distribute it, 131553719b08Smrg# with or without modifications, as long as this notice is preserved. 1316b1297603Smrg 131753719b08Smrg# serial 8 1318b1297603Smrg 131953719b08Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 132053719b08SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 1321b1297603Smrg 132253719b08Smrg# Do all the work for Automake. -*- Autoconf -*- 1323b1297603Smrg 132453719b08Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 132553719b08Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 132653719b08Smrg# 132753719b08Smrg# This file is free software; the Free Software Foundation 132853719b08Smrg# gives unlimited permission to copy and/or distribute it, 132953719b08Smrg# with or without modifications, as long as this notice is preserved. 1330b1297603Smrg 133153719b08Smrg# serial 16 1332b1297603Smrg 133353719b08Smrg# This macro actually does too much. Some checks are only needed if 133453719b08Smrg# your package does certain things. But this isn't really a big deal. 1335b1297603Smrg 133653719b08Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 133753719b08Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 133853719b08Smrg# ----------------------------------------------- 133953719b08Smrg# The call with PACKAGE and VERSION arguments is the old style 134053719b08Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 134153719b08Smrg# and VERSION should now be passed to AC_INIT and removed from 134253719b08Smrg# the call to AM_INIT_AUTOMAKE. 134353719b08Smrg# We support both call styles for the transition. After 134453719b08Smrg# the next Automake release, Autoconf can make the AC_INIT 134553719b08Smrg# arguments mandatory, and then we can depend on a new Autoconf 134653719b08Smrg# release and drop the old call support. 134753719b08SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 134853719b08Smrg[AC_PREREQ([2.62])dnl 134953719b08Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 135053719b08Smrgdnl the ones we care about. 135153719b08Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 135253719b08SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 135353719b08SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 135453719b08Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 135553719b08Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 135653719b08Smrg # is not polluted with repeated "-I." 135753719b08Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 135853719b08Smrg # test to see if srcdir already configured 135953719b08Smrg if test -f $srcdir/config.status; then 136053719b08Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 136153719b08Smrg fi 13625b944e2aSmrgfi 1363b1297603Smrg 136453719b08Smrg# test whether we have cygpath 136553719b08Smrgif test -z "$CYGPATH_W"; then 136653719b08Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 136753719b08Smrg CYGPATH_W='cygpath -w' 136853719b08Smrg else 136953719b08Smrg CYGPATH_W=echo 137053719b08Smrg fi 137153719b08Smrgfi 137253719b08SmrgAC_SUBST([CYGPATH_W]) 1373b1297603Smrg 137453719b08Smrg# Define the identity of the package. 137553719b08Smrgdnl Distinguish between old-style and new-style calls. 137653719b08Smrgm4_ifval([$2], 137753719b08Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 137853719b08Smrg AC_SUBST([PACKAGE], [$1])dnl 137953719b08Smrg AC_SUBST([VERSION], [$2])], 138053719b08Smrg[_AM_SET_OPTIONS([$1])dnl 138153719b08Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 138253719b08Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 138353719b08Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 138453719b08Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 138553719b08Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1386b1297603Smrg 138753719b08Smrg_AM_IF_OPTION([no-define],, 138853719b08Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 138953719b08Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1390b1297603Smrg 139153719b08Smrg# Some tools Automake needs. 139253719b08SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 139353719b08SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 139453719b08SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 139553719b08SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 139653719b08SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 139753719b08SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 139853719b08SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 139953719b08SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 140053719b08SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 140153719b08SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 140253719b08Smrg# We need awk for the "check" target. The system "awk" is bad on 140353719b08Smrg# some platforms. 140453719b08SmrgAC_REQUIRE([AC_PROG_AWK])dnl 140553719b08SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 140653719b08SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 140753719b08Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 140853719b08Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 140953719b08Smrg [_AM_PROG_TAR([v7])])]) 141053719b08Smrg_AM_IF_OPTION([no-dependencies],, 141153719b08Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 141253719b08Smrg [_AM_DEPENDENCIES(CC)], 141353719b08Smrg [define([AC_PROG_CC], 141453719b08Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 141553719b08SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 141653719b08Smrg [_AM_DEPENDENCIES(CXX)], 141753719b08Smrg [define([AC_PROG_CXX], 141853719b08Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 141953719b08SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 142053719b08Smrg [_AM_DEPENDENCIES(OBJC)], 142153719b08Smrg [define([AC_PROG_OBJC], 142253719b08Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 142353719b08Smrg]) 142453719b08Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 142553719b08Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 142653719b08Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 142753719b08Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 142853719b08SmrgAC_CONFIG_COMMANDS_PRE(dnl 142953719b08Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 143053719b08Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 143153719b08Smrg]) 1432b1297603Smrg 143353719b08Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 143453719b08Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 143553719b08Smrgdnl mangled by Autoconf and run in a shell conditional statement. 143653719b08Smrgm4_define([_AC_COMPILER_EXEEXT], 143753719b08Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 143853719b08Smrg 143953719b08Smrg 144053719b08Smrg# When config.status generates a header, we must update the stamp-h file. 144153719b08Smrg# This file resides in the same directory as the config header 144253719b08Smrg# that is generated. The stamp files are numbered to have different names. 144353719b08Smrg 144453719b08Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 144553719b08Smrg# loop where config.status creates the headers, so we can generate 144653719b08Smrg# our stamp files there. 144753719b08SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 144853719b08Smrg[# Compute $1's index in $config_headers. 144953719b08Smrg_am_arg=$1 145053719b08Smrg_am_stamp_count=1 145153719b08Smrgfor _am_header in $config_headers :; do 145253719b08Smrg case $_am_header in 145353719b08Smrg $_am_arg | $_am_arg:* ) 145453719b08Smrg break ;; 145553719b08Smrg * ) 145653719b08Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 145753719b08Smrg esac 145853719b08Smrgdone 145953719b08Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 146053719b08Smrg 146153719b08Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 14625b944e2aSmrg# 146353719b08Smrg# This file is free software; the Free Software Foundation 146453719b08Smrg# gives unlimited permission to copy and/or distribute it, 146553719b08Smrg# with or without modifications, as long as this notice is preserved. 146653719b08Smrg 146753719b08Smrg# AM_PROG_INSTALL_SH 146853719b08Smrg# ------------------ 146953719b08Smrg# Define $install_sh. 147053719b08SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 147153719b08Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 147253719b08Smrgif test x"${install_sh}" != xset; then 147353719b08Smrg case $am_aux_dir in 147453719b08Smrg *\ * | *\ *) 147553719b08Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 147653719b08Smrg *) 147753719b08Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 147853719b08Smrg esac 1479b1297603Smrgfi 148053719b08SmrgAC_SUBST(install_sh)]) 1481b1297603Smrg 148253719b08Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 148353719b08Smrg# 148453719b08Smrg# This file is free software; the Free Software Foundation 148553719b08Smrg# gives unlimited permission to copy and/or distribute it, 148653719b08Smrg# with or without modifications, as long as this notice is preserved. 1487b1297603Smrg 148853719b08Smrg# serial 2 1489b1297603Smrg 149053719b08Smrg# Check whether the underlying file-system supports filenames 149153719b08Smrg# with a leading dot. For instance MS-DOS doesn't. 149253719b08SmrgAC_DEFUN([AM_SET_LEADING_DOT], 149353719b08Smrg[rm -rf .tst 2>/dev/null 149453719b08Smrgmkdir .tst 2>/dev/null 149553719b08Smrgif test -d .tst; then 149653719b08Smrg am__leading_dot=. 149753719b08Smrgelse 149853719b08Smrg am__leading_dot=_ 1499b1297603Smrgfi 150053719b08Smrgrmdir .tst 2>/dev/null 150153719b08SmrgAC_SUBST([am__leading_dot])]) 1502b1297603Smrg 150353719b08Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 150453719b08Smrg# From Jim Meyering 1505b1297603Smrg 150653719b08Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 150753719b08Smrg# Free Software Foundation, Inc. 150853719b08Smrg# 150953719b08Smrg# This file is free software; the Free Software Foundation 151053719b08Smrg# gives unlimited permission to copy and/or distribute it, 151153719b08Smrg# with or without modifications, as long as this notice is preserved. 1512b1297603Smrg 151353719b08Smrg# serial 5 1514b1297603Smrg 151553719b08Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 151653719b08Smrg# ---------------------------------- 151753719b08Smrg# Control maintainer-specific portions of Makefiles. 151853719b08Smrg# Default is to disable them, unless `enable' is passed literally. 151953719b08Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 152053719b08Smrg# can override the default with the --enable/--disable switch. 152153719b08SmrgAC_DEFUN([AM_MAINTAINER_MODE], 152253719b08Smrg[m4_case(m4_default([$1], [disable]), 152353719b08Smrg [enable], [m4_define([am_maintainer_other], [disable])], 152453719b08Smrg [disable], [m4_define([am_maintainer_other], [enable])], 152553719b08Smrg [m4_define([am_maintainer_other], [enable]) 152653719b08Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 152753719b08SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 152853719b08Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 152953719b08Smrg AC_ARG_ENABLE([maintainer-mode], 153053719b08Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 153153719b08Smrg (and sometimes confusing) to the casual installer], 153253719b08Smrg [USE_MAINTAINER_MODE=$enableval], 153353719b08Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 153453719b08Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 153553719b08Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 153653719b08Smrg MAINT=$MAINTAINER_MODE_TRUE 153753719b08Smrg AC_SUBST([MAINT])dnl 153853719b08Smrg] 153953719b08Smrg) 1540b1297603Smrg 154153719b08SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1542b1297603Smrg 154353719b08Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 154453719b08Smrg 154553719b08Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 15465b944e2aSmrg# 154753719b08Smrg# This file is free software; the Free Software Foundation 154853719b08Smrg# gives unlimited permission to copy and/or distribute it, 154953719b08Smrg# with or without modifications, as long as this notice is preserved. 1550b1297603Smrg 155153719b08Smrg# serial 4 155253719b08Smrg 155353719b08Smrg# AM_MAKE_INCLUDE() 155453719b08Smrg# ----------------- 155553719b08Smrg# Check to see how make treats includes. 155653719b08SmrgAC_DEFUN([AM_MAKE_INCLUDE], 155753719b08Smrg[am_make=${MAKE-make} 155853719b08Smrgcat > confinc << 'END' 155953719b08Smrgam__doit: 156053719b08Smrg @echo this is the am__doit target 156153719b08Smrg.PHONY: am__doit 156253719b08SmrgEND 156353719b08Smrg# If we don't find an include directive, just comment out the code. 156453719b08SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 156553719b08Smrgam__include="#" 156653719b08Smrgam__quote= 156753719b08Smrg_am_result=none 156853719b08Smrg# First try GNU make style include. 156953719b08Smrgecho "include confinc" > confmf 157053719b08Smrg# Ignore all kinds of additional output from `make'. 157153719b08Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 157253719b08Smrg*the\ am__doit\ target*) 157353719b08Smrg am__include=include 157453719b08Smrg am__quote= 157553719b08Smrg _am_result=GNU 157653719b08Smrg ;; 157753719b08Smrgesac 157853719b08Smrg# Now try BSD make style include. 157953719b08Smrgif test "$am__include" = "#"; then 158053719b08Smrg echo '.include "confinc"' > confmf 158153719b08Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 158253719b08Smrg *the\ am__doit\ target*) 158353719b08Smrg am__include=.include 158453719b08Smrg am__quote="\"" 158553719b08Smrg _am_result=BSD 158653719b08Smrg ;; 158753719b08Smrg esac 15885b944e2aSmrgfi 158953719b08SmrgAC_SUBST([am__include]) 159053719b08SmrgAC_SUBST([am__quote]) 159153719b08SmrgAC_MSG_RESULT([$_am_result]) 159253719b08Smrgrm -f confinc confmf 159353719b08Smrg]) 1594b1297603Smrg 159553719b08Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 159653719b08Smrg 159753719b08Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 159853719b08Smrg# Free Software Foundation, Inc. 159953719b08Smrg# 160053719b08Smrg# This file is free software; the Free Software Foundation 160153719b08Smrg# gives unlimited permission to copy and/or distribute it, 160253719b08Smrg# with or without modifications, as long as this notice is preserved. 160353719b08Smrg 160453719b08Smrg# serial 6 160553719b08Smrg 160653719b08Smrg# AM_MISSING_PROG(NAME, PROGRAM) 160753719b08Smrg# ------------------------------ 160853719b08SmrgAC_DEFUN([AM_MISSING_PROG], 160953719b08Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 161053719b08Smrg$1=${$1-"${am_missing_run}$2"} 161153719b08SmrgAC_SUBST($1)]) 161253719b08Smrg 161353719b08Smrg 161453719b08Smrg# AM_MISSING_HAS_RUN 161553719b08Smrg# ------------------ 161653719b08Smrg# Define MISSING if not defined so far and test if it supports --run. 161753719b08Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 161853719b08SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 161953719b08Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 162053719b08SmrgAC_REQUIRE_AUX_FILE([missing])dnl 162153719b08Smrgif test x"${MISSING+set}" != xset; then 162253719b08Smrg case $am_aux_dir in 162353719b08Smrg *\ * | *\ *) 162453719b08Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 162553719b08Smrg *) 162653719b08Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 162753719b08Smrg esac 162853719b08Smrgfi 162953719b08Smrg# Use eval to expand $SHELL 163053719b08Smrgif eval "$MISSING --run true"; then 163153719b08Smrg am_missing_run="$MISSING --run " 16325b944e2aSmrgelse 163353719b08Smrg am_missing_run= 163453719b08Smrg AC_MSG_WARN([`missing' script is too old or missing]) 16355b944e2aSmrgfi 163653719b08Smrg]) 1637b1297603Smrg 163853719b08Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 163953719b08Smrg# 164053719b08Smrg# This file is free software; the Free Software Foundation 164153719b08Smrg# gives unlimited permission to copy and/or distribute it, 164253719b08Smrg# with or without modifications, as long as this notice is preserved. 1643b1297603Smrg 164453719b08Smrg# AM_PROG_MKDIR_P 164553719b08Smrg# --------------- 164653719b08Smrg# Check for `mkdir -p'. 164753719b08SmrgAC_DEFUN([AM_PROG_MKDIR_P], 164853719b08Smrg[AC_PREREQ([2.60])dnl 164953719b08SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 165053719b08Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 165153719b08Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 165253719b08Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 165353719b08Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 165453719b08Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 165553719b08Smrgdnl adjustment using top_builddir (which is defined more often than 165653719b08Smrgdnl MKDIR_P). 165753719b08SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 165853719b08Smrgcase $mkdir_p in 165953719b08Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 166053719b08Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 166153719b08Smrgesac 166253719b08Smrg]) 166353719b08Smrg 166453719b08Smrg# Helper functions for option handling. -*- Autoconf -*- 166553719b08Smrg 166653719b08Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 1667b1297603Smrg# 166853719b08Smrg# This file is free software; the Free Software Foundation 166953719b08Smrg# gives unlimited permission to copy and/or distribute it, 167053719b08Smrg# with or without modifications, as long as this notice is preserved. 167153719b08Smrg 167253719b08Smrg# serial 4 167353719b08Smrg 167453719b08Smrg# _AM_MANGLE_OPTION(NAME) 167553719b08Smrg# ----------------------- 167653719b08SmrgAC_DEFUN([_AM_MANGLE_OPTION], 167753719b08Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 167853719b08Smrg 167953719b08Smrg# _AM_SET_OPTION(NAME) 168053719b08Smrg# ------------------------------ 168153719b08Smrg# Set option NAME. Presently that only means defining a flag for this option. 168253719b08SmrgAC_DEFUN([_AM_SET_OPTION], 168353719b08Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 168453719b08Smrg 168553719b08Smrg# _AM_SET_OPTIONS(OPTIONS) 168653719b08Smrg# ---------------------------------- 168753719b08Smrg# OPTIONS is a space-separated list of Automake options. 168853719b08SmrgAC_DEFUN([_AM_SET_OPTIONS], 168953719b08Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 169053719b08Smrg 169153719b08Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 169253719b08Smrg# ------------------------------------------- 169353719b08Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 169453719b08SmrgAC_DEFUN([_AM_IF_OPTION], 169553719b08Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 169653719b08Smrg 169753719b08Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 169853719b08Smrg 169953719b08Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 170053719b08Smrg# Free Software Foundation, Inc. 17015b944e2aSmrg# 170253719b08Smrg# This file is free software; the Free Software Foundation 170353719b08Smrg# gives unlimited permission to copy and/or distribute it, 170453719b08Smrg# with or without modifications, as long as this notice is preserved. 1705b1297603Smrg 170653719b08Smrg# serial 5 170753719b08Smrg 170853719b08Smrg# AM_SANITY_CHECK 170953719b08Smrg# --------------- 171053719b08SmrgAC_DEFUN([AM_SANITY_CHECK], 171153719b08Smrg[AC_MSG_CHECKING([whether build environment is sane]) 171253719b08Smrg# Just in case 171353719b08Smrgsleep 1 171453719b08Smrgecho timestamp > conftest.file 171553719b08Smrg# Reject unsafe characters in $srcdir or the absolute working directory 171653719b08Smrg# name. Accept space and tab only in the latter. 171753719b08Smrgam_lf=' 171853719b08Smrg' 171953719b08Smrgcase `pwd` in 172053719b08Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 172153719b08Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 172253719b08Smrgesac 172353719b08Smrgcase $srcdir in 172453719b08Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 172553719b08Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 172653719b08Smrgesac 172753719b08Smrg 172853719b08Smrg# Do `set' in a subshell so we don't clobber the current shell's 172953719b08Smrg# arguments. Must try -L first in case configure is actually a 173053719b08Smrg# symlink; some systems play weird games with the mod time of symlinks 173153719b08Smrg# (eg FreeBSD returns the mod time of the symlink's containing 173253719b08Smrg# directory). 173353719b08Smrgif ( 173453719b08Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 173553719b08Smrg if test "$[*]" = "X"; then 173653719b08Smrg # -L didn't work. 173753719b08Smrg set X `ls -t "$srcdir/configure" conftest.file` 173853719b08Smrg fi 173953719b08Smrg rm -f conftest.file 174053719b08Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 174153719b08Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 174253719b08Smrg 174353719b08Smrg # If neither matched, then we have a broken ls. This can happen 174453719b08Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 174553719b08Smrg # broken ls alias from the environment. This has actually 174653719b08Smrg # happened. Such a system could not be considered "sane". 174753719b08Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 174853719b08Smrgalias in your environment]) 174953719b08Smrg fi 175053719b08Smrg 175153719b08Smrg test "$[2]" = conftest.file 175253719b08Smrg ) 175353719b08Smrgthen 175453719b08Smrg # Ok. 175553719b08Smrg : 1756b1297603Smrgelse 175753719b08Smrg AC_MSG_ERROR([newly created file is older than distributed files! 175853719b08SmrgCheck your system clock]) 1759b1297603Smrgfi 176053719b08SmrgAC_MSG_RESULT(yes)]) 1761b1297603Smrg 176253719b08Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 176353719b08Smrg# 176453719b08Smrg# This file is free software; the Free Software Foundation 176553719b08Smrg# gives unlimited permission to copy and/or distribute it, 176653719b08Smrg# with or without modifications, as long as this notice is preserved. 17675b944e2aSmrg 176853719b08Smrg# serial 1 17695b944e2aSmrg 177053719b08Smrg# AM_SILENT_RULES([DEFAULT]) 17715b944e2aSmrg# -------------------------- 177253719b08Smrg# Enable less verbose build rules; with the default set to DEFAULT 177353719b08Smrg# (`yes' being less verbose, `no' or empty being verbose). 177453719b08SmrgAC_DEFUN([AM_SILENT_RULES], 177553719b08Smrg[AC_ARG_ENABLE([silent-rules], 177653719b08Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 177753719b08Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 177853719b08Smrgcase $enable_silent_rules in 177953719b08Smrgyes) AM_DEFAULT_VERBOSITY=0;; 178053719b08Smrgno) AM_DEFAULT_VERBOSITY=1;; 178153719b08Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 178253719b08Smrgesac 178353719b08SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 178453719b08SmrgAM_BACKSLASH='\' 178553719b08SmrgAC_SUBST([AM_BACKSLASH])dnl 178653719b08Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 178753719b08Smrg]) 178853719b08Smrg 178953719b08Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1790b1297603Smrg# 179153719b08Smrg# This file is free software; the Free Software Foundation 179253719b08Smrg# gives unlimited permission to copy and/or distribute it, 179353719b08Smrg# with or without modifications, as long as this notice is preserved. 1794b1297603Smrg 179553719b08Smrg# AM_PROG_INSTALL_STRIP 179653719b08Smrg# --------------------- 179753719b08Smrg# One issue with vendor `install' (even GNU) is that you can't 179853719b08Smrg# specify the program used to strip binaries. This is especially 179953719b08Smrg# annoying in cross-compiling environments, where the build's strip 180053719b08Smrg# is unlikely to handle the host's binaries. 180153719b08Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 180253719b08Smrg# always use install-sh in `make install-strip', and initialize 180353719b08Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 180453719b08SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 180553719b08Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 180653719b08Smrg# Installed binaries are usually stripped using `strip' when the user 180753719b08Smrg# run `make install-strip'. However `strip' might not be the right 180853719b08Smrg# tool to use in cross-compilation environments, therefore Automake 180953719b08Smrg# will honor the `STRIP' environment variable to overrule this program. 181053719b08Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 181153719b08Smrgif test "$cross_compiling" != no; then 181253719b08Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1813b1297603Smrgfi 181453719b08SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 181553719b08SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1816b1297603Smrg 181753719b08Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 18185b944e2aSmrg# 181953719b08Smrg# This file is free software; the Free Software Foundation 182053719b08Smrg# gives unlimited permission to copy and/or distribute it, 182153719b08Smrg# with or without modifications, as long as this notice is preserved. 1822b1297603Smrg 182353719b08Smrg# serial 2 18245b944e2aSmrg 182553719b08Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 182653719b08Smrg# --------------------------- 182753719b08Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 182853719b08Smrg# This macro is traced by Automake. 182953719b08SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 183053719b08Smrg 183153719b08Smrg# AM_SUBST_NOTMAKE(VARIABLE) 183253719b08Smrg# --------------------------- 183353719b08Smrg# Public sister of _AM_SUBST_NOTMAKE. 183453719b08SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 183553719b08Smrg 183653719b08Smrg# Check how to create a tarball. -*- Autoconf -*- 183753719b08Smrg 183853719b08Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1839b1297603Smrg# 184053719b08Smrg# This file is free software; the Free Software Foundation 184153719b08Smrg# gives unlimited permission to copy and/or distribute it, 184253719b08Smrg# with or without modifications, as long as this notice is preserved. 184353719b08Smrg 184453719b08Smrg# serial 2 184553719b08Smrg 184653719b08Smrg# _AM_PROG_TAR(FORMAT) 184753719b08Smrg# -------------------- 184853719b08Smrg# Check how to create a tarball in format FORMAT. 184953719b08Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 1850b1297603Smrg# 185153719b08Smrg# Substitute a variable $(am__tar) that is a command 185253719b08Smrg# writing to stdout a FORMAT-tarball containing the directory 185353719b08Smrg# $tardir. 185453719b08Smrg# tardir=directory && $(am__tar) > result.tar 1855d3263506Smrg# 185653719b08Smrg# Substitute a variable $(am__untar) that extract such 185753719b08Smrg# a tarball read from stdin. 185853719b08Smrg# $(am__untar) < result.tar 185953719b08SmrgAC_DEFUN([_AM_PROG_TAR], 186053719b08Smrg[# Always define AMTAR for backward compatibility. 186153719b08SmrgAM_MISSING_PROG([AMTAR], [tar]) 186253719b08Smrgm4_if([$1], [v7], 186353719b08Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 186453719b08Smrg [m4_case([$1], [ustar],, [pax],, 186553719b08Smrg [m4_fatal([Unknown tar format])]) 186653719b08SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 186753719b08Smrg# Loop over all known methods to create a tar archive until one works. 186853719b08Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 186953719b08Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 187053719b08Smrg# Do not fold the above two line into one, because Tru64 sh and 187153719b08Smrg# Solaris sh will not grok spaces in the rhs of `-'. 187253719b08Smrgfor _am_tool in $_am_tools 187353719b08Smrgdo 187453719b08Smrg case $_am_tool in 187553719b08Smrg gnutar) 187653719b08Smrg for _am_tar in tar gnutar gtar; 187753719b08Smrg do 187853719b08Smrg AM_RUN_LOG([$_am_tar --version]) && break 187953719b08Smrg done 188053719b08Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 188153719b08Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 188253719b08Smrg am__untar="$_am_tar -xf -" 188353719b08Smrg ;; 188453719b08Smrg plaintar) 188553719b08Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 188653719b08Smrg # ustar tarball either. 188753719b08Smrg (tar --version) >/dev/null 2>&1 && continue 188853719b08Smrg am__tar='tar chf - "$$tardir"' 188953719b08Smrg am__tar_='tar chf - "$tardir"' 189053719b08Smrg am__untar='tar xf -' 189153719b08Smrg ;; 189253719b08Smrg pax) 189353719b08Smrg am__tar='pax -L -x $1 -w "$$tardir"' 189453719b08Smrg am__tar_='pax -L -x $1 -w "$tardir"' 189553719b08Smrg am__untar='pax -r' 189653719b08Smrg ;; 189753719b08Smrg cpio) 189853719b08Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 189953719b08Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 190053719b08Smrg am__untar='cpio -i -H $1 -d' 190153719b08Smrg ;; 190253719b08Smrg none) 190353719b08Smrg am__tar=false 190453719b08Smrg am__tar_=false 190553719b08Smrg am__untar=false 190653719b08Smrg ;; 190753719b08Smrg esac 190853719b08Smrg 190953719b08Smrg # If the value was cached, stop now. We just wanted to have am__tar 191053719b08Smrg # and am__untar set. 191153719b08Smrg test -n "${am_cv_prog_tar_$1}" && break 191253719b08Smrg 191353719b08Smrg # tar/untar a dummy directory, and stop if the command works 191453719b08Smrg rm -rf conftest.dir 191553719b08Smrg mkdir conftest.dir 191653719b08Smrg echo GrepMe > conftest.dir/file 191753719b08Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 191853719b08Smrg rm -rf conftest.dir 191953719b08Smrg if test -s conftest.tar; then 192053719b08Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 192153719b08Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 192253719b08Smrg fi 192353719b08Smrgdone 192453719b08Smrgrm -rf conftest.dir 192553719b08Smrg 192653719b08SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 192753719b08SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 192853719b08SmrgAC_SUBST([am__tar]) 192953719b08SmrgAC_SUBST([am__untar]) 193053719b08Smrg]) # _AM_PROG_TAR 1931b1297603Smrg 1932