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