aclocal.m4 revision b1cb5b87
1b1cb5b87Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 2b1cb5b87Smrg 3b1cb5b87Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 4b1cb5b87Smrg# Free Software Foundation, Inc. 5b1cb5b87Smrg# This file is free software; the Free Software Foundation 6b1cb5b87Smrg# gives unlimited permission to copy and/or distribute it, 7b1cb5b87Smrg# with or without modifications, as long as this notice is preserved. 8b1cb5b87Smrg 9b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 10b1cb5b87Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11b1cb5b87Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12b1cb5b87Smrg# PARTICULAR PURPOSE. 13b1cb5b87Smrg 14b1cb5b87Smrg# Do all the work for Automake. -*- Autoconf -*- 15b1cb5b87Smrg 16b1cb5b87Smrg# This macro actually does too much some checks are only needed if 17b1cb5b87Smrg# your package does certain things. But this isn't really a big deal. 18b1cb5b87Smrg 19b1cb5b87Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 20b1cb5b87Smrg# Free Software Foundation, Inc. 21b1cb5b87Smrg 22b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 23b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 24b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 25b1cb5b87Smrg# any later version. 26b1cb5b87Smrg 27b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 28b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 29b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30b1cb5b87Smrg# GNU General Public License for more details. 31b1cb5b87Smrg 32b1cb5b87Smrg# You should have received a copy of the GNU General Public License 33b1cb5b87Smrg# along with this program; if not, write to the Free Software 34b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 35b1cb5b87Smrg# 02111-1307, USA. 36b1cb5b87Smrg 37b1cb5b87Smrg# serial 10 38b1cb5b87Smrg 39b1cb5b87SmrgAC_PREREQ([2.54]) 40b1cb5b87Smrg 41b1cb5b87Smrg# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 42b1cb5b87Smrg# the ones we care about. 43b1cb5b87Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 44b1cb5b87Smrg 45b1cb5b87Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 46b1cb5b87Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 47b1cb5b87Smrg# ----------------------------------------------- 48b1cb5b87Smrg# The call with PACKAGE and VERSION arguments is the old style 49b1cb5b87Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 50b1cb5b87Smrg# and VERSION should now be passed to AC_INIT and removed from 51b1cb5b87Smrg# the call to AM_INIT_AUTOMAKE. 52b1cb5b87Smrg# We support both call styles for the transition. After 53b1cb5b87Smrg# the next Automake release, Autoconf can make the AC_INIT 54b1cb5b87Smrg# arguments mandatory, and then we can depend on a new Autoconf 55b1cb5b87Smrg# release and drop the old call support. 56b1cb5b87SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 57b1cb5b87Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 58b1cb5b87Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl 59b1cb5b87Smrg# test to see if srcdir already configured 60b1cb5b87Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 61b1cb5b87Smrg test -f $srcdir/config.status; then 62b1cb5b87Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 63b1cb5b87Smrgfi 64b1cb5b87Smrg 65b1cb5b87Smrg# test whether we have cygpath 66b1cb5b87Smrgif test -z "$CYGPATH_W"; then 67b1cb5b87Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 68b1cb5b87Smrg CYGPATH_W='cygpath -w' 69b1cb5b87Smrg else 70b1cb5b87Smrg CYGPATH_W=echo 71b1cb5b87Smrg fi 72b1cb5b87Smrgfi 73b1cb5b87SmrgAC_SUBST([CYGPATH_W]) 74b1cb5b87Smrg 75b1cb5b87Smrg# Define the identity of the package. 76b1cb5b87Smrgdnl Distinguish between old-style and new-style calls. 77b1cb5b87Smrgm4_ifval([$2], 78b1cb5b87Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 79b1cb5b87Smrg AC_SUBST([PACKAGE], [$1])dnl 80b1cb5b87Smrg AC_SUBST([VERSION], [$2])], 81b1cb5b87Smrg[_AM_SET_OPTIONS([$1])dnl 82b1cb5b87Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 83b1cb5b87Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 84b1cb5b87Smrg 85b1cb5b87Smrg_AM_IF_OPTION([no-define],, 86b1cb5b87Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 87b1cb5b87Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 88b1cb5b87Smrg 89b1cb5b87Smrg# Some tools Automake needs. 90b1cb5b87SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 91b1cb5b87SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 92b1cb5b87SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 93b1cb5b87SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 94b1cb5b87SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 95b1cb5b87SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 96b1cb5b87SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 97b1cb5b87SmrgAM_MISSING_PROG(AMTAR, tar) 98b1cb5b87SmrgAM_PROG_INSTALL_SH 99b1cb5b87SmrgAM_PROG_INSTALL_STRIP 100b1cb5b87Smrg# We need awk for the "check" target. The system "awk" is bad on 101b1cb5b87Smrg# some platforms. 102b1cb5b87SmrgAC_REQUIRE([AC_PROG_AWK])dnl 103b1cb5b87SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 104b1cb5b87SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 105b1cb5b87Smrg 106b1cb5b87Smrg_AM_IF_OPTION([no-dependencies],, 107b1cb5b87Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 108b1cb5b87Smrg [_AM_DEPENDENCIES(CC)], 109b1cb5b87Smrg [define([AC_PROG_CC], 110b1cb5b87Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 111b1cb5b87SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 112b1cb5b87Smrg [_AM_DEPENDENCIES(CXX)], 113b1cb5b87Smrg [define([AC_PROG_CXX], 114b1cb5b87Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 115b1cb5b87Smrg]) 116b1cb5b87Smrg]) 117b1cb5b87Smrg 118b1cb5b87Smrg 119b1cb5b87Smrg# When config.status generates a header, we must update the stamp-h file. 120b1cb5b87Smrg# This file resides in the same directory as the config header 121b1cb5b87Smrg# that is generated. The stamp files are numbered to have different names. 122b1cb5b87Smrg 123b1cb5b87Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 124b1cb5b87Smrg# loop where config.status creates the headers, so we can generate 125b1cb5b87Smrg# our stamp files there. 126b1cb5b87SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 127b1cb5b87Smrg[# Compute $1's index in $config_headers. 128b1cb5b87Smrg_am_stamp_count=1 129b1cb5b87Smrgfor _am_header in $config_headers :; do 130b1cb5b87Smrg case $_am_header in 131b1cb5b87Smrg $1 | $1:* ) 132b1cb5b87Smrg break ;; 133b1cb5b87Smrg * ) 134b1cb5b87Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 135b1cb5b87Smrg esac 136b1cb5b87Smrgdone 137b1cb5b87Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 138b1cb5b87Smrg 139b1cb5b87Smrg# Copyright 2002 Free Software Foundation, Inc. 140b1cb5b87Smrg 141b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 142b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 143b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 144b1cb5b87Smrg# any later version. 145b1cb5b87Smrg 146b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 147b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 148b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 149b1cb5b87Smrg# GNU General Public License for more details. 150b1cb5b87Smrg 151b1cb5b87Smrg# You should have received a copy of the GNU General Public License 152b1cb5b87Smrg# along with this program; if not, write to the Free Software 153b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 154b1cb5b87Smrg 155b1cb5b87Smrg# AM_AUTOMAKE_VERSION(VERSION) 156b1cb5b87Smrg# ---------------------------- 157b1cb5b87Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 158b1cb5b87Smrg# generated from the m4 files accompanying Automake X.Y. 159b1cb5b87SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 160b1cb5b87Smrg 161b1cb5b87Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 162b1cb5b87Smrg# ------------------------------- 163b1cb5b87Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 164b1cb5b87Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 165b1cb5b87SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 166b1cb5b87Smrg [AM_AUTOMAKE_VERSION([1.7.9])]) 167b1cb5b87Smrg 168b1cb5b87Smrg# Helper functions for option handling. -*- Autoconf -*- 169b1cb5b87Smrg 170b1cb5b87Smrg# Copyright 2001, 2002 Free Software Foundation, Inc. 171b1cb5b87Smrg 172b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 173b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 174b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 175b1cb5b87Smrg# any later version. 176b1cb5b87Smrg 177b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 178b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 179b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 180b1cb5b87Smrg# GNU General Public License for more details. 181b1cb5b87Smrg 182b1cb5b87Smrg# You should have received a copy of the GNU General Public License 183b1cb5b87Smrg# along with this program; if not, write to the Free Software 184b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 185b1cb5b87Smrg# 02111-1307, USA. 186b1cb5b87Smrg 187b1cb5b87Smrg# serial 2 188b1cb5b87Smrg 189b1cb5b87Smrg# _AM_MANGLE_OPTION(NAME) 190b1cb5b87Smrg# ----------------------- 191b1cb5b87SmrgAC_DEFUN([_AM_MANGLE_OPTION], 192b1cb5b87Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 193b1cb5b87Smrg 194b1cb5b87Smrg# _AM_SET_OPTION(NAME) 195b1cb5b87Smrg# ------------------------------ 196b1cb5b87Smrg# Set option NAME. Presently that only means defining a flag for this option. 197b1cb5b87SmrgAC_DEFUN([_AM_SET_OPTION], 198b1cb5b87Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 199b1cb5b87Smrg 200b1cb5b87Smrg# _AM_SET_OPTIONS(OPTIONS) 201b1cb5b87Smrg# ---------------------------------- 202b1cb5b87Smrg# OPTIONS is a space-separated list of Automake options. 203b1cb5b87SmrgAC_DEFUN([_AM_SET_OPTIONS], 204b1cb5b87Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 205b1cb5b87Smrg 206b1cb5b87Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 207b1cb5b87Smrg# ------------------------------------------- 208b1cb5b87Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 209b1cb5b87SmrgAC_DEFUN([_AM_IF_OPTION], 210b1cb5b87Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 211b1cb5b87Smrg 212b1cb5b87Smrg# 213b1cb5b87Smrg# Check to make sure that the build environment is sane. 214b1cb5b87Smrg# 215b1cb5b87Smrg 216b1cb5b87Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 217b1cb5b87Smrg 218b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 219b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 220b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 221b1cb5b87Smrg# any later version. 222b1cb5b87Smrg 223b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 224b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 225b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 226b1cb5b87Smrg# GNU General Public License for more details. 227b1cb5b87Smrg 228b1cb5b87Smrg# You should have received a copy of the GNU General Public License 229b1cb5b87Smrg# along with this program; if not, write to the Free Software 230b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 231b1cb5b87Smrg# 02111-1307, USA. 232b1cb5b87Smrg 233b1cb5b87Smrg# serial 3 234b1cb5b87Smrg 235b1cb5b87Smrg# AM_SANITY_CHECK 236b1cb5b87Smrg# --------------- 237b1cb5b87SmrgAC_DEFUN([AM_SANITY_CHECK], 238b1cb5b87Smrg[AC_MSG_CHECKING([whether build environment is sane]) 239b1cb5b87Smrg# Just in case 240b1cb5b87Smrgsleep 1 241b1cb5b87Smrgecho timestamp > conftest.file 242b1cb5b87Smrg# Do `set' in a subshell so we don't clobber the current shell's 243b1cb5b87Smrg# arguments. Must try -L first in case configure is actually a 244b1cb5b87Smrg# symlink; some systems play weird games with the mod time of symlinks 245b1cb5b87Smrg# (eg FreeBSD returns the mod time of the symlink's containing 246b1cb5b87Smrg# directory). 247b1cb5b87Smrgif ( 248b1cb5b87Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 249b1cb5b87Smrg if test "$[*]" = "X"; then 250b1cb5b87Smrg # -L didn't work. 251b1cb5b87Smrg set X `ls -t $srcdir/configure conftest.file` 252b1cb5b87Smrg fi 253b1cb5b87Smrg rm -f conftest.file 254b1cb5b87Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 255b1cb5b87Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 256b1cb5b87Smrg 257b1cb5b87Smrg # If neither matched, then we have a broken ls. This can happen 258b1cb5b87Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 259b1cb5b87Smrg # broken ls alias from the environment. This has actually 260b1cb5b87Smrg # happened. Such a system could not be considered "sane". 261b1cb5b87Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 262b1cb5b87Smrgalias in your environment]) 263b1cb5b87Smrg fi 264b1cb5b87Smrg 265b1cb5b87Smrg test "$[2]" = conftest.file 266b1cb5b87Smrg ) 267b1cb5b87Smrgthen 268b1cb5b87Smrg # Ok. 269b1cb5b87Smrg : 270b1cb5b87Smrgelse 271b1cb5b87Smrg AC_MSG_ERROR([newly created file is older than distributed files! 272b1cb5b87SmrgCheck your system clock]) 273b1cb5b87Smrgfi 274b1cb5b87SmrgAC_MSG_RESULT(yes)]) 275b1cb5b87Smrg 276b1cb5b87Smrg# -*- Autoconf -*- 277b1cb5b87Smrg 278b1cb5b87Smrg 279b1cb5b87Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 280b1cb5b87Smrg 281b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 282b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 283b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 284b1cb5b87Smrg# any later version. 285b1cb5b87Smrg 286b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 287b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 288b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 289b1cb5b87Smrg# GNU General Public License for more details. 290b1cb5b87Smrg 291b1cb5b87Smrg# You should have received a copy of the GNU General Public License 292b1cb5b87Smrg# along with this program; if not, write to the Free Software 293b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 294b1cb5b87Smrg# 02111-1307, USA. 295b1cb5b87Smrg 296b1cb5b87Smrg# serial 3 297b1cb5b87Smrg 298b1cb5b87Smrg# AM_MISSING_PROG(NAME, PROGRAM) 299b1cb5b87Smrg# ------------------------------ 300b1cb5b87SmrgAC_DEFUN([AM_MISSING_PROG], 301b1cb5b87Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 302b1cb5b87Smrg$1=${$1-"${am_missing_run}$2"} 303b1cb5b87SmrgAC_SUBST($1)]) 304b1cb5b87Smrg 305b1cb5b87Smrg 306b1cb5b87Smrg# AM_MISSING_HAS_RUN 307b1cb5b87Smrg# ------------------ 308b1cb5b87Smrg# Define MISSING if not defined so far and test if it supports --run. 309b1cb5b87Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 310b1cb5b87SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 311b1cb5b87Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 312b1cb5b87Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 313b1cb5b87Smrg# Use eval to expand $SHELL 314b1cb5b87Smrgif eval "$MISSING --run true"; then 315b1cb5b87Smrg am_missing_run="$MISSING --run " 316b1cb5b87Smrgelse 317b1cb5b87Smrg am_missing_run= 318b1cb5b87Smrg AC_MSG_WARN([`missing' script is too old or missing]) 319b1cb5b87Smrgfi 320b1cb5b87Smrg]) 321b1cb5b87Smrg 322b1cb5b87Smrg# AM_AUX_DIR_EXPAND 323b1cb5b87Smrg 324b1cb5b87Smrg# Copyright 2001 Free Software Foundation, Inc. 325b1cb5b87Smrg 326b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 327b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 328b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 329b1cb5b87Smrg# any later version. 330b1cb5b87Smrg 331b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 332b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 333b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 334b1cb5b87Smrg# GNU General Public License for more details. 335b1cb5b87Smrg 336b1cb5b87Smrg# You should have received a copy of the GNU General Public License 337b1cb5b87Smrg# along with this program; if not, write to the Free Software 338b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 339b1cb5b87Smrg# 02111-1307, USA. 340b1cb5b87Smrg 341b1cb5b87Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 342b1cb5b87Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 343b1cb5b87Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 344b1cb5b87Smrg# 345b1cb5b87Smrg# Of course, Automake must honor this variable whenever it calls a 346b1cb5b87Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 347b1cb5b87Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 348b1cb5b87Smrg# depending on how configure is run. This is pretty annoying, since 349b1cb5b87Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 350b1cb5b87Smrg# source directory, any form will work fine, but in subdirectories a 351b1cb5b87Smrg# relative path needs to be adjusted first. 352b1cb5b87Smrg# 353b1cb5b87Smrg# $ac_aux_dir/missing 354b1cb5b87Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 355b1cb5b87Smrg# $top_srcdir/$ac_aux_dir/missing 356b1cb5b87Smrg# fails if $ac_aux_dir is absolute, 357b1cb5b87Smrg# fails when called from a subdirectory in a VPATH build with 358b1cb5b87Smrg# a relative $ac_aux_dir 359b1cb5b87Smrg# 360b1cb5b87Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 361b1cb5b87Smrg# are both prefixed by $srcdir. In an in-source build this is usually 362b1cb5b87Smrg# harmless because $srcdir is `.', but things will broke when you 363b1cb5b87Smrg# start a VPATH build or use an absolute $srcdir. 364b1cb5b87Smrg# 365b1cb5b87Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 366b1cb5b87Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 367b1cb5b87Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 368b1cb5b87Smrg# and then we would define $MISSING as 369b1cb5b87Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 370b1cb5b87Smrg# This will work as long as MISSING is not called from configure, because 371b1cb5b87Smrg# unfortunately $(top_srcdir) has no meaning in configure. 372b1cb5b87Smrg# However there are other variables, like CC, which are often used in 373b1cb5b87Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 374b1cb5b87Smrg# 375b1cb5b87Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 376b1cb5b87Smrg# absolute PATH. The drawback is that using absolute paths prevent a 377b1cb5b87Smrg# configured tree to be moved without reconfiguration. 378b1cb5b87Smrg 379b1cb5b87Smrg# Rely on autoconf to set up CDPATH properly. 380b1cb5b87SmrgAC_PREREQ([2.50]) 381b1cb5b87Smrg 382b1cb5b87SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [ 383b1cb5b87Smrg# expand $ac_aux_dir to an absolute path 384b1cb5b87Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 385b1cb5b87Smrg]) 386b1cb5b87Smrg 387b1cb5b87Smrg# AM_PROG_INSTALL_SH 388b1cb5b87Smrg# ------------------ 389b1cb5b87Smrg# Define $install_sh. 390b1cb5b87Smrg 391b1cb5b87Smrg# Copyright 2001 Free Software Foundation, Inc. 392b1cb5b87Smrg 393b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 394b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 395b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 396b1cb5b87Smrg# any later version. 397b1cb5b87Smrg 398b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 399b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 400b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 401b1cb5b87Smrg# GNU General Public License for more details. 402b1cb5b87Smrg 403b1cb5b87Smrg# You should have received a copy of the GNU General Public License 404b1cb5b87Smrg# along with this program; if not, write to the Free Software 405b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 406b1cb5b87Smrg# 02111-1307, USA. 407b1cb5b87Smrg 408b1cb5b87SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 409b1cb5b87Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 410b1cb5b87Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 411b1cb5b87SmrgAC_SUBST(install_sh)]) 412b1cb5b87Smrg 413b1cb5b87Smrg# AM_PROG_INSTALL_STRIP 414b1cb5b87Smrg 415b1cb5b87Smrg# Copyright 2001 Free Software Foundation, Inc. 416b1cb5b87Smrg 417b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 418b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 419b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 420b1cb5b87Smrg# any later version. 421b1cb5b87Smrg 422b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 423b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 424b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 425b1cb5b87Smrg# GNU General Public License for more details. 426b1cb5b87Smrg 427b1cb5b87Smrg# You should have received a copy of the GNU General Public License 428b1cb5b87Smrg# along with this program; if not, write to the Free Software 429b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 430b1cb5b87Smrg# 02111-1307, USA. 431b1cb5b87Smrg 432b1cb5b87Smrg# One issue with vendor `install' (even GNU) is that you can't 433b1cb5b87Smrg# specify the program used to strip binaries. This is especially 434b1cb5b87Smrg# annoying in cross-compiling environments, where the build's strip 435b1cb5b87Smrg# is unlikely to handle the host's binaries. 436b1cb5b87Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 437b1cb5b87Smrg# always use install-sh in `make install-strip', and initialize 438b1cb5b87Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 439b1cb5b87SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 440b1cb5b87Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 441b1cb5b87Smrg# Installed binaries are usually stripped using `strip' when the user 442b1cb5b87Smrg# run `make install-strip'. However `strip' might not be the right 443b1cb5b87Smrg# tool to use in cross-compilation environments, therefore Automake 444b1cb5b87Smrg# will honor the `STRIP' environment variable to overrule this program. 445b1cb5b87Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 446b1cb5b87Smrgif test "$cross_compiling" != no; then 447b1cb5b87Smrg AC_CHECK_TOOL([STRIP], [strip], :) 448b1cb5b87Smrgfi 449b1cb5b87SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 450b1cb5b87SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 451b1cb5b87Smrg 452b1cb5b87Smrg# -*- Autoconf -*- 453b1cb5b87Smrg# Copyright (C) 2003 Free Software Foundation, Inc. 454b1cb5b87Smrg 455b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 456b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 457b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 458b1cb5b87Smrg# any later version. 459b1cb5b87Smrg 460b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 461b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 462b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 463b1cb5b87Smrg# GNU General Public License for more details. 464b1cb5b87Smrg 465b1cb5b87Smrg# You should have received a copy of the GNU General Public License 466b1cb5b87Smrg# along with this program; if not, write to the Free Software 467b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 468b1cb5b87Smrg# 02111-1307, USA. 469b1cb5b87Smrg 470b1cb5b87Smrg# serial 1 471b1cb5b87Smrg 472b1cb5b87Smrg# Check whether the underlying file-system supports filenames 473b1cb5b87Smrg# with a leading dot. For instance MS-DOS doesn't. 474b1cb5b87SmrgAC_DEFUN([AM_SET_LEADING_DOT], 475b1cb5b87Smrg[rm -rf .tst 2>/dev/null 476b1cb5b87Smrgmkdir .tst 2>/dev/null 477b1cb5b87Smrgif test -d .tst; then 478b1cb5b87Smrg am__leading_dot=. 479b1cb5b87Smrgelse 480b1cb5b87Smrg am__leading_dot=_ 481b1cb5b87Smrgfi 482b1cb5b87Smrgrmdir .tst 2>/dev/null 483b1cb5b87SmrgAC_SUBST([am__leading_dot])]) 484b1cb5b87Smrg 485b1cb5b87Smrg# serial 5 -*- Autoconf -*- 486b1cb5b87Smrg 487b1cb5b87Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 488b1cb5b87Smrg 489b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 490b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 491b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 492b1cb5b87Smrg# any later version. 493b1cb5b87Smrg 494b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 495b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 496b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 497b1cb5b87Smrg# GNU General Public License for more details. 498b1cb5b87Smrg 499b1cb5b87Smrg# You should have received a copy of the GNU General Public License 500b1cb5b87Smrg# along with this program; if not, write to the Free Software 501b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 502b1cb5b87Smrg# 02111-1307, USA. 503b1cb5b87Smrg 504b1cb5b87Smrg 505b1cb5b87Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 506b1cb5b87Smrg# written in clear, in which case automake, when reading aclocal.m4, 507b1cb5b87Smrg# will think it sees a *use*, and therefore will trigger all it's 508b1cb5b87Smrg# C support machinery. Also note that it means that autoscan, seeing 509b1cb5b87Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 510b1cb5b87Smrg 511b1cb5b87Smrg 512b1cb5b87Smrg 513b1cb5b87Smrg# _AM_DEPENDENCIES(NAME) 514b1cb5b87Smrg# ---------------------- 515b1cb5b87Smrg# See how the compiler implements dependency checking. 516b1cb5b87Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 517b1cb5b87Smrg# We try a few techniques and use that to set a single cache variable. 518b1cb5b87Smrg# 519b1cb5b87Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 520b1cb5b87Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 521b1cb5b87Smrg# dependency, and given that the user is not expected to run this macro, 522b1cb5b87Smrg# just rely on AC_PROG_CC. 523b1cb5b87SmrgAC_DEFUN([_AM_DEPENDENCIES], 524b1cb5b87Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 525b1cb5b87SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 526b1cb5b87SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 527b1cb5b87SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 528b1cb5b87Smrg 529b1cb5b87Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 530b1cb5b87Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 531b1cb5b87Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 532b1cb5b87Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 533b1cb5b87Smrg [depcc="$$1" am_compiler_list=]) 534b1cb5b87Smrg 535b1cb5b87SmrgAC_CACHE_CHECK([dependency style of $depcc], 536b1cb5b87Smrg [am_cv_$1_dependencies_compiler_type], 537b1cb5b87Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 538b1cb5b87Smrg # We make a subdir and do the tests there. Otherwise we can end up 539b1cb5b87Smrg # making bogus files that we don't know about and never remove. For 540b1cb5b87Smrg # instance it was reported that on HP-UX the gcc test will end up 541b1cb5b87Smrg # making a dummy file named `D' -- because `-MD' means `put the output 542b1cb5b87Smrg # in D'. 543b1cb5b87Smrg mkdir conftest.dir 544b1cb5b87Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 545b1cb5b87Smrg # using a relative directory. 546b1cb5b87Smrg cp "$am_depcomp" conftest.dir 547b1cb5b87Smrg cd conftest.dir 548b1cb5b87Smrg # We will build objects and dependencies in a subdirectory because 549b1cb5b87Smrg # it helps to detect inapplicable dependency modes. For instance 550b1cb5b87Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 551b1cb5b87Smrg # side effect of compilation, but ICC will put the dependencies in 552b1cb5b87Smrg # the current directory while Tru64 will put them in the object 553b1cb5b87Smrg # directory. 554b1cb5b87Smrg mkdir sub 555b1cb5b87Smrg 556b1cb5b87Smrg am_cv_$1_dependencies_compiler_type=none 557b1cb5b87Smrg if test "$am_compiler_list" = ""; then 558b1cb5b87Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 559b1cb5b87Smrg fi 560b1cb5b87Smrg for depmode in $am_compiler_list; do 561b1cb5b87Smrg # Setup a source with many dependencies, because some compilers 562b1cb5b87Smrg # like to wrap large dependency lists on column 80 (with \), and 563b1cb5b87Smrg # we should not choose a depcomp mode which is confused by this. 564b1cb5b87Smrg # 565b1cb5b87Smrg # We need to recreate these files for each test, as the compiler may 566b1cb5b87Smrg # overwrite some of them when testing with obscure command lines. 567b1cb5b87Smrg # This happens at least with the AIX C compiler. 568b1cb5b87Smrg : > sub/conftest.c 569b1cb5b87Smrg for i in 1 2 3 4 5 6; do 570b1cb5b87Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 571b1cb5b87Smrg : > sub/conftst$i.h 572b1cb5b87Smrg done 573b1cb5b87Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 574b1cb5b87Smrg 575b1cb5b87Smrg case $depmode in 576b1cb5b87Smrg nosideeffect) 577b1cb5b87Smrg # after this tag, mechanisms are not by side-effect, so they'll 578b1cb5b87Smrg # only be used when explicitly requested 579b1cb5b87Smrg if test "x$enable_dependency_tracking" = xyes; then 580b1cb5b87Smrg continue 581b1cb5b87Smrg else 582b1cb5b87Smrg break 583b1cb5b87Smrg fi 584b1cb5b87Smrg ;; 585b1cb5b87Smrg none) break ;; 586b1cb5b87Smrg esac 587b1cb5b87Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 588b1cb5b87Smrg # mode. It turns out that the SunPro C++ compiler does not properly 589b1cb5b87Smrg # handle `-M -o', and we need to detect this. 590b1cb5b87Smrg if depmode=$depmode \ 591b1cb5b87Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 592b1cb5b87Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 593b1cb5b87Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 594b1cb5b87Smrg >/dev/null 2>conftest.err && 595b1cb5b87Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 596b1cb5b87Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 597b1cb5b87Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 598b1cb5b87Smrg # icc doesn't choke on unknown options, it will just issue warnings 599b1cb5b87Smrg # (even with -Werror). So we grep stderr for any message 600b1cb5b87Smrg # that says an option was ignored. 601b1cb5b87Smrg if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 602b1cb5b87Smrg am_cv_$1_dependencies_compiler_type=$depmode 603b1cb5b87Smrg break 604b1cb5b87Smrg fi 605b1cb5b87Smrg fi 606b1cb5b87Smrg done 607b1cb5b87Smrg 608b1cb5b87Smrg cd .. 609b1cb5b87Smrg rm -rf conftest.dir 610b1cb5b87Smrgelse 611b1cb5b87Smrg am_cv_$1_dependencies_compiler_type=none 612b1cb5b87Smrgfi 613b1cb5b87Smrg]) 614b1cb5b87SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 615b1cb5b87SmrgAM_CONDITIONAL([am__fastdep$1], [ 616b1cb5b87Smrg test "x$enable_dependency_tracking" != xno \ 617b1cb5b87Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 618b1cb5b87Smrg]) 619b1cb5b87Smrg 620b1cb5b87Smrg 621b1cb5b87Smrg# AM_SET_DEPDIR 622b1cb5b87Smrg# ------------- 623b1cb5b87Smrg# Choose a directory name for dependency files. 624b1cb5b87Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 625b1cb5b87SmrgAC_DEFUN([AM_SET_DEPDIR], 626b1cb5b87Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 627b1cb5b87SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 628b1cb5b87Smrg]) 629b1cb5b87Smrg 630b1cb5b87Smrg 631b1cb5b87Smrg# AM_DEP_TRACK 632b1cb5b87Smrg# ------------ 633b1cb5b87SmrgAC_DEFUN([AM_DEP_TRACK], 634b1cb5b87Smrg[AC_ARG_ENABLE(dependency-tracking, 635b1cb5b87Smrg[ --disable-dependency-tracking Speeds up one-time builds 636b1cb5b87Smrg --enable-dependency-tracking Do not reject slow dependency extractors]) 637b1cb5b87Smrgif test "x$enable_dependency_tracking" != xno; then 638b1cb5b87Smrg am_depcomp="$ac_aux_dir/depcomp" 639b1cb5b87Smrg AMDEPBACKSLASH='\' 640b1cb5b87Smrgfi 641b1cb5b87SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 642b1cb5b87SmrgAC_SUBST([AMDEPBACKSLASH]) 643b1cb5b87Smrg]) 644b1cb5b87Smrg 645b1cb5b87Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 646b1cb5b87Smrg 647b1cb5b87Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 648b1cb5b87Smrg 649b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 650b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 651b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 652b1cb5b87Smrg# any later version. 653b1cb5b87Smrg 654b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 655b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 656b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 657b1cb5b87Smrg# GNU General Public License for more details. 658b1cb5b87Smrg 659b1cb5b87Smrg# You should have received a copy of the GNU General Public License 660b1cb5b87Smrg# along with this program; if not, write to the Free Software 661b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 662b1cb5b87Smrg# 02111-1307, USA. 663b1cb5b87Smrg 664b1cb5b87Smrg#serial 2 665b1cb5b87Smrg 666b1cb5b87Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 667b1cb5b87Smrg# ------------------------------ 668b1cb5b87SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 669b1cb5b87Smrg[for mf in $CONFIG_FILES; do 670b1cb5b87Smrg # Strip MF so we end up with the name of the file. 671b1cb5b87Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 672b1cb5b87Smrg # Check whether this is an Automake generated Makefile or not. 673b1cb5b87Smrg # We used to match only the files named `Makefile.in', but 674b1cb5b87Smrg # some people rename them; so instead we look at the file content. 675b1cb5b87Smrg # Grep'ing the first line is not enough: some people post-process 676b1cb5b87Smrg # each Makefile.in and add a new line on top of each file to say so. 677b1cb5b87Smrg # So let's grep whole file. 678b1cb5b87Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 679b1cb5b87Smrg dirpart=`AS_DIRNAME("$mf")` 680b1cb5b87Smrg else 681b1cb5b87Smrg continue 682b1cb5b87Smrg fi 683b1cb5b87Smrg grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 684b1cb5b87Smrg # Extract the definition of DEP_FILES from the Makefile without 685b1cb5b87Smrg # running `make'. 686b1cb5b87Smrg DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 687b1cb5b87Smrg test -z "$DEPDIR" && continue 688b1cb5b87Smrg # When using ansi2knr, U may be empty or an underscore; expand it 689b1cb5b87Smrg U=`sed -n -e '/^U = / s///p' < "$mf"` 690b1cb5b87Smrg test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 691b1cb5b87Smrg # We invoke sed twice because it is the simplest approach to 692b1cb5b87Smrg # changing $(DEPDIR) to its actual value in the expansion. 693b1cb5b87Smrg for file in `sed -n -e ' 694b1cb5b87Smrg /^DEP_FILES = .*\\\\$/ { 695b1cb5b87Smrg s/^DEP_FILES = // 696b1cb5b87Smrg :loop 697b1cb5b87Smrg s/\\\\$// 698b1cb5b87Smrg p 699b1cb5b87Smrg n 700b1cb5b87Smrg /\\\\$/ b loop 701b1cb5b87Smrg p 702b1cb5b87Smrg } 703b1cb5b87Smrg /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 704b1cb5b87Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 705b1cb5b87Smrg # Make sure the directory exists. 706b1cb5b87Smrg test -f "$dirpart/$file" && continue 707b1cb5b87Smrg fdir=`AS_DIRNAME(["$file"])` 708b1cb5b87Smrg AS_MKDIR_P([$dirpart/$fdir]) 709b1cb5b87Smrg # echo "creating $dirpart/$file" 710b1cb5b87Smrg echo '# dummy' > "$dirpart/$file" 711b1cb5b87Smrg done 712b1cb5b87Smrgdone 713b1cb5b87Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 714b1cb5b87Smrg 715b1cb5b87Smrg 716b1cb5b87Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 717b1cb5b87Smrg# ----------------------------- 718b1cb5b87Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 719b1cb5b87Smrg# 720b1cb5b87Smrg# This code is only required when automatic dependency tracking 721b1cb5b87Smrg# is enabled. FIXME. This creates each `.P' file that we will 722b1cb5b87Smrg# need in order to bootstrap the dependency handling code. 723b1cb5b87SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 724b1cb5b87Smrg[AC_CONFIG_COMMANDS([depfiles], 725b1cb5b87Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 726b1cb5b87Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 727b1cb5b87Smrg]) 728b1cb5b87Smrg 729b1cb5b87Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 730b1cb5b87Smrg 731b1cb5b87Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 732b1cb5b87Smrg 733b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 734b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 735b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 736b1cb5b87Smrg# any later version. 737b1cb5b87Smrg 738b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 739b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 740b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 741b1cb5b87Smrg# GNU General Public License for more details. 742b1cb5b87Smrg 743b1cb5b87Smrg# You should have received a copy of the GNU General Public License 744b1cb5b87Smrg# along with this program; if not, write to the Free Software 745b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 746b1cb5b87Smrg# 02111-1307, USA. 747b1cb5b87Smrg 748b1cb5b87Smrg# serial 2 749b1cb5b87Smrg 750b1cb5b87Smrg# AM_MAKE_INCLUDE() 751b1cb5b87Smrg# ----------------- 752b1cb5b87Smrg# Check to see how make treats includes. 753b1cb5b87SmrgAC_DEFUN([AM_MAKE_INCLUDE], 754b1cb5b87Smrg[am_make=${MAKE-make} 755b1cb5b87Smrgcat > confinc << 'END' 756b1cb5b87Smrgam__doit: 757b1cb5b87Smrg @echo done 758b1cb5b87Smrg.PHONY: am__doit 759b1cb5b87SmrgEND 760b1cb5b87Smrg# If we don't find an include directive, just comment out the code. 761b1cb5b87SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 762b1cb5b87Smrgam__include="#" 763b1cb5b87Smrgam__quote= 764b1cb5b87Smrg_am_result=none 765b1cb5b87Smrg# First try GNU make style include. 766b1cb5b87Smrgecho "include confinc" > confmf 767b1cb5b87Smrg# We grep out `Entering directory' and `Leaving directory' 768b1cb5b87Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 769b1cb5b87Smrg# In particular we don't look at `^make:' because GNU make might 770b1cb5b87Smrg# be invoked under some other name (usually "gmake"), in which 771b1cb5b87Smrg# case it prints its new name instead of `make'. 772b1cb5b87Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 773b1cb5b87Smrg am__include=include 774b1cb5b87Smrg am__quote= 775b1cb5b87Smrg _am_result=GNU 776b1cb5b87Smrgfi 777b1cb5b87Smrg# Now try BSD make style include. 778b1cb5b87Smrgif test "$am__include" = "#"; then 779b1cb5b87Smrg echo '.include "confinc"' > confmf 780b1cb5b87Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 781b1cb5b87Smrg am__include=.include 782b1cb5b87Smrg am__quote="\"" 783b1cb5b87Smrg _am_result=BSD 784b1cb5b87Smrg fi 785b1cb5b87Smrgfi 786b1cb5b87SmrgAC_SUBST([am__include]) 787b1cb5b87SmrgAC_SUBST([am__quote]) 788b1cb5b87SmrgAC_MSG_RESULT([$_am_result]) 789b1cb5b87Smrgrm -f confinc confmf 790b1cb5b87Smrg]) 791b1cb5b87Smrg 792b1cb5b87Smrg# AM_CONDITIONAL -*- Autoconf -*- 793b1cb5b87Smrg 794b1cb5b87Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 795b1cb5b87Smrg 796b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 797b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 798b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 799b1cb5b87Smrg# any later version. 800b1cb5b87Smrg 801b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 802b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 803b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 804b1cb5b87Smrg# GNU General Public License for more details. 805b1cb5b87Smrg 806b1cb5b87Smrg# You should have received a copy of the GNU General Public License 807b1cb5b87Smrg# along with this program; if not, write to the Free Software 808b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 809b1cb5b87Smrg# 02111-1307, USA. 810b1cb5b87Smrg 811b1cb5b87Smrg# serial 5 812b1cb5b87Smrg 813b1cb5b87SmrgAC_PREREQ(2.52) 814b1cb5b87Smrg 815b1cb5b87Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 816b1cb5b87Smrg# ------------------------------------- 817b1cb5b87Smrg# Define a conditional. 818b1cb5b87SmrgAC_DEFUN([AM_CONDITIONAL], 819b1cb5b87Smrg[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 820b1cb5b87Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 821b1cb5b87SmrgAC_SUBST([$1_TRUE]) 822b1cb5b87SmrgAC_SUBST([$1_FALSE]) 823b1cb5b87Smrgif $2; then 824b1cb5b87Smrg $1_TRUE= 825b1cb5b87Smrg $1_FALSE='#' 826b1cb5b87Smrgelse 827b1cb5b87Smrg $1_TRUE='#' 828b1cb5b87Smrg $1_FALSE= 829b1cb5b87Smrgfi 830b1cb5b87SmrgAC_CONFIG_COMMANDS_PRE( 831b1cb5b87Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 832b1cb5b87Smrg AC_MSG_ERROR([conditional "$1" was never defined. 833b1cb5b87SmrgUsually this means the macro was only invoked conditionally.]) 834b1cb5b87Smrgfi])]) 835b1cb5b87Smrg 836b1cb5b87Smrg# Add --enable-maintainer-mode option to configure. 837b1cb5b87Smrg# From Jim Meyering 838b1cb5b87Smrg 839b1cb5b87Smrg# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 840b1cb5b87Smrg 841b1cb5b87Smrg# This program is free software; you can redistribute it and/or modify 842b1cb5b87Smrg# it under the terms of the GNU General Public License as published by 843b1cb5b87Smrg# the Free Software Foundation; either version 2, or (at your option) 844b1cb5b87Smrg# any later version. 845b1cb5b87Smrg 846b1cb5b87Smrg# This program is distributed in the hope that it will be useful, 847b1cb5b87Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 848b1cb5b87Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 849b1cb5b87Smrg# GNU General Public License for more details. 850b1cb5b87Smrg 851b1cb5b87Smrg# You should have received a copy of the GNU General Public License 852b1cb5b87Smrg# along with this program; if not, write to the Free Software 853b1cb5b87Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 854b1cb5b87Smrg# 02111-1307, USA. 855b1cb5b87Smrg 856b1cb5b87Smrg# serial 2 857b1cb5b87Smrg 858b1cb5b87SmrgAC_DEFUN([AM_MAINTAINER_MODE], 859b1cb5b87Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 860b1cb5b87Smrg dnl maintainer-mode is disabled by default 861b1cb5b87Smrg AC_ARG_ENABLE(maintainer-mode, 862b1cb5b87Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 863b1cb5b87Smrg (and sometimes confusing) to the casual installer], 864b1cb5b87Smrg USE_MAINTAINER_MODE=$enableval, 865b1cb5b87Smrg USE_MAINTAINER_MODE=no) 866b1cb5b87Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 867b1cb5b87Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 868b1cb5b87Smrg MAINT=$MAINTAINER_MODE_TRUE 869b1cb5b87Smrg AC_SUBST(MAINT)dnl 870b1cb5b87Smrg] 871b1cb5b87Smrg) 872b1cb5b87Smrg 873b1cb5b87SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 874b1cb5b87Smrg 875b1cb5b87Smrgdnl Copyright 2005 Red Hat, Inc 876b1cb5b87Smrgdnl 877b1cb5b87Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 878b1cb5b87Smrgdnl documentation for any purpose is hereby granted without fee, provided that 879b1cb5b87Smrgdnl the above copyright notice appear in all copies and that both that 880b1cb5b87Smrgdnl copyright notice and this permission notice appear in supporting 881b1cb5b87Smrgdnl documentation. 882b1cb5b87Smrgdnl 883b1cb5b87Smrgdnl The above copyright notice and this permission notice shall be included 884b1cb5b87Smrgdnl in all copies or substantial portions of the Software. 885b1cb5b87Smrgdnl 886b1cb5b87Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 887b1cb5b87Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 888b1cb5b87Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 889b1cb5b87Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 890b1cb5b87Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 891b1cb5b87Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 892b1cb5b87Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 893b1cb5b87Smrgdnl 894b1cb5b87Smrgdnl Except as contained in this notice, the name of the copyright holders shall 895b1cb5b87Smrgdnl not be used in advertising or otherwise to promote the sale, use or 896b1cb5b87Smrgdnl other dealings in this Software without prior written authorization 897b1cb5b87Smrgdnl from the copyright holders. 898b1cb5b87Smrgdnl 899b1cb5b87Smrg 900b1cb5b87Smrg# XORG_RELEASE_VERSION 901b1cb5b87Smrg# -------------------- 902b1cb5b87Smrg# Adds --with/without-release-string and changes the PACKAGE and 903b1cb5b87Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 904b1cb5b87Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 905b1cb5b87Smrg 906b1cb5b87SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 907b1cb5b87Smrg AC_ARG_WITH(release-version, 908b1cb5b87Smrg AC_HELP_STRING([--with-release-version=STRING], 909b1cb5b87Smrg [Use release version string in package name]), 910b1cb5b87Smrg [RELEASE_VERSION="$withval"], 911b1cb5b87Smrg [RELEASE_VERSION=""]) 912b1cb5b87Smrg if test "x$RELEASE_VERSION" != "x"; then 913b1cb5b87Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 914b1cb5b87Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 915b1cb5b87Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 916b1cb5b87Smrg fi 917b1cb5b87Smrg]) 918b1cb5b87Smrg 919