aclocal.m4 revision 66fe65f6
166fe65f6Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 266fe65f6Smrg 366fe65f6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 466fe65f6Smrg# 2005 Free Software Foundation, Inc. 566fe65f6Smrg# This file is free software; the Free Software Foundation 666fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 766fe65f6Smrg# with or without modifications, as long as this notice is preserved. 866fe65f6Smrg 966fe65f6Smrg# This program is distributed in the hope that it will be useful, 1066fe65f6Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1166fe65f6Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1266fe65f6Smrg# PARTICULAR PURPOSE. 1366fe65f6Smrg 1466fe65f6Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 02:27:45 mrg Exp $ 1566fe65f6Smrgdnl 1666fe65f6Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 1766fe65f6Smrgdnl 1866fe65f6Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1966fe65f6Smrgdnl documentation for any purpose is hereby granted without fee, provided that 2066fe65f6Smrgdnl the above copyright notice appear in all copies and that both that 2166fe65f6Smrgdnl copyright notice and this permission notice appear in supporting 2266fe65f6Smrgdnl documentation. 2366fe65f6Smrgdnl 2466fe65f6Smrgdnl The above copyright notice and this permission notice shall be included 2566fe65f6Smrgdnl in all copies or substantial portions of the Software. 2666fe65f6Smrgdnl 2766fe65f6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2866fe65f6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2966fe65f6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3066fe65f6Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3166fe65f6Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3266fe65f6Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3366fe65f6Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 3466fe65f6Smrgdnl 3566fe65f6Smrgdnl Except as contained in this notice, the name of the copyright holders shall 3666fe65f6Smrgdnl not be used in advertising or otherwise to promote the sale, use or 3766fe65f6Smrgdnl other dealings in this Software without prior written authorization 3866fe65f6Smrgdnl from the copyright holders. 3966fe65f6Smrgdnl 4066fe65f6Smrg 4166fe65f6Smrg# XORG_PROG_RAWCPP() 4266fe65f6Smrg# ------------------ 4366fe65f6Smrg# Find cpp program and necessary flags for use in pre-processing text files 4466fe65f6Smrg# such as man pages and config files 4566fe65f6SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 4666fe65f6SmrgAC_REQUIRE([AC_PROG_CPP]) 4766fe65f6SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 4866fe65f6Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 4966fe65f6Smrg 5066fe65f6Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 5166fe65f6Smrg# which is not the best choice for supporting other OS'es, but covers most 5266fe65f6Smrg# of the ones we need for now. 5366fe65f6SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 5466fe65f6SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 5566fe65f6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 5666fe65f6Smrg AC_MSG_RESULT([no]) 5766fe65f6Smrgelse 5866fe65f6Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 5966fe65f6Smrg RAWCPPFLAGS=-undef 6066fe65f6Smrg AC_MSG_RESULT([yes]) 6166fe65f6Smrg else 6266fe65f6Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 6366fe65f6Smrg fi 6466fe65f6Smrgfi 6566fe65f6Smrgrm -f conftest.$ac_ext 6666fe65f6Smrg 6766fe65f6SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 6866fe65f6SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 6966fe65f6Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 7066fe65f6Smrg AC_MSG_RESULT([no]) 7166fe65f6Smrgelse 7266fe65f6Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 7366fe65f6Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 7466fe65f6Smrg AC_MSG_RESULT([yes]) 7566fe65f6Smrg else 7666fe65f6Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 7766fe65f6Smrg fi 7866fe65f6Smrgfi 7966fe65f6Smrgrm -f conftest.$ac_ext 8066fe65f6SmrgAC_SUBST(RAWCPPFLAGS) 8166fe65f6Smrg]) # XORG_PROG_RAWCPP 8266fe65f6Smrg 8366fe65f6Smrg# XORG_MANPAGE_SECTIONS() 8466fe65f6Smrg# ----------------------- 8566fe65f6Smrg# Determine which sections man pages go in for the different man page types 8666fe65f6Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8766fe65f6Smrg# Not sure if there's any better way than just hardcoding by OS name. 8866fe65f6Smrg# Override default settings by setting environment variables 8966fe65f6Smrg 9066fe65f6SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9166fe65f6SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9266fe65f6Smrg 9366fe65f6Smrgif test x$APP_MAN_SUFFIX = x ; then 9466fe65f6Smrg case $host_os in 9566fe65f6Smrg linux*) APP_MAN_SUFFIX=1x ;; 9666fe65f6Smrg *) APP_MAN_SUFFIX=1 ;; 9766fe65f6Smrg esac 9866fe65f6Smrgfi 9966fe65f6Smrgif test x$APP_MAN_DIR = x ; then 10066fe65f6Smrg case $host_os in 10166fe65f6Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 10266fe65f6Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 10366fe65f6Smrg esac 10466fe65f6Smrgfi 10566fe65f6Smrg 10666fe65f6Smrgif test x$LIB_MAN_SUFFIX = x ; then 10766fe65f6Smrg case $host_os in 10866fe65f6Smrg linux*) LIB_MAN_SUFFIX=3x ;; 10966fe65f6Smrg *) LIB_MAN_SUFFIX=3 ;; 11066fe65f6Smrg esac 11166fe65f6Smrgfi 11266fe65f6Smrgif test x$LIB_MAN_DIR = x ; then 11366fe65f6Smrg case $host_os in 11466fe65f6Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 11566fe65f6Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 11666fe65f6Smrg esac 11766fe65f6Smrgfi 11866fe65f6Smrg 11966fe65f6Smrgif test x$FILE_MAN_SUFFIX = x ; then 12066fe65f6Smrg case $host_os in 12166fe65f6Smrg linux*) FILE_MAN_SUFFIX=5x ;; 12266fe65f6Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 12366fe65f6Smrg *) FILE_MAN_SUFFIX=5 ;; 12466fe65f6Smrg esac 12566fe65f6Smrgfi 12666fe65f6Smrgif test x$FILE_MAN_DIR = x ; then 12766fe65f6Smrg case $host_os in 12866fe65f6Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 12966fe65f6Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 13066fe65f6Smrg esac 13166fe65f6Smrgfi 13266fe65f6Smrg 13366fe65f6Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 13466fe65f6Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 13566fe65f6Smrgif test x$MISC_MAN_SUFFIX = x ; then 13666fe65f6Smrg case $host_os in 13766fe65f6Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 13866fe65f6Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 13966fe65f6Smrg *) MISC_MAN_SUFFIX=7 ;; 14066fe65f6Smrg esac 14166fe65f6Smrgfi 14266fe65f6Smrgif test x$MISC_MAN_DIR = x ; then 14366fe65f6Smrg case $host_os in 14466fe65f6Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 14566fe65f6Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 14666fe65f6Smrg esac 14766fe65f6Smrgfi 14866fe65f6Smrg 14966fe65f6Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 15066fe65f6Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 15166fe65f6Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 15266fe65f6Smrg case $host_os in 15366fe65f6Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 15466fe65f6Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 15566fe65f6Smrg *) DRIVER_MAN_SUFFIX=4 ;; 15666fe65f6Smrg esac 15766fe65f6Smrgfi 15866fe65f6Smrgif test x$DRIVER_MAN_DIR = x ; then 15966fe65f6Smrg case $host_os in 16066fe65f6Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 16166fe65f6Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 16266fe65f6Smrg esac 16366fe65f6Smrgfi 16466fe65f6Smrg 16566fe65f6Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 16666fe65f6Smrg case $host_os in 16766fe65f6Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 16866fe65f6Smrg *) ADMIN_MAN_SUFFIX=8 ;; 16966fe65f6Smrg esac 17066fe65f6Smrgfi 17166fe65f6Smrgif test x$ADMIN_MAN_DIR = x ; then 17266fe65f6Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 17366fe65f6Smrgfi 17466fe65f6Smrg 17566fe65f6Smrg 17666fe65f6SmrgAC_SUBST([APP_MAN_SUFFIX]) 17766fe65f6SmrgAC_SUBST([LIB_MAN_SUFFIX]) 17866fe65f6SmrgAC_SUBST([FILE_MAN_SUFFIX]) 17966fe65f6SmrgAC_SUBST([MISC_MAN_SUFFIX]) 18066fe65f6SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 18166fe65f6SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 18266fe65f6SmrgAC_SUBST([APP_MAN_DIR]) 18366fe65f6SmrgAC_SUBST([LIB_MAN_DIR]) 18466fe65f6SmrgAC_SUBST([FILE_MAN_DIR]) 18566fe65f6SmrgAC_SUBST([MISC_MAN_DIR]) 18666fe65f6SmrgAC_SUBST([DRIVER_MAN_DIR]) 18766fe65f6SmrgAC_SUBST([ADMIN_MAN_DIR]) 18866fe65f6Smrg]) # XORG_MANPAGE_SECTIONS 18966fe65f6Smrg 19066fe65f6Smrg# XORG_CHECK_LINUXDOC 19166fe65f6Smrg# ------------------- 19266fe65f6Smrg# Defines the variable MAKE_TEXT if the necessary tools and 19366fe65f6Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 19466fe65f6Smrg# Whether or not the necessary tools and files are found can be checked 19566fe65f6Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 19666fe65f6SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 19766fe65f6SmrgAC_CHECK_FILE( 19866fe65f6Smrg [$prefix/share/X11/sgml/defs.ent], 19966fe65f6Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 20066fe65f6Smrg [DEFS_ENT_PATH=] 20166fe65f6Smrg) 20266fe65f6Smrg 20366fe65f6SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 20466fe65f6SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 20566fe65f6Smrg 20666fe65f6SmrgAC_MSG_CHECKING([Whether to build documentation]) 20766fe65f6Smrg 20866fe65f6Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 20966fe65f6Smrg BUILDDOC=yes 21066fe65f6Smrgelse 21166fe65f6Smrg BUILDDOC=no 21266fe65f6Smrgfi 21366fe65f6Smrg 21466fe65f6SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 21566fe65f6Smrg 21666fe65f6SmrgAC_MSG_RESULT([$BUILDDOC]) 21766fe65f6Smrg 21866fe65f6SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 21966fe65f6Smrg 22066fe65f6Smrgif test x$PS2PDF != x ; then 22166fe65f6Smrg BUILDPDFDOC=yes 22266fe65f6Smrgelse 22366fe65f6Smrg BUILDPDFDOC=no 22466fe65f6Smrgfi 22566fe65f6Smrg 22666fe65f6SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 22766fe65f6Smrg 22866fe65f6SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 22966fe65f6Smrg 23066fe65f6SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 23166fe65f6SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 23266fe65f6SmrgMAKE_PDF="$PS2PDF" 23366fe65f6SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 23466fe65f6Smrg 23566fe65f6SmrgAC_SUBST(MAKE_TEXT) 23666fe65f6SmrgAC_SUBST(MAKE_PS) 23766fe65f6SmrgAC_SUBST(MAKE_PDF) 23866fe65f6SmrgAC_SUBST(MAKE_HTML) 23966fe65f6Smrg]) # XORG_CHECK_LINUXDOC 24066fe65f6Smrg 24166fe65f6Smrg# XORG_CHECK_MALLOC_ZERO 24266fe65f6Smrg# ---------------------- 24366fe65f6Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 24466fe65f6Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 24566fe65f6Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 24666fe65f6SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 24766fe65f6SmrgAC_ARG_ENABLE(malloc0returnsnull, 24866fe65f6Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 24966fe65f6Smrg [malloc(0) returns NULL (default: auto)]), 25066fe65f6Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 25166fe65f6Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 25266fe65f6Smrg 25366fe65f6SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 25466fe65f6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 25566fe65f6Smrg AC_RUN_IFELSE([ 25666fe65f6Smrgchar *malloc(); 25766fe65f6Smrgchar *realloc(); 25866fe65f6Smrgchar *calloc(); 25966fe65f6Smrgmain() { 26066fe65f6Smrg char *m0, *r0, *c0, *p; 26166fe65f6Smrg m0 = malloc(0); 26266fe65f6Smrg p = malloc(10); 26366fe65f6Smrg r0 = realloc(p,0); 26466fe65f6Smrg c0 = calloc(0); 26566fe65f6Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 26666fe65f6Smrg}], 26766fe65f6Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 26866fe65f6Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 26966fe65f6Smrgfi 27066fe65f6SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 27166fe65f6Smrg 27266fe65f6Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 27366fe65f6Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 27466fe65f6Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 27566fe65f6Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 27666fe65f6Smrgelse 27766fe65f6Smrg MALLOC_ZERO_CFLAGS="" 27866fe65f6Smrg XMALLOC_ZERO_CFLAGS="" 27966fe65f6Smrg XTMALLOC_ZERO_CFLAGS="" 28066fe65f6Smrgfi 28166fe65f6Smrg 28266fe65f6SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 28366fe65f6SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 28466fe65f6SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 28566fe65f6Smrg]) # XORG_CHECK_MALLOC_ZERO 28666fe65f6Smrg 28766fe65f6Smrgdnl Copyright 2005 Red Hat, Inc 28866fe65f6Smrgdnl 28966fe65f6Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 29066fe65f6Smrgdnl documentation for any purpose is hereby granted without fee, provided that 29166fe65f6Smrgdnl the above copyright notice appear in all copies and that both that 29266fe65f6Smrgdnl copyright notice and this permission notice appear in supporting 29366fe65f6Smrgdnl documentation. 29466fe65f6Smrgdnl 29566fe65f6Smrgdnl The above copyright notice and this permission notice shall be included 29666fe65f6Smrgdnl in all copies or substantial portions of the Software. 29766fe65f6Smrgdnl 29866fe65f6Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 29966fe65f6Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 30066fe65f6Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 30166fe65f6Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 30266fe65f6Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 30366fe65f6Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 30466fe65f6Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 30566fe65f6Smrgdnl 30666fe65f6Smrgdnl Except as contained in this notice, the name of the copyright holders shall 30766fe65f6Smrgdnl not be used in advertising or otherwise to promote the sale, use or 30866fe65f6Smrgdnl other dealings in this Software without prior written authorization 30966fe65f6Smrgdnl from the copyright holders. 31066fe65f6Smrgdnl 31166fe65f6Smrg 31266fe65f6Smrg# XORG_RELEASE_VERSION 31366fe65f6Smrg# -------------------- 31466fe65f6Smrg# Adds --with/without-release-string and changes the PACKAGE and 31566fe65f6Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 31666fe65f6Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 31766fe65f6Smrg 31866fe65f6SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 31966fe65f6Smrg AC_ARG_WITH(release-version, 32066fe65f6Smrg AC_HELP_STRING([--with-release-version=STRING], 32166fe65f6Smrg [Use release version string in package name]), 32266fe65f6Smrg [RELEASE_VERSION="$withval"], 32366fe65f6Smrg [RELEASE_VERSION=""]) 32466fe65f6Smrg if test "x$RELEASE_VERSION" != "x"; then 32566fe65f6Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 32666fe65f6Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 32766fe65f6Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 32866fe65f6Smrg fi 32966fe65f6Smrg]) 33066fe65f6Smrg 33166fe65f6Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 33266fe65f6Smrg# 33366fe65f6Smrg# This file is free software; the Free Software Foundation 33466fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 33566fe65f6Smrg# with or without modifications, as long as this notice is preserved. 33666fe65f6Smrg 33766fe65f6Smrg# AM_AUTOMAKE_VERSION(VERSION) 33866fe65f6Smrg# ---------------------------- 33966fe65f6Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 34066fe65f6Smrg# generated from the m4 files accompanying Automake X.Y. 34166fe65f6SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 34266fe65f6Smrg 34366fe65f6Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 34466fe65f6Smrg# ------------------------------- 34566fe65f6Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 34666fe65f6Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 34766fe65f6SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 34866fe65f6Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 34966fe65f6Smrg 35066fe65f6Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 35166fe65f6Smrg 35266fe65f6Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 35366fe65f6Smrg# 35466fe65f6Smrg# This file is free software; the Free Software Foundation 35566fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 35666fe65f6Smrg# with or without modifications, as long as this notice is preserved. 35766fe65f6Smrg 35866fe65f6Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 35966fe65f6Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 36066fe65f6Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 36166fe65f6Smrg# 36266fe65f6Smrg# Of course, Automake must honor this variable whenever it calls a 36366fe65f6Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 36466fe65f6Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 36566fe65f6Smrg# depending on how configure is run. This is pretty annoying, since 36666fe65f6Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 36766fe65f6Smrg# source directory, any form will work fine, but in subdirectories a 36866fe65f6Smrg# relative path needs to be adjusted first. 36966fe65f6Smrg# 37066fe65f6Smrg# $ac_aux_dir/missing 37166fe65f6Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 37266fe65f6Smrg# $top_srcdir/$ac_aux_dir/missing 37366fe65f6Smrg# fails if $ac_aux_dir is absolute, 37466fe65f6Smrg# fails when called from a subdirectory in a VPATH build with 37566fe65f6Smrg# a relative $ac_aux_dir 37666fe65f6Smrg# 37766fe65f6Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 37866fe65f6Smrg# are both prefixed by $srcdir. In an in-source build this is usually 37966fe65f6Smrg# harmless because $srcdir is `.', but things will broke when you 38066fe65f6Smrg# start a VPATH build or use an absolute $srcdir. 38166fe65f6Smrg# 38266fe65f6Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 38366fe65f6Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 38466fe65f6Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 38566fe65f6Smrg# and then we would define $MISSING as 38666fe65f6Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 38766fe65f6Smrg# This will work as long as MISSING is not called from configure, because 38866fe65f6Smrg# unfortunately $(top_srcdir) has no meaning in configure. 38966fe65f6Smrg# However there are other variables, like CC, which are often used in 39066fe65f6Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 39166fe65f6Smrg# 39266fe65f6Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 39366fe65f6Smrg# absolute PATH. The drawback is that using absolute paths prevent a 39466fe65f6Smrg# configured tree to be moved without reconfiguration. 39566fe65f6Smrg 39666fe65f6SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 39766fe65f6Smrg[dnl Rely on autoconf to set up CDPATH properly. 39866fe65f6SmrgAC_PREREQ([2.50])dnl 39966fe65f6Smrg# expand $ac_aux_dir to an absolute path 40066fe65f6Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 40166fe65f6Smrg]) 40266fe65f6Smrg 40366fe65f6Smrg# AM_CONDITIONAL -*- Autoconf -*- 40466fe65f6Smrg 40566fe65f6Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 40666fe65f6Smrg# Free Software Foundation, Inc. 40766fe65f6Smrg# 40866fe65f6Smrg# This file is free software; the Free Software Foundation 40966fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 41066fe65f6Smrg# with or without modifications, as long as this notice is preserved. 41166fe65f6Smrg 41266fe65f6Smrg# serial 7 41366fe65f6Smrg 41466fe65f6Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 41566fe65f6Smrg# ------------------------------------- 41666fe65f6Smrg# Define a conditional. 41766fe65f6SmrgAC_DEFUN([AM_CONDITIONAL], 41866fe65f6Smrg[AC_PREREQ(2.52)dnl 41966fe65f6Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 42066fe65f6Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 42166fe65f6SmrgAC_SUBST([$1_TRUE]) 42266fe65f6SmrgAC_SUBST([$1_FALSE]) 42366fe65f6Smrgif $2; then 42466fe65f6Smrg $1_TRUE= 42566fe65f6Smrg $1_FALSE='#' 42666fe65f6Smrgelse 42766fe65f6Smrg $1_TRUE='#' 42866fe65f6Smrg $1_FALSE= 42966fe65f6Smrgfi 43066fe65f6SmrgAC_CONFIG_COMMANDS_PRE( 43166fe65f6Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 43266fe65f6Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 43366fe65f6SmrgUsually this means the macro was only invoked conditionally.]]) 43466fe65f6Smrgfi])]) 43566fe65f6Smrg 43666fe65f6Smrg 43766fe65f6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 43866fe65f6Smrg# Free Software Foundation, Inc. 43966fe65f6Smrg# 44066fe65f6Smrg# This file is free software; the Free Software Foundation 44166fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 44266fe65f6Smrg# with or without modifications, as long as this notice is preserved. 44366fe65f6Smrg 44466fe65f6Smrg# serial 8 44566fe65f6Smrg 44666fe65f6Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 44766fe65f6Smrg# written in clear, in which case automake, when reading aclocal.m4, 44866fe65f6Smrg# will think it sees a *use*, and therefore will trigger all it's 44966fe65f6Smrg# C support machinery. Also note that it means that autoscan, seeing 45066fe65f6Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 45166fe65f6Smrg 45266fe65f6Smrg 45366fe65f6Smrg# _AM_DEPENDENCIES(NAME) 45466fe65f6Smrg# ---------------------- 45566fe65f6Smrg# See how the compiler implements dependency checking. 45666fe65f6Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 45766fe65f6Smrg# We try a few techniques and use that to set a single cache variable. 45866fe65f6Smrg# 45966fe65f6Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 46066fe65f6Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 46166fe65f6Smrg# dependency, and given that the user is not expected to run this macro, 46266fe65f6Smrg# just rely on AC_PROG_CC. 46366fe65f6SmrgAC_DEFUN([_AM_DEPENDENCIES], 46466fe65f6Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 46566fe65f6SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 46666fe65f6SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 46766fe65f6SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 46866fe65f6Smrg 46966fe65f6Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 47066fe65f6Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 47166fe65f6Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 47266fe65f6Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 47366fe65f6Smrg [depcc="$$1" am_compiler_list=]) 47466fe65f6Smrg 47566fe65f6SmrgAC_CACHE_CHECK([dependency style of $depcc], 47666fe65f6Smrg [am_cv_$1_dependencies_compiler_type], 47766fe65f6Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 47866fe65f6Smrg # We make a subdir and do the tests there. Otherwise we can end up 47966fe65f6Smrg # making bogus files that we don't know about and never remove. For 48066fe65f6Smrg # instance it was reported that on HP-UX the gcc test will end up 48166fe65f6Smrg # making a dummy file named `D' -- because `-MD' means `put the output 48266fe65f6Smrg # in D'. 48366fe65f6Smrg mkdir conftest.dir 48466fe65f6Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 48566fe65f6Smrg # using a relative directory. 48666fe65f6Smrg cp "$am_depcomp" conftest.dir 48766fe65f6Smrg cd conftest.dir 48866fe65f6Smrg # We will build objects and dependencies in a subdirectory because 48966fe65f6Smrg # it helps to detect inapplicable dependency modes. For instance 49066fe65f6Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 49166fe65f6Smrg # side effect of compilation, but ICC will put the dependencies in 49266fe65f6Smrg # the current directory while Tru64 will put them in the object 49366fe65f6Smrg # directory. 49466fe65f6Smrg mkdir sub 49566fe65f6Smrg 49666fe65f6Smrg am_cv_$1_dependencies_compiler_type=none 49766fe65f6Smrg if test "$am_compiler_list" = ""; then 49866fe65f6Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 49966fe65f6Smrg fi 50066fe65f6Smrg for depmode in $am_compiler_list; do 50166fe65f6Smrg # Setup a source with many dependencies, because some compilers 50266fe65f6Smrg # like to wrap large dependency lists on column 80 (with \), and 50366fe65f6Smrg # we should not choose a depcomp mode which is confused by this. 50466fe65f6Smrg # 50566fe65f6Smrg # We need to recreate these files for each test, as the compiler may 50666fe65f6Smrg # overwrite some of them when testing with obscure command lines. 50766fe65f6Smrg # This happens at least with the AIX C compiler. 50866fe65f6Smrg : > sub/conftest.c 50966fe65f6Smrg for i in 1 2 3 4 5 6; do 51066fe65f6Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 51166fe65f6Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 51266fe65f6Smrg # Solaris 8's {/usr,}/bin/sh. 51366fe65f6Smrg touch sub/conftst$i.h 51466fe65f6Smrg done 51566fe65f6Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 51666fe65f6Smrg 51766fe65f6Smrg case $depmode in 51866fe65f6Smrg nosideeffect) 51966fe65f6Smrg # after this tag, mechanisms are not by side-effect, so they'll 52066fe65f6Smrg # only be used when explicitly requested 52166fe65f6Smrg if test "x$enable_dependency_tracking" = xyes; then 52266fe65f6Smrg continue 52366fe65f6Smrg else 52466fe65f6Smrg break 52566fe65f6Smrg fi 52666fe65f6Smrg ;; 52766fe65f6Smrg none) break ;; 52866fe65f6Smrg esac 52966fe65f6Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 53066fe65f6Smrg # mode. It turns out that the SunPro C++ compiler does not properly 53166fe65f6Smrg # handle `-M -o', and we need to detect this. 53266fe65f6Smrg if depmode=$depmode \ 53366fe65f6Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 53466fe65f6Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 53566fe65f6Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 53666fe65f6Smrg >/dev/null 2>conftest.err && 53766fe65f6Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 53866fe65f6Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 53966fe65f6Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 54066fe65f6Smrg # icc doesn't choke on unknown options, it will just issue warnings 54166fe65f6Smrg # or remarks (even with -Werror). So we grep stderr for any message 54266fe65f6Smrg # that says an option was ignored or not supported. 54366fe65f6Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 54466fe65f6Smrg # icc: Command line warning: ignoring option '-M'; no argument required 54566fe65f6Smrg # The diagnosis changed in icc 8.0: 54666fe65f6Smrg # icc: Command line remark: option '-MP' not supported 54766fe65f6Smrg if (grep 'ignoring option' conftest.err || 54866fe65f6Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 54966fe65f6Smrg am_cv_$1_dependencies_compiler_type=$depmode 55066fe65f6Smrg break 55166fe65f6Smrg fi 55266fe65f6Smrg fi 55366fe65f6Smrg done 55466fe65f6Smrg 55566fe65f6Smrg cd .. 55666fe65f6Smrg rm -rf conftest.dir 55766fe65f6Smrgelse 55866fe65f6Smrg am_cv_$1_dependencies_compiler_type=none 55966fe65f6Smrgfi 56066fe65f6Smrg]) 56166fe65f6SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 56266fe65f6SmrgAM_CONDITIONAL([am__fastdep$1], [ 56366fe65f6Smrg test "x$enable_dependency_tracking" != xno \ 56466fe65f6Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 56566fe65f6Smrg]) 56666fe65f6Smrg 56766fe65f6Smrg 56866fe65f6Smrg# AM_SET_DEPDIR 56966fe65f6Smrg# ------------- 57066fe65f6Smrg# Choose a directory name for dependency files. 57166fe65f6Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 57266fe65f6SmrgAC_DEFUN([AM_SET_DEPDIR], 57366fe65f6Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 57466fe65f6SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 57566fe65f6Smrg]) 57666fe65f6Smrg 57766fe65f6Smrg 57866fe65f6Smrg# AM_DEP_TRACK 57966fe65f6Smrg# ------------ 58066fe65f6SmrgAC_DEFUN([AM_DEP_TRACK], 58166fe65f6Smrg[AC_ARG_ENABLE(dependency-tracking, 58266fe65f6Smrg[ --disable-dependency-tracking speeds up one-time build 58366fe65f6Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 58466fe65f6Smrgif test "x$enable_dependency_tracking" != xno; then 58566fe65f6Smrg am_depcomp="$ac_aux_dir/depcomp" 58666fe65f6Smrg AMDEPBACKSLASH='\' 58766fe65f6Smrgfi 58866fe65f6SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 58966fe65f6SmrgAC_SUBST([AMDEPBACKSLASH]) 59066fe65f6Smrg]) 59166fe65f6Smrg 59266fe65f6Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 59366fe65f6Smrg 59466fe65f6Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 59566fe65f6Smrg# Free Software Foundation, Inc. 59666fe65f6Smrg# 59766fe65f6Smrg# This file is free software; the Free Software Foundation 59866fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 59966fe65f6Smrg# with or without modifications, as long as this notice is preserved. 60066fe65f6Smrg 60166fe65f6Smrg#serial 3 60266fe65f6Smrg 60366fe65f6Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 60466fe65f6Smrg# ------------------------------ 60566fe65f6SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 60666fe65f6Smrg[for mf in $CONFIG_FILES; do 60766fe65f6Smrg # Strip MF so we end up with the name of the file. 60866fe65f6Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 60966fe65f6Smrg # Check whether this is an Automake generated Makefile or not. 61066fe65f6Smrg # We used to match only the files named `Makefile.in', but 61166fe65f6Smrg # some people rename them; so instead we look at the file content. 61266fe65f6Smrg # Grep'ing the first line is not enough: some people post-process 61366fe65f6Smrg # each Makefile.in and add a new line on top of each file to say so. 61466fe65f6Smrg # So let's grep whole file. 61566fe65f6Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 61666fe65f6Smrg dirpart=`AS_DIRNAME("$mf")` 61766fe65f6Smrg else 61866fe65f6Smrg continue 61966fe65f6Smrg fi 62066fe65f6Smrg # Extract the definition of DEPDIR, am__include, and am__quote 62166fe65f6Smrg # from the Makefile without running `make'. 62266fe65f6Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 62366fe65f6Smrg test -z "$DEPDIR" && continue 62466fe65f6Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 62566fe65f6Smrg test -z "am__include" && continue 62666fe65f6Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 62766fe65f6Smrg # When using ansi2knr, U may be empty or an underscore; expand it 62866fe65f6Smrg U=`sed -n 's/^U = //p' < "$mf"` 62966fe65f6Smrg # Find all dependency output files, they are included files with 63066fe65f6Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 63166fe65f6Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 63266fe65f6Smrg # expansion. 63366fe65f6Smrg for file in `sed -n " 63466fe65f6Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 63566fe65f6Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 63666fe65f6Smrg # Make sure the directory exists. 63766fe65f6Smrg test -f "$dirpart/$file" && continue 63866fe65f6Smrg fdir=`AS_DIRNAME(["$file"])` 63966fe65f6Smrg AS_MKDIR_P([$dirpart/$fdir]) 64066fe65f6Smrg # echo "creating $dirpart/$file" 64166fe65f6Smrg echo '# dummy' > "$dirpart/$file" 64266fe65f6Smrg done 64366fe65f6Smrgdone 64466fe65f6Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 64566fe65f6Smrg 64666fe65f6Smrg 64766fe65f6Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 64866fe65f6Smrg# ----------------------------- 64966fe65f6Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 65066fe65f6Smrg# 65166fe65f6Smrg# This code is only required when automatic dependency tracking 65266fe65f6Smrg# is enabled. FIXME. This creates each `.P' file that we will 65366fe65f6Smrg# need in order to bootstrap the dependency handling code. 65466fe65f6SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 65566fe65f6Smrg[AC_CONFIG_COMMANDS([depfiles], 65666fe65f6Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 65766fe65f6Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 65866fe65f6Smrg]) 65966fe65f6Smrg 66066fe65f6Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 66166fe65f6Smrg# Free Software Foundation, Inc. 66266fe65f6Smrg# 66366fe65f6Smrg# This file is free software; the Free Software Foundation 66466fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 66566fe65f6Smrg# with or without modifications, as long as this notice is preserved. 66666fe65f6Smrg 66766fe65f6Smrg# serial 8 66866fe65f6Smrg 66966fe65f6Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 67066fe65f6SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 67166fe65f6Smrg 67266fe65f6Smrg# Do all the work for Automake. -*- Autoconf -*- 67366fe65f6Smrg 67466fe65f6Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 67566fe65f6Smrg# Free Software Foundation, Inc. 67666fe65f6Smrg# 67766fe65f6Smrg# This file is free software; the Free Software Foundation 67866fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 67966fe65f6Smrg# with or without modifications, as long as this notice is preserved. 68066fe65f6Smrg 68166fe65f6Smrg# serial 12 68266fe65f6Smrg 68366fe65f6Smrg# This macro actually does too much. Some checks are only needed if 68466fe65f6Smrg# your package does certain things. But this isn't really a big deal. 68566fe65f6Smrg 68666fe65f6Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 68766fe65f6Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 68866fe65f6Smrg# ----------------------------------------------- 68966fe65f6Smrg# The call with PACKAGE and VERSION arguments is the old style 69066fe65f6Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 69166fe65f6Smrg# and VERSION should now be passed to AC_INIT and removed from 69266fe65f6Smrg# the call to AM_INIT_AUTOMAKE. 69366fe65f6Smrg# We support both call styles for the transition. After 69466fe65f6Smrg# the next Automake release, Autoconf can make the AC_INIT 69566fe65f6Smrg# arguments mandatory, and then we can depend on a new Autoconf 69666fe65f6Smrg# release and drop the old call support. 69766fe65f6SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 69866fe65f6Smrg[AC_PREREQ([2.58])dnl 69966fe65f6Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 70066fe65f6Smrgdnl the ones we care about. 70166fe65f6Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 70266fe65f6SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 70366fe65f6SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 70466fe65f6Smrg# test to see if srcdir already configured 70566fe65f6Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 70666fe65f6Smrg test -f $srcdir/config.status; then 70766fe65f6Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 70866fe65f6Smrgfi 70966fe65f6Smrg 71066fe65f6Smrg# test whether we have cygpath 71166fe65f6Smrgif test -z "$CYGPATH_W"; then 71266fe65f6Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 71366fe65f6Smrg CYGPATH_W='cygpath -w' 71466fe65f6Smrg else 71566fe65f6Smrg CYGPATH_W=echo 71666fe65f6Smrg fi 71766fe65f6Smrgfi 71866fe65f6SmrgAC_SUBST([CYGPATH_W]) 71966fe65f6Smrg 72066fe65f6Smrg# Define the identity of the package. 72166fe65f6Smrgdnl Distinguish between old-style and new-style calls. 72266fe65f6Smrgm4_ifval([$2], 72366fe65f6Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 72466fe65f6Smrg AC_SUBST([PACKAGE], [$1])dnl 72566fe65f6Smrg AC_SUBST([VERSION], [$2])], 72666fe65f6Smrg[_AM_SET_OPTIONS([$1])dnl 72766fe65f6Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 72866fe65f6Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 72966fe65f6Smrg 73066fe65f6Smrg_AM_IF_OPTION([no-define],, 73166fe65f6Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 73266fe65f6Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 73366fe65f6Smrg 73466fe65f6Smrg# Some tools Automake needs. 73566fe65f6SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 73666fe65f6SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 73766fe65f6SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 73866fe65f6SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 73966fe65f6SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 74066fe65f6SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 74166fe65f6SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 74266fe65f6SmrgAM_PROG_INSTALL_SH 74366fe65f6SmrgAM_PROG_INSTALL_STRIP 74466fe65f6SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 74566fe65f6Smrg# We need awk for the "check" target. The system "awk" is bad on 74666fe65f6Smrg# some platforms. 74766fe65f6SmrgAC_REQUIRE([AC_PROG_AWK])dnl 74866fe65f6SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 74966fe65f6SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 75066fe65f6Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 75166fe65f6Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 75266fe65f6Smrg [_AM_PROG_TAR([v7])])]) 75366fe65f6Smrg_AM_IF_OPTION([no-dependencies],, 75466fe65f6Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 75566fe65f6Smrg [_AM_DEPENDENCIES(CC)], 75666fe65f6Smrg [define([AC_PROG_CC], 75766fe65f6Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 75866fe65f6SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 75966fe65f6Smrg [_AM_DEPENDENCIES(CXX)], 76066fe65f6Smrg [define([AC_PROG_CXX], 76166fe65f6Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 76266fe65f6Smrg]) 76366fe65f6Smrg]) 76466fe65f6Smrg 76566fe65f6Smrg 76666fe65f6Smrg# When config.status generates a header, we must update the stamp-h file. 76766fe65f6Smrg# This file resides in the same directory as the config header 76866fe65f6Smrg# that is generated. The stamp files are numbered to have different names. 76966fe65f6Smrg 77066fe65f6Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 77166fe65f6Smrg# loop where config.status creates the headers, so we can generate 77266fe65f6Smrg# our stamp files there. 77366fe65f6SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 77466fe65f6Smrg[# Compute $1's index in $config_headers. 77566fe65f6Smrg_am_stamp_count=1 77666fe65f6Smrgfor _am_header in $config_headers :; do 77766fe65f6Smrg case $_am_header in 77866fe65f6Smrg $1 | $1:* ) 77966fe65f6Smrg break ;; 78066fe65f6Smrg * ) 78166fe65f6Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 78266fe65f6Smrg esac 78366fe65f6Smrgdone 78466fe65f6Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 78566fe65f6Smrg 78666fe65f6Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 78766fe65f6Smrg# 78866fe65f6Smrg# This file is free software; the Free Software Foundation 78966fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 79066fe65f6Smrg# with or without modifications, as long as this notice is preserved. 79166fe65f6Smrg 79266fe65f6Smrg# AM_PROG_INSTALL_SH 79366fe65f6Smrg# ------------------ 79466fe65f6Smrg# Define $install_sh. 79566fe65f6SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 79666fe65f6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 79766fe65f6Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 79866fe65f6SmrgAC_SUBST(install_sh)]) 79966fe65f6Smrg 80066fe65f6Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 80166fe65f6Smrg# 80266fe65f6Smrg# This file is free software; the Free Software Foundation 80366fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 80466fe65f6Smrg# with or without modifications, as long as this notice is preserved. 80566fe65f6Smrg 80666fe65f6Smrg# serial 2 80766fe65f6Smrg 80866fe65f6Smrg# Check whether the underlying file-system supports filenames 80966fe65f6Smrg# with a leading dot. For instance MS-DOS doesn't. 81066fe65f6SmrgAC_DEFUN([AM_SET_LEADING_DOT], 81166fe65f6Smrg[rm -rf .tst 2>/dev/null 81266fe65f6Smrgmkdir .tst 2>/dev/null 81366fe65f6Smrgif test -d .tst; then 81466fe65f6Smrg am__leading_dot=. 81566fe65f6Smrgelse 81666fe65f6Smrg am__leading_dot=_ 81766fe65f6Smrgfi 81866fe65f6Smrgrmdir .tst 2>/dev/null 81966fe65f6SmrgAC_SUBST([am__leading_dot])]) 82066fe65f6Smrg 82166fe65f6Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 82266fe65f6Smrg# From Jim Meyering 82366fe65f6Smrg 82466fe65f6Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 82566fe65f6Smrg# Free Software Foundation, Inc. 82666fe65f6Smrg# 82766fe65f6Smrg# This file is free software; the Free Software Foundation 82866fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 82966fe65f6Smrg# with or without modifications, as long as this notice is preserved. 83066fe65f6Smrg 83166fe65f6Smrg# serial 4 83266fe65f6Smrg 83366fe65f6SmrgAC_DEFUN([AM_MAINTAINER_MODE], 83466fe65f6Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 83566fe65f6Smrg dnl maintainer-mode is disabled by default 83666fe65f6Smrg AC_ARG_ENABLE(maintainer-mode, 83766fe65f6Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 83866fe65f6Smrg (and sometimes confusing) to the casual installer], 83966fe65f6Smrg USE_MAINTAINER_MODE=$enableval, 84066fe65f6Smrg USE_MAINTAINER_MODE=no) 84166fe65f6Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 84266fe65f6Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 84366fe65f6Smrg MAINT=$MAINTAINER_MODE_TRUE 84466fe65f6Smrg AC_SUBST(MAINT)dnl 84566fe65f6Smrg] 84666fe65f6Smrg) 84766fe65f6Smrg 84866fe65f6SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 84966fe65f6Smrg 85066fe65f6Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 85166fe65f6Smrg 85266fe65f6Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 85366fe65f6Smrg# 85466fe65f6Smrg# This file is free software; the Free Software Foundation 85566fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 85666fe65f6Smrg# with or without modifications, as long as this notice is preserved. 85766fe65f6Smrg 85866fe65f6Smrg# serial 3 85966fe65f6Smrg 86066fe65f6Smrg# AM_MAKE_INCLUDE() 86166fe65f6Smrg# ----------------- 86266fe65f6Smrg# Check to see how make treats includes. 86366fe65f6SmrgAC_DEFUN([AM_MAKE_INCLUDE], 86466fe65f6Smrg[am_make=${MAKE-make} 86566fe65f6Smrgcat > confinc << 'END' 86666fe65f6Smrgam__doit: 86766fe65f6Smrg @echo done 86866fe65f6Smrg.PHONY: am__doit 86966fe65f6SmrgEND 87066fe65f6Smrg# If we don't find an include directive, just comment out the code. 87166fe65f6SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 87266fe65f6Smrgam__include="#" 87366fe65f6Smrgam__quote= 87466fe65f6Smrg_am_result=none 87566fe65f6Smrg# First try GNU make style include. 87666fe65f6Smrgecho "include confinc" > confmf 87766fe65f6Smrg# We grep out `Entering directory' and `Leaving directory' 87866fe65f6Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 87966fe65f6Smrg# In particular we don't look at `^make:' because GNU make might 88066fe65f6Smrg# be invoked under some other name (usually "gmake"), in which 88166fe65f6Smrg# case it prints its new name instead of `make'. 88266fe65f6Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 88366fe65f6Smrg am__include=include 88466fe65f6Smrg am__quote= 88566fe65f6Smrg _am_result=GNU 88666fe65f6Smrgfi 88766fe65f6Smrg# Now try BSD make style include. 88866fe65f6Smrgif test "$am__include" = "#"; then 88966fe65f6Smrg echo '.include "confinc"' > confmf 89066fe65f6Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 89166fe65f6Smrg am__include=.include 89266fe65f6Smrg am__quote="\"" 89366fe65f6Smrg _am_result=BSD 89466fe65f6Smrg fi 89566fe65f6Smrgfi 89666fe65f6SmrgAC_SUBST([am__include]) 89766fe65f6SmrgAC_SUBST([am__quote]) 89866fe65f6SmrgAC_MSG_RESULT([$_am_result]) 89966fe65f6Smrgrm -f confinc confmf 90066fe65f6Smrg]) 90166fe65f6Smrg 90266fe65f6Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 90366fe65f6Smrg 90466fe65f6Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 90566fe65f6Smrg# Free Software Foundation, Inc. 90666fe65f6Smrg# 90766fe65f6Smrg# This file is free software; the Free Software Foundation 90866fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 90966fe65f6Smrg# with or without modifications, as long as this notice is preserved. 91066fe65f6Smrg 91166fe65f6Smrg# serial 4 91266fe65f6Smrg 91366fe65f6Smrg# AM_MISSING_PROG(NAME, PROGRAM) 91466fe65f6Smrg# ------------------------------ 91566fe65f6SmrgAC_DEFUN([AM_MISSING_PROG], 91666fe65f6Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 91766fe65f6Smrg$1=${$1-"${am_missing_run}$2"} 91866fe65f6SmrgAC_SUBST($1)]) 91966fe65f6Smrg 92066fe65f6Smrg 92166fe65f6Smrg# AM_MISSING_HAS_RUN 92266fe65f6Smrg# ------------------ 92366fe65f6Smrg# Define MISSING if not defined so far and test if it supports --run. 92466fe65f6Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 92566fe65f6SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 92666fe65f6Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 92766fe65f6Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 92866fe65f6Smrg# Use eval to expand $SHELL 92966fe65f6Smrgif eval "$MISSING --run true"; then 93066fe65f6Smrg am_missing_run="$MISSING --run " 93166fe65f6Smrgelse 93266fe65f6Smrg am_missing_run= 93366fe65f6Smrg AC_MSG_WARN([`missing' script is too old or missing]) 93466fe65f6Smrgfi 93566fe65f6Smrg]) 93666fe65f6Smrg 93766fe65f6Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 93866fe65f6Smrg# 93966fe65f6Smrg# This file is free software; the Free Software Foundation 94066fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 94166fe65f6Smrg# with or without modifications, as long as this notice is preserved. 94266fe65f6Smrg 94366fe65f6Smrg# AM_PROG_MKDIR_P 94466fe65f6Smrg# --------------- 94566fe65f6Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 94666fe65f6Smrg# 94766fe65f6Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 94866fe65f6Smrg# created by `make install' are always world readable, even if the 94966fe65f6Smrg# installer happens to have an overly restrictive umask (e.g. 077). 95066fe65f6Smrg# This was a mistake. There are at least two reasons why we must not 95166fe65f6Smrg# use `-m 0755': 95266fe65f6Smrg# - it causes special bits like SGID to be ignored, 95366fe65f6Smrg# - it may be too restrictive (some setups expect 775 directories). 95466fe65f6Smrg# 95566fe65f6Smrg# Do not use -m 0755 and let people choose whatever they expect by 95666fe65f6Smrg# setting umask. 95766fe65f6Smrg# 95866fe65f6Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 95966fe65f6Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 96066fe65f6Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 96166fe65f6Smrg# concurrently, both version can detect that a/ is missing, but only 96266fe65f6Smrg# one can create it and the other will error out. Consequently we 96366fe65f6Smrg# restrict ourselves to GNU make (using the --version option ensures 96466fe65f6Smrg# this.) 96566fe65f6SmrgAC_DEFUN([AM_PROG_MKDIR_P], 96666fe65f6Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 96766fe65f6Smrg # We used to keeping the `.' as first argument, in order to 96866fe65f6Smrg # allow $(mkdir_p) to be used without argument. As in 96966fe65f6Smrg # $(mkdir_p) $(somedir) 97066fe65f6Smrg # where $(somedir) is conditionally defined. However this is wrong 97166fe65f6Smrg # for two reasons: 97266fe65f6Smrg # 1. if the package is installed by a user who cannot write `.' 97366fe65f6Smrg # make install will fail, 97466fe65f6Smrg # 2. the above comment should most certainly read 97566fe65f6Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 97666fe65f6Smrg # so it does not work when $(somedir) is undefined and 97766fe65f6Smrg # $(DESTDIR) is not. 97866fe65f6Smrg # To support the latter case, we have to write 97966fe65f6Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 98066fe65f6Smrg # so the `.' trick is pointless. 98166fe65f6Smrg mkdir_p='mkdir -p --' 98266fe65f6Smrgelse 98366fe65f6Smrg # On NextStep and OpenStep, the `mkdir' command does not 98466fe65f6Smrg # recognize any option. It will interpret all options as 98566fe65f6Smrg # directories to create, and then abort because `.' already 98666fe65f6Smrg # exists. 98766fe65f6Smrg for d in ./-p ./--version; 98866fe65f6Smrg do 98966fe65f6Smrg test -d $d && rmdir $d 99066fe65f6Smrg done 99166fe65f6Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 99266fe65f6Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 99366fe65f6Smrg mkdir_p='$(mkinstalldirs)' 99466fe65f6Smrg else 99566fe65f6Smrg mkdir_p='$(install_sh) -d' 99666fe65f6Smrg fi 99766fe65f6Smrgfi 99866fe65f6SmrgAC_SUBST([mkdir_p])]) 99966fe65f6Smrg 100066fe65f6Smrg# Helper functions for option handling. -*- Autoconf -*- 100166fe65f6Smrg 100266fe65f6Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 100366fe65f6Smrg# 100466fe65f6Smrg# This file is free software; the Free Software Foundation 100566fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 100666fe65f6Smrg# with or without modifications, as long as this notice is preserved. 100766fe65f6Smrg 100866fe65f6Smrg# serial 3 100966fe65f6Smrg 101066fe65f6Smrg# _AM_MANGLE_OPTION(NAME) 101166fe65f6Smrg# ----------------------- 101266fe65f6SmrgAC_DEFUN([_AM_MANGLE_OPTION], 101366fe65f6Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 101466fe65f6Smrg 101566fe65f6Smrg# _AM_SET_OPTION(NAME) 101666fe65f6Smrg# ------------------------------ 101766fe65f6Smrg# Set option NAME. Presently that only means defining a flag for this option. 101866fe65f6SmrgAC_DEFUN([_AM_SET_OPTION], 101966fe65f6Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 102066fe65f6Smrg 102166fe65f6Smrg# _AM_SET_OPTIONS(OPTIONS) 102266fe65f6Smrg# ---------------------------------- 102366fe65f6Smrg# OPTIONS is a space-separated list of Automake options. 102466fe65f6SmrgAC_DEFUN([_AM_SET_OPTIONS], 102566fe65f6Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 102666fe65f6Smrg 102766fe65f6Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 102866fe65f6Smrg# ------------------------------------------- 102966fe65f6Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 103066fe65f6SmrgAC_DEFUN([_AM_IF_OPTION], 103166fe65f6Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 103266fe65f6Smrg 103366fe65f6Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 103466fe65f6Smrg 103566fe65f6Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 103666fe65f6Smrg# Free Software Foundation, Inc. 103766fe65f6Smrg# 103866fe65f6Smrg# This file is free software; the Free Software Foundation 103966fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 104066fe65f6Smrg# with or without modifications, as long as this notice is preserved. 104166fe65f6Smrg 104266fe65f6Smrg# serial 4 104366fe65f6Smrg 104466fe65f6Smrg# AM_SANITY_CHECK 104566fe65f6Smrg# --------------- 104666fe65f6SmrgAC_DEFUN([AM_SANITY_CHECK], 104766fe65f6Smrg[AC_MSG_CHECKING([whether build environment is sane]) 104866fe65f6Smrg# Just in case 104966fe65f6Smrgsleep 1 105066fe65f6Smrgecho timestamp > conftest.file 105166fe65f6Smrg# Do `set' in a subshell so we don't clobber the current shell's 105266fe65f6Smrg# arguments. Must try -L first in case configure is actually a 105366fe65f6Smrg# symlink; some systems play weird games with the mod time of symlinks 105466fe65f6Smrg# (eg FreeBSD returns the mod time of the symlink's containing 105566fe65f6Smrg# directory). 105666fe65f6Smrgif ( 105766fe65f6Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 105866fe65f6Smrg if test "$[*]" = "X"; then 105966fe65f6Smrg # -L didn't work. 106066fe65f6Smrg set X `ls -t $srcdir/configure conftest.file` 106166fe65f6Smrg fi 106266fe65f6Smrg rm -f conftest.file 106366fe65f6Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 106466fe65f6Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 106566fe65f6Smrg 106666fe65f6Smrg # If neither matched, then we have a broken ls. This can happen 106766fe65f6Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 106866fe65f6Smrg # broken ls alias from the environment. This has actually 106966fe65f6Smrg # happened. Such a system could not be considered "sane". 107066fe65f6Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 107166fe65f6Smrgalias in your environment]) 107266fe65f6Smrg fi 107366fe65f6Smrg 107466fe65f6Smrg test "$[2]" = conftest.file 107566fe65f6Smrg ) 107666fe65f6Smrgthen 107766fe65f6Smrg # Ok. 107866fe65f6Smrg : 107966fe65f6Smrgelse 108066fe65f6Smrg AC_MSG_ERROR([newly created file is older than distributed files! 108166fe65f6SmrgCheck your system clock]) 108266fe65f6Smrgfi 108366fe65f6SmrgAC_MSG_RESULT(yes)]) 108466fe65f6Smrg 108566fe65f6Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 108666fe65f6Smrg# 108766fe65f6Smrg# This file is free software; the Free Software Foundation 108866fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 108966fe65f6Smrg# with or without modifications, as long as this notice is preserved. 109066fe65f6Smrg 109166fe65f6Smrg# AM_PROG_INSTALL_STRIP 109266fe65f6Smrg# --------------------- 109366fe65f6Smrg# One issue with vendor `install' (even GNU) is that you can't 109466fe65f6Smrg# specify the program used to strip binaries. This is especially 109566fe65f6Smrg# annoying in cross-compiling environments, where the build's strip 109666fe65f6Smrg# is unlikely to handle the host's binaries. 109766fe65f6Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 109866fe65f6Smrg# always use install-sh in `make install-strip', and initialize 109966fe65f6Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 110066fe65f6SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 110166fe65f6Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 110266fe65f6Smrg# Installed binaries are usually stripped using `strip' when the user 110366fe65f6Smrg# run `make install-strip'. However `strip' might not be the right 110466fe65f6Smrg# tool to use in cross-compilation environments, therefore Automake 110566fe65f6Smrg# will honor the `STRIP' environment variable to overrule this program. 110666fe65f6Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 110766fe65f6Smrgif test "$cross_compiling" != no; then 110866fe65f6Smrg AC_CHECK_TOOL([STRIP], [strip], :) 110966fe65f6Smrgfi 111066fe65f6SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 111166fe65f6SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 111266fe65f6Smrg 111366fe65f6Smrg# Check how to create a tarball. -*- Autoconf -*- 111466fe65f6Smrg 111566fe65f6Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 111666fe65f6Smrg# 111766fe65f6Smrg# This file is free software; the Free Software Foundation 111866fe65f6Smrg# gives unlimited permission to copy and/or distribute it, 111966fe65f6Smrg# with or without modifications, as long as this notice is preserved. 112066fe65f6Smrg 112166fe65f6Smrg# serial 2 112266fe65f6Smrg 112366fe65f6Smrg# _AM_PROG_TAR(FORMAT) 112466fe65f6Smrg# -------------------- 112566fe65f6Smrg# Check how to create a tarball in format FORMAT. 112666fe65f6Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 112766fe65f6Smrg# 112866fe65f6Smrg# Substitute a variable $(am__tar) that is a command 112966fe65f6Smrg# writing to stdout a FORMAT-tarball containing the directory 113066fe65f6Smrg# $tardir. 113166fe65f6Smrg# tardir=directory && $(am__tar) > result.tar 113266fe65f6Smrg# 113366fe65f6Smrg# Substitute a variable $(am__untar) that extract such 113466fe65f6Smrg# a tarball read from stdin. 113566fe65f6Smrg# $(am__untar) < result.tar 113666fe65f6SmrgAC_DEFUN([_AM_PROG_TAR], 113766fe65f6Smrg[# Always define AMTAR for backward compatibility. 113866fe65f6SmrgAM_MISSING_PROG([AMTAR], [tar]) 113966fe65f6Smrgm4_if([$1], [v7], 114066fe65f6Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 114166fe65f6Smrg [m4_case([$1], [ustar],, [pax],, 114266fe65f6Smrg [m4_fatal([Unknown tar format])]) 114366fe65f6SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 114466fe65f6Smrg# Loop over all known methods to create a tar archive until one works. 114566fe65f6Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 114666fe65f6Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 114766fe65f6Smrg# Do not fold the above two line into one, because Tru64 sh and 114866fe65f6Smrg# Solaris sh will not grok spaces in the rhs of `-'. 114966fe65f6Smrgfor _am_tool in $_am_tools 115066fe65f6Smrgdo 115166fe65f6Smrg case $_am_tool in 115266fe65f6Smrg gnutar) 115366fe65f6Smrg for _am_tar in tar gnutar gtar; 115466fe65f6Smrg do 115566fe65f6Smrg AM_RUN_LOG([$_am_tar --version]) && break 115666fe65f6Smrg done 115766fe65f6Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 115866fe65f6Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 115966fe65f6Smrg am__untar="$_am_tar -xf -" 116066fe65f6Smrg ;; 116166fe65f6Smrg plaintar) 116266fe65f6Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 116366fe65f6Smrg # ustar tarball either. 116466fe65f6Smrg (tar --version) >/dev/null 2>&1 && continue 116566fe65f6Smrg am__tar='tar chf - "$$tardir"' 116666fe65f6Smrg am__tar_='tar chf - "$tardir"' 116766fe65f6Smrg am__untar='tar xf -' 116866fe65f6Smrg ;; 116966fe65f6Smrg pax) 117066fe65f6Smrg am__tar='pax -L -x $1 -w "$$tardir"' 117166fe65f6Smrg am__tar_='pax -L -x $1 -w "$tardir"' 117266fe65f6Smrg am__untar='pax -r' 117366fe65f6Smrg ;; 117466fe65f6Smrg cpio) 117566fe65f6Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 117666fe65f6Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 117766fe65f6Smrg am__untar='cpio -i -H $1 -d' 117866fe65f6Smrg ;; 117966fe65f6Smrg none) 118066fe65f6Smrg am__tar=false 118166fe65f6Smrg am__tar_=false 118266fe65f6Smrg am__untar=false 118366fe65f6Smrg ;; 118466fe65f6Smrg esac 118566fe65f6Smrg 118666fe65f6Smrg # If the value was cached, stop now. We just wanted to have am__tar 118766fe65f6Smrg # and am__untar set. 118866fe65f6Smrg test -n "${am_cv_prog_tar_$1}" && break 118966fe65f6Smrg 119066fe65f6Smrg # tar/untar a dummy directory, and stop if the command works 119166fe65f6Smrg rm -rf conftest.dir 119266fe65f6Smrg mkdir conftest.dir 119366fe65f6Smrg echo GrepMe > conftest.dir/file 119466fe65f6Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 119566fe65f6Smrg rm -rf conftest.dir 119666fe65f6Smrg if test -s conftest.tar; then 119766fe65f6Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 119866fe65f6Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 119966fe65f6Smrg fi 120066fe65f6Smrgdone 120166fe65f6Smrgrm -rf conftest.dir 120266fe65f6Smrg 120366fe65f6SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 120466fe65f6SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 120566fe65f6SmrgAC_SUBST([am__tar]) 120666fe65f6SmrgAC_SUBST([am__untar]) 120766fe65f6Smrg]) # _AM_PROG_TAR 120866fe65f6Smrg 1209