aclocal.m4 revision 7da8b7e3
17da8b7e3Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 27da8b7e3Smrg 37da8b7e3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 47da8b7e3Smrg# 2005 Free Software Foundation, Inc. 57da8b7e3Smrg# This file is free software; the Free Software Foundation 67da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 77da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 87da8b7e3Smrg 97da8b7e3Smrg# This program is distributed in the hope that it will be useful, 107da8b7e3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 117da8b7e3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 127da8b7e3Smrg# PARTICULAR PURPOSE. 137da8b7e3Smrg 147da8b7e3Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 157da8b7e3Smrg# 167da8b7e3Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 177da8b7e3Smrg# 187da8b7e3Smrg# This program is free software; you can redistribute it and/or modify 197da8b7e3Smrg# it under the terms of the GNU General Public License as published by 207da8b7e3Smrg# the Free Software Foundation; either version 2 of the License, or 217da8b7e3Smrg# (at your option) any later version. 227da8b7e3Smrg# 237da8b7e3Smrg# This program is distributed in the hope that it will be useful, but 247da8b7e3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 257da8b7e3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 267da8b7e3Smrg# General Public License for more details. 277da8b7e3Smrg# 287da8b7e3Smrg# You should have received a copy of the GNU General Public License 297da8b7e3Smrg# along with this program; if not, write to the Free Software 307da8b7e3Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 317da8b7e3Smrg# 327da8b7e3Smrg# As a special exception to the GNU General Public License, if you 337da8b7e3Smrg# distribute this file as part of a program that contains a 347da8b7e3Smrg# configuration script generated by Autoconf, you may include it under 357da8b7e3Smrg# the same distribution terms that you use for the rest of that program. 367da8b7e3Smrg 377da8b7e3Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 387da8b7e3Smrg# ---------------------------------- 397da8b7e3SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 407da8b7e3Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 417da8b7e3Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 427da8b7e3SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 437da8b7e3Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 447da8b7e3Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 457da8b7e3Smrgfi 467da8b7e3Smrgif test -n "$PKG_CONFIG"; then 477da8b7e3Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 487da8b7e3Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 497da8b7e3Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 507da8b7e3Smrg AC_MSG_RESULT([yes]) 517da8b7e3Smrg else 527da8b7e3Smrg AC_MSG_RESULT([no]) 537da8b7e3Smrg PKG_CONFIG="" 547da8b7e3Smrg fi 557da8b7e3Smrg 567da8b7e3Smrgfi[]dnl 577da8b7e3Smrg])# PKG_PROG_PKG_CONFIG 587da8b7e3Smrg 597da8b7e3Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 607da8b7e3Smrg# 617da8b7e3Smrg# Check to see whether a particular set of modules exists. Similar 627da8b7e3Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 637da8b7e3Smrg# 647da8b7e3Smrg# 657da8b7e3Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 667da8b7e3Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 677da8b7e3Smrg# PKG_CHECK_EXISTS manually 687da8b7e3Smrg# -------------------------------------------------------------- 697da8b7e3SmrgAC_DEFUN([PKG_CHECK_EXISTS], 707da8b7e3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 717da8b7e3Smrgif test -n "$PKG_CONFIG" && \ 727da8b7e3Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 737da8b7e3Smrg m4_ifval([$2], [$2], [:]) 747da8b7e3Smrgm4_ifvaln([$3], [else 757da8b7e3Smrg $3])dnl 767da8b7e3Smrgfi]) 777da8b7e3Smrg 787da8b7e3Smrg 797da8b7e3Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 807da8b7e3Smrg# --------------------------------------------- 817da8b7e3Smrgm4_define([_PKG_CONFIG], 827da8b7e3Smrg[if test -n "$PKG_CONFIG"; then 837da8b7e3Smrg if test -n "$$1"; then 847da8b7e3Smrg pkg_cv_[]$1="$$1" 857da8b7e3Smrg else 867da8b7e3Smrg PKG_CHECK_EXISTS([$3], 877da8b7e3Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 887da8b7e3Smrg [pkg_failed=yes]) 897da8b7e3Smrg fi 907da8b7e3Smrgelse 917da8b7e3Smrg pkg_failed=untried 927da8b7e3Smrgfi[]dnl 937da8b7e3Smrg])# _PKG_CONFIG 947da8b7e3Smrg 957da8b7e3Smrg# _PKG_SHORT_ERRORS_SUPPORTED 967da8b7e3Smrg# ----------------------------- 977da8b7e3SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 987da8b7e3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 997da8b7e3Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1007da8b7e3Smrg _pkg_short_errors_supported=yes 1017da8b7e3Smrgelse 1027da8b7e3Smrg _pkg_short_errors_supported=no 1037da8b7e3Smrgfi[]dnl 1047da8b7e3Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1057da8b7e3Smrg 1067da8b7e3Smrg 1077da8b7e3Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1087da8b7e3Smrg# [ACTION-IF-NOT-FOUND]) 1097da8b7e3Smrg# 1107da8b7e3Smrg# 1117da8b7e3Smrg# Note that if there is a possibility the first call to 1127da8b7e3Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1137da8b7e3Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1147da8b7e3Smrg# 1157da8b7e3Smrg# 1167da8b7e3Smrg# -------------------------------------------------------------- 1177da8b7e3SmrgAC_DEFUN([PKG_CHECK_MODULES], 1187da8b7e3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1197da8b7e3SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1207da8b7e3SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1217da8b7e3Smrg 1227da8b7e3Smrgpkg_failed=no 1237da8b7e3SmrgAC_MSG_CHECKING([for $1]) 1247da8b7e3Smrg 1257da8b7e3Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1267da8b7e3Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1277da8b7e3Smrg 1287da8b7e3Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1297da8b7e3Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1307da8b7e3SmrgSee the pkg-config man page for more details.]) 1317da8b7e3Smrg 1327da8b7e3Smrgif test $pkg_failed = yes; then 1337da8b7e3Smrg _PKG_SHORT_ERRORS_SUPPORTED 1347da8b7e3Smrg if test $_pkg_short_errors_supported = yes; then 1357da8b7e3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 1367da8b7e3Smrg else 1377da8b7e3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 1387da8b7e3Smrg fi 1397da8b7e3Smrg # Put the nasty error message in config.log where it belongs 1407da8b7e3Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1417da8b7e3Smrg 1427da8b7e3Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 1437da8b7e3Smrg[Package requirements ($2) were not met: 1447da8b7e3Smrg 1457da8b7e3Smrg$$1_PKG_ERRORS 1467da8b7e3Smrg 1477da8b7e3SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1487da8b7e3Smrginstalled software in a non-standard prefix. 1497da8b7e3Smrg 1507da8b7e3Smrg_PKG_TEXT 1517da8b7e3Smrg])], 1527da8b7e3Smrg [$4]) 1537da8b7e3Smrgelif test $pkg_failed = untried; then 1547da8b7e3Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 1557da8b7e3Smrg[The pkg-config script could not be found or is too old. Make sure it 1567da8b7e3Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1577da8b7e3Smrgpath to pkg-config. 1587da8b7e3Smrg 1597da8b7e3Smrg_PKG_TEXT 1607da8b7e3Smrg 1617da8b7e3SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 1627da8b7e3Smrg [$4]) 1637da8b7e3Smrgelse 1647da8b7e3Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1657da8b7e3Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1667da8b7e3Smrg AC_MSG_RESULT([yes]) 1677da8b7e3Smrg ifelse([$3], , :, [$3]) 1687da8b7e3Smrgfi[]dnl 1697da8b7e3Smrg])# PKG_CHECK_MODULES 1707da8b7e3Smrg 1717da8b7e3Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:37:54 mrg Exp $ 1727da8b7e3Smrgdnl 1737da8b7e3Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 1747da8b7e3Smrgdnl 1757da8b7e3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1767da8b7e3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1777da8b7e3Smrgdnl the above copyright notice appear in all copies and that both that 1787da8b7e3Smrgdnl copyright notice and this permission notice appear in supporting 1797da8b7e3Smrgdnl documentation. 1807da8b7e3Smrgdnl 1817da8b7e3Smrgdnl The above copyright notice and this permission notice shall be included 1827da8b7e3Smrgdnl in all copies or substantial portions of the Software. 1837da8b7e3Smrgdnl 1847da8b7e3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1857da8b7e3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1867da8b7e3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1877da8b7e3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1887da8b7e3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1897da8b7e3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1907da8b7e3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1917da8b7e3Smrgdnl 1927da8b7e3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1937da8b7e3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1947da8b7e3Smrgdnl other dealings in this Software without prior written authorization 1957da8b7e3Smrgdnl from the copyright holders. 1967da8b7e3Smrgdnl 1977da8b7e3Smrg 1987da8b7e3Smrg# XORG_PROG_RAWCPP() 1997da8b7e3Smrg# ------------------ 2007da8b7e3Smrg# Find cpp program and necessary flags for use in pre-processing text files 2017da8b7e3Smrg# such as man pages and config files 2027da8b7e3SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 2037da8b7e3SmrgAC_REQUIRE([AC_PROG_CPP]) 2047da8b7e3SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 2057da8b7e3Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 2067da8b7e3Smrg 2077da8b7e3Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 2087da8b7e3Smrg# which is not the best choice for supporting other OS'es, but covers most 2097da8b7e3Smrg# of the ones we need for now. 2107da8b7e3SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 2117da8b7e3SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 2127da8b7e3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 2137da8b7e3Smrg AC_MSG_RESULT([no]) 2147da8b7e3Smrgelse 2157da8b7e3Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 2167da8b7e3Smrg RAWCPPFLAGS=-undef 2177da8b7e3Smrg AC_MSG_RESULT([yes]) 2187da8b7e3Smrg else 2197da8b7e3Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 2207da8b7e3Smrg fi 2217da8b7e3Smrgfi 2227da8b7e3Smrgrm -f conftest.$ac_ext 2237da8b7e3Smrg 2247da8b7e3SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 2257da8b7e3SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 2267da8b7e3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 2277da8b7e3Smrg AC_MSG_RESULT([no]) 2287da8b7e3Smrgelse 2297da8b7e3Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 2307da8b7e3Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 2317da8b7e3Smrg AC_MSG_RESULT([yes]) 2327da8b7e3Smrg else 2337da8b7e3Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 2347da8b7e3Smrg fi 2357da8b7e3Smrgfi 2367da8b7e3Smrgrm -f conftest.$ac_ext 2377da8b7e3SmrgAC_SUBST(RAWCPPFLAGS) 2387da8b7e3Smrg]) # XORG_PROG_RAWCPP 2397da8b7e3Smrg 2407da8b7e3Smrg# XORG_MANPAGE_SECTIONS() 2417da8b7e3Smrg# ----------------------- 2427da8b7e3Smrg# Determine which sections man pages go in for the different man page types 2437da8b7e3Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 2447da8b7e3Smrg# Not sure if there's any better way than just hardcoding by OS name. 2457da8b7e3Smrg# Override default settings by setting environment variables 2467da8b7e3Smrg 2477da8b7e3SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 2487da8b7e3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2497da8b7e3Smrg 2507da8b7e3Smrgif test x$APP_MAN_SUFFIX = x ; then 2517da8b7e3Smrg case $host_os in 2527da8b7e3Smrg linux*) APP_MAN_SUFFIX=1x ;; 2537da8b7e3Smrg *) APP_MAN_SUFFIX=1 ;; 2547da8b7e3Smrg esac 2557da8b7e3Smrgfi 2567da8b7e3Smrgif test x$APP_MAN_DIR = x ; then 2577da8b7e3Smrg case $host_os in 2587da8b7e3Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 2597da8b7e3Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 2607da8b7e3Smrg esac 2617da8b7e3Smrgfi 2627da8b7e3Smrg 2637da8b7e3Smrgif test x$LIB_MAN_SUFFIX = x ; then 2647da8b7e3Smrg case $host_os in 2657da8b7e3Smrg linux*) LIB_MAN_SUFFIX=3x ;; 2667da8b7e3Smrg *) LIB_MAN_SUFFIX=3 ;; 2677da8b7e3Smrg esac 2687da8b7e3Smrgfi 2697da8b7e3Smrgif test x$LIB_MAN_DIR = x ; then 2707da8b7e3Smrg case $host_os in 2717da8b7e3Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 2727da8b7e3Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 2737da8b7e3Smrg esac 2747da8b7e3Smrgfi 2757da8b7e3Smrg 2767da8b7e3Smrgif test x$FILE_MAN_SUFFIX = x ; then 2777da8b7e3Smrg case $host_os in 2787da8b7e3Smrg linux*) FILE_MAN_SUFFIX=5x ;; 2797da8b7e3Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 2807da8b7e3Smrg *) FILE_MAN_SUFFIX=5 ;; 2817da8b7e3Smrg esac 2827da8b7e3Smrgfi 2837da8b7e3Smrgif test x$FILE_MAN_DIR = x ; then 2847da8b7e3Smrg case $host_os in 2857da8b7e3Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 2867da8b7e3Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 2877da8b7e3Smrg esac 2887da8b7e3Smrgfi 2897da8b7e3Smrg 2907da8b7e3Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 2917da8b7e3Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 2927da8b7e3Smrgif test x$MISC_MAN_SUFFIX = x ; then 2937da8b7e3Smrg case $host_os in 2947da8b7e3Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 2957da8b7e3Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 2967da8b7e3Smrg *) MISC_MAN_SUFFIX=7 ;; 2977da8b7e3Smrg esac 2987da8b7e3Smrgfi 2997da8b7e3Smrgif test x$MISC_MAN_DIR = x ; then 3007da8b7e3Smrg case $host_os in 3017da8b7e3Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 3027da8b7e3Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 3037da8b7e3Smrg esac 3047da8b7e3Smrgfi 3057da8b7e3Smrg 3067da8b7e3Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 3077da8b7e3Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 3087da8b7e3Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 3097da8b7e3Smrg case $host_os in 3107da8b7e3Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 3117da8b7e3Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 3127da8b7e3Smrg *) DRIVER_MAN_SUFFIX=4 ;; 3137da8b7e3Smrg esac 3147da8b7e3Smrgfi 3157da8b7e3Smrgif test x$DRIVER_MAN_DIR = x ; then 3167da8b7e3Smrg case $host_os in 3177da8b7e3Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 3187da8b7e3Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 3197da8b7e3Smrg esac 3207da8b7e3Smrgfi 3217da8b7e3Smrg 3227da8b7e3Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 3237da8b7e3Smrg case $host_os in 3247da8b7e3Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 3257da8b7e3Smrg *) ADMIN_MAN_SUFFIX=8 ;; 3267da8b7e3Smrg esac 3277da8b7e3Smrgfi 3287da8b7e3Smrgif test x$ADMIN_MAN_DIR = x ; then 3297da8b7e3Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 3307da8b7e3Smrgfi 3317da8b7e3Smrg 3327da8b7e3Smrg 3337da8b7e3SmrgAC_SUBST([APP_MAN_SUFFIX]) 3347da8b7e3SmrgAC_SUBST([LIB_MAN_SUFFIX]) 3357da8b7e3SmrgAC_SUBST([FILE_MAN_SUFFIX]) 3367da8b7e3SmrgAC_SUBST([MISC_MAN_SUFFIX]) 3377da8b7e3SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 3387da8b7e3SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 3397da8b7e3SmrgAC_SUBST([APP_MAN_DIR]) 3407da8b7e3SmrgAC_SUBST([LIB_MAN_DIR]) 3417da8b7e3SmrgAC_SUBST([FILE_MAN_DIR]) 3427da8b7e3SmrgAC_SUBST([MISC_MAN_DIR]) 3437da8b7e3SmrgAC_SUBST([DRIVER_MAN_DIR]) 3447da8b7e3SmrgAC_SUBST([ADMIN_MAN_DIR]) 3457da8b7e3Smrg]) # XORG_MANPAGE_SECTIONS 3467da8b7e3Smrg 3477da8b7e3Smrg# XORG_CHECK_LINUXDOC 3487da8b7e3Smrg# ------------------- 3497da8b7e3Smrg# Defines the variable MAKE_TEXT if the necessary tools and 3507da8b7e3Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 3517da8b7e3Smrg# Whether or not the necessary tools and files are found can be checked 3527da8b7e3Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 3537da8b7e3SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 3547da8b7e3SmrgAC_CHECK_FILE( 3557da8b7e3Smrg [$prefix/share/X11/sgml/defs.ent], 3567da8b7e3Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 3577da8b7e3Smrg [DEFS_ENT_PATH=] 3587da8b7e3Smrg) 3597da8b7e3Smrg 3607da8b7e3SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 3617da8b7e3SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 3627da8b7e3Smrg 3637da8b7e3SmrgAC_MSG_CHECKING([Whether to build documentation]) 3647da8b7e3Smrg 3657da8b7e3Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 3667da8b7e3Smrg BUILDDOC=yes 3677da8b7e3Smrgelse 3687da8b7e3Smrg BUILDDOC=no 3697da8b7e3Smrgfi 3707da8b7e3Smrg 3717da8b7e3SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 3727da8b7e3Smrg 3737da8b7e3SmrgAC_MSG_RESULT([$BUILDDOC]) 3747da8b7e3Smrg 3757da8b7e3SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 3767da8b7e3Smrg 3777da8b7e3Smrgif test x$PS2PDF != x ; then 3787da8b7e3Smrg BUILDPDFDOC=yes 3797da8b7e3Smrgelse 3807da8b7e3Smrg BUILDPDFDOC=no 3817da8b7e3Smrgfi 3827da8b7e3Smrg 3837da8b7e3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 3847da8b7e3Smrg 3857da8b7e3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 3867da8b7e3Smrg 3877da8b7e3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 3887da8b7e3SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 3897da8b7e3SmrgMAKE_PDF="$PS2PDF" 3907da8b7e3SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 3917da8b7e3Smrg 3927da8b7e3SmrgAC_SUBST(MAKE_TEXT) 3937da8b7e3SmrgAC_SUBST(MAKE_PS) 3947da8b7e3SmrgAC_SUBST(MAKE_PDF) 3957da8b7e3SmrgAC_SUBST(MAKE_HTML) 3967da8b7e3Smrg]) # XORG_CHECK_LINUXDOC 3977da8b7e3Smrg 3987da8b7e3Smrg# XORG_CHECK_MALLOC_ZERO 3997da8b7e3Smrg# ---------------------- 4007da8b7e3Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 4017da8b7e3Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 4027da8b7e3Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 4037da8b7e3SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 4047da8b7e3SmrgAC_ARG_ENABLE(malloc0returnsnull, 4057da8b7e3Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 4067da8b7e3Smrg [malloc(0) returns NULL (default: auto)]), 4077da8b7e3Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 4087da8b7e3Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 4097da8b7e3Smrg 4107da8b7e3SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 4117da8b7e3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 4127da8b7e3Smrg AC_RUN_IFELSE([ 4137da8b7e3Smrgchar *malloc(); 4147da8b7e3Smrgchar *realloc(); 4157da8b7e3Smrgchar *calloc(); 4167da8b7e3Smrgmain() { 4177da8b7e3Smrg char *m0, *r0, *c0, *p; 4187da8b7e3Smrg m0 = malloc(0); 4197da8b7e3Smrg p = malloc(10); 4207da8b7e3Smrg r0 = realloc(p,0); 4217da8b7e3Smrg c0 = calloc(0); 4227da8b7e3Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 4237da8b7e3Smrg}], 4247da8b7e3Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 4257da8b7e3Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 4267da8b7e3Smrgfi 4277da8b7e3SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 4287da8b7e3Smrg 4297da8b7e3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 4307da8b7e3Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 4317da8b7e3Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 4327da8b7e3Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 4337da8b7e3Smrgelse 4347da8b7e3Smrg MALLOC_ZERO_CFLAGS="" 4357da8b7e3Smrg XMALLOC_ZERO_CFLAGS="" 4367da8b7e3Smrg XTMALLOC_ZERO_CFLAGS="" 4377da8b7e3Smrgfi 4387da8b7e3Smrg 4397da8b7e3SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 4407da8b7e3SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 4417da8b7e3SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 4427da8b7e3Smrg]) # XORG_CHECK_MALLOC_ZERO 4437da8b7e3Smrg 4447da8b7e3Smrgdnl Copyright 2005 Red Hat, Inc 4457da8b7e3Smrgdnl 4467da8b7e3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 4477da8b7e3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 4487da8b7e3Smrgdnl the above copyright notice appear in all copies and that both that 4497da8b7e3Smrgdnl copyright notice and this permission notice appear in supporting 4507da8b7e3Smrgdnl documentation. 4517da8b7e3Smrgdnl 4527da8b7e3Smrgdnl The above copyright notice and this permission notice shall be included 4537da8b7e3Smrgdnl in all copies or substantial portions of the Software. 4547da8b7e3Smrgdnl 4557da8b7e3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 4567da8b7e3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 4577da8b7e3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 4587da8b7e3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 4597da8b7e3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 4607da8b7e3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4617da8b7e3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 4627da8b7e3Smrgdnl 4637da8b7e3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 4647da8b7e3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 4657da8b7e3Smrgdnl other dealings in this Software without prior written authorization 4667da8b7e3Smrgdnl from the copyright holders. 4677da8b7e3Smrgdnl 4687da8b7e3Smrg 4697da8b7e3Smrg# XORG_RELEASE_VERSION 4707da8b7e3Smrg# -------------------- 4717da8b7e3Smrg# Adds --with/without-release-string and changes the PACKAGE and 4727da8b7e3Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 4737da8b7e3Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 4747da8b7e3Smrg 4757da8b7e3SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 4767da8b7e3Smrg AC_ARG_WITH(release-version, 4777da8b7e3Smrg AC_HELP_STRING([--with-release-version=STRING], 4787da8b7e3Smrg [Use release version string in package name]), 4797da8b7e3Smrg [RELEASE_VERSION="$withval"], 4807da8b7e3Smrg [RELEASE_VERSION=""]) 4817da8b7e3Smrg if test "x$RELEASE_VERSION" != "x"; then 4827da8b7e3Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 4837da8b7e3Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 4847da8b7e3Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 4857da8b7e3Smrg fi 4867da8b7e3Smrg]) 4877da8b7e3Smrg 4887da8b7e3Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 4897da8b7e3Smrg# 4907da8b7e3Smrg# This file is free software; the Free Software Foundation 4917da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 4927da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 4937da8b7e3Smrg 4947da8b7e3Smrg# AM_AUTOMAKE_VERSION(VERSION) 4957da8b7e3Smrg# ---------------------------- 4967da8b7e3Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 4977da8b7e3Smrg# generated from the m4 files accompanying Automake X.Y. 4987da8b7e3SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 4997da8b7e3Smrg 5007da8b7e3Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 5017da8b7e3Smrg# ------------------------------- 5027da8b7e3Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 5037da8b7e3Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 5047da8b7e3SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5057da8b7e3Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 5067da8b7e3Smrg 5077da8b7e3Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 5087da8b7e3Smrg 5097da8b7e3Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 5107da8b7e3Smrg# 5117da8b7e3Smrg# This file is free software; the Free Software Foundation 5127da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 5137da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 5147da8b7e3Smrg 5157da8b7e3Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 5167da8b7e3Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 5177da8b7e3Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 5187da8b7e3Smrg# 5197da8b7e3Smrg# Of course, Automake must honor this variable whenever it calls a 5207da8b7e3Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 5217da8b7e3Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 5227da8b7e3Smrg# depending on how configure is run. This is pretty annoying, since 5237da8b7e3Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 5247da8b7e3Smrg# source directory, any form will work fine, but in subdirectories a 5257da8b7e3Smrg# relative path needs to be adjusted first. 5267da8b7e3Smrg# 5277da8b7e3Smrg# $ac_aux_dir/missing 5287da8b7e3Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 5297da8b7e3Smrg# $top_srcdir/$ac_aux_dir/missing 5307da8b7e3Smrg# fails if $ac_aux_dir is absolute, 5317da8b7e3Smrg# fails when called from a subdirectory in a VPATH build with 5327da8b7e3Smrg# a relative $ac_aux_dir 5337da8b7e3Smrg# 5347da8b7e3Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 5357da8b7e3Smrg# are both prefixed by $srcdir. In an in-source build this is usually 5367da8b7e3Smrg# harmless because $srcdir is `.', but things will broke when you 5377da8b7e3Smrg# start a VPATH build or use an absolute $srcdir. 5387da8b7e3Smrg# 5397da8b7e3Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 5407da8b7e3Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 5417da8b7e3Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 5427da8b7e3Smrg# and then we would define $MISSING as 5437da8b7e3Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 5447da8b7e3Smrg# This will work as long as MISSING is not called from configure, because 5457da8b7e3Smrg# unfortunately $(top_srcdir) has no meaning in configure. 5467da8b7e3Smrg# However there are other variables, like CC, which are often used in 5477da8b7e3Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 5487da8b7e3Smrg# 5497da8b7e3Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 5507da8b7e3Smrg# absolute PATH. The drawback is that using absolute paths prevent a 5517da8b7e3Smrg# configured tree to be moved without reconfiguration. 5527da8b7e3Smrg 5537da8b7e3SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 5547da8b7e3Smrg[dnl Rely on autoconf to set up CDPATH properly. 5557da8b7e3SmrgAC_PREREQ([2.50])dnl 5567da8b7e3Smrg# expand $ac_aux_dir to an absolute path 5577da8b7e3Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 5587da8b7e3Smrg]) 5597da8b7e3Smrg 5607da8b7e3Smrg# AM_CONDITIONAL -*- Autoconf -*- 5617da8b7e3Smrg 5627da8b7e3Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 5637da8b7e3Smrg# Free Software Foundation, Inc. 5647da8b7e3Smrg# 5657da8b7e3Smrg# This file is free software; the Free Software Foundation 5667da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 5677da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 5687da8b7e3Smrg 5697da8b7e3Smrg# serial 7 5707da8b7e3Smrg 5717da8b7e3Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 5727da8b7e3Smrg# ------------------------------------- 5737da8b7e3Smrg# Define a conditional. 5747da8b7e3SmrgAC_DEFUN([AM_CONDITIONAL], 5757da8b7e3Smrg[AC_PREREQ(2.52)dnl 5767da8b7e3Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 5777da8b7e3Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 5787da8b7e3SmrgAC_SUBST([$1_TRUE]) 5797da8b7e3SmrgAC_SUBST([$1_FALSE]) 5807da8b7e3Smrgif $2; then 5817da8b7e3Smrg $1_TRUE= 5827da8b7e3Smrg $1_FALSE='#' 5837da8b7e3Smrgelse 5847da8b7e3Smrg $1_TRUE='#' 5857da8b7e3Smrg $1_FALSE= 5867da8b7e3Smrgfi 5877da8b7e3SmrgAC_CONFIG_COMMANDS_PRE( 5887da8b7e3Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 5897da8b7e3Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 5907da8b7e3SmrgUsually this means the macro was only invoked conditionally.]]) 5917da8b7e3Smrgfi])]) 5927da8b7e3Smrg 5937da8b7e3Smrg 5947da8b7e3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 5957da8b7e3Smrg# Free Software Foundation, Inc. 5967da8b7e3Smrg# 5977da8b7e3Smrg# This file is free software; the Free Software Foundation 5987da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 5997da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 6007da8b7e3Smrg 6017da8b7e3Smrg# serial 8 6027da8b7e3Smrg 6037da8b7e3Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 6047da8b7e3Smrg# written in clear, in which case automake, when reading aclocal.m4, 6057da8b7e3Smrg# will think it sees a *use*, and therefore will trigger all it's 6067da8b7e3Smrg# C support machinery. Also note that it means that autoscan, seeing 6077da8b7e3Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 6087da8b7e3Smrg 6097da8b7e3Smrg 6107da8b7e3Smrg# _AM_DEPENDENCIES(NAME) 6117da8b7e3Smrg# ---------------------- 6127da8b7e3Smrg# See how the compiler implements dependency checking. 6137da8b7e3Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 6147da8b7e3Smrg# We try a few techniques and use that to set a single cache variable. 6157da8b7e3Smrg# 6167da8b7e3Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 6177da8b7e3Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 6187da8b7e3Smrg# dependency, and given that the user is not expected to run this macro, 6197da8b7e3Smrg# just rely on AC_PROG_CC. 6207da8b7e3SmrgAC_DEFUN([_AM_DEPENDENCIES], 6217da8b7e3Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 6227da8b7e3SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 6237da8b7e3SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 6247da8b7e3SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 6257da8b7e3Smrg 6267da8b7e3Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 6277da8b7e3Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 6287da8b7e3Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 6297da8b7e3Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 6307da8b7e3Smrg [depcc="$$1" am_compiler_list=]) 6317da8b7e3Smrg 6327da8b7e3SmrgAC_CACHE_CHECK([dependency style of $depcc], 6337da8b7e3Smrg [am_cv_$1_dependencies_compiler_type], 6347da8b7e3Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 6357da8b7e3Smrg # We make a subdir and do the tests there. Otherwise we can end up 6367da8b7e3Smrg # making bogus files that we don't know about and never remove. For 6377da8b7e3Smrg # instance it was reported that on HP-UX the gcc test will end up 6387da8b7e3Smrg # making a dummy file named `D' -- because `-MD' means `put the output 6397da8b7e3Smrg # in D'. 6407da8b7e3Smrg mkdir conftest.dir 6417da8b7e3Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 6427da8b7e3Smrg # using a relative directory. 6437da8b7e3Smrg cp "$am_depcomp" conftest.dir 6447da8b7e3Smrg cd conftest.dir 6457da8b7e3Smrg # We will build objects and dependencies in a subdirectory because 6467da8b7e3Smrg # it helps to detect inapplicable dependency modes. For instance 6477da8b7e3Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 6487da8b7e3Smrg # side effect of compilation, but ICC will put the dependencies in 6497da8b7e3Smrg # the current directory while Tru64 will put them in the object 6507da8b7e3Smrg # directory. 6517da8b7e3Smrg mkdir sub 6527da8b7e3Smrg 6537da8b7e3Smrg am_cv_$1_dependencies_compiler_type=none 6547da8b7e3Smrg if test "$am_compiler_list" = ""; then 6557da8b7e3Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 6567da8b7e3Smrg fi 6577da8b7e3Smrg for depmode in $am_compiler_list; do 6587da8b7e3Smrg # Setup a source with many dependencies, because some compilers 6597da8b7e3Smrg # like to wrap large dependency lists on column 80 (with \), and 6607da8b7e3Smrg # we should not choose a depcomp mode which is confused by this. 6617da8b7e3Smrg # 6627da8b7e3Smrg # We need to recreate these files for each test, as the compiler may 6637da8b7e3Smrg # overwrite some of them when testing with obscure command lines. 6647da8b7e3Smrg # This happens at least with the AIX C compiler. 6657da8b7e3Smrg : > sub/conftest.c 6667da8b7e3Smrg for i in 1 2 3 4 5 6; do 6677da8b7e3Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 6687da8b7e3Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 6697da8b7e3Smrg # Solaris 8's {/usr,}/bin/sh. 6707da8b7e3Smrg touch sub/conftst$i.h 6717da8b7e3Smrg done 6727da8b7e3Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 6737da8b7e3Smrg 6747da8b7e3Smrg case $depmode in 6757da8b7e3Smrg nosideeffect) 6767da8b7e3Smrg # after this tag, mechanisms are not by side-effect, so they'll 6777da8b7e3Smrg # only be used when explicitly requested 6787da8b7e3Smrg if test "x$enable_dependency_tracking" = xyes; then 6797da8b7e3Smrg continue 6807da8b7e3Smrg else 6817da8b7e3Smrg break 6827da8b7e3Smrg fi 6837da8b7e3Smrg ;; 6847da8b7e3Smrg none) break ;; 6857da8b7e3Smrg esac 6867da8b7e3Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 6877da8b7e3Smrg # mode. It turns out that the SunPro C++ compiler does not properly 6887da8b7e3Smrg # handle `-M -o', and we need to detect this. 6897da8b7e3Smrg if depmode=$depmode \ 6907da8b7e3Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 6917da8b7e3Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 6927da8b7e3Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 6937da8b7e3Smrg >/dev/null 2>conftest.err && 6947da8b7e3Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 6957da8b7e3Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 6967da8b7e3Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 6977da8b7e3Smrg # icc doesn't choke on unknown options, it will just issue warnings 6987da8b7e3Smrg # or remarks (even with -Werror). So we grep stderr for any message 6997da8b7e3Smrg # that says an option was ignored or not supported. 7007da8b7e3Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 7017da8b7e3Smrg # icc: Command line warning: ignoring option '-M'; no argument required 7027da8b7e3Smrg # The diagnosis changed in icc 8.0: 7037da8b7e3Smrg # icc: Command line remark: option '-MP' not supported 7047da8b7e3Smrg if (grep 'ignoring option' conftest.err || 7057da8b7e3Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 7067da8b7e3Smrg am_cv_$1_dependencies_compiler_type=$depmode 7077da8b7e3Smrg break 7087da8b7e3Smrg fi 7097da8b7e3Smrg fi 7107da8b7e3Smrg done 7117da8b7e3Smrg 7127da8b7e3Smrg cd .. 7137da8b7e3Smrg rm -rf conftest.dir 7147da8b7e3Smrgelse 7157da8b7e3Smrg am_cv_$1_dependencies_compiler_type=none 7167da8b7e3Smrgfi 7177da8b7e3Smrg]) 7187da8b7e3SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 7197da8b7e3SmrgAM_CONDITIONAL([am__fastdep$1], [ 7207da8b7e3Smrg test "x$enable_dependency_tracking" != xno \ 7217da8b7e3Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 7227da8b7e3Smrg]) 7237da8b7e3Smrg 7247da8b7e3Smrg 7257da8b7e3Smrg# AM_SET_DEPDIR 7267da8b7e3Smrg# ------------- 7277da8b7e3Smrg# Choose a directory name for dependency files. 7287da8b7e3Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 7297da8b7e3SmrgAC_DEFUN([AM_SET_DEPDIR], 7307da8b7e3Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 7317da8b7e3SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 7327da8b7e3Smrg]) 7337da8b7e3Smrg 7347da8b7e3Smrg 7357da8b7e3Smrg# AM_DEP_TRACK 7367da8b7e3Smrg# ------------ 7377da8b7e3SmrgAC_DEFUN([AM_DEP_TRACK], 7387da8b7e3Smrg[AC_ARG_ENABLE(dependency-tracking, 7397da8b7e3Smrg[ --disable-dependency-tracking speeds up one-time build 7407da8b7e3Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 7417da8b7e3Smrgif test "x$enable_dependency_tracking" != xno; then 7427da8b7e3Smrg am_depcomp="$ac_aux_dir/depcomp" 7437da8b7e3Smrg AMDEPBACKSLASH='\' 7447da8b7e3Smrgfi 7457da8b7e3SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 7467da8b7e3SmrgAC_SUBST([AMDEPBACKSLASH]) 7477da8b7e3Smrg]) 7487da8b7e3Smrg 7497da8b7e3Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 7507da8b7e3Smrg 7517da8b7e3Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 7527da8b7e3Smrg# Free Software Foundation, Inc. 7537da8b7e3Smrg# 7547da8b7e3Smrg# This file is free software; the Free Software Foundation 7557da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 7567da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 7577da8b7e3Smrg 7587da8b7e3Smrg#serial 3 7597da8b7e3Smrg 7607da8b7e3Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 7617da8b7e3Smrg# ------------------------------ 7627da8b7e3SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 7637da8b7e3Smrg[for mf in $CONFIG_FILES; do 7647da8b7e3Smrg # Strip MF so we end up with the name of the file. 7657da8b7e3Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 7667da8b7e3Smrg # Check whether this is an Automake generated Makefile or not. 7677da8b7e3Smrg # We used to match only the files named `Makefile.in', but 7687da8b7e3Smrg # some people rename them; so instead we look at the file content. 7697da8b7e3Smrg # Grep'ing the first line is not enough: some people post-process 7707da8b7e3Smrg # each Makefile.in and add a new line on top of each file to say so. 7717da8b7e3Smrg # So let's grep whole file. 7727da8b7e3Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 7737da8b7e3Smrg dirpart=`AS_DIRNAME("$mf")` 7747da8b7e3Smrg else 7757da8b7e3Smrg continue 7767da8b7e3Smrg fi 7777da8b7e3Smrg # Extract the definition of DEPDIR, am__include, and am__quote 7787da8b7e3Smrg # from the Makefile without running `make'. 7797da8b7e3Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 7807da8b7e3Smrg test -z "$DEPDIR" && continue 7817da8b7e3Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 7827da8b7e3Smrg test -z "am__include" && continue 7837da8b7e3Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 7847da8b7e3Smrg # When using ansi2knr, U may be empty or an underscore; expand it 7857da8b7e3Smrg U=`sed -n 's/^U = //p' < "$mf"` 7867da8b7e3Smrg # Find all dependency output files, they are included files with 7877da8b7e3Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 7887da8b7e3Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 7897da8b7e3Smrg # expansion. 7907da8b7e3Smrg for file in `sed -n " 7917da8b7e3Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 7927da8b7e3Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 7937da8b7e3Smrg # Make sure the directory exists. 7947da8b7e3Smrg test -f "$dirpart/$file" && continue 7957da8b7e3Smrg fdir=`AS_DIRNAME(["$file"])` 7967da8b7e3Smrg AS_MKDIR_P([$dirpart/$fdir]) 7977da8b7e3Smrg # echo "creating $dirpart/$file" 7987da8b7e3Smrg echo '# dummy' > "$dirpart/$file" 7997da8b7e3Smrg done 8007da8b7e3Smrgdone 8017da8b7e3Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8027da8b7e3Smrg 8037da8b7e3Smrg 8047da8b7e3Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8057da8b7e3Smrg# ----------------------------- 8067da8b7e3Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 8077da8b7e3Smrg# 8087da8b7e3Smrg# This code is only required when automatic dependency tracking 8097da8b7e3Smrg# is enabled. FIXME. This creates each `.P' file that we will 8107da8b7e3Smrg# need in order to bootstrap the dependency handling code. 8117da8b7e3SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8127da8b7e3Smrg[AC_CONFIG_COMMANDS([depfiles], 8137da8b7e3Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8147da8b7e3Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8157da8b7e3Smrg]) 8167da8b7e3Smrg 8177da8b7e3Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 8187da8b7e3Smrg# Free Software Foundation, Inc. 8197da8b7e3Smrg# 8207da8b7e3Smrg# This file is free software; the Free Software Foundation 8217da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 8227da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 8237da8b7e3Smrg 8247da8b7e3Smrg# serial 8 8257da8b7e3Smrg 8267da8b7e3Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8277da8b7e3SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 8287da8b7e3Smrg 8297da8b7e3Smrg# Do all the work for Automake. -*- Autoconf -*- 8307da8b7e3Smrg 8317da8b7e3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 8327da8b7e3Smrg# Free Software Foundation, Inc. 8337da8b7e3Smrg# 8347da8b7e3Smrg# This file is free software; the Free Software Foundation 8357da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 8367da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 8377da8b7e3Smrg 8387da8b7e3Smrg# serial 12 8397da8b7e3Smrg 8407da8b7e3Smrg# This macro actually does too much. Some checks are only needed if 8417da8b7e3Smrg# your package does certain things. But this isn't really a big deal. 8427da8b7e3Smrg 8437da8b7e3Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 8447da8b7e3Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 8457da8b7e3Smrg# ----------------------------------------------- 8467da8b7e3Smrg# The call with PACKAGE and VERSION arguments is the old style 8477da8b7e3Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 8487da8b7e3Smrg# and VERSION should now be passed to AC_INIT and removed from 8497da8b7e3Smrg# the call to AM_INIT_AUTOMAKE. 8507da8b7e3Smrg# We support both call styles for the transition. After 8517da8b7e3Smrg# the next Automake release, Autoconf can make the AC_INIT 8527da8b7e3Smrg# arguments mandatory, and then we can depend on a new Autoconf 8537da8b7e3Smrg# release and drop the old call support. 8547da8b7e3SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 8557da8b7e3Smrg[AC_PREREQ([2.58])dnl 8567da8b7e3Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 8577da8b7e3Smrgdnl the ones we care about. 8587da8b7e3Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 8597da8b7e3SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 8607da8b7e3SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 8617da8b7e3Smrg# test to see if srcdir already configured 8627da8b7e3Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 8637da8b7e3Smrg test -f $srcdir/config.status; then 8647da8b7e3Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 8657da8b7e3Smrgfi 8667da8b7e3Smrg 8677da8b7e3Smrg# test whether we have cygpath 8687da8b7e3Smrgif test -z "$CYGPATH_W"; then 8697da8b7e3Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 8707da8b7e3Smrg CYGPATH_W='cygpath -w' 8717da8b7e3Smrg else 8727da8b7e3Smrg CYGPATH_W=echo 8737da8b7e3Smrg fi 8747da8b7e3Smrgfi 8757da8b7e3SmrgAC_SUBST([CYGPATH_W]) 8767da8b7e3Smrg 8777da8b7e3Smrg# Define the identity of the package. 8787da8b7e3Smrgdnl Distinguish between old-style and new-style calls. 8797da8b7e3Smrgm4_ifval([$2], 8807da8b7e3Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 8817da8b7e3Smrg AC_SUBST([PACKAGE], [$1])dnl 8827da8b7e3Smrg AC_SUBST([VERSION], [$2])], 8837da8b7e3Smrg[_AM_SET_OPTIONS([$1])dnl 8847da8b7e3Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 8857da8b7e3Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 8867da8b7e3Smrg 8877da8b7e3Smrg_AM_IF_OPTION([no-define],, 8887da8b7e3Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 8897da8b7e3Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 8907da8b7e3Smrg 8917da8b7e3Smrg# Some tools Automake needs. 8927da8b7e3SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 8937da8b7e3SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 8947da8b7e3SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 8957da8b7e3SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 8967da8b7e3SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 8977da8b7e3SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 8987da8b7e3SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 8997da8b7e3SmrgAM_PROG_INSTALL_SH 9007da8b7e3SmrgAM_PROG_INSTALL_STRIP 9017da8b7e3SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 9027da8b7e3Smrg# We need awk for the "check" target. The system "awk" is bad on 9037da8b7e3Smrg# some platforms. 9047da8b7e3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 9057da8b7e3SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9067da8b7e3SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9077da8b7e3Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9087da8b7e3Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9097da8b7e3Smrg [_AM_PROG_TAR([v7])])]) 9107da8b7e3Smrg_AM_IF_OPTION([no-dependencies],, 9117da8b7e3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 9127da8b7e3Smrg [_AM_DEPENDENCIES(CC)], 9137da8b7e3Smrg [define([AC_PROG_CC], 9147da8b7e3Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 9157da8b7e3SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 9167da8b7e3Smrg [_AM_DEPENDENCIES(CXX)], 9177da8b7e3Smrg [define([AC_PROG_CXX], 9187da8b7e3Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 9197da8b7e3Smrg]) 9207da8b7e3Smrg]) 9217da8b7e3Smrg 9227da8b7e3Smrg 9237da8b7e3Smrg# When config.status generates a header, we must update the stamp-h file. 9247da8b7e3Smrg# This file resides in the same directory as the config header 9257da8b7e3Smrg# that is generated. The stamp files are numbered to have different names. 9267da8b7e3Smrg 9277da8b7e3Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9287da8b7e3Smrg# loop where config.status creates the headers, so we can generate 9297da8b7e3Smrg# our stamp files there. 9307da8b7e3SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9317da8b7e3Smrg[# Compute $1's index in $config_headers. 9327da8b7e3Smrg_am_stamp_count=1 9337da8b7e3Smrgfor _am_header in $config_headers :; do 9347da8b7e3Smrg case $_am_header in 9357da8b7e3Smrg $1 | $1:* ) 9367da8b7e3Smrg break ;; 9377da8b7e3Smrg * ) 9387da8b7e3Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9397da8b7e3Smrg esac 9407da8b7e3Smrgdone 9417da8b7e3Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 9427da8b7e3Smrg 9437da8b7e3Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9447da8b7e3Smrg# 9457da8b7e3Smrg# This file is free software; the Free Software Foundation 9467da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 9477da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 9487da8b7e3Smrg 9497da8b7e3Smrg# AM_PROG_INSTALL_SH 9507da8b7e3Smrg# ------------------ 9517da8b7e3Smrg# Define $install_sh. 9527da8b7e3SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 9537da8b7e3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9547da8b7e3Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 9557da8b7e3SmrgAC_SUBST(install_sh)]) 9567da8b7e3Smrg 9577da8b7e3Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 9587da8b7e3Smrg# 9597da8b7e3Smrg# This file is free software; the Free Software Foundation 9607da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 9617da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 9627da8b7e3Smrg 9637da8b7e3Smrg# serial 2 9647da8b7e3Smrg 9657da8b7e3Smrg# Check whether the underlying file-system supports filenames 9667da8b7e3Smrg# with a leading dot. For instance MS-DOS doesn't. 9677da8b7e3SmrgAC_DEFUN([AM_SET_LEADING_DOT], 9687da8b7e3Smrg[rm -rf .tst 2>/dev/null 9697da8b7e3Smrgmkdir .tst 2>/dev/null 9707da8b7e3Smrgif test -d .tst; then 9717da8b7e3Smrg am__leading_dot=. 9727da8b7e3Smrgelse 9737da8b7e3Smrg am__leading_dot=_ 9747da8b7e3Smrgfi 9757da8b7e3Smrgrmdir .tst 2>/dev/null 9767da8b7e3SmrgAC_SUBST([am__leading_dot])]) 9777da8b7e3Smrg 9787da8b7e3Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9797da8b7e3Smrg# From Jim Meyering 9807da8b7e3Smrg 9817da8b7e3Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 9827da8b7e3Smrg# Free Software Foundation, Inc. 9837da8b7e3Smrg# 9847da8b7e3Smrg# This file is free software; the Free Software Foundation 9857da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 9867da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 9877da8b7e3Smrg 9887da8b7e3Smrg# serial 4 9897da8b7e3Smrg 9907da8b7e3SmrgAC_DEFUN([AM_MAINTAINER_MODE], 9917da8b7e3Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 9927da8b7e3Smrg dnl maintainer-mode is disabled by default 9937da8b7e3Smrg AC_ARG_ENABLE(maintainer-mode, 9947da8b7e3Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 9957da8b7e3Smrg (and sometimes confusing) to the casual installer], 9967da8b7e3Smrg USE_MAINTAINER_MODE=$enableval, 9977da8b7e3Smrg USE_MAINTAINER_MODE=no) 9987da8b7e3Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9997da8b7e3Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 10007da8b7e3Smrg MAINT=$MAINTAINER_MODE_TRUE 10017da8b7e3Smrg AC_SUBST(MAINT)dnl 10027da8b7e3Smrg] 10037da8b7e3Smrg) 10047da8b7e3Smrg 10057da8b7e3SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 10067da8b7e3Smrg 10077da8b7e3Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 10087da8b7e3Smrg 10097da8b7e3Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 10107da8b7e3Smrg# 10117da8b7e3Smrg# This file is free software; the Free Software Foundation 10127da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 10137da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 10147da8b7e3Smrg 10157da8b7e3Smrg# serial 3 10167da8b7e3Smrg 10177da8b7e3Smrg# AM_MAKE_INCLUDE() 10187da8b7e3Smrg# ----------------- 10197da8b7e3Smrg# Check to see how make treats includes. 10207da8b7e3SmrgAC_DEFUN([AM_MAKE_INCLUDE], 10217da8b7e3Smrg[am_make=${MAKE-make} 10227da8b7e3Smrgcat > confinc << 'END' 10237da8b7e3Smrgam__doit: 10247da8b7e3Smrg @echo done 10257da8b7e3Smrg.PHONY: am__doit 10267da8b7e3SmrgEND 10277da8b7e3Smrg# If we don't find an include directive, just comment out the code. 10287da8b7e3SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 10297da8b7e3Smrgam__include="#" 10307da8b7e3Smrgam__quote= 10317da8b7e3Smrg_am_result=none 10327da8b7e3Smrg# First try GNU make style include. 10337da8b7e3Smrgecho "include confinc" > confmf 10347da8b7e3Smrg# We grep out `Entering directory' and `Leaving directory' 10357da8b7e3Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 10367da8b7e3Smrg# In particular we don't look at `^make:' because GNU make might 10377da8b7e3Smrg# be invoked under some other name (usually "gmake"), in which 10387da8b7e3Smrg# case it prints its new name instead of `make'. 10397da8b7e3Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 10407da8b7e3Smrg am__include=include 10417da8b7e3Smrg am__quote= 10427da8b7e3Smrg _am_result=GNU 10437da8b7e3Smrgfi 10447da8b7e3Smrg# Now try BSD make style include. 10457da8b7e3Smrgif test "$am__include" = "#"; then 10467da8b7e3Smrg echo '.include "confinc"' > confmf 10477da8b7e3Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 10487da8b7e3Smrg am__include=.include 10497da8b7e3Smrg am__quote="\"" 10507da8b7e3Smrg _am_result=BSD 10517da8b7e3Smrg fi 10527da8b7e3Smrgfi 10537da8b7e3SmrgAC_SUBST([am__include]) 10547da8b7e3SmrgAC_SUBST([am__quote]) 10557da8b7e3SmrgAC_MSG_RESULT([$_am_result]) 10567da8b7e3Smrgrm -f confinc confmf 10577da8b7e3Smrg]) 10587da8b7e3Smrg 10597da8b7e3Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 10607da8b7e3Smrg 10617da8b7e3Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 10627da8b7e3Smrg# Free Software Foundation, Inc. 10637da8b7e3Smrg# 10647da8b7e3Smrg# This file is free software; the Free Software Foundation 10657da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 10667da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 10677da8b7e3Smrg 10687da8b7e3Smrg# serial 4 10697da8b7e3Smrg 10707da8b7e3Smrg# AM_MISSING_PROG(NAME, PROGRAM) 10717da8b7e3Smrg# ------------------------------ 10727da8b7e3SmrgAC_DEFUN([AM_MISSING_PROG], 10737da8b7e3Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 10747da8b7e3Smrg$1=${$1-"${am_missing_run}$2"} 10757da8b7e3SmrgAC_SUBST($1)]) 10767da8b7e3Smrg 10777da8b7e3Smrg 10787da8b7e3Smrg# AM_MISSING_HAS_RUN 10797da8b7e3Smrg# ------------------ 10807da8b7e3Smrg# Define MISSING if not defined so far and test if it supports --run. 10817da8b7e3Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 10827da8b7e3SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 10837da8b7e3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 10847da8b7e3Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 10857da8b7e3Smrg# Use eval to expand $SHELL 10867da8b7e3Smrgif eval "$MISSING --run true"; then 10877da8b7e3Smrg am_missing_run="$MISSING --run " 10887da8b7e3Smrgelse 10897da8b7e3Smrg am_missing_run= 10907da8b7e3Smrg AC_MSG_WARN([`missing' script is too old or missing]) 10917da8b7e3Smrgfi 10927da8b7e3Smrg]) 10937da8b7e3Smrg 10947da8b7e3Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 10957da8b7e3Smrg# 10967da8b7e3Smrg# This file is free software; the Free Software Foundation 10977da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 10987da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 10997da8b7e3Smrg 11007da8b7e3Smrg# AM_PROG_MKDIR_P 11017da8b7e3Smrg# --------------- 11027da8b7e3Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 11037da8b7e3Smrg# 11047da8b7e3Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 11057da8b7e3Smrg# created by `make install' are always world readable, even if the 11067da8b7e3Smrg# installer happens to have an overly restrictive umask (e.g. 077). 11077da8b7e3Smrg# This was a mistake. There are at least two reasons why we must not 11087da8b7e3Smrg# use `-m 0755': 11097da8b7e3Smrg# - it causes special bits like SGID to be ignored, 11107da8b7e3Smrg# - it may be too restrictive (some setups expect 775 directories). 11117da8b7e3Smrg# 11127da8b7e3Smrg# Do not use -m 0755 and let people choose whatever they expect by 11137da8b7e3Smrg# setting umask. 11147da8b7e3Smrg# 11157da8b7e3Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 11167da8b7e3Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 11177da8b7e3Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 11187da8b7e3Smrg# concurrently, both version can detect that a/ is missing, but only 11197da8b7e3Smrg# one can create it and the other will error out. Consequently we 11207da8b7e3Smrg# restrict ourselves to GNU make (using the --version option ensures 11217da8b7e3Smrg# this.) 11227da8b7e3SmrgAC_DEFUN([AM_PROG_MKDIR_P], 11237da8b7e3Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 11247da8b7e3Smrg # We used to keeping the `.' as first argument, in order to 11257da8b7e3Smrg # allow $(mkdir_p) to be used without argument. As in 11267da8b7e3Smrg # $(mkdir_p) $(somedir) 11277da8b7e3Smrg # where $(somedir) is conditionally defined. However this is wrong 11287da8b7e3Smrg # for two reasons: 11297da8b7e3Smrg # 1. if the package is installed by a user who cannot write `.' 11307da8b7e3Smrg # make install will fail, 11317da8b7e3Smrg # 2. the above comment should most certainly read 11327da8b7e3Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 11337da8b7e3Smrg # so it does not work when $(somedir) is undefined and 11347da8b7e3Smrg # $(DESTDIR) is not. 11357da8b7e3Smrg # To support the latter case, we have to write 11367da8b7e3Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 11377da8b7e3Smrg # so the `.' trick is pointless. 11387da8b7e3Smrg mkdir_p='mkdir -p --' 11397da8b7e3Smrgelse 11407da8b7e3Smrg # On NextStep and OpenStep, the `mkdir' command does not 11417da8b7e3Smrg # recognize any option. It will interpret all options as 11427da8b7e3Smrg # directories to create, and then abort because `.' already 11437da8b7e3Smrg # exists. 11447da8b7e3Smrg for d in ./-p ./--version; 11457da8b7e3Smrg do 11467da8b7e3Smrg test -d $d && rmdir $d 11477da8b7e3Smrg done 11487da8b7e3Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 11497da8b7e3Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 11507da8b7e3Smrg mkdir_p='$(mkinstalldirs)' 11517da8b7e3Smrg else 11527da8b7e3Smrg mkdir_p='$(install_sh) -d' 11537da8b7e3Smrg fi 11547da8b7e3Smrgfi 11557da8b7e3SmrgAC_SUBST([mkdir_p])]) 11567da8b7e3Smrg 11577da8b7e3Smrg# Helper functions for option handling. -*- Autoconf -*- 11587da8b7e3Smrg 11597da8b7e3Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 11607da8b7e3Smrg# 11617da8b7e3Smrg# This file is free software; the Free Software Foundation 11627da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 11637da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 11647da8b7e3Smrg 11657da8b7e3Smrg# serial 3 11667da8b7e3Smrg 11677da8b7e3Smrg# _AM_MANGLE_OPTION(NAME) 11687da8b7e3Smrg# ----------------------- 11697da8b7e3SmrgAC_DEFUN([_AM_MANGLE_OPTION], 11707da8b7e3Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11717da8b7e3Smrg 11727da8b7e3Smrg# _AM_SET_OPTION(NAME) 11737da8b7e3Smrg# ------------------------------ 11747da8b7e3Smrg# Set option NAME. Presently that only means defining a flag for this option. 11757da8b7e3SmrgAC_DEFUN([_AM_SET_OPTION], 11767da8b7e3Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 11777da8b7e3Smrg 11787da8b7e3Smrg# _AM_SET_OPTIONS(OPTIONS) 11797da8b7e3Smrg# ---------------------------------- 11807da8b7e3Smrg# OPTIONS is a space-separated list of Automake options. 11817da8b7e3SmrgAC_DEFUN([_AM_SET_OPTIONS], 11827da8b7e3Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11837da8b7e3Smrg 11847da8b7e3Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11857da8b7e3Smrg# ------------------------------------------- 11867da8b7e3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11877da8b7e3SmrgAC_DEFUN([_AM_IF_OPTION], 11887da8b7e3Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11897da8b7e3Smrg 11907da8b7e3Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 11917da8b7e3Smrg 11927da8b7e3Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 11937da8b7e3Smrg# Free Software Foundation, Inc. 11947da8b7e3Smrg# 11957da8b7e3Smrg# This file is free software; the Free Software Foundation 11967da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 11977da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 11987da8b7e3Smrg 11997da8b7e3Smrg# serial 4 12007da8b7e3Smrg 12017da8b7e3Smrg# AM_SANITY_CHECK 12027da8b7e3Smrg# --------------- 12037da8b7e3SmrgAC_DEFUN([AM_SANITY_CHECK], 12047da8b7e3Smrg[AC_MSG_CHECKING([whether build environment is sane]) 12057da8b7e3Smrg# Just in case 12067da8b7e3Smrgsleep 1 12077da8b7e3Smrgecho timestamp > conftest.file 12087da8b7e3Smrg# Do `set' in a subshell so we don't clobber the current shell's 12097da8b7e3Smrg# arguments. Must try -L first in case configure is actually a 12107da8b7e3Smrg# symlink; some systems play weird games with the mod time of symlinks 12117da8b7e3Smrg# (eg FreeBSD returns the mod time of the symlink's containing 12127da8b7e3Smrg# directory). 12137da8b7e3Smrgif ( 12147da8b7e3Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 12157da8b7e3Smrg if test "$[*]" = "X"; then 12167da8b7e3Smrg # -L didn't work. 12177da8b7e3Smrg set X `ls -t $srcdir/configure conftest.file` 12187da8b7e3Smrg fi 12197da8b7e3Smrg rm -f conftest.file 12207da8b7e3Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12217da8b7e3Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 12227da8b7e3Smrg 12237da8b7e3Smrg # If neither matched, then we have a broken ls. This can happen 12247da8b7e3Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12257da8b7e3Smrg # broken ls alias from the environment. This has actually 12267da8b7e3Smrg # happened. Such a system could not be considered "sane". 12277da8b7e3Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12287da8b7e3Smrgalias in your environment]) 12297da8b7e3Smrg fi 12307da8b7e3Smrg 12317da8b7e3Smrg test "$[2]" = conftest.file 12327da8b7e3Smrg ) 12337da8b7e3Smrgthen 12347da8b7e3Smrg # Ok. 12357da8b7e3Smrg : 12367da8b7e3Smrgelse 12377da8b7e3Smrg AC_MSG_ERROR([newly created file is older than distributed files! 12387da8b7e3SmrgCheck your system clock]) 12397da8b7e3Smrgfi 12407da8b7e3SmrgAC_MSG_RESULT(yes)]) 12417da8b7e3Smrg 12427da8b7e3Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 12437da8b7e3Smrg# 12447da8b7e3Smrg# This file is free software; the Free Software Foundation 12457da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 12467da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 12477da8b7e3Smrg 12487da8b7e3Smrg# AM_PROG_INSTALL_STRIP 12497da8b7e3Smrg# --------------------- 12507da8b7e3Smrg# One issue with vendor `install' (even GNU) is that you can't 12517da8b7e3Smrg# specify the program used to strip binaries. This is especially 12527da8b7e3Smrg# annoying in cross-compiling environments, where the build's strip 12537da8b7e3Smrg# is unlikely to handle the host's binaries. 12547da8b7e3Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 12557da8b7e3Smrg# always use install-sh in `make install-strip', and initialize 12567da8b7e3Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 12577da8b7e3SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12587da8b7e3Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12597da8b7e3Smrg# Installed binaries are usually stripped using `strip' when the user 12607da8b7e3Smrg# run `make install-strip'. However `strip' might not be the right 12617da8b7e3Smrg# tool to use in cross-compilation environments, therefore Automake 12627da8b7e3Smrg# will honor the `STRIP' environment variable to overrule this program. 12637da8b7e3Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 12647da8b7e3Smrgif test "$cross_compiling" != no; then 12657da8b7e3Smrg AC_CHECK_TOOL([STRIP], [strip], :) 12667da8b7e3Smrgfi 12677da8b7e3SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 12687da8b7e3SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12697da8b7e3Smrg 12707da8b7e3Smrg# Check how to create a tarball. -*- Autoconf -*- 12717da8b7e3Smrg 12727da8b7e3Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 12737da8b7e3Smrg# 12747da8b7e3Smrg# This file is free software; the Free Software Foundation 12757da8b7e3Smrg# gives unlimited permission to copy and/or distribute it, 12767da8b7e3Smrg# with or without modifications, as long as this notice is preserved. 12777da8b7e3Smrg 12787da8b7e3Smrg# serial 2 12797da8b7e3Smrg 12807da8b7e3Smrg# _AM_PROG_TAR(FORMAT) 12817da8b7e3Smrg# -------------------- 12827da8b7e3Smrg# Check how to create a tarball in format FORMAT. 12837da8b7e3Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 12847da8b7e3Smrg# 12857da8b7e3Smrg# Substitute a variable $(am__tar) that is a command 12867da8b7e3Smrg# writing to stdout a FORMAT-tarball containing the directory 12877da8b7e3Smrg# $tardir. 12887da8b7e3Smrg# tardir=directory && $(am__tar) > result.tar 12897da8b7e3Smrg# 12907da8b7e3Smrg# Substitute a variable $(am__untar) that extract such 12917da8b7e3Smrg# a tarball read from stdin. 12927da8b7e3Smrg# $(am__untar) < result.tar 12937da8b7e3SmrgAC_DEFUN([_AM_PROG_TAR], 12947da8b7e3Smrg[# Always define AMTAR for backward compatibility. 12957da8b7e3SmrgAM_MISSING_PROG([AMTAR], [tar]) 12967da8b7e3Smrgm4_if([$1], [v7], 12977da8b7e3Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 12987da8b7e3Smrg [m4_case([$1], [ustar],, [pax],, 12997da8b7e3Smrg [m4_fatal([Unknown tar format])]) 13007da8b7e3SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 13017da8b7e3Smrg# Loop over all known methods to create a tar archive until one works. 13027da8b7e3Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 13037da8b7e3Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 13047da8b7e3Smrg# Do not fold the above two line into one, because Tru64 sh and 13057da8b7e3Smrg# Solaris sh will not grok spaces in the rhs of `-'. 13067da8b7e3Smrgfor _am_tool in $_am_tools 13077da8b7e3Smrgdo 13087da8b7e3Smrg case $_am_tool in 13097da8b7e3Smrg gnutar) 13107da8b7e3Smrg for _am_tar in tar gnutar gtar; 13117da8b7e3Smrg do 13127da8b7e3Smrg AM_RUN_LOG([$_am_tar --version]) && break 13137da8b7e3Smrg done 13147da8b7e3Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 13157da8b7e3Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 13167da8b7e3Smrg am__untar="$_am_tar -xf -" 13177da8b7e3Smrg ;; 13187da8b7e3Smrg plaintar) 13197da8b7e3Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 13207da8b7e3Smrg # ustar tarball either. 13217da8b7e3Smrg (tar --version) >/dev/null 2>&1 && continue 13227da8b7e3Smrg am__tar='tar chf - "$$tardir"' 13237da8b7e3Smrg am__tar_='tar chf - "$tardir"' 13247da8b7e3Smrg am__untar='tar xf -' 13257da8b7e3Smrg ;; 13267da8b7e3Smrg pax) 13277da8b7e3Smrg am__tar='pax -L -x $1 -w "$$tardir"' 13287da8b7e3Smrg am__tar_='pax -L -x $1 -w "$tardir"' 13297da8b7e3Smrg am__untar='pax -r' 13307da8b7e3Smrg ;; 13317da8b7e3Smrg cpio) 13327da8b7e3Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 13337da8b7e3Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 13347da8b7e3Smrg am__untar='cpio -i -H $1 -d' 13357da8b7e3Smrg ;; 13367da8b7e3Smrg none) 13377da8b7e3Smrg am__tar=false 13387da8b7e3Smrg am__tar_=false 13397da8b7e3Smrg am__untar=false 13407da8b7e3Smrg ;; 13417da8b7e3Smrg esac 13427da8b7e3Smrg 13437da8b7e3Smrg # If the value was cached, stop now. We just wanted to have am__tar 13447da8b7e3Smrg # and am__untar set. 13457da8b7e3Smrg test -n "${am_cv_prog_tar_$1}" && break 13467da8b7e3Smrg 13477da8b7e3Smrg # tar/untar a dummy directory, and stop if the command works 13487da8b7e3Smrg rm -rf conftest.dir 13497da8b7e3Smrg mkdir conftest.dir 13507da8b7e3Smrg echo GrepMe > conftest.dir/file 13517da8b7e3Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 13527da8b7e3Smrg rm -rf conftest.dir 13537da8b7e3Smrg if test -s conftest.tar; then 13547da8b7e3Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 13557da8b7e3Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 13567da8b7e3Smrg fi 13577da8b7e3Smrgdone 13587da8b7e3Smrgrm -rf conftest.dir 13597da8b7e3Smrg 13607da8b7e3SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 13617da8b7e3SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 13627da8b7e3SmrgAC_SUBST([am__tar]) 13637da8b7e3SmrgAC_SUBST([am__untar]) 13647da8b7e3Smrg]) # _AM_PROG_TAR 13657da8b7e3Smrg 1366