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