aclocal.m4 revision 2ddb6cf1
12ddb6cf1Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2a1d141d5Smrg 32ddb6cf1Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42ddb6cf1Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5a1d141d5Smrg# This file is free software; the Free Software Foundation 6a1d141d5Smrg# gives unlimited permission to copy and/or distribute it, 7a1d141d5Smrg# with or without modifications, as long as this notice is preserved. 8a1d141d5Smrg 9a1d141d5Smrg# This program is distributed in the hope that it will be useful, 10a1d141d5Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a1d141d5Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a1d141d5Smrg# PARTICULAR PURPOSE. 13a1d141d5Smrg 142ddb6cf1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 152ddb6cf1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 162ddb6cf1Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 172ddb6cf1Smrg[m4_warning([this file was generated for autoconf 2.63. 182ddb6cf1SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 192ddb6cf1SmrgIf you have problems, you may need to regenerate the build system entirely. 202ddb6cf1SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21a1d141d5Smrg 222ddb6cf1Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 232ddb6cf1Smrg# 242ddb6cf1Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 252ddb6cf1Smrg# 26a1d141d5Smrg# This program is free software; you can redistribute it and/or modify 27a1d141d5Smrg# it under the terms of the GNU General Public License as published by 282ddb6cf1Smrg# the Free Software Foundation; either version 2 of the License, or 292ddb6cf1Smrg# (at your option) any later version. 302ddb6cf1Smrg# 312ddb6cf1Smrg# This program is distributed in the hope that it will be useful, but 322ddb6cf1Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 332ddb6cf1Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 342ddb6cf1Smrg# General Public License for more details. 352ddb6cf1Smrg# 36a1d141d5Smrg# You should have received a copy of the GNU General Public License 37a1d141d5Smrg# along with this program; if not, write to the Free Software 382ddb6cf1Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 392ddb6cf1Smrg# 402ddb6cf1Smrg# As a special exception to the GNU General Public License, if you 412ddb6cf1Smrg# distribute this file as part of a program that contains a 422ddb6cf1Smrg# configuration script generated by Autoconf, you may include it under 432ddb6cf1Smrg# the same distribution terms that you use for the rest of that program. 44a1d141d5Smrg 452ddb6cf1Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 462ddb6cf1Smrg# ---------------------------------- 472ddb6cf1SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 482ddb6cf1Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 492ddb6cf1Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 502ddb6cf1SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 512ddb6cf1Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 522ddb6cf1Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 53a1d141d5Smrgfi 542ddb6cf1Smrgif test -n "$PKG_CONFIG"; then 552ddb6cf1Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 562ddb6cf1Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 572ddb6cf1Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 582ddb6cf1Smrg AC_MSG_RESULT([yes]) 592ddb6cf1Smrg else 602ddb6cf1Smrg AC_MSG_RESULT([no]) 612ddb6cf1Smrg PKG_CONFIG="" 622ddb6cf1Smrg fi 632ddb6cf1Smrg 642ddb6cf1Smrgfi[]dnl 652ddb6cf1Smrg])# PKG_PROG_PKG_CONFIG 66a1d141d5Smrg 672ddb6cf1Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 682ddb6cf1Smrg# 692ddb6cf1Smrg# Check to see whether a particular set of modules exists. Similar 702ddb6cf1Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 712ddb6cf1Smrg# 722ddb6cf1Smrg# 732ddb6cf1Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 742ddb6cf1Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 752ddb6cf1Smrg# PKG_CHECK_EXISTS manually 762ddb6cf1Smrg# -------------------------------------------------------------- 772ddb6cf1SmrgAC_DEFUN([PKG_CHECK_EXISTS], 782ddb6cf1Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 792ddb6cf1Smrgif test -n "$PKG_CONFIG" && \ 802ddb6cf1Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 812ddb6cf1Smrg m4_ifval([$2], [$2], [:]) 822ddb6cf1Smrgm4_ifvaln([$3], [else 832ddb6cf1Smrg $3])dnl 842ddb6cf1Smrgfi]) 85a1d141d5Smrg 86a1d141d5Smrg 872ddb6cf1Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 882ddb6cf1Smrg# --------------------------------------------- 892ddb6cf1Smrgm4_define([_PKG_CONFIG], 902ddb6cf1Smrg[if test -n "$$1"; then 912ddb6cf1Smrg pkg_cv_[]$1="$$1" 922ddb6cf1Smrg elif test -n "$PKG_CONFIG"; then 932ddb6cf1Smrg PKG_CHECK_EXISTS([$3], 942ddb6cf1Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 952ddb6cf1Smrg [pkg_failed=yes]) 962ddb6cf1Smrg else 972ddb6cf1Smrg pkg_failed=untried 982ddb6cf1Smrgfi[]dnl 992ddb6cf1Smrg])# _PKG_CONFIG 100a1d141d5Smrg 1012ddb6cf1Smrg# _PKG_SHORT_ERRORS_SUPPORTED 1022ddb6cf1Smrg# ----------------------------- 1032ddb6cf1SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1042ddb6cf1Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1052ddb6cf1Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1062ddb6cf1Smrg _pkg_short_errors_supported=yes 1072ddb6cf1Smrgelse 1082ddb6cf1Smrg _pkg_short_errors_supported=no 1092ddb6cf1Smrgfi[]dnl 1102ddb6cf1Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 111a1d141d5Smrg 112a1d141d5Smrg 1132ddb6cf1Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1142ddb6cf1Smrg# [ACTION-IF-NOT-FOUND]) 1152ddb6cf1Smrg# 1162ddb6cf1Smrg# 1172ddb6cf1Smrg# Note that if there is a possibility the first call to 1182ddb6cf1Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1192ddb6cf1Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1202ddb6cf1Smrg# 1212ddb6cf1Smrg# 1222ddb6cf1Smrg# -------------------------------------------------------------- 1232ddb6cf1SmrgAC_DEFUN([PKG_CHECK_MODULES], 1242ddb6cf1Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1252ddb6cf1SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1262ddb6cf1SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 127a1d141d5Smrg 1282ddb6cf1Smrgpkg_failed=no 1292ddb6cf1SmrgAC_MSG_CHECKING([for $1]) 130a1d141d5Smrg 1312ddb6cf1Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1322ddb6cf1Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 133a1d141d5Smrg 1342ddb6cf1Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1352ddb6cf1Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1362ddb6cf1SmrgSee the pkg-config man page for more details.]) 137a1d141d5Smrg 1382ddb6cf1Smrgif test $pkg_failed = yes; then 1392ddb6cf1Smrg _PKG_SHORT_ERRORS_SUPPORTED 1402ddb6cf1Smrg if test $_pkg_short_errors_supported = yes; then 1412ddb6cf1Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1422ddb6cf1Smrg else 1432ddb6cf1Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1442ddb6cf1Smrg fi 1452ddb6cf1Smrg # Put the nasty error message in config.log where it belongs 1462ddb6cf1Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 147a1d141d5Smrg 1482ddb6cf1Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 1492ddb6cf1Smrg[Package requirements ($2) were not met: 150a1d141d5Smrg 1512ddb6cf1Smrg$$1_PKG_ERRORS 152a1d141d5Smrg 1532ddb6cf1SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1542ddb6cf1Smrginstalled software in a non-standard prefix. 155a1d141d5Smrg 1562ddb6cf1Smrg_PKG_TEXT 1572ddb6cf1Smrg])], 1582ddb6cf1Smrg [AC_MSG_RESULT([no]) 1592ddb6cf1Smrg $4]) 1602ddb6cf1Smrgelif test $pkg_failed = untried; then 1612ddb6cf1Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 1622ddb6cf1Smrg[The pkg-config script could not be found or is too old. Make sure it 1632ddb6cf1Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1642ddb6cf1Smrgpath to pkg-config. 165a1d141d5Smrg 1662ddb6cf1Smrg_PKG_TEXT 167a1d141d5Smrg 1682ddb6cf1SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 1692ddb6cf1Smrg [$4]) 1702ddb6cf1Smrgelse 1712ddb6cf1Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1722ddb6cf1Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1732ddb6cf1Smrg AC_MSG_RESULT([yes]) 1742ddb6cf1Smrg ifelse([$3], , :, [$3]) 1752ddb6cf1Smrgfi[]dnl 1762ddb6cf1Smrg])# PKG_CHECK_MODULES 177a1d141d5Smrg 1782ddb6cf1Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1792ddb6cf1Smrgdnl 1802ddb6cf1Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1812ddb6cf1Smrgdnl 1822ddb6cf1Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1832ddb6cf1Smrgdnl copy of this software and associated documentation files (the 1842ddb6cf1Smrgdnl "Software"), to deal in the Software without restriction, including 1852ddb6cf1Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 1862ddb6cf1Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 1872ddb6cf1Smrgdnl to whom the Software is furnished to do so, provided that the above 1882ddb6cf1Smrgdnl copyright notice(s) and this permission notice appear in all copies of 1892ddb6cf1Smrgdnl the Software and that both the above copyright notice(s) and this 1902ddb6cf1Smrgdnl permission notice appear in supporting documentation. 1912ddb6cf1Smrgdnl 1922ddb6cf1Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1932ddb6cf1Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1942ddb6cf1Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 1952ddb6cf1Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1962ddb6cf1Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 1972ddb6cf1Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 1982ddb6cf1Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 1992ddb6cf1Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 2002ddb6cf1Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 2012ddb6cf1Smrgdnl 2022ddb6cf1Smrgdnl Except as contained in this notice, the name of a copyright holder 2032ddb6cf1Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 2042ddb6cf1Smrgdnl or other dealings in this Software without prior written authorization 2052ddb6cf1Smrgdnl of the copyright holder. 206a1d141d5Smrg 2072ddb6cf1Smrg# XORG_MACROS_VERSION(required-version) 2082ddb6cf1Smrg# ------------------------------------- 2092ddb6cf1Smrg# Minimum version: 1.1.0 210a1d141d5Smrg# 2112ddb6cf1Smrg# If you're using a macro added in Version 1.1 or newer, include this in 2122ddb6cf1Smrg# your configure.ac with the minimum required version, such as: 2132ddb6cf1Smrg# XORG_MACROS_VERSION(1.1) 214a1d141d5Smrg# 2152ddb6cf1Smrg# To ensure that this macro is defined, also add: 2162ddb6cf1Smrg# m4_ifndef([XORG_MACROS_VERSION], 2172ddb6cf1Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 2182ddb6cf1Smrg# 2192ddb6cf1Smrg# 2202ddb6cf1Smrg# See the "minimum version" comment for each macro you use to see what 2212ddb6cf1Smrg# version you require. 2222ddb6cf1Smrgm4_defun([XORG_MACROS_VERSION],[ 2232ddb6cf1Smrgm4_define([vers_have], [1.3.0]) 2242ddb6cf1Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 2252ddb6cf1Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 2262ddb6cf1Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 2272ddb6cf1Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 2282ddb6cf1Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 2292ddb6cf1Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 2302ddb6cf1Smrgm4_undefine([vers_have]) 2312ddb6cf1Smrgm4_undefine([maj_have]) 2322ddb6cf1Smrgm4_undefine([maj_needed]) 2332ddb6cf1Smrg]) # XORG_MACROS_VERSION 234a1d141d5Smrg 2352ddb6cf1Smrg# XORG_PROG_RAWCPP() 2362ddb6cf1Smrg# ------------------ 2372ddb6cf1Smrg# Minimum version: 1.0.0 2382ddb6cf1Smrg# 2392ddb6cf1Smrg# Find cpp program and necessary flags for use in pre-processing text files 2402ddb6cf1Smrg# such as man pages and config files 2412ddb6cf1SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 2422ddb6cf1SmrgAC_REQUIRE([AC_PROG_CPP]) 2432ddb6cf1SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 2442ddb6cf1Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 245a1d141d5Smrg 2462ddb6cf1Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 2472ddb6cf1Smrg# which is not the best choice for supporting other OS'es, but covers most 2482ddb6cf1Smrg# of the ones we need for now. 2492ddb6cf1SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 2502ddb6cf1SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 2512ddb6cf1Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 2522ddb6cf1Smrg AC_MSG_RESULT([no]) 2532ddb6cf1Smrgelse 2542ddb6cf1Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 2552ddb6cf1Smrg RAWCPPFLAGS=-undef 2562ddb6cf1Smrg AC_MSG_RESULT([yes]) 2572ddb6cf1Smrg # under Cygwin unix is still defined even with -undef 2582ddb6cf1Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 2592ddb6cf1Smrg RAWCPPFLAGS="-undef -ansi" 2602ddb6cf1Smrg AC_MSG_RESULT([yes, with -ansi]) 2612ddb6cf1Smrg else 2622ddb6cf1Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 2632ddb6cf1Smrg fi 2642ddb6cf1Smrgfi 2652ddb6cf1Smrgrm -f conftest.$ac_ext 266a1d141d5Smrg 2672ddb6cf1SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 2682ddb6cf1SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 2692ddb6cf1Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 2702ddb6cf1Smrg AC_MSG_RESULT([no]) 2712ddb6cf1Smrgelse 2722ddb6cf1Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 2732ddb6cf1Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 2742ddb6cf1Smrg AC_MSG_RESULT([yes]) 2752ddb6cf1Smrg else 2762ddb6cf1Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 2772ddb6cf1Smrg fi 2782ddb6cf1Smrgfi 2792ddb6cf1Smrgrm -f conftest.$ac_ext 2802ddb6cf1SmrgAC_SUBST(RAWCPPFLAGS) 2812ddb6cf1Smrg]) # XORG_PROG_RAWCPP 282a1d141d5Smrg 2832ddb6cf1Smrg# XORG_MANPAGE_SECTIONS() 2842ddb6cf1Smrg# ----------------------- 2852ddb6cf1Smrg# Minimum version: 1.0.0 2862ddb6cf1Smrg# 2872ddb6cf1Smrg# Determine which sections man pages go in for the different man page types 2882ddb6cf1Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 2892ddb6cf1Smrg# Not sure if there's any better way than just hardcoding by OS name. 2902ddb6cf1Smrg# Override default settings by setting environment variables 291a1d141d5Smrg 2922ddb6cf1SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 2932ddb6cf1SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 294a1d141d5Smrg 2952ddb6cf1Smrgif test x$APP_MAN_SUFFIX = x ; then 2962ddb6cf1Smrg APP_MAN_SUFFIX=1 2972ddb6cf1Smrgfi 2982ddb6cf1Smrgif test x$APP_MAN_DIR = x ; then 2992ddb6cf1Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 300a1d141d5Smrgfi 301a1d141d5Smrg 3022ddb6cf1Smrgif test x$LIB_MAN_SUFFIX = x ; then 3032ddb6cf1Smrg LIB_MAN_SUFFIX=3 3042ddb6cf1Smrgfi 3052ddb6cf1Smrgif test x$LIB_MAN_DIR = x ; then 3062ddb6cf1Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 3072ddb6cf1Smrgfi 308a1d141d5Smrg 3092ddb6cf1Smrgif test x$FILE_MAN_SUFFIX = x ; then 3102ddb6cf1Smrg case $host_os in 3112ddb6cf1Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 3122ddb6cf1Smrg *) FILE_MAN_SUFFIX=5 ;; 3132ddb6cf1Smrg esac 3142ddb6cf1Smrgfi 3152ddb6cf1Smrgif test x$FILE_MAN_DIR = x ; then 3162ddb6cf1Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 3172ddb6cf1Smrgfi 318a1d141d5Smrg 3192ddb6cf1Smrgif test x$MISC_MAN_SUFFIX = x ; then 3202ddb6cf1Smrg case $host_os in 3212ddb6cf1Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 3222ddb6cf1Smrg *) MISC_MAN_SUFFIX=7 ;; 3232ddb6cf1Smrg esac 3242ddb6cf1Smrgfi 3252ddb6cf1Smrgif test x$MISC_MAN_DIR = x ; then 3262ddb6cf1Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 3272ddb6cf1Smrgfi 328a1d141d5Smrg 3292ddb6cf1Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 3302ddb6cf1Smrg case $host_os in 3312ddb6cf1Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 3322ddb6cf1Smrg *) DRIVER_MAN_SUFFIX=4 ;; 3332ddb6cf1Smrg esac 3342ddb6cf1Smrgfi 3352ddb6cf1Smrgif test x$DRIVER_MAN_DIR = x ; then 3362ddb6cf1Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 3372ddb6cf1Smrgfi 338a1d141d5Smrg 3392ddb6cf1Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 3402ddb6cf1Smrg case $host_os in 3412ddb6cf1Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 3422ddb6cf1Smrg *) ADMIN_MAN_SUFFIX=8 ;; 3432ddb6cf1Smrg esac 3442ddb6cf1Smrgfi 3452ddb6cf1Smrgif test x$ADMIN_MAN_DIR = x ; then 3462ddb6cf1Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 3472ddb6cf1Smrgfi 348a1d141d5Smrg 349a1d141d5Smrg 3502ddb6cf1SmrgAC_SUBST([APP_MAN_SUFFIX]) 3512ddb6cf1SmrgAC_SUBST([LIB_MAN_SUFFIX]) 3522ddb6cf1SmrgAC_SUBST([FILE_MAN_SUFFIX]) 3532ddb6cf1SmrgAC_SUBST([MISC_MAN_SUFFIX]) 3542ddb6cf1SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 3552ddb6cf1SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 3562ddb6cf1SmrgAC_SUBST([APP_MAN_DIR]) 3572ddb6cf1SmrgAC_SUBST([LIB_MAN_DIR]) 3582ddb6cf1SmrgAC_SUBST([FILE_MAN_DIR]) 3592ddb6cf1SmrgAC_SUBST([MISC_MAN_DIR]) 3602ddb6cf1SmrgAC_SUBST([DRIVER_MAN_DIR]) 3612ddb6cf1SmrgAC_SUBST([ADMIN_MAN_DIR]) 3622ddb6cf1Smrg]) # XORG_MANPAGE_SECTIONS 363a1d141d5Smrg 3642ddb6cf1Smrg# XORG_CHECK_LINUXDOC 3652ddb6cf1Smrg# ------------------- 3662ddb6cf1Smrg# Minimum version: 1.0.0 3672ddb6cf1Smrg# 3682ddb6cf1Smrg# Defines the variable MAKE_TEXT if the necessary tools and 3692ddb6cf1Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 3702ddb6cf1Smrg# Whether or not the necessary tools and files are found can be checked 3712ddb6cf1Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 3722ddb6cf1SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 3732ddb6cf1Smrgif test x$XORG_SGML_PATH = x ; then 3742ddb6cf1Smrg XORG_SGML_PATH=$prefix/share/sgml 3752ddb6cf1Smrgfi 3762ddb6cf1SmrgHAVE_DEFS_ENT= 377a1d141d5Smrg 3782ddb6cf1Smrgif test x"$cross_compiling" = x"yes" ; then 3792ddb6cf1Smrg HAVE_DEFS_ENT=no 380a1d141d5Smrgelse 3812ddb6cf1Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 382a1d141d5Smrgfi 383a1d141d5Smrg 3842ddb6cf1SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 3852ddb6cf1SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 386a1d141d5Smrg 3872ddb6cf1SmrgAC_MSG_CHECKING([Whether to build documentation]) 388a1d141d5Smrg 3892ddb6cf1Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 3902ddb6cf1Smrg BUILDDOC=yes 3912ddb6cf1Smrgelse 3922ddb6cf1Smrg BUILDDOC=no 3932ddb6cf1Smrgfi 394a1d141d5Smrg 3952ddb6cf1SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 396a1d141d5Smrg 3972ddb6cf1SmrgAC_MSG_RESULT([$BUILDDOC]) 398a1d141d5Smrg 3992ddb6cf1SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 400a1d141d5Smrg 4012ddb6cf1Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 4022ddb6cf1Smrg BUILDPDFDOC=yes 4032ddb6cf1Smrgelse 4042ddb6cf1Smrg BUILDPDFDOC=no 4052ddb6cf1Smrgfi 406a1d141d5Smrg 4072ddb6cf1SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 408a1d141d5Smrg 4092ddb6cf1SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 410a1d141d5Smrg 4112ddb6cf1SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 4122ddb6cf1SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 4132ddb6cf1SmrgMAKE_PDF="$PS2PDF" 4142ddb6cf1SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 415a1d141d5Smrg 4162ddb6cf1SmrgAC_SUBST(MAKE_TEXT) 4172ddb6cf1SmrgAC_SUBST(MAKE_PS) 4182ddb6cf1SmrgAC_SUBST(MAKE_PDF) 4192ddb6cf1SmrgAC_SUBST(MAKE_HTML) 4202ddb6cf1Smrg]) # XORG_CHECK_LINUXDOC 421a1d141d5Smrg 4222ddb6cf1Smrg# XORG_CHECK_DOCBOOK 4232ddb6cf1Smrg# ------------------- 4242ddb6cf1Smrg# Minimum version: 1.0.0 4252ddb6cf1Smrg# 4262ddb6cf1Smrg# Checks for the ability to build output formats from SGML DocBook source. 4272ddb6cf1Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 4282ddb6cf1Smrg# indicates whether the necessary tools and files are found and, if set, 4292ddb6cf1Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 4302ddb6cf1SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 4312ddb6cf1Smrgif test x$XORG_SGML_PATH = x ; then 4322ddb6cf1Smrg XORG_SGML_PATH=$prefix/share/sgml 4332ddb6cf1Smrgfi 4342ddb6cf1SmrgHAVE_DEFS_ENT= 4352ddb6cf1SmrgBUILDTXTDOC=no 4362ddb6cf1SmrgBUILDPDFDOC=no 4372ddb6cf1SmrgBUILDPSDOC=no 4382ddb6cf1SmrgBUILDHTMLDOC=no 4392ddb6cf1Smrg 4402ddb6cf1SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 4412ddb6cf1Smrg 4422ddb6cf1SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 4432ddb6cf1SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 4442ddb6cf1SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 4452ddb6cf1SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 4462ddb6cf1Smrg 4472ddb6cf1SmrgAC_MSG_CHECKING([Whether to build text documentation]) 4482ddb6cf1Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 4492ddb6cf1Smrg test x$BUILD_TXTDOC != xno; then 4502ddb6cf1Smrg BUILDTXTDOC=yes 4512ddb6cf1Smrgfi 4522ddb6cf1SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 4532ddb6cf1SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 454a1d141d5Smrg 4552ddb6cf1SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 4562ddb6cf1Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 4572ddb6cf1Smrg test x$BUILD_PDFDOC != xno; then 4582ddb6cf1Smrg BUILDPDFDOC=yes 4592ddb6cf1Smrgfi 4602ddb6cf1SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 4612ddb6cf1SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 462a1d141d5Smrg 4632ddb6cf1SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 4642ddb6cf1Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 4652ddb6cf1Smrg test x$BUILD_PSDOC != xno; then 4662ddb6cf1Smrg BUILDPSDOC=yes 4672ddb6cf1Smrgfi 4682ddb6cf1SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 4692ddb6cf1SmrgAC_MSG_RESULT([$BUILDPSDOC]) 470a1d141d5Smrg 4712ddb6cf1SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 4722ddb6cf1Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 4732ddb6cf1Smrg test x$BUILD_HTMLDOC != xno; then 4742ddb6cf1Smrg BUILDHTMLDOC=yes 4752ddb6cf1Smrgfi 4762ddb6cf1SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 4772ddb6cf1SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 478a1d141d5Smrg 4792ddb6cf1SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 4802ddb6cf1SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 4812ddb6cf1SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 4822ddb6cf1SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 483a1d141d5Smrg 4842ddb6cf1SmrgAC_SUBST(MAKE_TEXT) 4852ddb6cf1SmrgAC_SUBST(MAKE_PS) 4862ddb6cf1SmrgAC_SUBST(MAKE_PDF) 4872ddb6cf1SmrgAC_SUBST(MAKE_HTML) 4882ddb6cf1Smrg]) # XORG_CHECK_DOCBOOK 489a1d141d5Smrg 4902ddb6cf1Smrg# XORG_CHECK_MALLOC_ZERO 4912ddb6cf1Smrg# ---------------------- 4922ddb6cf1Smrg# Minimum version: 1.0.0 4932ddb6cf1Smrg# 4942ddb6cf1Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 4952ddb6cf1Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 4962ddb6cf1Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 4972ddb6cf1SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 4982ddb6cf1SmrgAC_ARG_ENABLE(malloc0returnsnull, 4992ddb6cf1Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 5002ddb6cf1Smrg [malloc(0) returns NULL (default: auto)]), 5012ddb6cf1Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 5022ddb6cf1Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 503a1d141d5Smrg 5042ddb6cf1SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 5052ddb6cf1Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 5062ddb6cf1Smrg AC_RUN_IFELSE([ 5072ddb6cf1Smrgchar *malloc(); 5082ddb6cf1Smrgchar *realloc(); 5092ddb6cf1Smrgchar *calloc(); 5102ddb6cf1Smrgmain() { 5112ddb6cf1Smrg char *m0, *r0, *c0, *p; 5122ddb6cf1Smrg m0 = malloc(0); 5132ddb6cf1Smrg p = malloc(10); 5142ddb6cf1Smrg r0 = realloc(p,0); 5152ddb6cf1Smrg c0 = calloc(0); 5162ddb6cf1Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 5172ddb6cf1Smrg}], 5182ddb6cf1Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 5192ddb6cf1Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 5202ddb6cf1Smrgfi 5212ddb6cf1SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 522a1d141d5Smrg 5232ddb6cf1Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 5242ddb6cf1Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 5252ddb6cf1Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 5262ddb6cf1Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 5272ddb6cf1Smrgelse 5282ddb6cf1Smrg MALLOC_ZERO_CFLAGS="" 5292ddb6cf1Smrg XMALLOC_ZERO_CFLAGS="" 5302ddb6cf1Smrg XTMALLOC_ZERO_CFLAGS="" 531a1d141d5Smrgfi 532a1d141d5Smrg 5332ddb6cf1SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 5342ddb6cf1SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 5352ddb6cf1SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 5362ddb6cf1Smrg]) # XORG_CHECK_MALLOC_ZERO 537a1d141d5Smrg 5382ddb6cf1Smrg# XORG_WITH_LINT() 5392ddb6cf1Smrg# ---------------- 5402ddb6cf1Smrg# Minimum version: 1.1.0 5412ddb6cf1Smrg# 5422ddb6cf1Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 5432ddb6cf1Smrg# is specified. (Use --with-lint=sparse for sparse.) 5442ddb6cf1Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 5452ddb6cf1Smrg# Sets $LINT_FLAGS to flags to pass to source checker 5462ddb6cf1Smrg# Sets LINT automake conditional if enabled (default: disabled) 5472ddb6cf1Smrg# 5482ddb6cf1SmrgAC_DEFUN([XORG_WITH_LINT],[ 5492ddb6cf1Smrg 5502ddb6cf1Smrg# Allow checking code with lint, sparse, etc. 5512ddb6cf1SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 5522ddb6cf1Smrg [Use a lint-style source code checker (default: disabled)])], 5532ddb6cf1Smrg [use_lint=$withval], [use_lint=no]) 5542ddb6cf1Smrgif test "x$use_lint" = "xyes" ; then 5552ddb6cf1Smrg LINT="lint" 5562ddb6cf1Smrgelse 5572ddb6cf1Smrg LINT="$use_lint" 5582ddb6cf1Smrgfi 5592ddb6cf1Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 5602ddb6cf1Smrg case $LINT in 5612ddb6cf1Smrg lint|*/lint) 5622ddb6cf1Smrg case $host_os in 5632ddb6cf1Smrg solaris*) 5642ddb6cf1Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 5652ddb6cf1Smrg ;; 5662ddb6cf1Smrg esac 5672ddb6cf1Smrg ;; 5682ddb6cf1Smrg esac 5692ddb6cf1Smrgfi 570a1d141d5Smrg 5712ddb6cf1SmrgAC_SUBST(LINT) 5722ddb6cf1SmrgAC_SUBST(LINT_FLAGS) 5732ddb6cf1SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 574a1d141d5Smrg 5752ddb6cf1Smrg]) # XORG_WITH_LINT 576a1d141d5Smrg 5772ddb6cf1Smrg# XORG_LINT_LIBRARY(LIBNAME) 5782ddb6cf1Smrg# -------------------------- 5792ddb6cf1Smrg# Minimum version: 1.1.0 5802ddb6cf1Smrg# 5812ddb6cf1Smrg# Sets up flags for building lint libraries for checking programs that call 5822ddb6cf1Smrg# functions in the library. 5832ddb6cf1Smrg# Disabled by default, enable with --enable-lint-library 5842ddb6cf1Smrg# Sets: 5852ddb6cf1Smrg# @LINTLIB@ - name of lint library file to make 5862ddb6cf1Smrg# MAKE_LINT_LIB - automake conditional 5872ddb6cf1Smrg# 588a1d141d5Smrg 5892ddb6cf1SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 5902ddb6cf1SmrgAC_REQUIRE([XORG_WITH_LINT]) 5912ddb6cf1Smrg# Build lint "library" for more indepth checks of programs calling this library 5922ddb6cf1SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 5932ddb6cf1Smrg [Create lint library (default: disabled)])], 5942ddb6cf1Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 5952ddb6cf1Smrgif test "x$make_lint_lib" != "xno" ; then 5962ddb6cf1Smrg if test "x$LINT" = "xno" ; then 5972ddb6cf1Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 5982ddb6cf1Smrg fi 5992ddb6cf1Smrg if test "x$make_lint_lib" = "xyes" ; then 6002ddb6cf1Smrg LINTLIB=llib-l$1.ln 6012ddb6cf1Smrg else 6022ddb6cf1Smrg LINTLIB=$make_lint_lib 6032ddb6cf1Smrg fi 6042ddb6cf1Smrgfi 6052ddb6cf1SmrgAC_SUBST(LINTLIB) 6062ddb6cf1SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 6072ddb6cf1Smrg 6082ddb6cf1Smrg]) # XORG_LINT_LIBRARY 6092ddb6cf1Smrg 6102ddb6cf1Smrg# XORG_CWARNFLAGS 6112ddb6cf1Smrg# --------------- 6122ddb6cf1Smrg# Minimum version: 1.2.0 6132ddb6cf1Smrg# 6142ddb6cf1Smrg# Defines CWARNFLAGS to enable C compiler warnings. 6152ddb6cf1Smrg# 6162ddb6cf1SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 6172ddb6cf1SmrgAC_REQUIRE([AC_PROG_CC]) 6182ddb6cf1Smrgif test "x$GCC" = xyes ; then 6192ddb6cf1Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 6202ddb6cf1Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 6212ddb6cf1Smrg-Wbad-function-cast" 6222ddb6cf1Smrg case `$CC -dumpversion` in 6232ddb6cf1Smrg 3.4.* | 4.*) 6242ddb6cf1Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 6252ddb6cf1Smrg ;; 6262ddb6cf1Smrg esac 627a1d141d5Smrgelse 6282ddb6cf1Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 6292ddb6cf1Smrg if test "x$SUNCC" = "xyes"; then 6302ddb6cf1Smrg CWARNFLAGS="-v" 6312ddb6cf1Smrg fi 632a1d141d5Smrgfi 6332ddb6cf1SmrgAC_SUBST(CWARNFLAGS) 6342ddb6cf1Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 6352ddb6cf1Smrg]) # XORG_CWARNFLAGS 636a1d141d5Smrg 6372ddb6cf1Smrg# XORG_STRICT_OPTION 6382ddb6cf1Smrg# ----------------------- 6392ddb6cf1Smrg# Minimum version: 1.3.0 6402ddb6cf1Smrg# 6412ddb6cf1Smrg# Add configure option to enable strict compilation 6422ddb6cf1SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 6432ddb6cf1SmrgAC_REQUIRE([AC_PROG_CC]) 6442ddb6cf1SmrgAC_REQUIRE([AC_PROG_CC_C99]) 6452ddb6cf1SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 6462ddb6cf1Smrg 6472ddb6cf1SmrgAC_ARG_ENABLE(strict-compilation, 6482ddb6cf1Smrg AS_HELP_STRING([--enable-strict-compilation], 6492ddb6cf1Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 6502ddb6cf1Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 6512ddb6cf1Smrgif test "x$STRICT_COMPILE" = "xyes"; then 6522ddb6cf1Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 6532ddb6cf1Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 6542ddb6cf1Smrg if test "x$GCC" = xyes ; then 6552ddb6cf1Smrg STRICT_CFLAGS="-pedantic -Werror" 6562ddb6cf1Smrg elif test "x$SUNCC" = "xyes"; then 6572ddb6cf1Smrg STRICT_CFLAGS="-errwarn" 6582ddb6cf1Smrg elif test "x$INTELCC" = "xyes"; then 6592ddb6cf1Smrg STRICT_CFLAGS="-Werror" 6602ddb6cf1Smrg fi 6612ddb6cf1Smrgfi 6622ddb6cf1SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 6632ddb6cf1SmrgAC_SUBST([CWARNFLAGS]) 6642ddb6cf1Smrg]) # XORG_STRICT_OPTION 665a1d141d5Smrg 6662ddb6cf1Smrg# XORG_DEFAULT_OPTIONS 6672ddb6cf1Smrg# -------------------- 6682ddb6cf1Smrg# Minimum version: 1.3.0 6692ddb6cf1Smrg# 6702ddb6cf1Smrg# Defines default options for X.Org modules. 6712ddb6cf1Smrg# 6722ddb6cf1SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 6732ddb6cf1SmrgXORG_CWARNFLAGS 6742ddb6cf1SmrgXORG_STRICT_OPTION 6752ddb6cf1SmrgXORG_RELEASE_VERSION 6762ddb6cf1SmrgXORG_CHANGELOG 6772ddb6cf1SmrgXORG_INSTALL 6782ddb6cf1SmrgXORG_MANPAGE_SECTIONS 6792ddb6cf1Smrg]) # XORG_DEFAULT_OPTIONS 6802ddb6cf1Smrg 6812ddb6cf1Smrg# XORG_INSTALL() 6822ddb6cf1Smrg# ---------------- 6832ddb6cf1Smrg# Minimum version: 1.4.0 6842ddb6cf1Smrg# 6852ddb6cf1Smrg# Defines the variable INSTALL_CMD as the command to copy 6862ddb6cf1Smrg# INSTALL from $prefix/share/doc/util-macros. 6872ddb6cf1Smrg# 6882ddb6cf1SmrgAC_DEFUN([XORG_INSTALL], [ 6892ddb6cf1SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 6902ddb6cf1Smrgmacros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros) 6912ddb6cf1SmrgINSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 6922ddb6cf1Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 6932ddb6cf1Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 6942ddb6cf1Smrgecho 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 6952ddb6cf1SmrgAC_SUBST([INSTALL_CMD]) 6962ddb6cf1Smrg]) # XORG_INSTALL 6972ddb6cf1Smrgdnl Copyright 2005 Red Hat, Inc 6982ddb6cf1Smrgdnl 6992ddb6cf1Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 7002ddb6cf1Smrgdnl documentation for any purpose is hereby granted without fee, provided that 7012ddb6cf1Smrgdnl the above copyright notice appear in all copies and that both that 7022ddb6cf1Smrgdnl copyright notice and this permission notice appear in supporting 7032ddb6cf1Smrgdnl documentation. 7042ddb6cf1Smrgdnl 7052ddb6cf1Smrgdnl The above copyright notice and this permission notice shall be included 7062ddb6cf1Smrgdnl in all copies or substantial portions of the Software. 7072ddb6cf1Smrgdnl 7082ddb6cf1Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 7092ddb6cf1Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 7102ddb6cf1Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 7112ddb6cf1Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 7122ddb6cf1Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 7132ddb6cf1Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 7142ddb6cf1Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 7152ddb6cf1Smrgdnl 7162ddb6cf1Smrgdnl Except as contained in this notice, the name of the copyright holders shall 7172ddb6cf1Smrgdnl not be used in advertising or otherwise to promote the sale, use or 7182ddb6cf1Smrgdnl other dealings in this Software without prior written authorization 7192ddb6cf1Smrgdnl from the copyright holders. 7202ddb6cf1Smrgdnl 721a1d141d5Smrg 7222ddb6cf1Smrg# XORG_RELEASE_VERSION 7232ddb6cf1Smrg# -------------------- 7242ddb6cf1Smrg# Adds --with/without-release-string and changes the PACKAGE and 7252ddb6cf1Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 7262ddb6cf1Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 7272ddb6cf1Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 7282ddb6cf1Smrg 7292ddb6cf1SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 7302ddb6cf1Smrg AC_ARG_WITH(release-version, 7312ddb6cf1Smrg AS_HELP_STRING([--with-release-version=STRING], 7322ddb6cf1Smrg [Use release version string in package name]), 7332ddb6cf1Smrg [RELEASE_VERSION="$withval"], 7342ddb6cf1Smrg [RELEASE_VERSION=""]) 7352ddb6cf1Smrg if test "x$RELEASE_VERSION" != "x"; then 7362ddb6cf1Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 7372ddb6cf1Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 7382ddb6cf1Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 7392ddb6cf1Smrg fi 7402ddb6cf1Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 7412ddb6cf1Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 7422ddb6cf1Smrg [Major version of this package]) 7432ddb6cf1Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 7442ddb6cf1Smrg if test "x$PVM" = "x"; then 7452ddb6cf1Smrg PVM="0" 7462ddb6cf1Smrg fi 7472ddb6cf1Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 7482ddb6cf1Smrg [$PVM], 7492ddb6cf1Smrg [Minor version of this package]) 7502ddb6cf1Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 7512ddb6cf1Smrg if test "x$PVP" = "x"; then 7522ddb6cf1Smrg PVP="0" 7532ddb6cf1Smrg fi 7542ddb6cf1Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 7552ddb6cf1Smrg [$PVP], 7562ddb6cf1Smrg [Patch version of this package]) 7572ddb6cf1Smrg]) 758a1d141d5Smrg 7592ddb6cf1Smrg# XORG_CHANGELOG() 7602ddb6cf1Smrg# ---------------- 7612ddb6cf1Smrg# Minimum version: 1.2.0 7622ddb6cf1Smrg# 7632ddb6cf1Smrg# Defines the variable CHANGELOG_CMD as the command to generate 7642ddb6cf1Smrg# ChangeLog from git. 7652ddb6cf1Smrg# 7662ddb6cf1Smrg# 7672ddb6cf1SmrgAC_DEFUN([XORG_CHANGELOG], [ 7682ddb6cf1SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 7692ddb6cf1Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 7702ddb6cf1Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 7712ddb6cf1Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 7722ddb6cf1SmrgAC_SUBST([CHANGELOG_CMD]) 7732ddb6cf1Smrg]) # XORG_CHANGELOG 7742ddb6cf1Smrg 7752ddb6cf1Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 7762ddb6cf1Smrg# 7772ddb6cf1Smrg# This file is free software; the Free Software Foundation 7782ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 7792ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 780a1d141d5Smrg 7812ddb6cf1Smrg# AM_AUTOMAKE_VERSION(VERSION) 7822ddb6cf1Smrg# ---------------------------- 7832ddb6cf1Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 7842ddb6cf1Smrg# generated from the m4 files accompanying Automake X.Y. 7852ddb6cf1Smrg# (This private macro should not be called outside this file.) 7862ddb6cf1SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 7872ddb6cf1Smrg[am__api_version='1.11' 7882ddb6cf1Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 7892ddb6cf1Smrgdnl require some minimum version. Point them to the right macro. 7902ddb6cf1Smrgm4_if([$1], [1.11], [], 7912ddb6cf1Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 7922ddb6cf1Smrg]) 793a1d141d5Smrg 7942ddb6cf1Smrg# _AM_AUTOCONF_VERSION(VERSION) 7952ddb6cf1Smrg# ----------------------------- 7962ddb6cf1Smrg# aclocal traces this macro to find the Autoconf version. 7972ddb6cf1Smrg# This is a private macro too. Using m4_define simplifies 7982ddb6cf1Smrg# the logic in aclocal, which can simply ignore this definition. 7992ddb6cf1Smrgm4_define([_AM_AUTOCONF_VERSION], []) 800a1d141d5Smrg 8012ddb6cf1Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8022ddb6cf1Smrg# ------------------------------- 8032ddb6cf1Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8042ddb6cf1Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8052ddb6cf1SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8062ddb6cf1Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 8072ddb6cf1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 8082ddb6cf1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8092ddb6cf1Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 810a1d141d5Smrg 8112ddb6cf1Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 812a1d141d5Smrg 8132ddb6cf1Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8142ddb6cf1Smrg# 8152ddb6cf1Smrg# This file is free software; the Free Software Foundation 8162ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 8172ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 818a1d141d5Smrg 8192ddb6cf1Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8202ddb6cf1Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8212ddb6cf1Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 822a1d141d5Smrg# 8232ddb6cf1Smrg# Of course, Automake must honor this variable whenever it calls a 8242ddb6cf1Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 8252ddb6cf1Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8262ddb6cf1Smrg# depending on how configure is run. This is pretty annoying, since 8272ddb6cf1Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8282ddb6cf1Smrg# source directory, any form will work fine, but in subdirectories a 8292ddb6cf1Smrg# relative path needs to be adjusted first. 8302ddb6cf1Smrg# 8312ddb6cf1Smrg# $ac_aux_dir/missing 8322ddb6cf1Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8332ddb6cf1Smrg# $top_srcdir/$ac_aux_dir/missing 8342ddb6cf1Smrg# fails if $ac_aux_dir is absolute, 8352ddb6cf1Smrg# fails when called from a subdirectory in a VPATH build with 8362ddb6cf1Smrg# a relative $ac_aux_dir 8372ddb6cf1Smrg# 8382ddb6cf1Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8392ddb6cf1Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8402ddb6cf1Smrg# harmless because $srcdir is `.', but things will broke when you 8412ddb6cf1Smrg# start a VPATH build or use an absolute $srcdir. 8422ddb6cf1Smrg# 8432ddb6cf1Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8442ddb6cf1Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8452ddb6cf1Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8462ddb6cf1Smrg# and then we would define $MISSING as 8472ddb6cf1Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 8482ddb6cf1Smrg# This will work as long as MISSING is not called from configure, because 8492ddb6cf1Smrg# unfortunately $(top_srcdir) has no meaning in configure. 8502ddb6cf1Smrg# However there are other variables, like CC, which are often used in 8512ddb6cf1Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8522ddb6cf1Smrg# 8532ddb6cf1Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 8542ddb6cf1Smrg# absolute PATH. The drawback is that using absolute paths prevent a 8552ddb6cf1Smrg# configured tree to be moved without reconfiguration. 856a1d141d5Smrg 8572ddb6cf1SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8582ddb6cf1Smrg[dnl Rely on autoconf to set up CDPATH properly. 8592ddb6cf1SmrgAC_PREREQ([2.50])dnl 8602ddb6cf1Smrg# expand $ac_aux_dir to an absolute path 8612ddb6cf1Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 8622ddb6cf1Smrg]) 863a1d141d5Smrg 8642ddb6cf1Smrg# AM_CONDITIONAL -*- Autoconf -*- 8652ddb6cf1Smrg 8662ddb6cf1Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 8672ddb6cf1Smrg# Free Software Foundation, Inc. 8682ddb6cf1Smrg# 8692ddb6cf1Smrg# This file is free software; the Free Software Foundation 8702ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 8712ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 8722ddb6cf1Smrg 8732ddb6cf1Smrg# serial 9 8742ddb6cf1Smrg 8752ddb6cf1Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8762ddb6cf1Smrg# ------------------------------------- 8772ddb6cf1Smrg# Define a conditional. 8782ddb6cf1SmrgAC_DEFUN([AM_CONDITIONAL], 8792ddb6cf1Smrg[AC_PREREQ(2.52)dnl 8802ddb6cf1Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8812ddb6cf1Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8822ddb6cf1SmrgAC_SUBST([$1_TRUE])dnl 8832ddb6cf1SmrgAC_SUBST([$1_FALSE])dnl 8842ddb6cf1Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8852ddb6cf1Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8862ddb6cf1Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 8872ddb6cf1Smrgif $2; then 8882ddb6cf1Smrg $1_TRUE= 8892ddb6cf1Smrg $1_FALSE='#' 8902ddb6cf1Smrgelse 8912ddb6cf1Smrg $1_TRUE='#' 8922ddb6cf1Smrg $1_FALSE= 8932ddb6cf1Smrgfi 8942ddb6cf1SmrgAC_CONFIG_COMMANDS_PRE( 8952ddb6cf1Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8962ddb6cf1Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 8972ddb6cf1SmrgUsually this means the macro was only invoked conditionally.]]) 8982ddb6cf1Smrgfi])]) 8992ddb6cf1Smrg 9002ddb6cf1Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 9012ddb6cf1Smrg# Free Software Foundation, Inc. 9022ddb6cf1Smrg# 9032ddb6cf1Smrg# This file is free software; the Free Software Foundation 9042ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 9052ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 9062ddb6cf1Smrg 9072ddb6cf1Smrg# serial 10 9082ddb6cf1Smrg 9092ddb6cf1Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 9102ddb6cf1Smrg# written in clear, in which case automake, when reading aclocal.m4, 9112ddb6cf1Smrg# will think it sees a *use*, and therefore will trigger all it's 9122ddb6cf1Smrg# C support machinery. Also note that it means that autoscan, seeing 9132ddb6cf1Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 9142ddb6cf1Smrg 9152ddb6cf1Smrg 9162ddb6cf1Smrg# _AM_DEPENDENCIES(NAME) 9172ddb6cf1Smrg# ---------------------- 9182ddb6cf1Smrg# See how the compiler implements dependency checking. 9192ddb6cf1Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 9202ddb6cf1Smrg# We try a few techniques and use that to set a single cache variable. 9212ddb6cf1Smrg# 9222ddb6cf1Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 9232ddb6cf1Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 9242ddb6cf1Smrg# dependency, and given that the user is not expected to run this macro, 9252ddb6cf1Smrg# just rely on AC_PROG_CC. 9262ddb6cf1SmrgAC_DEFUN([_AM_DEPENDENCIES], 9272ddb6cf1Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 9282ddb6cf1SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 9292ddb6cf1SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 9302ddb6cf1SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 9312ddb6cf1Smrg 9322ddb6cf1Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 9332ddb6cf1Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 9342ddb6cf1Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 9352ddb6cf1Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 9362ddb6cf1Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 9372ddb6cf1Smrg [depcc="$$1" am_compiler_list=]) 9382ddb6cf1Smrg 9392ddb6cf1SmrgAC_CACHE_CHECK([dependency style of $depcc], 9402ddb6cf1Smrg [am_cv_$1_dependencies_compiler_type], 9412ddb6cf1Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 9422ddb6cf1Smrg # We make a subdir and do the tests there. Otherwise we can end up 9432ddb6cf1Smrg # making bogus files that we don't know about and never remove. For 9442ddb6cf1Smrg # instance it was reported that on HP-UX the gcc test will end up 9452ddb6cf1Smrg # making a dummy file named `D' -- because `-MD' means `put the output 9462ddb6cf1Smrg # in D'. 9472ddb6cf1Smrg mkdir conftest.dir 9482ddb6cf1Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 949a1d141d5Smrg # using a relative directory. 950a1d141d5Smrg cp "$am_depcomp" conftest.dir 951a1d141d5Smrg cd conftest.dir 952a1d141d5Smrg # We will build objects and dependencies in a subdirectory because 953a1d141d5Smrg # it helps to detect inapplicable dependency modes. For instance 954a1d141d5Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 955a1d141d5Smrg # side effect of compilation, but ICC will put the dependencies in 956a1d141d5Smrg # the current directory while Tru64 will put them in the object 957a1d141d5Smrg # directory. 958a1d141d5Smrg mkdir sub 959a1d141d5Smrg 960a1d141d5Smrg am_cv_$1_dependencies_compiler_type=none 961a1d141d5Smrg if test "$am_compiler_list" = ""; then 962a1d141d5Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 963a1d141d5Smrg fi 9642ddb6cf1Smrg am__universal=false 9652ddb6cf1Smrg m4_case([$1], [CC], 9662ddb6cf1Smrg [case " $depcc " in #( 9672ddb6cf1Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9682ddb6cf1Smrg esac], 9692ddb6cf1Smrg [CXX], 9702ddb6cf1Smrg [case " $depcc " in #( 9712ddb6cf1Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9722ddb6cf1Smrg esac]) 9732ddb6cf1Smrg 974a1d141d5Smrg for depmode in $am_compiler_list; do 975a1d141d5Smrg # Setup a source with many dependencies, because some compilers 976a1d141d5Smrg # like to wrap large dependency lists on column 80 (with \), and 977a1d141d5Smrg # we should not choose a depcomp mode which is confused by this. 978a1d141d5Smrg # 979a1d141d5Smrg # We need to recreate these files for each test, as the compiler may 980a1d141d5Smrg # overwrite some of them when testing with obscure command lines. 981a1d141d5Smrg # This happens at least with the AIX C compiler. 982a1d141d5Smrg : > sub/conftest.c 983a1d141d5Smrg for i in 1 2 3 4 5 6; do 984a1d141d5Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 9852ddb6cf1Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 9862ddb6cf1Smrg # Solaris 8's {/usr,}/bin/sh. 9872ddb6cf1Smrg touch sub/conftst$i.h 988a1d141d5Smrg done 989a1d141d5Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 990a1d141d5Smrg 9912ddb6cf1Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 9922ddb6cf1Smrg # mode. It turns out that the SunPro C++ compiler does not properly 9932ddb6cf1Smrg # handle `-M -o', and we need to detect this. Also, some Intel 9942ddb6cf1Smrg # versions had trouble with output in subdirs 9952ddb6cf1Smrg am__obj=sub/conftest.${OBJEXT-o} 9962ddb6cf1Smrg am__minus_obj="-o $am__obj" 997a1d141d5Smrg case $depmode in 9982ddb6cf1Smrg gcc) 9992ddb6cf1Smrg # This depmode causes a compiler race in universal mode. 10002ddb6cf1Smrg test "$am__universal" = false || continue 10012ddb6cf1Smrg ;; 1002a1d141d5Smrg nosideeffect) 1003a1d141d5Smrg # after this tag, mechanisms are not by side-effect, so they'll 1004a1d141d5Smrg # only be used when explicitly requested 1005a1d141d5Smrg if test "x$enable_dependency_tracking" = xyes; then 1006a1d141d5Smrg continue 1007a1d141d5Smrg else 1008a1d141d5Smrg break 1009a1d141d5Smrg fi 1010a1d141d5Smrg ;; 10112ddb6cf1Smrg msvisualcpp | msvcmsys) 10122ddb6cf1Smrg # This compiler won't grok `-c -o', but also, the minuso test has 10132ddb6cf1Smrg # not run yet. These depmodes are late enough in the game, and 10142ddb6cf1Smrg # so weak that their functioning should not be impacted. 10152ddb6cf1Smrg am__obj=conftest.${OBJEXT-o} 10162ddb6cf1Smrg am__minus_obj= 10172ddb6cf1Smrg ;; 1018a1d141d5Smrg none) break ;; 1019a1d141d5Smrg esac 1020a1d141d5Smrg if depmode=$depmode \ 10212ddb6cf1Smrg source=sub/conftest.c object=$am__obj \ 1022a1d141d5Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10232ddb6cf1Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1024a1d141d5Smrg >/dev/null 2>conftest.err && 10252ddb6cf1Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1026a1d141d5Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10272ddb6cf1Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1028a1d141d5Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1029a1d141d5Smrg # icc doesn't choke on unknown options, it will just issue warnings 10302ddb6cf1Smrg # or remarks (even with -Werror). So we grep stderr for any message 10312ddb6cf1Smrg # that says an option was ignored or not supported. 10322ddb6cf1Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 10332ddb6cf1Smrg # icc: Command line warning: ignoring option '-M'; no argument required 10342ddb6cf1Smrg # The diagnosis changed in icc 8.0: 10352ddb6cf1Smrg # icc: Command line remark: option '-MP' not supported 10362ddb6cf1Smrg if (grep 'ignoring option' conftest.err || 10372ddb6cf1Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1038a1d141d5Smrg am_cv_$1_dependencies_compiler_type=$depmode 1039a1d141d5Smrg break 1040a1d141d5Smrg fi 1041a1d141d5Smrg fi 1042a1d141d5Smrg done 1043a1d141d5Smrg 1044a1d141d5Smrg cd .. 1045a1d141d5Smrg rm -rf conftest.dir 1046a1d141d5Smrgelse 1047a1d141d5Smrg am_cv_$1_dependencies_compiler_type=none 1048a1d141d5Smrgfi 1049a1d141d5Smrg]) 1050a1d141d5SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1051a1d141d5SmrgAM_CONDITIONAL([am__fastdep$1], [ 1052a1d141d5Smrg test "x$enable_dependency_tracking" != xno \ 1053a1d141d5Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1054a1d141d5Smrg]) 1055a1d141d5Smrg 1056a1d141d5Smrg 1057a1d141d5Smrg# AM_SET_DEPDIR 1058a1d141d5Smrg# ------------- 1059a1d141d5Smrg# Choose a directory name for dependency files. 1060a1d141d5Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 1061a1d141d5SmrgAC_DEFUN([AM_SET_DEPDIR], 1062a1d141d5Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1063a1d141d5SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1064a1d141d5Smrg]) 1065a1d141d5Smrg 1066a1d141d5Smrg 1067a1d141d5Smrg# AM_DEP_TRACK 1068a1d141d5Smrg# ------------ 1069a1d141d5SmrgAC_DEFUN([AM_DEP_TRACK], 1070a1d141d5Smrg[AC_ARG_ENABLE(dependency-tracking, 10712ddb6cf1Smrg[ --disable-dependency-tracking speeds up one-time build 10722ddb6cf1Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 1073a1d141d5Smrgif test "x$enable_dependency_tracking" != xno; then 1074a1d141d5Smrg am_depcomp="$ac_aux_dir/depcomp" 1075a1d141d5Smrg AMDEPBACKSLASH='\' 1076a1d141d5Smrgfi 1077a1d141d5SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10782ddb6cf1SmrgAC_SUBST([AMDEPBACKSLASH])dnl 10792ddb6cf1Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1080a1d141d5Smrg]) 1081a1d141d5Smrg 10822ddb6cf1Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1083a1d141d5Smrg 10842ddb6cf1Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 10852ddb6cf1Smrg# Free Software Foundation, Inc. 10862ddb6cf1Smrg# 10872ddb6cf1Smrg# This file is free software; the Free Software Foundation 10882ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 10892ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1090a1d141d5Smrg 10912ddb6cf1Smrg#serial 5 1092a1d141d5Smrg 1093a1d141d5Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1094a1d141d5Smrg# ------------------------------ 1095a1d141d5SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 10962ddb6cf1Smrg[{ 10972ddb6cf1Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 10982ddb6cf1Smrg # are listed without --file. Let's play safe and only enable the eval 10992ddb6cf1Smrg # if we detect the quoting. 11002ddb6cf1Smrg case $CONFIG_FILES in 11012ddb6cf1Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11022ddb6cf1Smrg *) set x $CONFIG_FILES ;; 11032ddb6cf1Smrg esac 11042ddb6cf1Smrg shift 11052ddb6cf1Smrg for mf 11062ddb6cf1Smrg do 11072ddb6cf1Smrg # Strip MF so we end up with the name of the file. 11082ddb6cf1Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11092ddb6cf1Smrg # Check whether this is an Automake generated Makefile or not. 11102ddb6cf1Smrg # We used to match only the files named `Makefile.in', but 11112ddb6cf1Smrg # some people rename them; so instead we look at the file content. 11122ddb6cf1Smrg # Grep'ing the first line is not enough: some people post-process 11132ddb6cf1Smrg # each Makefile.in and add a new line on top of each file to say so. 11142ddb6cf1Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11152ddb6cf1Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11162ddb6cf1Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11172ddb6cf1Smrg dirpart=`AS_DIRNAME("$mf")` 11182ddb6cf1Smrg else 11192ddb6cf1Smrg continue 11202ddb6cf1Smrg fi 11212ddb6cf1Smrg # Extract the definition of DEPDIR, am__include, and am__quote 11222ddb6cf1Smrg # from the Makefile without running `make'. 11232ddb6cf1Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11242ddb6cf1Smrg test -z "$DEPDIR" && continue 11252ddb6cf1Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11262ddb6cf1Smrg test -z "am__include" && continue 11272ddb6cf1Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11282ddb6cf1Smrg # When using ansi2knr, U may be empty or an underscore; expand it 11292ddb6cf1Smrg U=`sed -n 's/^U = //p' < "$mf"` 11302ddb6cf1Smrg # Find all dependency output files, they are included files with 11312ddb6cf1Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11322ddb6cf1Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11332ddb6cf1Smrg # expansion. 11342ddb6cf1Smrg for file in `sed -n " 11352ddb6cf1Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11362ddb6cf1Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 11372ddb6cf1Smrg # Make sure the directory exists. 11382ddb6cf1Smrg test -f "$dirpart/$file" && continue 11392ddb6cf1Smrg fdir=`AS_DIRNAME(["$file"])` 11402ddb6cf1Smrg AS_MKDIR_P([$dirpart/$fdir]) 11412ddb6cf1Smrg # echo "creating $dirpart/$file" 11422ddb6cf1Smrg echo '# dummy' > "$dirpart/$file" 11432ddb6cf1Smrg done 1144a1d141d5Smrg done 11452ddb6cf1Smrg} 1146a1d141d5Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1147a1d141d5Smrg 1148a1d141d5Smrg 1149a1d141d5Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1150a1d141d5Smrg# ----------------------------- 1151a1d141d5Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1152a1d141d5Smrg# 1153a1d141d5Smrg# This code is only required when automatic dependency tracking 1154a1d141d5Smrg# is enabled. FIXME. This creates each `.P' file that we will 1155a1d141d5Smrg# need in order to bootstrap the dependency handling code. 1156a1d141d5SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1157a1d141d5Smrg[AC_CONFIG_COMMANDS([depfiles], 1158a1d141d5Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1159a1d141d5Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1160a1d141d5Smrg]) 1161a1d141d5Smrg 11622ddb6cf1Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 11632ddb6cf1Smrg# Free Software Foundation, Inc. 11642ddb6cf1Smrg# 11652ddb6cf1Smrg# This file is free software; the Free Software Foundation 11662ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 11672ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1168a1d141d5Smrg 11692ddb6cf1Smrg# serial 8 1170a1d141d5Smrg 11712ddb6cf1Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 11722ddb6cf1SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 1173a1d141d5Smrg 11742ddb6cf1Smrg# Do all the work for Automake. -*- Autoconf -*- 1175a1d141d5Smrg 11762ddb6cf1Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 11772ddb6cf1Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 11782ddb6cf1Smrg# 11792ddb6cf1Smrg# This file is free software; the Free Software Foundation 11802ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 11812ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 11822ddb6cf1Smrg 11832ddb6cf1Smrg# serial 16 11842ddb6cf1Smrg 11852ddb6cf1Smrg# This macro actually does too much. Some checks are only needed if 11862ddb6cf1Smrg# your package does certain things. But this isn't really a big deal. 11872ddb6cf1Smrg 11882ddb6cf1Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11892ddb6cf1Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 11902ddb6cf1Smrg# ----------------------------------------------- 11912ddb6cf1Smrg# The call with PACKAGE and VERSION arguments is the old style 11922ddb6cf1Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11932ddb6cf1Smrg# and VERSION should now be passed to AC_INIT and removed from 11942ddb6cf1Smrg# the call to AM_INIT_AUTOMAKE. 11952ddb6cf1Smrg# We support both call styles for the transition. After 11962ddb6cf1Smrg# the next Automake release, Autoconf can make the AC_INIT 11972ddb6cf1Smrg# arguments mandatory, and then we can depend on a new Autoconf 11982ddb6cf1Smrg# release and drop the old call support. 11992ddb6cf1SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 12002ddb6cf1Smrg[AC_PREREQ([2.62])dnl 12012ddb6cf1Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 12022ddb6cf1Smrgdnl the ones we care about. 12032ddb6cf1Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 12042ddb6cf1SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 12052ddb6cf1SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 12062ddb6cf1Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 12072ddb6cf1Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 12082ddb6cf1Smrg # is not polluted with repeated "-I." 12092ddb6cf1Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 12102ddb6cf1Smrg # test to see if srcdir already configured 12112ddb6cf1Smrg if test -f $srcdir/config.status; then 12122ddb6cf1Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 12132ddb6cf1Smrg fi 12142ddb6cf1Smrgfi 12152ddb6cf1Smrg 12162ddb6cf1Smrg# test whether we have cygpath 12172ddb6cf1Smrgif test -z "$CYGPATH_W"; then 12182ddb6cf1Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 12192ddb6cf1Smrg CYGPATH_W='cygpath -w' 12202ddb6cf1Smrg else 12212ddb6cf1Smrg CYGPATH_W=echo 12222ddb6cf1Smrg fi 12232ddb6cf1Smrgfi 12242ddb6cf1SmrgAC_SUBST([CYGPATH_W]) 12252ddb6cf1Smrg 12262ddb6cf1Smrg# Define the identity of the package. 12272ddb6cf1Smrgdnl Distinguish between old-style and new-style calls. 12282ddb6cf1Smrgm4_ifval([$2], 12292ddb6cf1Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 12302ddb6cf1Smrg AC_SUBST([PACKAGE], [$1])dnl 12312ddb6cf1Smrg AC_SUBST([VERSION], [$2])], 12322ddb6cf1Smrg[_AM_SET_OPTIONS([$1])dnl 12332ddb6cf1Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 12342ddb6cf1Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 12352ddb6cf1Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 12362ddb6cf1Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 12372ddb6cf1Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 12382ddb6cf1Smrg 12392ddb6cf1Smrg_AM_IF_OPTION([no-define],, 12402ddb6cf1Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 12412ddb6cf1Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 12422ddb6cf1Smrg 12432ddb6cf1Smrg# Some tools Automake needs. 12442ddb6cf1SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 12452ddb6cf1SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 12462ddb6cf1SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 12472ddb6cf1SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 12482ddb6cf1SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 12492ddb6cf1SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 12502ddb6cf1SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 12512ddb6cf1SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12522ddb6cf1SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 12532ddb6cf1SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 12542ddb6cf1Smrg# We need awk for the "check" target. The system "awk" is bad on 12552ddb6cf1Smrg# some platforms. 12562ddb6cf1SmrgAC_REQUIRE([AC_PROG_AWK])dnl 12572ddb6cf1SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 12582ddb6cf1SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 12592ddb6cf1Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 12602ddb6cf1Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 12612ddb6cf1Smrg [_AM_PROG_TAR([v7])])]) 12622ddb6cf1Smrg_AM_IF_OPTION([no-dependencies],, 12632ddb6cf1Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 12642ddb6cf1Smrg [_AM_DEPENDENCIES(CC)], 12652ddb6cf1Smrg [define([AC_PROG_CC], 12662ddb6cf1Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 12672ddb6cf1SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 12682ddb6cf1Smrg [_AM_DEPENDENCIES(CXX)], 12692ddb6cf1Smrg [define([AC_PROG_CXX], 12702ddb6cf1Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 12712ddb6cf1SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 12722ddb6cf1Smrg [_AM_DEPENDENCIES(OBJC)], 12732ddb6cf1Smrg [define([AC_PROG_OBJC], 12742ddb6cf1Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 12752ddb6cf1Smrg]) 12762ddb6cf1Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 12772ddb6cf1Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 12782ddb6cf1Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 12792ddb6cf1Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 12802ddb6cf1SmrgAC_CONFIG_COMMANDS_PRE(dnl 12812ddb6cf1Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 12822ddb6cf1Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 12832ddb6cf1Smrg]) 12842ddb6cf1Smrg 12852ddb6cf1Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 12862ddb6cf1Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 12872ddb6cf1Smrgdnl mangled by Autoconf and run in a shell conditional statement. 12882ddb6cf1Smrgm4_define([_AC_COMPILER_EXEEXT], 12892ddb6cf1Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 12902ddb6cf1Smrg 12912ddb6cf1Smrg 12922ddb6cf1Smrg# When config.status generates a header, we must update the stamp-h file. 12932ddb6cf1Smrg# This file resides in the same directory as the config header 12942ddb6cf1Smrg# that is generated. The stamp files are numbered to have different names. 12952ddb6cf1Smrg 12962ddb6cf1Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 12972ddb6cf1Smrg# loop where config.status creates the headers, so we can generate 12982ddb6cf1Smrg# our stamp files there. 12992ddb6cf1SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 13002ddb6cf1Smrg[# Compute $1's index in $config_headers. 13012ddb6cf1Smrg_am_arg=$1 13022ddb6cf1Smrg_am_stamp_count=1 13032ddb6cf1Smrgfor _am_header in $config_headers :; do 13042ddb6cf1Smrg case $_am_header in 13052ddb6cf1Smrg $_am_arg | $_am_arg:* ) 13062ddb6cf1Smrg break ;; 13072ddb6cf1Smrg * ) 13082ddb6cf1Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 13092ddb6cf1Smrg esac 13102ddb6cf1Smrgdone 13112ddb6cf1Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 13122ddb6cf1Smrg 13132ddb6cf1Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 13142ddb6cf1Smrg# 13152ddb6cf1Smrg# This file is free software; the Free Software Foundation 13162ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 13172ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 13182ddb6cf1Smrg 13192ddb6cf1Smrg# AM_PROG_INSTALL_SH 13202ddb6cf1Smrg# ------------------ 13212ddb6cf1Smrg# Define $install_sh. 13222ddb6cf1SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 13232ddb6cf1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 13242ddb6cf1Smrgif test x"${install_sh}" != xset; then 13252ddb6cf1Smrg case $am_aux_dir in 13262ddb6cf1Smrg *\ * | *\ *) 13272ddb6cf1Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 13282ddb6cf1Smrg *) 13292ddb6cf1Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 13302ddb6cf1Smrg esac 13312ddb6cf1Smrgfi 13322ddb6cf1SmrgAC_SUBST(install_sh)]) 13332ddb6cf1Smrg 13342ddb6cf1Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 13352ddb6cf1Smrg# 13362ddb6cf1Smrg# This file is free software; the Free Software Foundation 13372ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 13382ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1339a1d141d5Smrg 1340a1d141d5Smrg# serial 2 1341a1d141d5Smrg 13422ddb6cf1Smrg# Check whether the underlying file-system supports filenames 13432ddb6cf1Smrg# with a leading dot. For instance MS-DOS doesn't. 13442ddb6cf1SmrgAC_DEFUN([AM_SET_LEADING_DOT], 13452ddb6cf1Smrg[rm -rf .tst 2>/dev/null 13462ddb6cf1Smrgmkdir .tst 2>/dev/null 13472ddb6cf1Smrgif test -d .tst; then 13482ddb6cf1Smrg am__leading_dot=. 13492ddb6cf1Smrgelse 13502ddb6cf1Smrg am__leading_dot=_ 13512ddb6cf1Smrgfi 13522ddb6cf1Smrgrmdir .tst 2>/dev/null 13532ddb6cf1SmrgAC_SUBST([am__leading_dot])]) 13542ddb6cf1Smrg 13552ddb6cf1Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 13562ddb6cf1Smrg# From Jim Meyering 13572ddb6cf1Smrg 13582ddb6cf1Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 13592ddb6cf1Smrg# Free Software Foundation, Inc. 13602ddb6cf1Smrg# 13612ddb6cf1Smrg# This file is free software; the Free Software Foundation 13622ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 13632ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 13642ddb6cf1Smrg 13652ddb6cf1Smrg# serial 5 13662ddb6cf1Smrg 13672ddb6cf1Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 13682ddb6cf1Smrg# ---------------------------------- 13692ddb6cf1Smrg# Control maintainer-specific portions of Makefiles. 13702ddb6cf1Smrg# Default is to disable them, unless `enable' is passed literally. 13712ddb6cf1Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 13722ddb6cf1Smrg# can override the default with the --enable/--disable switch. 13732ddb6cf1SmrgAC_DEFUN([AM_MAINTAINER_MODE], 13742ddb6cf1Smrg[m4_case(m4_default([$1], [disable]), 13752ddb6cf1Smrg [enable], [m4_define([am_maintainer_other], [disable])], 13762ddb6cf1Smrg [disable], [m4_define([am_maintainer_other], [enable])], 13772ddb6cf1Smrg [m4_define([am_maintainer_other], [enable]) 13782ddb6cf1Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 13792ddb6cf1SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 13802ddb6cf1Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 13812ddb6cf1Smrg AC_ARG_ENABLE([maintainer-mode], 13822ddb6cf1Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 13832ddb6cf1Smrg (and sometimes confusing) to the casual installer], 13842ddb6cf1Smrg [USE_MAINTAINER_MODE=$enableval], 13852ddb6cf1Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 13862ddb6cf1Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 13872ddb6cf1Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 13882ddb6cf1Smrg MAINT=$MAINTAINER_MODE_TRUE 13892ddb6cf1Smrg AC_SUBST([MAINT])dnl 13902ddb6cf1Smrg] 13912ddb6cf1Smrg) 13922ddb6cf1Smrg 13932ddb6cf1SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 13942ddb6cf1Smrg 13952ddb6cf1Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 13962ddb6cf1Smrg 13972ddb6cf1Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 13982ddb6cf1Smrg# 13992ddb6cf1Smrg# This file is free software; the Free Software Foundation 14002ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 14012ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 14022ddb6cf1Smrg 14032ddb6cf1Smrg# serial 4 14042ddb6cf1Smrg 1405a1d141d5Smrg# AM_MAKE_INCLUDE() 1406a1d141d5Smrg# ----------------- 1407a1d141d5Smrg# Check to see how make treats includes. 1408a1d141d5SmrgAC_DEFUN([AM_MAKE_INCLUDE], 1409a1d141d5Smrg[am_make=${MAKE-make} 1410a1d141d5Smrgcat > confinc << 'END' 1411a1d141d5Smrgam__doit: 14122ddb6cf1Smrg @echo this is the am__doit target 1413a1d141d5Smrg.PHONY: am__doit 1414a1d141d5SmrgEND 1415a1d141d5Smrg# If we don't find an include directive, just comment out the code. 1416a1d141d5SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1417a1d141d5Smrgam__include="#" 1418a1d141d5Smrgam__quote= 1419a1d141d5Smrg_am_result=none 1420a1d141d5Smrg# First try GNU make style include. 1421a1d141d5Smrgecho "include confinc" > confmf 14222ddb6cf1Smrg# Ignore all kinds of additional output from `make'. 14232ddb6cf1Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 14242ddb6cf1Smrg*the\ am__doit\ target*) 14252ddb6cf1Smrg am__include=include 14262ddb6cf1Smrg am__quote= 14272ddb6cf1Smrg _am_result=GNU 14282ddb6cf1Smrg ;; 14292ddb6cf1Smrgesac 1430a1d141d5Smrg# Now try BSD make style include. 1431a1d141d5Smrgif test "$am__include" = "#"; then 1432a1d141d5Smrg echo '.include "confinc"' > confmf 14332ddb6cf1Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 14342ddb6cf1Smrg *the\ am__doit\ target*) 14352ddb6cf1Smrg am__include=.include 14362ddb6cf1Smrg am__quote="\"" 14372ddb6cf1Smrg _am_result=BSD 14382ddb6cf1Smrg ;; 14392ddb6cf1Smrg esac 1440a1d141d5Smrgfi 1441a1d141d5SmrgAC_SUBST([am__include]) 1442a1d141d5SmrgAC_SUBST([am__quote]) 1443a1d141d5SmrgAC_MSG_RESULT([$_am_result]) 1444a1d141d5Smrgrm -f confinc confmf 1445a1d141d5Smrg]) 1446a1d141d5Smrg 14472ddb6cf1Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1448a1d141d5Smrg 14492ddb6cf1Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 14502ddb6cf1Smrg# Free Software Foundation, Inc. 14512ddb6cf1Smrg# 14522ddb6cf1Smrg# This file is free software; the Free Software Foundation 14532ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 14542ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1455a1d141d5Smrg 14562ddb6cf1Smrg# serial 6 1457a1d141d5Smrg 14582ddb6cf1Smrg# AM_MISSING_PROG(NAME, PROGRAM) 14592ddb6cf1Smrg# ------------------------------ 14602ddb6cf1SmrgAC_DEFUN([AM_MISSING_PROG], 14612ddb6cf1Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 14622ddb6cf1Smrg$1=${$1-"${am_missing_run}$2"} 14632ddb6cf1SmrgAC_SUBST($1)]) 1464a1d141d5Smrg 1465a1d141d5Smrg 14662ddb6cf1Smrg# AM_MISSING_HAS_RUN 14672ddb6cf1Smrg# ------------------ 14682ddb6cf1Smrg# Define MISSING if not defined so far and test if it supports --run. 14692ddb6cf1Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 14702ddb6cf1SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 14712ddb6cf1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 14722ddb6cf1SmrgAC_REQUIRE_AUX_FILE([missing])dnl 14732ddb6cf1Smrgif test x"${MISSING+set}" != xset; then 14742ddb6cf1Smrg case $am_aux_dir in 14752ddb6cf1Smrg *\ * | *\ *) 14762ddb6cf1Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 14772ddb6cf1Smrg *) 14782ddb6cf1Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 14792ddb6cf1Smrg esac 14802ddb6cf1Smrgfi 14812ddb6cf1Smrg# Use eval to expand $SHELL 14822ddb6cf1Smrgif eval "$MISSING --run true"; then 14832ddb6cf1Smrg am_missing_run="$MISSING --run " 1484a1d141d5Smrgelse 14852ddb6cf1Smrg am_missing_run= 14862ddb6cf1Smrg AC_MSG_WARN([`missing' script is too old or missing]) 1487a1d141d5Smrgfi 14882ddb6cf1Smrg]) 1489a1d141d5Smrg 14902ddb6cf1Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 14912ddb6cf1Smrg# 14922ddb6cf1Smrg# This file is free software; the Free Software Foundation 14932ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 14942ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1495a1d141d5Smrg 14962ddb6cf1Smrg# AM_PROG_MKDIR_P 14972ddb6cf1Smrg# --------------- 14982ddb6cf1Smrg# Check for `mkdir -p'. 14992ddb6cf1SmrgAC_DEFUN([AM_PROG_MKDIR_P], 15002ddb6cf1Smrg[AC_PREREQ([2.60])dnl 15012ddb6cf1SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 15022ddb6cf1Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 15032ddb6cf1Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 15042ddb6cf1Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 15052ddb6cf1Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 15062ddb6cf1Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 15072ddb6cf1Smrgdnl adjustment using top_builddir (which is defined more often than 15082ddb6cf1Smrgdnl MKDIR_P). 15092ddb6cf1SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 15102ddb6cf1Smrgcase $mkdir_p in 15112ddb6cf1Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 15122ddb6cf1Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 15132ddb6cf1Smrgesac 15142ddb6cf1Smrg]) 1515a1d141d5Smrg 15162ddb6cf1Smrg# Helper functions for option handling. -*- Autoconf -*- 1517a1d141d5Smrg 15182ddb6cf1Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 15192ddb6cf1Smrg# 15202ddb6cf1Smrg# This file is free software; the Free Software Foundation 15212ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 15222ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1523a1d141d5Smrg 15242ddb6cf1Smrg# serial 4 1525a1d141d5Smrg 15262ddb6cf1Smrg# _AM_MANGLE_OPTION(NAME) 15272ddb6cf1Smrg# ----------------------- 15282ddb6cf1SmrgAC_DEFUN([_AM_MANGLE_OPTION], 15292ddb6cf1Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1530a1d141d5Smrg 15312ddb6cf1Smrg# _AM_SET_OPTION(NAME) 15322ddb6cf1Smrg# ------------------------------ 15332ddb6cf1Smrg# Set option NAME. Presently that only means defining a flag for this option. 15342ddb6cf1SmrgAC_DEFUN([_AM_SET_OPTION], 15352ddb6cf1Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1536a1d141d5Smrg 15372ddb6cf1Smrg# _AM_SET_OPTIONS(OPTIONS) 15382ddb6cf1Smrg# ---------------------------------- 15392ddb6cf1Smrg# OPTIONS is a space-separated list of Automake options. 15402ddb6cf1SmrgAC_DEFUN([_AM_SET_OPTIONS], 15412ddb6cf1Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1542a1d141d5Smrg 15432ddb6cf1Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 15442ddb6cf1Smrg# ------------------------------------------- 15452ddb6cf1Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 15462ddb6cf1SmrgAC_DEFUN([_AM_IF_OPTION], 15472ddb6cf1Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1548a1d141d5Smrg 15492ddb6cf1Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1550a1d141d5Smrg 15512ddb6cf1Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 15522ddb6cf1Smrg# Free Software Foundation, Inc. 15532ddb6cf1Smrg# 15542ddb6cf1Smrg# This file is free software; the Free Software Foundation 15552ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 15562ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1557a1d141d5Smrg 15582ddb6cf1Smrg# serial 5 1559a1d141d5Smrg 15602ddb6cf1Smrg# AM_SANITY_CHECK 15612ddb6cf1Smrg# --------------- 15622ddb6cf1SmrgAC_DEFUN([AM_SANITY_CHECK], 15632ddb6cf1Smrg[AC_MSG_CHECKING([whether build environment is sane]) 15642ddb6cf1Smrg# Just in case 15652ddb6cf1Smrgsleep 1 15662ddb6cf1Smrgecho timestamp > conftest.file 15672ddb6cf1Smrg# Reject unsafe characters in $srcdir or the absolute working directory 15682ddb6cf1Smrg# name. Accept space and tab only in the latter. 15692ddb6cf1Smrgam_lf=' 15702ddb6cf1Smrg' 15712ddb6cf1Smrgcase `pwd` in 15722ddb6cf1Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 15732ddb6cf1Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 15742ddb6cf1Smrgesac 15752ddb6cf1Smrgcase $srcdir in 15762ddb6cf1Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 15772ddb6cf1Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 15782ddb6cf1Smrgesac 1579a1d141d5Smrg 15802ddb6cf1Smrg# Do `set' in a subshell so we don't clobber the current shell's 15812ddb6cf1Smrg# arguments. Must try -L first in case configure is actually a 15822ddb6cf1Smrg# symlink; some systems play weird games with the mod time of symlinks 15832ddb6cf1Smrg# (eg FreeBSD returns the mod time of the symlink's containing 15842ddb6cf1Smrg# directory). 15852ddb6cf1Smrgif ( 15862ddb6cf1Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 15872ddb6cf1Smrg if test "$[*]" = "X"; then 15882ddb6cf1Smrg # -L didn't work. 15892ddb6cf1Smrg set X `ls -t "$srcdir/configure" conftest.file` 15902ddb6cf1Smrg fi 15912ddb6cf1Smrg rm -f conftest.file 15922ddb6cf1Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 15932ddb6cf1Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1594a1d141d5Smrg 15952ddb6cf1Smrg # If neither matched, then we have a broken ls. This can happen 15962ddb6cf1Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 15972ddb6cf1Smrg # broken ls alias from the environment. This has actually 15982ddb6cf1Smrg # happened. Such a system could not be considered "sane". 15992ddb6cf1Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 16002ddb6cf1Smrgalias in your environment]) 16012ddb6cf1Smrg fi 1602a1d141d5Smrg 16032ddb6cf1Smrg test "$[2]" = conftest.file 16042ddb6cf1Smrg ) 16052ddb6cf1Smrgthen 16062ddb6cf1Smrg # Ok. 16072ddb6cf1Smrg : 16082ddb6cf1Smrgelse 16092ddb6cf1Smrg AC_MSG_ERROR([newly created file is older than distributed files! 16102ddb6cf1SmrgCheck your system clock]) 16112ddb6cf1Smrgfi 16122ddb6cf1SmrgAC_MSG_RESULT(yes)]) 1613a1d141d5Smrg 16142ddb6cf1Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 1615a1d141d5Smrg# 16162ddb6cf1Smrg# This file is free software; the Free Software Foundation 16172ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 16182ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 16192ddb6cf1Smrg 16202ddb6cf1Smrg# serial 1 16212ddb6cf1Smrg 16222ddb6cf1Smrg# AM_SILENT_RULES([DEFAULT]) 16232ddb6cf1Smrg# -------------------------- 16242ddb6cf1Smrg# Enable less verbose build rules; with the default set to DEFAULT 16252ddb6cf1Smrg# (`yes' being less verbose, `no' or empty being verbose). 16262ddb6cf1SmrgAC_DEFUN([AM_SILENT_RULES], 16272ddb6cf1Smrg[AC_ARG_ENABLE([silent-rules], 16282ddb6cf1Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 16292ddb6cf1Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 16302ddb6cf1Smrgcase $enable_silent_rules in 16312ddb6cf1Smrgyes) AM_DEFAULT_VERBOSITY=0;; 16322ddb6cf1Smrgno) AM_DEFAULT_VERBOSITY=1;; 16332ddb6cf1Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 16342ddb6cf1Smrgesac 16352ddb6cf1SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 16362ddb6cf1SmrgAM_BACKSLASH='\' 16372ddb6cf1SmrgAC_SUBST([AM_BACKSLASH])dnl 16382ddb6cf1Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 16392ddb6cf1Smrg]) 16402ddb6cf1Smrg 16412ddb6cf1Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1642a1d141d5Smrg# 16432ddb6cf1Smrg# This file is free software; the Free Software Foundation 16442ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 16452ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1646a1d141d5Smrg 16472ddb6cf1Smrg# AM_PROG_INSTALL_STRIP 16482ddb6cf1Smrg# --------------------- 16492ddb6cf1Smrg# One issue with vendor `install' (even GNU) is that you can't 16502ddb6cf1Smrg# specify the program used to strip binaries. This is especially 16512ddb6cf1Smrg# annoying in cross-compiling environments, where the build's strip 16522ddb6cf1Smrg# is unlikely to handle the host's binaries. 16532ddb6cf1Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 16542ddb6cf1Smrg# always use install-sh in `make install-strip', and initialize 16552ddb6cf1Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 16562ddb6cf1SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 16572ddb6cf1Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 16582ddb6cf1Smrg# Installed binaries are usually stripped using `strip' when the user 16592ddb6cf1Smrg# run `make install-strip'. However `strip' might not be the right 16602ddb6cf1Smrg# tool to use in cross-compilation environments, therefore Automake 16612ddb6cf1Smrg# will honor the `STRIP' environment variable to overrule this program. 16622ddb6cf1Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 16632ddb6cf1Smrgif test "$cross_compiling" != no; then 16642ddb6cf1Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1665a1d141d5Smrgfi 16662ddb6cf1SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 16672ddb6cf1SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1668a1d141d5Smrg 16692ddb6cf1Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 1670a1d141d5Smrg# 16712ddb6cf1Smrg# This file is free software; the Free Software Foundation 16722ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 16732ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 1674a1d141d5Smrg 16752ddb6cf1Smrg# serial 2 1676a1d141d5Smrg 16772ddb6cf1Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 16782ddb6cf1Smrg# --------------------------- 16792ddb6cf1Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 16802ddb6cf1Smrg# This macro is traced by Automake. 16812ddb6cf1SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1682a1d141d5Smrg 16832ddb6cf1Smrg# AM_SUBST_NOTMAKE(VARIABLE) 16842ddb6cf1Smrg# --------------------------- 16852ddb6cf1Smrg# Public sister of _AM_SUBST_NOTMAKE. 16862ddb6cf1SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1687a1d141d5Smrg 16882ddb6cf1Smrg# Check how to create a tarball. -*- Autoconf -*- 1689a1d141d5Smrg 16902ddb6cf1Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 1691a1d141d5Smrg# 16922ddb6cf1Smrg# This file is free software; the Free Software Foundation 16932ddb6cf1Smrg# gives unlimited permission to copy and/or distribute it, 16942ddb6cf1Smrg# with or without modifications, as long as this notice is preserved. 16952ddb6cf1Smrg 16962ddb6cf1Smrg# serial 2 16972ddb6cf1Smrg 16982ddb6cf1Smrg# _AM_PROG_TAR(FORMAT) 16992ddb6cf1Smrg# -------------------- 17002ddb6cf1Smrg# Check how to create a tarball in format FORMAT. 17012ddb6cf1Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 1702a1d141d5Smrg# 17032ddb6cf1Smrg# Substitute a variable $(am__tar) that is a command 17042ddb6cf1Smrg# writing to stdout a FORMAT-tarball containing the directory 17052ddb6cf1Smrg# $tardir. 17062ddb6cf1Smrg# tardir=directory && $(am__tar) > result.tar 1707a1d141d5Smrg# 17082ddb6cf1Smrg# Substitute a variable $(am__untar) that extract such 17092ddb6cf1Smrg# a tarball read from stdin. 17102ddb6cf1Smrg# $(am__untar) < result.tar 17112ddb6cf1SmrgAC_DEFUN([_AM_PROG_TAR], 17122ddb6cf1Smrg[# Always define AMTAR for backward compatibility. 17132ddb6cf1SmrgAM_MISSING_PROG([AMTAR], [tar]) 17142ddb6cf1Smrgm4_if([$1], [v7], 17152ddb6cf1Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 17162ddb6cf1Smrg [m4_case([$1], [ustar],, [pax],, 17172ddb6cf1Smrg [m4_fatal([Unknown tar format])]) 17182ddb6cf1SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 17192ddb6cf1Smrg# Loop over all known methods to create a tar archive until one works. 17202ddb6cf1Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 17212ddb6cf1Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 17222ddb6cf1Smrg# Do not fold the above two line into one, because Tru64 sh and 17232ddb6cf1Smrg# Solaris sh will not grok spaces in the rhs of `-'. 17242ddb6cf1Smrgfor _am_tool in $_am_tools 17252ddb6cf1Smrgdo 17262ddb6cf1Smrg case $_am_tool in 17272ddb6cf1Smrg gnutar) 17282ddb6cf1Smrg for _am_tar in tar gnutar gtar; 17292ddb6cf1Smrg do 17302ddb6cf1Smrg AM_RUN_LOG([$_am_tar --version]) && break 17312ddb6cf1Smrg done 17322ddb6cf1Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 17332ddb6cf1Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 17342ddb6cf1Smrg am__untar="$_am_tar -xf -" 17352ddb6cf1Smrg ;; 17362ddb6cf1Smrg plaintar) 17372ddb6cf1Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 17382ddb6cf1Smrg # ustar tarball either. 17392ddb6cf1Smrg (tar --version) >/dev/null 2>&1 && continue 17402ddb6cf1Smrg am__tar='tar chf - "$$tardir"' 17412ddb6cf1Smrg am__tar_='tar chf - "$tardir"' 17422ddb6cf1Smrg am__untar='tar xf -' 17432ddb6cf1Smrg ;; 17442ddb6cf1Smrg pax) 17452ddb6cf1Smrg am__tar='pax -L -x $1 -w "$$tardir"' 17462ddb6cf1Smrg am__tar_='pax -L -x $1 -w "$tardir"' 17472ddb6cf1Smrg am__untar='pax -r' 17482ddb6cf1Smrg ;; 17492ddb6cf1Smrg cpio) 17502ddb6cf1Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 17512ddb6cf1Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 17522ddb6cf1Smrg am__untar='cpio -i -H $1 -d' 17532ddb6cf1Smrg ;; 17542ddb6cf1Smrg none) 17552ddb6cf1Smrg am__tar=false 17562ddb6cf1Smrg am__tar_=false 17572ddb6cf1Smrg am__untar=false 17582ddb6cf1Smrg ;; 17592ddb6cf1Smrg esac 1760a1d141d5Smrg 17612ddb6cf1Smrg # If the value was cached, stop now. We just wanted to have am__tar 17622ddb6cf1Smrg # and am__untar set. 17632ddb6cf1Smrg test -n "${am_cv_prog_tar_$1}" && break 1764a1d141d5Smrg 17652ddb6cf1Smrg # tar/untar a dummy directory, and stop if the command works 17662ddb6cf1Smrg rm -rf conftest.dir 17672ddb6cf1Smrg mkdir conftest.dir 17682ddb6cf1Smrg echo GrepMe > conftest.dir/file 17692ddb6cf1Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 17702ddb6cf1Smrg rm -rf conftest.dir 17712ddb6cf1Smrg if test -s conftest.tar; then 17722ddb6cf1Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 17732ddb6cf1Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 17742ddb6cf1Smrg fi 17752ddb6cf1Smrgdone 17762ddb6cf1Smrgrm -rf conftest.dir 1777a1d141d5Smrg 17782ddb6cf1SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 17792ddb6cf1SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 17802ddb6cf1SmrgAC_SUBST([am__tar]) 17812ddb6cf1SmrgAC_SUBST([am__untar]) 17822ddb6cf1Smrg]) # _AM_PROG_TAR 1783a1d141d5Smrg 1784