aclocal.m4 revision 439fab64
1439fab64Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 2439fab64Smrg 3439fab64Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 4439fab64Smrg# Free Software Foundation, Inc. 5439fab64Smrg# This file is free software; the Free Software Foundation 6439fab64Smrg# gives unlimited permission to copy and/or distribute it, 7439fab64Smrg# with or without modifications, as long as this notice is preserved. 8439fab64Smrg 9439fab64Smrg# This program is distributed in the hope that it will be useful, 10439fab64Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11439fab64Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12439fab64Smrg# PARTICULAR PURPOSE. 13439fab64Smrg 14439fab64Smrg# Do all the work for Automake. -*- Autoconf -*- 15439fab64Smrg 16439fab64Smrg# This macro actually does too much some checks are only needed if 17439fab64Smrg# your package does certain things. But this isn't really a big deal. 18439fab64Smrg 19439fab64Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 20439fab64Smrg# Free Software Foundation, Inc. 21439fab64Smrg 22439fab64Smrg# This program is free software; you can redistribute it and/or modify 23439fab64Smrg# it under the terms of the GNU General Public License as published by 24439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 25439fab64Smrg# any later version. 26439fab64Smrg 27439fab64Smrg# This program is distributed in the hope that it will be useful, 28439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 29439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30439fab64Smrg# GNU General Public License for more details. 31439fab64Smrg 32439fab64Smrg# You should have received a copy of the GNU General Public License 33439fab64Smrg# along with this program; if not, write to the Free Software 34439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 35439fab64Smrg# 02111-1307, USA. 36439fab64Smrg 37439fab64Smrg# serial 10 38439fab64Smrg 39439fab64SmrgAC_PREREQ([2.54]) 40439fab64Smrg 41439fab64Smrg# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 42439fab64Smrg# the ones we care about. 43439fab64Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 44439fab64Smrg 45439fab64Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 46439fab64Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 47439fab64Smrg# ----------------------------------------------- 48439fab64Smrg# The call with PACKAGE and VERSION arguments is the old style 49439fab64Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 50439fab64Smrg# and VERSION should now be passed to AC_INIT and removed from 51439fab64Smrg# the call to AM_INIT_AUTOMAKE. 52439fab64Smrg# We support both call styles for the transition. After 53439fab64Smrg# the next Automake release, Autoconf can make the AC_INIT 54439fab64Smrg# arguments mandatory, and then we can depend on a new Autoconf 55439fab64Smrg# release and drop the old call support. 56439fab64SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 57439fab64Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 58439fab64Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl 59439fab64Smrg# test to see if srcdir already configured 60439fab64Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 61439fab64Smrg test -f $srcdir/config.status; then 62439fab64Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 63439fab64Smrgfi 64439fab64Smrg 65439fab64Smrg# test whether we have cygpath 66439fab64Smrgif test -z "$CYGPATH_W"; then 67439fab64Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 68439fab64Smrg CYGPATH_W='cygpath -w' 69439fab64Smrg else 70439fab64Smrg CYGPATH_W=echo 71439fab64Smrg fi 72439fab64Smrgfi 73439fab64SmrgAC_SUBST([CYGPATH_W]) 74439fab64Smrg 75439fab64Smrg# Define the identity of the package. 76439fab64Smrgdnl Distinguish between old-style and new-style calls. 77439fab64Smrgm4_ifval([$2], 78439fab64Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 79439fab64Smrg AC_SUBST([PACKAGE], [$1])dnl 80439fab64Smrg AC_SUBST([VERSION], [$2])], 81439fab64Smrg[_AM_SET_OPTIONS([$1])dnl 82439fab64Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 83439fab64Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 84439fab64Smrg 85439fab64Smrg_AM_IF_OPTION([no-define],, 86439fab64Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 87439fab64Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 88439fab64Smrg 89439fab64Smrg# Some tools Automake needs. 90439fab64SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 91439fab64SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 92439fab64SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 93439fab64SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 94439fab64SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 95439fab64SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 96439fab64SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 97439fab64SmrgAM_MISSING_PROG(AMTAR, tar) 98439fab64SmrgAM_PROG_INSTALL_SH 99439fab64SmrgAM_PROG_INSTALL_STRIP 100439fab64Smrg# We need awk for the "check" target. The system "awk" is bad on 101439fab64Smrg# some platforms. 102439fab64SmrgAC_REQUIRE([AC_PROG_AWK])dnl 103439fab64SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 104439fab64SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 105439fab64Smrg 106439fab64Smrg_AM_IF_OPTION([no-dependencies],, 107439fab64Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 108439fab64Smrg [_AM_DEPENDENCIES(CC)], 109439fab64Smrg [define([AC_PROG_CC], 110439fab64Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 111439fab64SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 112439fab64Smrg [_AM_DEPENDENCIES(CXX)], 113439fab64Smrg [define([AC_PROG_CXX], 114439fab64Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 115439fab64Smrg]) 116439fab64Smrg]) 117439fab64Smrg 118439fab64Smrg 119439fab64Smrg# When config.status generates a header, we must update the stamp-h file. 120439fab64Smrg# This file resides in the same directory as the config header 121439fab64Smrg# that is generated. The stamp files are numbered to have different names. 122439fab64Smrg 123439fab64Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 124439fab64Smrg# loop where config.status creates the headers, so we can generate 125439fab64Smrg# our stamp files there. 126439fab64SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 127439fab64Smrg[# Compute $1's index in $config_headers. 128439fab64Smrg_am_stamp_count=1 129439fab64Smrgfor _am_header in $config_headers :; do 130439fab64Smrg case $_am_header in 131439fab64Smrg $1 | $1:* ) 132439fab64Smrg break ;; 133439fab64Smrg * ) 134439fab64Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 135439fab64Smrg esac 136439fab64Smrgdone 137439fab64Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 138439fab64Smrg 139439fab64Smrg# Copyright 2002 Free Software Foundation, Inc. 140439fab64Smrg 141439fab64Smrg# This program is free software; you can redistribute it and/or modify 142439fab64Smrg# it under the terms of the GNU General Public License as published by 143439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 144439fab64Smrg# any later version. 145439fab64Smrg 146439fab64Smrg# This program is distributed in the hope that it will be useful, 147439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 148439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 149439fab64Smrg# GNU General Public License for more details. 150439fab64Smrg 151439fab64Smrg# You should have received a copy of the GNU General Public License 152439fab64Smrg# along with this program; if not, write to the Free Software 153439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 154439fab64Smrg 155439fab64Smrg# AM_AUTOMAKE_VERSION(VERSION) 156439fab64Smrg# ---------------------------- 157439fab64Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 158439fab64Smrg# generated from the m4 files accompanying Automake X.Y. 159439fab64SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 160439fab64Smrg 161439fab64Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 162439fab64Smrg# ------------------------------- 163439fab64Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 164439fab64Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 165439fab64SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 166439fab64Smrg [AM_AUTOMAKE_VERSION([1.7.9])]) 167439fab64Smrg 168439fab64Smrg# Helper functions for option handling. -*- Autoconf -*- 169439fab64Smrg 170439fab64Smrg# Copyright 2001, 2002 Free Software Foundation, Inc. 171439fab64Smrg 172439fab64Smrg# This program is free software; you can redistribute it and/or modify 173439fab64Smrg# it under the terms of the GNU General Public License as published by 174439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 175439fab64Smrg# any later version. 176439fab64Smrg 177439fab64Smrg# This program is distributed in the hope that it will be useful, 178439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 179439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 180439fab64Smrg# GNU General Public License for more details. 181439fab64Smrg 182439fab64Smrg# You should have received a copy of the GNU General Public License 183439fab64Smrg# along with this program; if not, write to the Free Software 184439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 185439fab64Smrg# 02111-1307, USA. 186439fab64Smrg 187439fab64Smrg# serial 2 188439fab64Smrg 189439fab64Smrg# _AM_MANGLE_OPTION(NAME) 190439fab64Smrg# ----------------------- 191439fab64SmrgAC_DEFUN([_AM_MANGLE_OPTION], 192439fab64Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 193439fab64Smrg 194439fab64Smrg# _AM_SET_OPTION(NAME) 195439fab64Smrg# ------------------------------ 196439fab64Smrg# Set option NAME. Presently that only means defining a flag for this option. 197439fab64SmrgAC_DEFUN([_AM_SET_OPTION], 198439fab64Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 199439fab64Smrg 200439fab64Smrg# _AM_SET_OPTIONS(OPTIONS) 201439fab64Smrg# ---------------------------------- 202439fab64Smrg# OPTIONS is a space-separated list of Automake options. 203439fab64SmrgAC_DEFUN([_AM_SET_OPTIONS], 204439fab64Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 205439fab64Smrg 206439fab64Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 207439fab64Smrg# ------------------------------------------- 208439fab64Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 209439fab64SmrgAC_DEFUN([_AM_IF_OPTION], 210439fab64Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 211439fab64Smrg 212439fab64Smrg# 213439fab64Smrg# Check to make sure that the build environment is sane. 214439fab64Smrg# 215439fab64Smrg 216439fab64Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 217439fab64Smrg 218439fab64Smrg# This program is free software; you can redistribute it and/or modify 219439fab64Smrg# it under the terms of the GNU General Public License as published by 220439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 221439fab64Smrg# any later version. 222439fab64Smrg 223439fab64Smrg# This program is distributed in the hope that it will be useful, 224439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 225439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 226439fab64Smrg# GNU General Public License for more details. 227439fab64Smrg 228439fab64Smrg# You should have received a copy of the GNU General Public License 229439fab64Smrg# along with this program; if not, write to the Free Software 230439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 231439fab64Smrg# 02111-1307, USA. 232439fab64Smrg 233439fab64Smrg# serial 3 234439fab64Smrg 235439fab64Smrg# AM_SANITY_CHECK 236439fab64Smrg# --------------- 237439fab64SmrgAC_DEFUN([AM_SANITY_CHECK], 238439fab64Smrg[AC_MSG_CHECKING([whether build environment is sane]) 239439fab64Smrg# Just in case 240439fab64Smrgsleep 1 241439fab64Smrgecho timestamp > conftest.file 242439fab64Smrg# Do `set' in a subshell so we don't clobber the current shell's 243439fab64Smrg# arguments. Must try -L first in case configure is actually a 244439fab64Smrg# symlink; some systems play weird games with the mod time of symlinks 245439fab64Smrg# (eg FreeBSD returns the mod time of the symlink's containing 246439fab64Smrg# directory). 247439fab64Smrgif ( 248439fab64Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 249439fab64Smrg if test "$[*]" = "X"; then 250439fab64Smrg # -L didn't work. 251439fab64Smrg set X `ls -t $srcdir/configure conftest.file` 252439fab64Smrg fi 253439fab64Smrg rm -f conftest.file 254439fab64Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 255439fab64Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 256439fab64Smrg 257439fab64Smrg # If neither matched, then we have a broken ls. This can happen 258439fab64Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 259439fab64Smrg # broken ls alias from the environment. This has actually 260439fab64Smrg # happened. Such a system could not be considered "sane". 261439fab64Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 262439fab64Smrgalias in your environment]) 263439fab64Smrg fi 264439fab64Smrg 265439fab64Smrg test "$[2]" = conftest.file 266439fab64Smrg ) 267439fab64Smrgthen 268439fab64Smrg # Ok. 269439fab64Smrg : 270439fab64Smrgelse 271439fab64Smrg AC_MSG_ERROR([newly created file is older than distributed files! 272439fab64SmrgCheck your system clock]) 273439fab64Smrgfi 274439fab64SmrgAC_MSG_RESULT(yes)]) 275439fab64Smrg 276439fab64Smrg# -*- Autoconf -*- 277439fab64Smrg 278439fab64Smrg 279439fab64Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 280439fab64Smrg 281439fab64Smrg# This program is free software; you can redistribute it and/or modify 282439fab64Smrg# it under the terms of the GNU General Public License as published by 283439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 284439fab64Smrg# any later version. 285439fab64Smrg 286439fab64Smrg# This program is distributed in the hope that it will be useful, 287439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 288439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 289439fab64Smrg# GNU General Public License for more details. 290439fab64Smrg 291439fab64Smrg# You should have received a copy of the GNU General Public License 292439fab64Smrg# along with this program; if not, write to the Free Software 293439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 294439fab64Smrg# 02111-1307, USA. 295439fab64Smrg 296439fab64Smrg# serial 3 297439fab64Smrg 298439fab64Smrg# AM_MISSING_PROG(NAME, PROGRAM) 299439fab64Smrg# ------------------------------ 300439fab64SmrgAC_DEFUN([AM_MISSING_PROG], 301439fab64Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 302439fab64Smrg$1=${$1-"${am_missing_run}$2"} 303439fab64SmrgAC_SUBST($1)]) 304439fab64Smrg 305439fab64Smrg 306439fab64Smrg# AM_MISSING_HAS_RUN 307439fab64Smrg# ------------------ 308439fab64Smrg# Define MISSING if not defined so far and test if it supports --run. 309439fab64Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 310439fab64SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 311439fab64Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 312439fab64Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 313439fab64Smrg# Use eval to expand $SHELL 314439fab64Smrgif eval "$MISSING --run true"; then 315439fab64Smrg am_missing_run="$MISSING --run " 316439fab64Smrgelse 317439fab64Smrg am_missing_run= 318439fab64Smrg AC_MSG_WARN([`missing' script is too old or missing]) 319439fab64Smrgfi 320439fab64Smrg]) 321439fab64Smrg 322439fab64Smrg# AM_AUX_DIR_EXPAND 323439fab64Smrg 324439fab64Smrg# Copyright 2001 Free Software Foundation, Inc. 325439fab64Smrg 326439fab64Smrg# This program is free software; you can redistribute it and/or modify 327439fab64Smrg# it under the terms of the GNU General Public License as published by 328439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 329439fab64Smrg# any later version. 330439fab64Smrg 331439fab64Smrg# This program is distributed in the hope that it will be useful, 332439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 333439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 334439fab64Smrg# GNU General Public License for more details. 335439fab64Smrg 336439fab64Smrg# You should have received a copy of the GNU General Public License 337439fab64Smrg# along with this program; if not, write to the Free Software 338439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 339439fab64Smrg# 02111-1307, USA. 340439fab64Smrg 341439fab64Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 342439fab64Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 343439fab64Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 344439fab64Smrg# 345439fab64Smrg# Of course, Automake must honor this variable whenever it calls a 346439fab64Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 347439fab64Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 348439fab64Smrg# depending on how configure is run. This is pretty annoying, since 349439fab64Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 350439fab64Smrg# source directory, any form will work fine, but in subdirectories a 351439fab64Smrg# relative path needs to be adjusted first. 352439fab64Smrg# 353439fab64Smrg# $ac_aux_dir/missing 354439fab64Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 355439fab64Smrg# $top_srcdir/$ac_aux_dir/missing 356439fab64Smrg# fails if $ac_aux_dir is absolute, 357439fab64Smrg# fails when called from a subdirectory in a VPATH build with 358439fab64Smrg# a relative $ac_aux_dir 359439fab64Smrg# 360439fab64Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 361439fab64Smrg# are both prefixed by $srcdir. In an in-source build this is usually 362439fab64Smrg# harmless because $srcdir is `.', but things will broke when you 363439fab64Smrg# start a VPATH build or use an absolute $srcdir. 364439fab64Smrg# 365439fab64Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 366439fab64Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 367439fab64Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 368439fab64Smrg# and then we would define $MISSING as 369439fab64Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 370439fab64Smrg# This will work as long as MISSING is not called from configure, because 371439fab64Smrg# unfortunately $(top_srcdir) has no meaning in configure. 372439fab64Smrg# However there are other variables, like CC, which are often used in 373439fab64Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 374439fab64Smrg# 375439fab64Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 376439fab64Smrg# absolute PATH. The drawback is that using absolute paths prevent a 377439fab64Smrg# configured tree to be moved without reconfiguration. 378439fab64Smrg 379439fab64Smrg# Rely on autoconf to set up CDPATH properly. 380439fab64SmrgAC_PREREQ([2.50]) 381439fab64Smrg 382439fab64SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [ 383439fab64Smrg# expand $ac_aux_dir to an absolute path 384439fab64Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 385439fab64Smrg]) 386439fab64Smrg 387439fab64Smrg# AM_PROG_INSTALL_SH 388439fab64Smrg# ------------------ 389439fab64Smrg# Define $install_sh. 390439fab64Smrg 391439fab64Smrg# Copyright 2001 Free Software Foundation, Inc. 392439fab64Smrg 393439fab64Smrg# This program is free software; you can redistribute it and/or modify 394439fab64Smrg# it under the terms of the GNU General Public License as published by 395439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 396439fab64Smrg# any later version. 397439fab64Smrg 398439fab64Smrg# This program is distributed in the hope that it will be useful, 399439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 400439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 401439fab64Smrg# GNU General Public License for more details. 402439fab64Smrg 403439fab64Smrg# You should have received a copy of the GNU General Public License 404439fab64Smrg# along with this program; if not, write to the Free Software 405439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 406439fab64Smrg# 02111-1307, USA. 407439fab64Smrg 408439fab64SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 409439fab64Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 410439fab64Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 411439fab64SmrgAC_SUBST(install_sh)]) 412439fab64Smrg 413439fab64Smrg# AM_PROG_INSTALL_STRIP 414439fab64Smrg 415439fab64Smrg# Copyright 2001 Free Software Foundation, Inc. 416439fab64Smrg 417439fab64Smrg# This program is free software; you can redistribute it and/or modify 418439fab64Smrg# it under the terms of the GNU General Public License as published by 419439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 420439fab64Smrg# any later version. 421439fab64Smrg 422439fab64Smrg# This program is distributed in the hope that it will be useful, 423439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 424439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 425439fab64Smrg# GNU General Public License for more details. 426439fab64Smrg 427439fab64Smrg# You should have received a copy of the GNU General Public License 428439fab64Smrg# along with this program; if not, write to the Free Software 429439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 430439fab64Smrg# 02111-1307, USA. 431439fab64Smrg 432439fab64Smrg# One issue with vendor `install' (even GNU) is that you can't 433439fab64Smrg# specify the program used to strip binaries. This is especially 434439fab64Smrg# annoying in cross-compiling environments, where the build's strip 435439fab64Smrg# is unlikely to handle the host's binaries. 436439fab64Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 437439fab64Smrg# always use install-sh in `make install-strip', and initialize 438439fab64Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 439439fab64SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 440439fab64Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 441439fab64Smrg# Installed binaries are usually stripped using `strip' when the user 442439fab64Smrg# run `make install-strip'. However `strip' might not be the right 443439fab64Smrg# tool to use in cross-compilation environments, therefore Automake 444439fab64Smrg# will honor the `STRIP' environment variable to overrule this program. 445439fab64Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 446439fab64Smrgif test "$cross_compiling" != no; then 447439fab64Smrg AC_CHECK_TOOL([STRIP], [strip], :) 448439fab64Smrgfi 449439fab64SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 450439fab64SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 451439fab64Smrg 452439fab64Smrg# -*- Autoconf -*- 453439fab64Smrg# Copyright (C) 2003 Free Software Foundation, Inc. 454439fab64Smrg 455439fab64Smrg# This program is free software; you can redistribute it and/or modify 456439fab64Smrg# it under the terms of the GNU General Public License as published by 457439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 458439fab64Smrg# any later version. 459439fab64Smrg 460439fab64Smrg# This program is distributed in the hope that it will be useful, 461439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 462439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 463439fab64Smrg# GNU General Public License for more details. 464439fab64Smrg 465439fab64Smrg# You should have received a copy of the GNU General Public License 466439fab64Smrg# along with this program; if not, write to the Free Software 467439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 468439fab64Smrg# 02111-1307, USA. 469439fab64Smrg 470439fab64Smrg# serial 1 471439fab64Smrg 472439fab64Smrg# Check whether the underlying file-system supports filenames 473439fab64Smrg# with a leading dot. For instance MS-DOS doesn't. 474439fab64SmrgAC_DEFUN([AM_SET_LEADING_DOT], 475439fab64Smrg[rm -rf .tst 2>/dev/null 476439fab64Smrgmkdir .tst 2>/dev/null 477439fab64Smrgif test -d .tst; then 478439fab64Smrg am__leading_dot=. 479439fab64Smrgelse 480439fab64Smrg am__leading_dot=_ 481439fab64Smrgfi 482439fab64Smrgrmdir .tst 2>/dev/null 483439fab64SmrgAC_SUBST([am__leading_dot])]) 484439fab64Smrg 485439fab64Smrg# serial 5 -*- Autoconf -*- 486439fab64Smrg 487439fab64Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 488439fab64Smrg 489439fab64Smrg# This program is free software; you can redistribute it and/or modify 490439fab64Smrg# it under the terms of the GNU General Public License as published by 491439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 492439fab64Smrg# any later version. 493439fab64Smrg 494439fab64Smrg# This program is distributed in the hope that it will be useful, 495439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 496439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 497439fab64Smrg# GNU General Public License for more details. 498439fab64Smrg 499439fab64Smrg# You should have received a copy of the GNU General Public License 500439fab64Smrg# along with this program; if not, write to the Free Software 501439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 502439fab64Smrg# 02111-1307, USA. 503439fab64Smrg 504439fab64Smrg 505439fab64Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 506439fab64Smrg# written in clear, in which case automake, when reading aclocal.m4, 507439fab64Smrg# will think it sees a *use*, and therefore will trigger all it's 508439fab64Smrg# C support machinery. Also note that it means that autoscan, seeing 509439fab64Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 510439fab64Smrg 511439fab64Smrg 512439fab64Smrg 513439fab64Smrg# _AM_DEPENDENCIES(NAME) 514439fab64Smrg# ---------------------- 515439fab64Smrg# See how the compiler implements dependency checking. 516439fab64Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 517439fab64Smrg# We try a few techniques and use that to set a single cache variable. 518439fab64Smrg# 519439fab64Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 520439fab64Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 521439fab64Smrg# dependency, and given that the user is not expected to run this macro, 522439fab64Smrg# just rely on AC_PROG_CC. 523439fab64SmrgAC_DEFUN([_AM_DEPENDENCIES], 524439fab64Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 525439fab64SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 526439fab64SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 527439fab64SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 528439fab64Smrg 529439fab64Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 530439fab64Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 531439fab64Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 532439fab64Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 533439fab64Smrg [depcc="$$1" am_compiler_list=]) 534439fab64Smrg 535439fab64SmrgAC_CACHE_CHECK([dependency style of $depcc], 536439fab64Smrg [am_cv_$1_dependencies_compiler_type], 537439fab64Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 538439fab64Smrg # We make a subdir and do the tests there. Otherwise we can end up 539439fab64Smrg # making bogus files that we don't know about and never remove. For 540439fab64Smrg # instance it was reported that on HP-UX the gcc test will end up 541439fab64Smrg # making a dummy file named `D' -- because `-MD' means `put the output 542439fab64Smrg # in D'. 543439fab64Smrg mkdir conftest.dir 544439fab64Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 545439fab64Smrg # using a relative directory. 546439fab64Smrg cp "$am_depcomp" conftest.dir 547439fab64Smrg cd conftest.dir 548439fab64Smrg # We will build objects and dependencies in a subdirectory because 549439fab64Smrg # it helps to detect inapplicable dependency modes. For instance 550439fab64Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 551439fab64Smrg # side effect of compilation, but ICC will put the dependencies in 552439fab64Smrg # the current directory while Tru64 will put them in the object 553439fab64Smrg # directory. 554439fab64Smrg mkdir sub 555439fab64Smrg 556439fab64Smrg am_cv_$1_dependencies_compiler_type=none 557439fab64Smrg if test "$am_compiler_list" = ""; then 558439fab64Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 559439fab64Smrg fi 560439fab64Smrg for depmode in $am_compiler_list; do 561439fab64Smrg # Setup a source with many dependencies, because some compilers 562439fab64Smrg # like to wrap large dependency lists on column 80 (with \), and 563439fab64Smrg # we should not choose a depcomp mode which is confused by this. 564439fab64Smrg # 565439fab64Smrg # We need to recreate these files for each test, as the compiler may 566439fab64Smrg # overwrite some of them when testing with obscure command lines. 567439fab64Smrg # This happens at least with the AIX C compiler. 568439fab64Smrg : > sub/conftest.c 569439fab64Smrg for i in 1 2 3 4 5 6; do 570439fab64Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 571439fab64Smrg : > sub/conftst$i.h 572439fab64Smrg done 573439fab64Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 574439fab64Smrg 575439fab64Smrg case $depmode in 576439fab64Smrg nosideeffect) 577439fab64Smrg # after this tag, mechanisms are not by side-effect, so they'll 578439fab64Smrg # only be used when explicitly requested 579439fab64Smrg if test "x$enable_dependency_tracking" = xyes; then 580439fab64Smrg continue 581439fab64Smrg else 582439fab64Smrg break 583439fab64Smrg fi 584439fab64Smrg ;; 585439fab64Smrg none) break ;; 586439fab64Smrg esac 587439fab64Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 588439fab64Smrg # mode. It turns out that the SunPro C++ compiler does not properly 589439fab64Smrg # handle `-M -o', and we need to detect this. 590439fab64Smrg if depmode=$depmode \ 591439fab64Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 592439fab64Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 593439fab64Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 594439fab64Smrg >/dev/null 2>conftest.err && 595439fab64Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 596439fab64Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 597439fab64Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 598439fab64Smrg # icc doesn't choke on unknown options, it will just issue warnings 599439fab64Smrg # (even with -Werror). So we grep stderr for any message 600439fab64Smrg # that says an option was ignored. 601439fab64Smrg if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 602439fab64Smrg am_cv_$1_dependencies_compiler_type=$depmode 603439fab64Smrg break 604439fab64Smrg fi 605439fab64Smrg fi 606439fab64Smrg done 607439fab64Smrg 608439fab64Smrg cd .. 609439fab64Smrg rm -rf conftest.dir 610439fab64Smrgelse 611439fab64Smrg am_cv_$1_dependencies_compiler_type=none 612439fab64Smrgfi 613439fab64Smrg]) 614439fab64SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 615439fab64SmrgAM_CONDITIONAL([am__fastdep$1], [ 616439fab64Smrg test "x$enable_dependency_tracking" != xno \ 617439fab64Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 618439fab64Smrg]) 619439fab64Smrg 620439fab64Smrg 621439fab64Smrg# AM_SET_DEPDIR 622439fab64Smrg# ------------- 623439fab64Smrg# Choose a directory name for dependency files. 624439fab64Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 625439fab64SmrgAC_DEFUN([AM_SET_DEPDIR], 626439fab64Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 627439fab64SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 628439fab64Smrg]) 629439fab64Smrg 630439fab64Smrg 631439fab64Smrg# AM_DEP_TRACK 632439fab64Smrg# ------------ 633439fab64SmrgAC_DEFUN([AM_DEP_TRACK], 634439fab64Smrg[AC_ARG_ENABLE(dependency-tracking, 635439fab64Smrg[ --disable-dependency-tracking Speeds up one-time builds 636439fab64Smrg --enable-dependency-tracking Do not reject slow dependency extractors]) 637439fab64Smrgif test "x$enable_dependency_tracking" != xno; then 638439fab64Smrg am_depcomp="$ac_aux_dir/depcomp" 639439fab64Smrg AMDEPBACKSLASH='\' 640439fab64Smrgfi 641439fab64SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 642439fab64SmrgAC_SUBST([AMDEPBACKSLASH]) 643439fab64Smrg]) 644439fab64Smrg 645439fab64Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 646439fab64Smrg 647439fab64Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 648439fab64Smrg 649439fab64Smrg# This program is free software; you can redistribute it and/or modify 650439fab64Smrg# it under the terms of the GNU General Public License as published by 651439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 652439fab64Smrg# any later version. 653439fab64Smrg 654439fab64Smrg# This program is distributed in the hope that it will be useful, 655439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 656439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 657439fab64Smrg# GNU General Public License for more details. 658439fab64Smrg 659439fab64Smrg# You should have received a copy of the GNU General Public License 660439fab64Smrg# along with this program; if not, write to the Free Software 661439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 662439fab64Smrg# 02111-1307, USA. 663439fab64Smrg 664439fab64Smrg#serial 2 665439fab64Smrg 666439fab64Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 667439fab64Smrg# ------------------------------ 668439fab64SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 669439fab64Smrg[for mf in $CONFIG_FILES; do 670439fab64Smrg # Strip MF so we end up with the name of the file. 671439fab64Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 672439fab64Smrg # Check whether this is an Automake generated Makefile or not. 673439fab64Smrg # We used to match only the files named `Makefile.in', but 674439fab64Smrg # some people rename them; so instead we look at the file content. 675439fab64Smrg # Grep'ing the first line is not enough: some people post-process 676439fab64Smrg # each Makefile.in and add a new line on top of each file to say so. 677439fab64Smrg # So let's grep whole file. 678439fab64Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 679439fab64Smrg dirpart=`AS_DIRNAME("$mf")` 680439fab64Smrg else 681439fab64Smrg continue 682439fab64Smrg fi 683439fab64Smrg grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 684439fab64Smrg # Extract the definition of DEP_FILES from the Makefile without 685439fab64Smrg # running `make'. 686439fab64Smrg DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 687439fab64Smrg test -z "$DEPDIR" && continue 688439fab64Smrg # When using ansi2knr, U may be empty or an underscore; expand it 689439fab64Smrg U=`sed -n -e '/^U = / s///p' < "$mf"` 690439fab64Smrg test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 691439fab64Smrg # We invoke sed twice because it is the simplest approach to 692439fab64Smrg # changing $(DEPDIR) to its actual value in the expansion. 693439fab64Smrg for file in `sed -n -e ' 694439fab64Smrg /^DEP_FILES = .*\\\\$/ { 695439fab64Smrg s/^DEP_FILES = // 696439fab64Smrg :loop 697439fab64Smrg s/\\\\$// 698439fab64Smrg p 699439fab64Smrg n 700439fab64Smrg /\\\\$/ b loop 701439fab64Smrg p 702439fab64Smrg } 703439fab64Smrg /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 704439fab64Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 705439fab64Smrg # Make sure the directory exists. 706439fab64Smrg test -f "$dirpart/$file" && continue 707439fab64Smrg fdir=`AS_DIRNAME(["$file"])` 708439fab64Smrg AS_MKDIR_P([$dirpart/$fdir]) 709439fab64Smrg # echo "creating $dirpart/$file" 710439fab64Smrg echo '# dummy' > "$dirpart/$file" 711439fab64Smrg done 712439fab64Smrgdone 713439fab64Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 714439fab64Smrg 715439fab64Smrg 716439fab64Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 717439fab64Smrg# ----------------------------- 718439fab64Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 719439fab64Smrg# 720439fab64Smrg# This code is only required when automatic dependency tracking 721439fab64Smrg# is enabled. FIXME. This creates each `.P' file that we will 722439fab64Smrg# need in order to bootstrap the dependency handling code. 723439fab64SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 724439fab64Smrg[AC_CONFIG_COMMANDS([depfiles], 725439fab64Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 726439fab64Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 727439fab64Smrg]) 728439fab64Smrg 729439fab64Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 730439fab64Smrg 731439fab64Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 732439fab64Smrg 733439fab64Smrg# This program is free software; you can redistribute it and/or modify 734439fab64Smrg# it under the terms of the GNU General Public License as published by 735439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 736439fab64Smrg# any later version. 737439fab64Smrg 738439fab64Smrg# This program is distributed in the hope that it will be useful, 739439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 740439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 741439fab64Smrg# GNU General Public License for more details. 742439fab64Smrg 743439fab64Smrg# You should have received a copy of the GNU General Public License 744439fab64Smrg# along with this program; if not, write to the Free Software 745439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 746439fab64Smrg# 02111-1307, USA. 747439fab64Smrg 748439fab64Smrg# serial 2 749439fab64Smrg 750439fab64Smrg# AM_MAKE_INCLUDE() 751439fab64Smrg# ----------------- 752439fab64Smrg# Check to see how make treats includes. 753439fab64SmrgAC_DEFUN([AM_MAKE_INCLUDE], 754439fab64Smrg[am_make=${MAKE-make} 755439fab64Smrgcat > confinc << 'END' 756439fab64Smrgam__doit: 757439fab64Smrg @echo done 758439fab64Smrg.PHONY: am__doit 759439fab64SmrgEND 760439fab64Smrg# If we don't find an include directive, just comment out the code. 761439fab64SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 762439fab64Smrgam__include="#" 763439fab64Smrgam__quote= 764439fab64Smrg_am_result=none 765439fab64Smrg# First try GNU make style include. 766439fab64Smrgecho "include confinc" > confmf 767439fab64Smrg# We grep out `Entering directory' and `Leaving directory' 768439fab64Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 769439fab64Smrg# In particular we don't look at `^make:' because GNU make might 770439fab64Smrg# be invoked under some other name (usually "gmake"), in which 771439fab64Smrg# case it prints its new name instead of `make'. 772439fab64Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 773439fab64Smrg am__include=include 774439fab64Smrg am__quote= 775439fab64Smrg _am_result=GNU 776439fab64Smrgfi 777439fab64Smrg# Now try BSD make style include. 778439fab64Smrgif test "$am__include" = "#"; then 779439fab64Smrg echo '.include "confinc"' > confmf 780439fab64Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 781439fab64Smrg am__include=.include 782439fab64Smrg am__quote="\"" 783439fab64Smrg _am_result=BSD 784439fab64Smrg fi 785439fab64Smrgfi 786439fab64SmrgAC_SUBST([am__include]) 787439fab64SmrgAC_SUBST([am__quote]) 788439fab64SmrgAC_MSG_RESULT([$_am_result]) 789439fab64Smrgrm -f confinc confmf 790439fab64Smrg]) 791439fab64Smrg 792439fab64Smrg# AM_CONDITIONAL -*- Autoconf -*- 793439fab64Smrg 794439fab64Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 795439fab64Smrg 796439fab64Smrg# This program is free software; you can redistribute it and/or modify 797439fab64Smrg# it under the terms of the GNU General Public License as published by 798439fab64Smrg# the Free Software Foundation; either version 2, or (at your option) 799439fab64Smrg# any later version. 800439fab64Smrg 801439fab64Smrg# This program is distributed in the hope that it will be useful, 802439fab64Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 803439fab64Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 804439fab64Smrg# GNU General Public License for more details. 805439fab64Smrg 806439fab64Smrg# You should have received a copy of the GNU General Public License 807439fab64Smrg# along with this program; if not, write to the Free Software 808439fab64Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 809439fab64Smrg# 02111-1307, USA. 810439fab64Smrg 811439fab64Smrg# serial 5 812439fab64Smrg 813439fab64SmrgAC_PREREQ(2.52) 814439fab64Smrg 815439fab64Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 816439fab64Smrg# ------------------------------------- 817439fab64Smrg# Define a conditional. 818439fab64SmrgAC_DEFUN([AM_CONDITIONAL], 819439fab64Smrg[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 820439fab64Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 821439fab64SmrgAC_SUBST([$1_TRUE]) 822439fab64SmrgAC_SUBST([$1_FALSE]) 823439fab64Smrgif $2; then 824439fab64Smrg $1_TRUE= 825439fab64Smrg $1_FALSE='#' 826439fab64Smrgelse 827439fab64Smrg $1_TRUE='#' 828439fab64Smrg $1_FALSE= 829439fab64Smrgfi 830439fab64SmrgAC_CONFIG_COMMANDS_PRE( 831439fab64Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 832439fab64Smrg AC_MSG_ERROR([conditional "$1" was never defined. 833439fab64SmrgUsually this means the macro was only invoked conditionally.]) 834439fab64Smrgfi])]) 835439fab64Smrg 836439fab64Smrgdnl Copyright 2005 Red Hat, Inc 837439fab64Smrgdnl 838439fab64Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 839439fab64Smrgdnl documentation for any purpose is hereby granted without fee, provided that 840439fab64Smrgdnl the above copyright notice appear in all copies and that both that 841439fab64Smrgdnl copyright notice and this permission notice appear in supporting 842439fab64Smrgdnl documentation. 843439fab64Smrgdnl 844439fab64Smrgdnl The above copyright notice and this permission notice shall be included 845439fab64Smrgdnl in all copies or substantial portions of the Software. 846439fab64Smrgdnl 847439fab64Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 848439fab64Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 849439fab64Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 850439fab64Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 851439fab64Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 852439fab64Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 853439fab64Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 854439fab64Smrgdnl 855439fab64Smrgdnl Except as contained in this notice, the name of the copyright holders shall 856439fab64Smrgdnl not be used in advertising or otherwise to promote the sale, use or 857439fab64Smrgdnl other dealings in this Software without prior written authorization 858439fab64Smrgdnl from the copyright holders. 859439fab64Smrgdnl 860439fab64Smrg 861439fab64Smrg# XORG_RELEASE_VERSION 862439fab64Smrg# -------------------- 863439fab64Smrg# Adds --with/without-release-string and changes the PACKAGE and 864439fab64Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 865439fab64Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 866439fab64Smrg 867439fab64SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 868439fab64Smrg AC_ARG_WITH(release-version, 869439fab64Smrg AC_HELP_STRING([--with-release-version=STRING], 870439fab64Smrg [Use release version string in package name]), 871439fab64Smrg [RELEASE_VERSION="$withval"], 872439fab64Smrg [RELEASE_VERSION=""]) 873439fab64Smrg if test "x$RELEASE_VERSION" != "x"; then 874439fab64Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 875439fab64Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 876439fab64Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 877439fab64Smrg fi 878439fab64Smrg]) 879439fab64Smrg 880