aclocal.m4 revision c9e2be55
1c9e2be55Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*- 2c9e2be55Smrg 3c9e2be55Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 4c9e2be55Smrg# Free Software Foundation, Inc. 5c9e2be55Smrg# This file is free software; the Free Software Foundation 6c9e2be55Smrg# gives unlimited permission to copy and/or distribute it, 7c9e2be55Smrg# with or without modifications, as long as this notice is preserved. 8c9e2be55Smrg 9c9e2be55Smrg# This program is distributed in the hope that it will be useful, 10c9e2be55Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c9e2be55Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c9e2be55Smrg# PARTICULAR PURPOSE. 13c9e2be55Smrg 14c9e2be55Smrg# Do all the work for Automake. -*- Autoconf -*- 15c9e2be55Smrg 16c9e2be55Smrg# This macro actually does too much some checks are only needed if 17c9e2be55Smrg# your package does certain things. But this isn't really a big deal. 18c9e2be55Smrg 19c9e2be55Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 20c9e2be55Smrg# Free Software Foundation, Inc. 21c9e2be55Smrg 22c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 23c9e2be55Smrg# it under the terms of the GNU General Public License as published by 24c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 25c9e2be55Smrg# any later version. 26c9e2be55Smrg 27c9e2be55Smrg# This program is distributed in the hope that it will be useful, 28c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 29c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30c9e2be55Smrg# GNU General Public License for more details. 31c9e2be55Smrg 32c9e2be55Smrg# You should have received a copy of the GNU General Public License 33c9e2be55Smrg# along with this program; if not, write to the Free Software 34c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 35c9e2be55Smrg# 02111-1307, USA. 36c9e2be55Smrg 37c9e2be55Smrg# serial 10 38c9e2be55Smrg 39c9e2be55SmrgAC_PREREQ([2.54]) 40c9e2be55Smrg 41c9e2be55Smrg# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow 42c9e2be55Smrg# the ones we care about. 43c9e2be55Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 44c9e2be55Smrg 45c9e2be55Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 46c9e2be55Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 47c9e2be55Smrg# ----------------------------------------------- 48c9e2be55Smrg# The call with PACKAGE and VERSION arguments is the old style 49c9e2be55Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 50c9e2be55Smrg# and VERSION should now be passed to AC_INIT and removed from 51c9e2be55Smrg# the call to AM_INIT_AUTOMAKE. 52c9e2be55Smrg# We support both call styles for the transition. After 53c9e2be55Smrg# the next Automake release, Autoconf can make the AC_INIT 54c9e2be55Smrg# arguments mandatory, and then we can depend on a new Autoconf 55c9e2be55Smrg# release and drop the old call support. 56c9e2be55SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 57c9e2be55Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 58c9e2be55Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl 59c9e2be55Smrg# test to see if srcdir already configured 60c9e2be55Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 61c9e2be55Smrg test -f $srcdir/config.status; then 62c9e2be55Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 63c9e2be55Smrgfi 64c9e2be55Smrg 65c9e2be55Smrg# test whether we have cygpath 66c9e2be55Smrgif test -z "$CYGPATH_W"; then 67c9e2be55Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 68c9e2be55Smrg CYGPATH_W='cygpath -w' 69c9e2be55Smrg else 70c9e2be55Smrg CYGPATH_W=echo 71c9e2be55Smrg fi 72c9e2be55Smrgfi 73c9e2be55SmrgAC_SUBST([CYGPATH_W]) 74c9e2be55Smrg 75c9e2be55Smrg# Define the identity of the package. 76c9e2be55Smrgdnl Distinguish between old-style and new-style calls. 77c9e2be55Smrgm4_ifval([$2], 78c9e2be55Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 79c9e2be55Smrg AC_SUBST([PACKAGE], [$1])dnl 80c9e2be55Smrg AC_SUBST([VERSION], [$2])], 81c9e2be55Smrg[_AM_SET_OPTIONS([$1])dnl 82c9e2be55Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 83c9e2be55Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 84c9e2be55Smrg 85c9e2be55Smrg_AM_IF_OPTION([no-define],, 86c9e2be55Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 87c9e2be55Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 88c9e2be55Smrg 89c9e2be55Smrg# Some tools Automake needs. 90c9e2be55SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 91c9e2be55SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 92c9e2be55SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 93c9e2be55SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 94c9e2be55SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 95c9e2be55SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 96c9e2be55SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 97c9e2be55SmrgAM_MISSING_PROG(AMTAR, tar) 98c9e2be55SmrgAM_PROG_INSTALL_SH 99c9e2be55SmrgAM_PROG_INSTALL_STRIP 100c9e2be55Smrg# We need awk for the "check" target. The system "awk" is bad on 101c9e2be55Smrg# some platforms. 102c9e2be55SmrgAC_REQUIRE([AC_PROG_AWK])dnl 103c9e2be55SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 104c9e2be55SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 105c9e2be55Smrg 106c9e2be55Smrg_AM_IF_OPTION([no-dependencies],, 107c9e2be55Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 108c9e2be55Smrg [_AM_DEPENDENCIES(CC)], 109c9e2be55Smrg [define([AC_PROG_CC], 110c9e2be55Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 111c9e2be55SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 112c9e2be55Smrg [_AM_DEPENDENCIES(CXX)], 113c9e2be55Smrg [define([AC_PROG_CXX], 114c9e2be55Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 115c9e2be55Smrg]) 116c9e2be55Smrg]) 117c9e2be55Smrg 118c9e2be55Smrg 119c9e2be55Smrg# When config.status generates a header, we must update the stamp-h file. 120c9e2be55Smrg# This file resides in the same directory as the config header 121c9e2be55Smrg# that is generated. The stamp files are numbered to have different names. 122c9e2be55Smrg 123c9e2be55Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 124c9e2be55Smrg# loop where config.status creates the headers, so we can generate 125c9e2be55Smrg# our stamp files there. 126c9e2be55SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 127c9e2be55Smrg[# Compute $1's index in $config_headers. 128c9e2be55Smrg_am_stamp_count=1 129c9e2be55Smrgfor _am_header in $config_headers :; do 130c9e2be55Smrg case $_am_header in 131c9e2be55Smrg $1 | $1:* ) 132c9e2be55Smrg break ;; 133c9e2be55Smrg * ) 134c9e2be55Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 135c9e2be55Smrg esac 136c9e2be55Smrgdone 137c9e2be55Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 138c9e2be55Smrg 139c9e2be55Smrg# Copyright 2002 Free Software Foundation, Inc. 140c9e2be55Smrg 141c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 142c9e2be55Smrg# it under the terms of the GNU General Public License as published by 143c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 144c9e2be55Smrg# any later version. 145c9e2be55Smrg 146c9e2be55Smrg# This program is distributed in the hope that it will be useful, 147c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 148c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 149c9e2be55Smrg# GNU General Public License for more details. 150c9e2be55Smrg 151c9e2be55Smrg# You should have received a copy of the GNU General Public License 152c9e2be55Smrg# along with this program; if not, write to the Free Software 153c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 154c9e2be55Smrg 155c9e2be55Smrg# AM_AUTOMAKE_VERSION(VERSION) 156c9e2be55Smrg# ---------------------------- 157c9e2be55Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 158c9e2be55Smrg# generated from the m4 files accompanying Automake X.Y. 159c9e2be55SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) 160c9e2be55Smrg 161c9e2be55Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 162c9e2be55Smrg# ------------------------------- 163c9e2be55Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 164c9e2be55Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 165c9e2be55SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 166c9e2be55Smrg [AM_AUTOMAKE_VERSION([1.7.9])]) 167c9e2be55Smrg 168c9e2be55Smrg# Helper functions for option handling. -*- Autoconf -*- 169c9e2be55Smrg 170c9e2be55Smrg# Copyright 2001, 2002 Free Software Foundation, Inc. 171c9e2be55Smrg 172c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 173c9e2be55Smrg# it under the terms of the GNU General Public License as published by 174c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 175c9e2be55Smrg# any later version. 176c9e2be55Smrg 177c9e2be55Smrg# This program is distributed in the hope that it will be useful, 178c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 179c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 180c9e2be55Smrg# GNU General Public License for more details. 181c9e2be55Smrg 182c9e2be55Smrg# You should have received a copy of the GNU General Public License 183c9e2be55Smrg# along with this program; if not, write to the Free Software 184c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 185c9e2be55Smrg# 02111-1307, USA. 186c9e2be55Smrg 187c9e2be55Smrg# serial 2 188c9e2be55Smrg 189c9e2be55Smrg# _AM_MANGLE_OPTION(NAME) 190c9e2be55Smrg# ----------------------- 191c9e2be55SmrgAC_DEFUN([_AM_MANGLE_OPTION], 192c9e2be55Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 193c9e2be55Smrg 194c9e2be55Smrg# _AM_SET_OPTION(NAME) 195c9e2be55Smrg# ------------------------------ 196c9e2be55Smrg# Set option NAME. Presently that only means defining a flag for this option. 197c9e2be55SmrgAC_DEFUN([_AM_SET_OPTION], 198c9e2be55Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 199c9e2be55Smrg 200c9e2be55Smrg# _AM_SET_OPTIONS(OPTIONS) 201c9e2be55Smrg# ---------------------------------- 202c9e2be55Smrg# OPTIONS is a space-separated list of Automake options. 203c9e2be55SmrgAC_DEFUN([_AM_SET_OPTIONS], 204c9e2be55Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 205c9e2be55Smrg 206c9e2be55Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 207c9e2be55Smrg# ------------------------------------------- 208c9e2be55Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 209c9e2be55SmrgAC_DEFUN([_AM_IF_OPTION], 210c9e2be55Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 211c9e2be55Smrg 212c9e2be55Smrg# 213c9e2be55Smrg# Check to make sure that the build environment is sane. 214c9e2be55Smrg# 215c9e2be55Smrg 216c9e2be55Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 217c9e2be55Smrg 218c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 219c9e2be55Smrg# it under the terms of the GNU General Public License as published by 220c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 221c9e2be55Smrg# any later version. 222c9e2be55Smrg 223c9e2be55Smrg# This program is distributed in the hope that it will be useful, 224c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 225c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 226c9e2be55Smrg# GNU General Public License for more details. 227c9e2be55Smrg 228c9e2be55Smrg# You should have received a copy of the GNU General Public License 229c9e2be55Smrg# along with this program; if not, write to the Free Software 230c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 231c9e2be55Smrg# 02111-1307, USA. 232c9e2be55Smrg 233c9e2be55Smrg# serial 3 234c9e2be55Smrg 235c9e2be55Smrg# AM_SANITY_CHECK 236c9e2be55Smrg# --------------- 237c9e2be55SmrgAC_DEFUN([AM_SANITY_CHECK], 238c9e2be55Smrg[AC_MSG_CHECKING([whether build environment is sane]) 239c9e2be55Smrg# Just in case 240c9e2be55Smrgsleep 1 241c9e2be55Smrgecho timestamp > conftest.file 242c9e2be55Smrg# Do `set' in a subshell so we don't clobber the current shell's 243c9e2be55Smrg# arguments. Must try -L first in case configure is actually a 244c9e2be55Smrg# symlink; some systems play weird games with the mod time of symlinks 245c9e2be55Smrg# (eg FreeBSD returns the mod time of the symlink's containing 246c9e2be55Smrg# directory). 247c9e2be55Smrgif ( 248c9e2be55Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 249c9e2be55Smrg if test "$[*]" = "X"; then 250c9e2be55Smrg # -L didn't work. 251c9e2be55Smrg set X `ls -t $srcdir/configure conftest.file` 252c9e2be55Smrg fi 253c9e2be55Smrg rm -f conftest.file 254c9e2be55Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 255c9e2be55Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 256c9e2be55Smrg 257c9e2be55Smrg # If neither matched, then we have a broken ls. This can happen 258c9e2be55Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 259c9e2be55Smrg # broken ls alias from the environment. This has actually 260c9e2be55Smrg # happened. Such a system could not be considered "sane". 261c9e2be55Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 262c9e2be55Smrgalias in your environment]) 263c9e2be55Smrg fi 264c9e2be55Smrg 265c9e2be55Smrg test "$[2]" = conftest.file 266c9e2be55Smrg ) 267c9e2be55Smrgthen 268c9e2be55Smrg # Ok. 269c9e2be55Smrg : 270c9e2be55Smrgelse 271c9e2be55Smrg AC_MSG_ERROR([newly created file is older than distributed files! 272c9e2be55SmrgCheck your system clock]) 273c9e2be55Smrgfi 274c9e2be55SmrgAC_MSG_RESULT(yes)]) 275c9e2be55Smrg 276c9e2be55Smrg# -*- Autoconf -*- 277c9e2be55Smrg 278c9e2be55Smrg 279c9e2be55Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. 280c9e2be55Smrg 281c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 282c9e2be55Smrg# it under the terms of the GNU General Public License as published by 283c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 284c9e2be55Smrg# any later version. 285c9e2be55Smrg 286c9e2be55Smrg# This program is distributed in the hope that it will be useful, 287c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 288c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 289c9e2be55Smrg# GNU General Public License for more details. 290c9e2be55Smrg 291c9e2be55Smrg# You should have received a copy of the GNU General Public License 292c9e2be55Smrg# along with this program; if not, write to the Free Software 293c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 294c9e2be55Smrg# 02111-1307, USA. 295c9e2be55Smrg 296c9e2be55Smrg# serial 3 297c9e2be55Smrg 298c9e2be55Smrg# AM_MISSING_PROG(NAME, PROGRAM) 299c9e2be55Smrg# ------------------------------ 300c9e2be55SmrgAC_DEFUN([AM_MISSING_PROG], 301c9e2be55Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 302c9e2be55Smrg$1=${$1-"${am_missing_run}$2"} 303c9e2be55SmrgAC_SUBST($1)]) 304c9e2be55Smrg 305c9e2be55Smrg 306c9e2be55Smrg# AM_MISSING_HAS_RUN 307c9e2be55Smrg# ------------------ 308c9e2be55Smrg# Define MISSING if not defined so far and test if it supports --run. 309c9e2be55Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 310c9e2be55SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 311c9e2be55Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 312c9e2be55Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 313c9e2be55Smrg# Use eval to expand $SHELL 314c9e2be55Smrgif eval "$MISSING --run true"; then 315c9e2be55Smrg am_missing_run="$MISSING --run " 316c9e2be55Smrgelse 317c9e2be55Smrg am_missing_run= 318c9e2be55Smrg AC_MSG_WARN([`missing' script is too old or missing]) 319c9e2be55Smrgfi 320c9e2be55Smrg]) 321c9e2be55Smrg 322c9e2be55Smrg# AM_AUX_DIR_EXPAND 323c9e2be55Smrg 324c9e2be55Smrg# Copyright 2001 Free Software Foundation, Inc. 325c9e2be55Smrg 326c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 327c9e2be55Smrg# it under the terms of the GNU General Public License as published by 328c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 329c9e2be55Smrg# any later version. 330c9e2be55Smrg 331c9e2be55Smrg# This program is distributed in the hope that it will be useful, 332c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 333c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 334c9e2be55Smrg# GNU General Public License for more details. 335c9e2be55Smrg 336c9e2be55Smrg# You should have received a copy of the GNU General Public License 337c9e2be55Smrg# along with this program; if not, write to the Free Software 338c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 339c9e2be55Smrg# 02111-1307, USA. 340c9e2be55Smrg 341c9e2be55Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 342c9e2be55Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 343c9e2be55Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 344c9e2be55Smrg# 345c9e2be55Smrg# Of course, Automake must honor this variable whenever it calls a 346c9e2be55Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 347c9e2be55Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 348c9e2be55Smrg# depending on how configure is run. This is pretty annoying, since 349c9e2be55Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 350c9e2be55Smrg# source directory, any form will work fine, but in subdirectories a 351c9e2be55Smrg# relative path needs to be adjusted first. 352c9e2be55Smrg# 353c9e2be55Smrg# $ac_aux_dir/missing 354c9e2be55Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 355c9e2be55Smrg# $top_srcdir/$ac_aux_dir/missing 356c9e2be55Smrg# fails if $ac_aux_dir is absolute, 357c9e2be55Smrg# fails when called from a subdirectory in a VPATH build with 358c9e2be55Smrg# a relative $ac_aux_dir 359c9e2be55Smrg# 360c9e2be55Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 361c9e2be55Smrg# are both prefixed by $srcdir. In an in-source build this is usually 362c9e2be55Smrg# harmless because $srcdir is `.', but things will broke when you 363c9e2be55Smrg# start a VPATH build or use an absolute $srcdir. 364c9e2be55Smrg# 365c9e2be55Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 366c9e2be55Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 367c9e2be55Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 368c9e2be55Smrg# and then we would define $MISSING as 369c9e2be55Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 370c9e2be55Smrg# This will work as long as MISSING is not called from configure, because 371c9e2be55Smrg# unfortunately $(top_srcdir) has no meaning in configure. 372c9e2be55Smrg# However there are other variables, like CC, which are often used in 373c9e2be55Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 374c9e2be55Smrg# 375c9e2be55Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 376c9e2be55Smrg# absolute PATH. The drawback is that using absolute paths prevent a 377c9e2be55Smrg# configured tree to be moved without reconfiguration. 378c9e2be55Smrg 379c9e2be55Smrg# Rely on autoconf to set up CDPATH properly. 380c9e2be55SmrgAC_PREREQ([2.50]) 381c9e2be55Smrg 382c9e2be55SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [ 383c9e2be55Smrg# expand $ac_aux_dir to an absolute path 384c9e2be55Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 385c9e2be55Smrg]) 386c9e2be55Smrg 387c9e2be55Smrg# AM_PROG_INSTALL_SH 388c9e2be55Smrg# ------------------ 389c9e2be55Smrg# Define $install_sh. 390c9e2be55Smrg 391c9e2be55Smrg# Copyright 2001 Free Software Foundation, Inc. 392c9e2be55Smrg 393c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 394c9e2be55Smrg# it under the terms of the GNU General Public License as published by 395c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 396c9e2be55Smrg# any later version. 397c9e2be55Smrg 398c9e2be55Smrg# This program is distributed in the hope that it will be useful, 399c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 400c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 401c9e2be55Smrg# GNU General Public License for more details. 402c9e2be55Smrg 403c9e2be55Smrg# You should have received a copy of the GNU General Public License 404c9e2be55Smrg# along with this program; if not, write to the Free Software 405c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 406c9e2be55Smrg# 02111-1307, USA. 407c9e2be55Smrg 408c9e2be55SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 409c9e2be55Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 410c9e2be55Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 411c9e2be55SmrgAC_SUBST(install_sh)]) 412c9e2be55Smrg 413c9e2be55Smrg# AM_PROG_INSTALL_STRIP 414c9e2be55Smrg 415c9e2be55Smrg# Copyright 2001 Free Software Foundation, Inc. 416c9e2be55Smrg 417c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 418c9e2be55Smrg# it under the terms of the GNU General Public License as published by 419c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 420c9e2be55Smrg# any later version. 421c9e2be55Smrg 422c9e2be55Smrg# This program is distributed in the hope that it will be useful, 423c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 424c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 425c9e2be55Smrg# GNU General Public License for more details. 426c9e2be55Smrg 427c9e2be55Smrg# You should have received a copy of the GNU General Public License 428c9e2be55Smrg# along with this program; if not, write to the Free Software 429c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 430c9e2be55Smrg# 02111-1307, USA. 431c9e2be55Smrg 432c9e2be55Smrg# One issue with vendor `install' (even GNU) is that you can't 433c9e2be55Smrg# specify the program used to strip binaries. This is especially 434c9e2be55Smrg# annoying in cross-compiling environments, where the build's strip 435c9e2be55Smrg# is unlikely to handle the host's binaries. 436c9e2be55Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 437c9e2be55Smrg# always use install-sh in `make install-strip', and initialize 438c9e2be55Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 439c9e2be55SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 440c9e2be55Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 441c9e2be55Smrg# Installed binaries are usually stripped using `strip' when the user 442c9e2be55Smrg# run `make install-strip'. However `strip' might not be the right 443c9e2be55Smrg# tool to use in cross-compilation environments, therefore Automake 444c9e2be55Smrg# will honor the `STRIP' environment variable to overrule this program. 445c9e2be55Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 446c9e2be55Smrgif test "$cross_compiling" != no; then 447c9e2be55Smrg AC_CHECK_TOOL([STRIP], [strip], :) 448c9e2be55Smrgfi 449c9e2be55SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 450c9e2be55SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 451c9e2be55Smrg 452c9e2be55Smrg# -*- Autoconf -*- 453c9e2be55Smrg# Copyright (C) 2003 Free Software Foundation, Inc. 454c9e2be55Smrg 455c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 456c9e2be55Smrg# it under the terms of the GNU General Public License as published by 457c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 458c9e2be55Smrg# any later version. 459c9e2be55Smrg 460c9e2be55Smrg# This program is distributed in the hope that it will be useful, 461c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 462c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 463c9e2be55Smrg# GNU General Public License for more details. 464c9e2be55Smrg 465c9e2be55Smrg# You should have received a copy of the GNU General Public License 466c9e2be55Smrg# along with this program; if not, write to the Free Software 467c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 468c9e2be55Smrg# 02111-1307, USA. 469c9e2be55Smrg 470c9e2be55Smrg# serial 1 471c9e2be55Smrg 472c9e2be55Smrg# Check whether the underlying file-system supports filenames 473c9e2be55Smrg# with a leading dot. For instance MS-DOS doesn't. 474c9e2be55SmrgAC_DEFUN([AM_SET_LEADING_DOT], 475c9e2be55Smrg[rm -rf .tst 2>/dev/null 476c9e2be55Smrgmkdir .tst 2>/dev/null 477c9e2be55Smrgif test -d .tst; then 478c9e2be55Smrg am__leading_dot=. 479c9e2be55Smrgelse 480c9e2be55Smrg am__leading_dot=_ 481c9e2be55Smrgfi 482c9e2be55Smrgrmdir .tst 2>/dev/null 483c9e2be55SmrgAC_SUBST([am__leading_dot])]) 484c9e2be55Smrg 485c9e2be55Smrg# serial 5 -*- Autoconf -*- 486c9e2be55Smrg 487c9e2be55Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 488c9e2be55Smrg 489c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 490c9e2be55Smrg# it under the terms of the GNU General Public License as published by 491c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 492c9e2be55Smrg# any later version. 493c9e2be55Smrg 494c9e2be55Smrg# This program is distributed in the hope that it will be useful, 495c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 496c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 497c9e2be55Smrg# GNU General Public License for more details. 498c9e2be55Smrg 499c9e2be55Smrg# You should have received a copy of the GNU General Public License 500c9e2be55Smrg# along with this program; if not, write to the Free Software 501c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 502c9e2be55Smrg# 02111-1307, USA. 503c9e2be55Smrg 504c9e2be55Smrg 505c9e2be55Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 506c9e2be55Smrg# written in clear, in which case automake, when reading aclocal.m4, 507c9e2be55Smrg# will think it sees a *use*, and therefore will trigger all it's 508c9e2be55Smrg# C support machinery. Also note that it means that autoscan, seeing 509c9e2be55Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 510c9e2be55Smrg 511c9e2be55Smrg 512c9e2be55Smrg 513c9e2be55Smrg# _AM_DEPENDENCIES(NAME) 514c9e2be55Smrg# ---------------------- 515c9e2be55Smrg# See how the compiler implements dependency checking. 516c9e2be55Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 517c9e2be55Smrg# We try a few techniques and use that to set a single cache variable. 518c9e2be55Smrg# 519c9e2be55Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 520c9e2be55Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 521c9e2be55Smrg# dependency, and given that the user is not expected to run this macro, 522c9e2be55Smrg# just rely on AC_PROG_CC. 523c9e2be55SmrgAC_DEFUN([_AM_DEPENDENCIES], 524c9e2be55Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 525c9e2be55SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 526c9e2be55SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 527c9e2be55SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 528c9e2be55Smrg 529c9e2be55Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 530c9e2be55Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 531c9e2be55Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 532c9e2be55Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 533c9e2be55Smrg [depcc="$$1" am_compiler_list=]) 534c9e2be55Smrg 535c9e2be55SmrgAC_CACHE_CHECK([dependency style of $depcc], 536c9e2be55Smrg [am_cv_$1_dependencies_compiler_type], 537c9e2be55Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 538c9e2be55Smrg # We make a subdir and do the tests there. Otherwise we can end up 539c9e2be55Smrg # making bogus files that we don't know about and never remove. For 540c9e2be55Smrg # instance it was reported that on HP-UX the gcc test will end up 541c9e2be55Smrg # making a dummy file named `D' -- because `-MD' means `put the output 542c9e2be55Smrg # in D'. 543c9e2be55Smrg mkdir conftest.dir 544c9e2be55Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 545c9e2be55Smrg # using a relative directory. 546c9e2be55Smrg cp "$am_depcomp" conftest.dir 547c9e2be55Smrg cd conftest.dir 548c9e2be55Smrg # We will build objects and dependencies in a subdirectory because 549c9e2be55Smrg # it helps to detect inapplicable dependency modes. For instance 550c9e2be55Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 551c9e2be55Smrg # side effect of compilation, but ICC will put the dependencies in 552c9e2be55Smrg # the current directory while Tru64 will put them in the object 553c9e2be55Smrg # directory. 554c9e2be55Smrg mkdir sub 555c9e2be55Smrg 556c9e2be55Smrg am_cv_$1_dependencies_compiler_type=none 557c9e2be55Smrg if test "$am_compiler_list" = ""; then 558c9e2be55Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 559c9e2be55Smrg fi 560c9e2be55Smrg for depmode in $am_compiler_list; do 561c9e2be55Smrg # Setup a source with many dependencies, because some compilers 562c9e2be55Smrg # like to wrap large dependency lists on column 80 (with \), and 563c9e2be55Smrg # we should not choose a depcomp mode which is confused by this. 564c9e2be55Smrg # 565c9e2be55Smrg # We need to recreate these files for each test, as the compiler may 566c9e2be55Smrg # overwrite some of them when testing with obscure command lines. 567c9e2be55Smrg # This happens at least with the AIX C compiler. 568c9e2be55Smrg : > sub/conftest.c 569c9e2be55Smrg for i in 1 2 3 4 5 6; do 570c9e2be55Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 571c9e2be55Smrg : > sub/conftst$i.h 572c9e2be55Smrg done 573c9e2be55Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 574c9e2be55Smrg 575c9e2be55Smrg case $depmode in 576c9e2be55Smrg nosideeffect) 577c9e2be55Smrg # after this tag, mechanisms are not by side-effect, so they'll 578c9e2be55Smrg # only be used when explicitly requested 579c9e2be55Smrg if test "x$enable_dependency_tracking" = xyes; then 580c9e2be55Smrg continue 581c9e2be55Smrg else 582c9e2be55Smrg break 583c9e2be55Smrg fi 584c9e2be55Smrg ;; 585c9e2be55Smrg none) break ;; 586c9e2be55Smrg esac 587c9e2be55Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 588c9e2be55Smrg # mode. It turns out that the SunPro C++ compiler does not properly 589c9e2be55Smrg # handle `-M -o', and we need to detect this. 590c9e2be55Smrg if depmode=$depmode \ 591c9e2be55Smrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 592c9e2be55Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 593c9e2be55Smrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 594c9e2be55Smrg >/dev/null 2>conftest.err && 595c9e2be55Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 596c9e2be55Smrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 597c9e2be55Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 598c9e2be55Smrg # icc doesn't choke on unknown options, it will just issue warnings 599c9e2be55Smrg # (even with -Werror). So we grep stderr for any message 600c9e2be55Smrg # that says an option was ignored. 601c9e2be55Smrg if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else 602c9e2be55Smrg am_cv_$1_dependencies_compiler_type=$depmode 603c9e2be55Smrg break 604c9e2be55Smrg fi 605c9e2be55Smrg fi 606c9e2be55Smrg done 607c9e2be55Smrg 608c9e2be55Smrg cd .. 609c9e2be55Smrg rm -rf conftest.dir 610c9e2be55Smrgelse 611c9e2be55Smrg am_cv_$1_dependencies_compiler_type=none 612c9e2be55Smrgfi 613c9e2be55Smrg]) 614c9e2be55SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 615c9e2be55SmrgAM_CONDITIONAL([am__fastdep$1], [ 616c9e2be55Smrg test "x$enable_dependency_tracking" != xno \ 617c9e2be55Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 618c9e2be55Smrg]) 619c9e2be55Smrg 620c9e2be55Smrg 621c9e2be55Smrg# AM_SET_DEPDIR 622c9e2be55Smrg# ------------- 623c9e2be55Smrg# Choose a directory name for dependency files. 624c9e2be55Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 625c9e2be55SmrgAC_DEFUN([AM_SET_DEPDIR], 626c9e2be55Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 627c9e2be55SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 628c9e2be55Smrg]) 629c9e2be55Smrg 630c9e2be55Smrg 631c9e2be55Smrg# AM_DEP_TRACK 632c9e2be55Smrg# ------------ 633c9e2be55SmrgAC_DEFUN([AM_DEP_TRACK], 634c9e2be55Smrg[AC_ARG_ENABLE(dependency-tracking, 635c9e2be55Smrg[ --disable-dependency-tracking Speeds up one-time builds 636c9e2be55Smrg --enable-dependency-tracking Do not reject slow dependency extractors]) 637c9e2be55Smrgif test "x$enable_dependency_tracking" != xno; then 638c9e2be55Smrg am_depcomp="$ac_aux_dir/depcomp" 639c9e2be55Smrg AMDEPBACKSLASH='\' 640c9e2be55Smrgfi 641c9e2be55SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 642c9e2be55SmrgAC_SUBST([AMDEPBACKSLASH]) 643c9e2be55Smrg]) 644c9e2be55Smrg 645c9e2be55Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 646c9e2be55Smrg 647c9e2be55Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 648c9e2be55Smrg 649c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 650c9e2be55Smrg# it under the terms of the GNU General Public License as published by 651c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 652c9e2be55Smrg# any later version. 653c9e2be55Smrg 654c9e2be55Smrg# This program is distributed in the hope that it will be useful, 655c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 656c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 657c9e2be55Smrg# GNU General Public License for more details. 658c9e2be55Smrg 659c9e2be55Smrg# You should have received a copy of the GNU General Public License 660c9e2be55Smrg# along with this program; if not, write to the Free Software 661c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 662c9e2be55Smrg# 02111-1307, USA. 663c9e2be55Smrg 664c9e2be55Smrg#serial 2 665c9e2be55Smrg 666c9e2be55Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 667c9e2be55Smrg# ------------------------------ 668c9e2be55SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 669c9e2be55Smrg[for mf in $CONFIG_FILES; do 670c9e2be55Smrg # Strip MF so we end up with the name of the file. 671c9e2be55Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 672c9e2be55Smrg # Check whether this is an Automake generated Makefile or not. 673c9e2be55Smrg # We used to match only the files named `Makefile.in', but 674c9e2be55Smrg # some people rename them; so instead we look at the file content. 675c9e2be55Smrg # Grep'ing the first line is not enough: some people post-process 676c9e2be55Smrg # each Makefile.in and add a new line on top of each file to say so. 677c9e2be55Smrg # So let's grep whole file. 678c9e2be55Smrg if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 679c9e2be55Smrg dirpart=`AS_DIRNAME("$mf")` 680c9e2be55Smrg else 681c9e2be55Smrg continue 682c9e2be55Smrg fi 683c9e2be55Smrg grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue 684c9e2be55Smrg # Extract the definition of DEP_FILES from the Makefile without 685c9e2be55Smrg # running `make'. 686c9e2be55Smrg DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` 687c9e2be55Smrg test -z "$DEPDIR" && continue 688c9e2be55Smrg # When using ansi2knr, U may be empty or an underscore; expand it 689c9e2be55Smrg U=`sed -n -e '/^U = / s///p' < "$mf"` 690c9e2be55Smrg test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" 691c9e2be55Smrg # We invoke sed twice because it is the simplest approach to 692c9e2be55Smrg # changing $(DEPDIR) to its actual value in the expansion. 693c9e2be55Smrg for file in `sed -n -e ' 694c9e2be55Smrg /^DEP_FILES = .*\\\\$/ { 695c9e2be55Smrg s/^DEP_FILES = // 696c9e2be55Smrg :loop 697c9e2be55Smrg s/\\\\$// 698c9e2be55Smrg p 699c9e2be55Smrg n 700c9e2be55Smrg /\\\\$/ b loop 701c9e2be55Smrg p 702c9e2be55Smrg } 703c9e2be55Smrg /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ 704c9e2be55Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 705c9e2be55Smrg # Make sure the directory exists. 706c9e2be55Smrg test -f "$dirpart/$file" && continue 707c9e2be55Smrg fdir=`AS_DIRNAME(["$file"])` 708c9e2be55Smrg AS_MKDIR_P([$dirpart/$fdir]) 709c9e2be55Smrg # echo "creating $dirpart/$file" 710c9e2be55Smrg echo '# dummy' > "$dirpart/$file" 711c9e2be55Smrg done 712c9e2be55Smrgdone 713c9e2be55Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 714c9e2be55Smrg 715c9e2be55Smrg 716c9e2be55Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 717c9e2be55Smrg# ----------------------------- 718c9e2be55Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 719c9e2be55Smrg# 720c9e2be55Smrg# This code is only required when automatic dependency tracking 721c9e2be55Smrg# is enabled. FIXME. This creates each `.P' file that we will 722c9e2be55Smrg# need in order to bootstrap the dependency handling code. 723c9e2be55SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 724c9e2be55Smrg[AC_CONFIG_COMMANDS([depfiles], 725c9e2be55Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 726c9e2be55Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 727c9e2be55Smrg]) 728c9e2be55Smrg 729c9e2be55Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 730c9e2be55Smrg 731c9e2be55Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 732c9e2be55Smrg 733c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 734c9e2be55Smrg# it under the terms of the GNU General Public License as published by 735c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 736c9e2be55Smrg# any later version. 737c9e2be55Smrg 738c9e2be55Smrg# This program is distributed in the hope that it will be useful, 739c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 740c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 741c9e2be55Smrg# GNU General Public License for more details. 742c9e2be55Smrg 743c9e2be55Smrg# You should have received a copy of the GNU General Public License 744c9e2be55Smrg# along with this program; if not, write to the Free Software 745c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 746c9e2be55Smrg# 02111-1307, USA. 747c9e2be55Smrg 748c9e2be55Smrg# serial 2 749c9e2be55Smrg 750c9e2be55Smrg# AM_MAKE_INCLUDE() 751c9e2be55Smrg# ----------------- 752c9e2be55Smrg# Check to see how make treats includes. 753c9e2be55SmrgAC_DEFUN([AM_MAKE_INCLUDE], 754c9e2be55Smrg[am_make=${MAKE-make} 755c9e2be55Smrgcat > confinc << 'END' 756c9e2be55Smrgam__doit: 757c9e2be55Smrg @echo done 758c9e2be55Smrg.PHONY: am__doit 759c9e2be55SmrgEND 760c9e2be55Smrg# If we don't find an include directive, just comment out the code. 761c9e2be55SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 762c9e2be55Smrgam__include="#" 763c9e2be55Smrgam__quote= 764c9e2be55Smrg_am_result=none 765c9e2be55Smrg# First try GNU make style include. 766c9e2be55Smrgecho "include confinc" > confmf 767c9e2be55Smrg# We grep out `Entering directory' and `Leaving directory' 768c9e2be55Smrg# messages which can occur if `w' ends up in MAKEFLAGS. 769c9e2be55Smrg# In particular we don't look at `^make:' because GNU make might 770c9e2be55Smrg# be invoked under some other name (usually "gmake"), in which 771c9e2be55Smrg# case it prints its new name instead of `make'. 772c9e2be55Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 773c9e2be55Smrg am__include=include 774c9e2be55Smrg am__quote= 775c9e2be55Smrg _am_result=GNU 776c9e2be55Smrgfi 777c9e2be55Smrg# Now try BSD make style include. 778c9e2be55Smrgif test "$am__include" = "#"; then 779c9e2be55Smrg echo '.include "confinc"' > confmf 780c9e2be55Smrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 781c9e2be55Smrg am__include=.include 782c9e2be55Smrg am__quote="\"" 783c9e2be55Smrg _am_result=BSD 784c9e2be55Smrg fi 785c9e2be55Smrgfi 786c9e2be55SmrgAC_SUBST([am__include]) 787c9e2be55SmrgAC_SUBST([am__quote]) 788c9e2be55SmrgAC_MSG_RESULT([$_am_result]) 789c9e2be55Smrgrm -f confinc confmf 790c9e2be55Smrg]) 791c9e2be55Smrg 792c9e2be55Smrg# AM_CONDITIONAL -*- Autoconf -*- 793c9e2be55Smrg 794c9e2be55Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. 795c9e2be55Smrg 796c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 797c9e2be55Smrg# it under the terms of the GNU General Public License as published by 798c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 799c9e2be55Smrg# any later version. 800c9e2be55Smrg 801c9e2be55Smrg# This program is distributed in the hope that it will be useful, 802c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 803c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 804c9e2be55Smrg# GNU General Public License for more details. 805c9e2be55Smrg 806c9e2be55Smrg# You should have received a copy of the GNU General Public License 807c9e2be55Smrg# along with this program; if not, write to the Free Software 808c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 809c9e2be55Smrg# 02111-1307, USA. 810c9e2be55Smrg 811c9e2be55Smrg# serial 5 812c9e2be55Smrg 813c9e2be55SmrgAC_PREREQ(2.52) 814c9e2be55Smrg 815c9e2be55Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 816c9e2be55Smrg# ------------------------------------- 817c9e2be55Smrg# Define a conditional. 818c9e2be55SmrgAC_DEFUN([AM_CONDITIONAL], 819c9e2be55Smrg[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 820c9e2be55Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 821c9e2be55SmrgAC_SUBST([$1_TRUE]) 822c9e2be55SmrgAC_SUBST([$1_FALSE]) 823c9e2be55Smrgif $2; then 824c9e2be55Smrg $1_TRUE= 825c9e2be55Smrg $1_FALSE='#' 826c9e2be55Smrgelse 827c9e2be55Smrg $1_TRUE='#' 828c9e2be55Smrg $1_FALSE= 829c9e2be55Smrgfi 830c9e2be55SmrgAC_CONFIG_COMMANDS_PRE( 831c9e2be55Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 832c9e2be55Smrg AC_MSG_ERROR([conditional "$1" was never defined. 833c9e2be55SmrgUsually this means the macro was only invoked conditionally.]) 834c9e2be55Smrgfi])]) 835c9e2be55Smrg 836c9e2be55Smrg# Add --enable-maintainer-mode option to configure. 837c9e2be55Smrg# From Jim Meyering 838c9e2be55Smrg 839c9e2be55Smrg# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 840c9e2be55Smrg 841c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 842c9e2be55Smrg# it under the terms of the GNU General Public License as published by 843c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 844c9e2be55Smrg# any later version. 845c9e2be55Smrg 846c9e2be55Smrg# This program is distributed in the hope that it will be useful, 847c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 848c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 849c9e2be55Smrg# GNU General Public License for more details. 850c9e2be55Smrg 851c9e2be55Smrg# You should have received a copy of the GNU General Public License 852c9e2be55Smrg# along with this program; if not, write to the Free Software 853c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 854c9e2be55Smrg# 02111-1307, USA. 855c9e2be55Smrg 856c9e2be55Smrg# serial 2 857c9e2be55Smrg 858c9e2be55SmrgAC_DEFUN([AM_MAINTAINER_MODE], 859c9e2be55Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 860c9e2be55Smrg dnl maintainer-mode is disabled by default 861c9e2be55Smrg AC_ARG_ENABLE(maintainer-mode, 862c9e2be55Smrg[ --enable-maintainer-mode enable make rules and dependencies not useful 863c9e2be55Smrg (and sometimes confusing) to the casual installer], 864c9e2be55Smrg USE_MAINTAINER_MODE=$enableval, 865c9e2be55Smrg USE_MAINTAINER_MODE=no) 866c9e2be55Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 867c9e2be55Smrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 868c9e2be55Smrg MAINT=$MAINTAINER_MODE_TRUE 869c9e2be55Smrg AC_SUBST(MAINT)dnl 870c9e2be55Smrg] 871c9e2be55Smrg) 872c9e2be55Smrg 873c9e2be55SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 874c9e2be55Smrg 875c9e2be55Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- 876c9e2be55Smrg 877c9e2be55Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. 878c9e2be55Smrg 879c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 880c9e2be55Smrg# it under the terms of the GNU General Public License as published by 881c9e2be55Smrg# the Free Software Foundation; either version 2, or (at your option) 882c9e2be55Smrg# any later version. 883c9e2be55Smrg 884c9e2be55Smrg# This program is distributed in the hope that it will be useful, 885c9e2be55Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 886c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 887c9e2be55Smrg# GNU General Public License for more details. 888c9e2be55Smrg 889c9e2be55Smrg# You should have received a copy of the GNU General Public License 890c9e2be55Smrg# along with this program; if not, write to the Free Software 891c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 892c9e2be55Smrg# 02111-1307, USA. 893c9e2be55Smrg 894c9e2be55SmrgAC_PREREQ([2.52]) 895c9e2be55Smrg 896c9e2be55Smrg# serial 6 897c9e2be55Smrg 898c9e2be55Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 899c9e2be55SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 900c9e2be55Smrg 901c9e2be55Smrgdnl Copyright 2005 Red Hat, Inc 902c9e2be55Smrgdnl 903c9e2be55Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 904c9e2be55Smrgdnl documentation for any purpose is hereby granted without fee, provided that 905c9e2be55Smrgdnl the above copyright notice appear in all copies and that both that 906c9e2be55Smrgdnl copyright notice and this permission notice appear in supporting 907c9e2be55Smrgdnl documentation. 908c9e2be55Smrgdnl 909c9e2be55Smrgdnl The above copyright notice and this permission notice shall be included 910c9e2be55Smrgdnl in all copies or substantial portions of the Software. 911c9e2be55Smrgdnl 912c9e2be55Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 913c9e2be55Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 914c9e2be55Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 915c9e2be55Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 916c9e2be55Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 917c9e2be55Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 918c9e2be55Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 919c9e2be55Smrgdnl 920c9e2be55Smrgdnl Except as contained in this notice, the name of the copyright holders shall 921c9e2be55Smrgdnl not be used in advertising or otherwise to promote the sale, use or 922c9e2be55Smrgdnl other dealings in this Software without prior written authorization 923c9e2be55Smrgdnl from the copyright holders. 924c9e2be55Smrgdnl 925c9e2be55Smrg 926c9e2be55Smrg# XAW_CHECK_XPRINT_SUPPORT() 927c9e2be55Smrg# -------------------------- 928c9e2be55Smrg# Adds --enable/disable-xprint and selects the appropriate version of the Xaw 929c9e2be55Smrg# library. If neither --enable-xprint nor --disable-xprint are given, 930c9e2be55Smrg# the presence of an Xaw with Xprint support will be auto detected 931c9e2be55Smrg 932c9e2be55SmrgAC_DEFUN([XAW_CHECK_XPRINT_SUPPORT],[ 933c9e2be55Smrg AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]), 934c9e2be55Smrg [use_xprint=$enableval],[use_xprint=auto]) 935c9e2be55Smrg if test "x$use_xprint" = "xyes"; then 936c9e2be55Smrg TMP_CHECK1=xaw8 937c9e2be55Smrg TMP_CHECK2= 938c9e2be55Smrg xaw_use_xprint=yes 939c9e2be55Smrg elif test "x$use_xprint" = "xno"; then 940c9e2be55Smrg TMP_CHECK1=xaw7 941c9e2be55Smrg TMP_CHECK2= 942c9e2be55Smrg xaw_use_xprint=no 943c9e2be55Smrg else 944c9e2be55Smrg TMP_CHECK1=xaw8 945c9e2be55Smrg TMP_CHECK2=xaw7 946c9e2be55Smrg xaw_use_xprint=yes 947c9e2be55Smrg fi 948c9e2be55Smrg 949c9e2be55Smrg PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK1, success=yes, success=no) 950c9e2be55Smrg if [[ ! -z $TMP_CHECK2 ]] ; then 951c9e2be55Smrg if test $success = no ; then 952c9e2be55Smrg PKG_CHECK_MODULES(TMP_XAW, $TMP_CHECK2, success=yes, success=no) 953c9e2be55Smrg xaw_use_xprint=no 954c9e2be55Smrg fi 955c9e2be55Smrg fi 956c9e2be55Smrg 957c9e2be55Smrg if test "x$success" = "xyes"; then 958c9e2be55Smrg $1_CFLAGS=$TMP_XAW_CFLAGS 959c9e2be55Smrg $1_LIBS=$TMP_XAW_LIBS 960c9e2be55Smrg 961c9e2be55Smrg AM_CONDITIONAL([XAW_USE_XPRINT], [test "x$xaw_use_xprint" = "xyes"]) 962c9e2be55Smrg else 963c9e2be55Smrg AC_MSG_ERROR([No suitable version of Xaw found]) 964c9e2be55Smrg fi 965c9e2be55Smrg]) 966c9e2be55Smrg 967c9e2be55Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 968c9e2be55Smrg# 969c9e2be55Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 970c9e2be55Smrg# 971c9e2be55Smrg# This program is free software; you can redistribute it and/or modify 972c9e2be55Smrg# it under the terms of the GNU General Public License as published by 973c9e2be55Smrg# the Free Software Foundation; either version 2 of the License, or 974c9e2be55Smrg# (at your option) any later version. 975c9e2be55Smrg# 976c9e2be55Smrg# This program is distributed in the hope that it will be useful, but 977c9e2be55Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 978c9e2be55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 979c9e2be55Smrg# General Public License for more details. 980c9e2be55Smrg# 981c9e2be55Smrg# You should have received a copy of the GNU General Public License 982c9e2be55Smrg# along with this program; if not, write to the Free Software 983c9e2be55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 984c9e2be55Smrg# 985c9e2be55Smrg# As a special exception to the GNU General Public License, if you 986c9e2be55Smrg# distribute this file as part of a program that contains a 987c9e2be55Smrg# configuration script generated by Autoconf, you may include it under 988c9e2be55Smrg# the same distribution terms that you use for the rest of that program. 989c9e2be55Smrg 990c9e2be55Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 991c9e2be55Smrg# ---------------------------------- 992c9e2be55SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 993c9e2be55Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 994c9e2be55Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 995c9e2be55SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 996c9e2be55Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 997c9e2be55Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 998c9e2be55Smrgfi 999c9e2be55Smrgif test -n "$PKG_CONFIG"; then 1000c9e2be55Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 1001c9e2be55Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1002c9e2be55Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1003c9e2be55Smrg AC_MSG_RESULT([yes]) 1004c9e2be55Smrg else 1005c9e2be55Smrg AC_MSG_RESULT([no]) 1006c9e2be55Smrg PKG_CONFIG="" 1007c9e2be55Smrg fi 1008c9e2be55Smrg 1009c9e2be55Smrgfi[]dnl 1010c9e2be55Smrg])# PKG_PROG_PKG_CONFIG 1011c9e2be55Smrg 1012c9e2be55Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1013c9e2be55Smrg# 1014c9e2be55Smrg# Check to see whether a particular set of modules exists. Similar 1015c9e2be55Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 1016c9e2be55Smrg# 1017c9e2be55Smrg# 1018c9e2be55Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 1019c9e2be55Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 1020c9e2be55Smrg# PKG_CHECK_EXISTS manually 1021c9e2be55Smrg# -------------------------------------------------------------- 1022c9e2be55SmrgAC_DEFUN([PKG_CHECK_EXISTS], 1023c9e2be55Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1024c9e2be55Smrgif test -n "$PKG_CONFIG" && \ 1025c9e2be55Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1026c9e2be55Smrg m4_ifval([$2], [$2], [:]) 1027c9e2be55Smrgm4_ifvaln([$3], [else 1028c9e2be55Smrg $3])dnl 1029c9e2be55Smrgfi]) 1030c9e2be55Smrg 1031c9e2be55Smrg 1032c9e2be55Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1033c9e2be55Smrg# --------------------------------------------- 1034c9e2be55Smrgm4_define([_PKG_CONFIG], 1035c9e2be55Smrg[if test -n "$PKG_CONFIG"; then 1036c9e2be55Smrg if test -n "$$1"; then 1037c9e2be55Smrg pkg_cv_[]$1="$$1" 1038c9e2be55Smrg else 1039c9e2be55Smrg PKG_CHECK_EXISTS([$3], 1040c9e2be55Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1041c9e2be55Smrg [pkg_failed=yes]) 1042c9e2be55Smrg fi 1043c9e2be55Smrgelse 1044c9e2be55Smrg pkg_failed=untried 1045c9e2be55Smrgfi[]dnl 1046c9e2be55Smrg])# _PKG_CONFIG 1047c9e2be55Smrg 1048c9e2be55Smrg# _PKG_SHORT_ERRORS_SUPPORTED 1049c9e2be55Smrg# ----------------------------- 1050c9e2be55SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1051c9e2be55Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1052c9e2be55Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1053c9e2be55Smrg _pkg_short_errors_supported=yes 1054c9e2be55Smrgelse 1055c9e2be55Smrg _pkg_short_errors_supported=no 1056c9e2be55Smrgfi[]dnl 1057c9e2be55Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1058c9e2be55Smrg 1059c9e2be55Smrg 1060c9e2be55Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1061c9e2be55Smrg# [ACTION-IF-NOT-FOUND]) 1062c9e2be55Smrg# 1063c9e2be55Smrg# 1064c9e2be55Smrg# Note that if there is a possibility the first call to 1065c9e2be55Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1066c9e2be55Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1067c9e2be55Smrg# 1068c9e2be55Smrg# 1069c9e2be55Smrg# -------------------------------------------------------------- 1070c9e2be55SmrgAC_DEFUN([PKG_CHECK_MODULES], 1071c9e2be55Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1072c9e2be55SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1073c9e2be55SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1074c9e2be55Smrg 1075c9e2be55Smrgpkg_failed=no 1076c9e2be55SmrgAC_MSG_CHECKING([for $1]) 1077c9e2be55Smrg 1078c9e2be55Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1079c9e2be55Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1080c9e2be55Smrg 1081c9e2be55Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1082c9e2be55Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1083c9e2be55SmrgSee the pkg-config man page for more details.]) 1084c9e2be55Smrg 1085c9e2be55Smrgif test $pkg_failed = yes; then 1086c9e2be55Smrg _PKG_SHORT_ERRORS_SUPPORTED 1087c9e2be55Smrg if test $_pkg_short_errors_supported = yes; then 1088c9e2be55Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 1089c9e2be55Smrg else 1090c9e2be55Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 1091c9e2be55Smrg fi 1092c9e2be55Smrg # Put the nasty error message in config.log where it belongs 1093c9e2be55Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1094c9e2be55Smrg 1095c9e2be55Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 1096c9e2be55Smrg[Package requirements ($2) were not met: 1097c9e2be55Smrg 1098c9e2be55Smrg$$1_PKG_ERRORS 1099c9e2be55Smrg 1100c9e2be55SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1101c9e2be55Smrginstalled software in a non-standard prefix. 1102c9e2be55Smrg 1103c9e2be55Smrg_PKG_TEXT 1104c9e2be55Smrg])], 1105c9e2be55Smrg [$4]) 1106c9e2be55Smrgelif test $pkg_failed = untried; then 1107c9e2be55Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 1108c9e2be55Smrg[The pkg-config script could not be found or is too old. Make sure it 1109c9e2be55Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1110c9e2be55Smrgpath to pkg-config. 1111c9e2be55Smrg 1112c9e2be55Smrg_PKG_TEXT 1113c9e2be55Smrg 1114c9e2be55SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], 1115c9e2be55Smrg [$4]) 1116c9e2be55Smrgelse 1117c9e2be55Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1118c9e2be55Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1119c9e2be55Smrg AC_MSG_RESULT([yes]) 1120c9e2be55Smrg ifelse([$3], , :, [$3]) 1121c9e2be55Smrgfi[]dnl 1122c9e2be55Smrg])# PKG_CHECK_MODULES 1123c9e2be55Smrg 1124c9e2be55Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:30:22 mrg Exp $ 1125c9e2be55Smrgdnl 1126c9e2be55Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 1127c9e2be55Smrgdnl 1128c9e2be55Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1129c9e2be55Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1130c9e2be55Smrgdnl the above copyright notice appear in all copies and that both that 1131c9e2be55Smrgdnl copyright notice and this permission notice appear in supporting 1132c9e2be55Smrgdnl documentation. 1133c9e2be55Smrgdnl 1134c9e2be55Smrgdnl The above copyright notice and this permission notice shall be included 1135c9e2be55Smrgdnl in all copies or substantial portions of the Software. 1136c9e2be55Smrgdnl 1137c9e2be55Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1138c9e2be55Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1139c9e2be55Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1140c9e2be55Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1141c9e2be55Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1142c9e2be55Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1143c9e2be55Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1144c9e2be55Smrgdnl 1145c9e2be55Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1146c9e2be55Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1147c9e2be55Smrgdnl other dealings in this Software without prior written authorization 1148c9e2be55Smrgdnl from the copyright holders. 1149c9e2be55Smrgdnl 1150c9e2be55Smrg 1151c9e2be55Smrg# XORG_PROG_RAWCPP() 1152c9e2be55Smrg# ------------------ 1153c9e2be55Smrg# Find cpp program and necessary flags for use in pre-processing text files 1154c9e2be55Smrg# such as man pages and config files 1155c9e2be55SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1156c9e2be55SmrgAC_REQUIRE([AC_PROG_CPP]) 1157c9e2be55SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1158c9e2be55Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1159c9e2be55Smrg 1160c9e2be55Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1161c9e2be55Smrg# which is not the best choice for supporting other OS'es, but covers most 1162c9e2be55Smrg# of the ones we need for now. 1163c9e2be55SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1164c9e2be55SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1165c9e2be55Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1166c9e2be55Smrg AC_MSG_RESULT([no]) 1167c9e2be55Smrgelse 1168c9e2be55Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1169c9e2be55Smrg RAWCPPFLAGS=-undef 1170c9e2be55Smrg AC_MSG_RESULT([yes]) 1171c9e2be55Smrg else 1172c9e2be55Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1173c9e2be55Smrg fi 1174c9e2be55Smrgfi 1175c9e2be55Smrgrm -f conftest.$ac_ext 1176c9e2be55Smrg 1177c9e2be55SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1178c9e2be55SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1179c9e2be55Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1180c9e2be55Smrg AC_MSG_RESULT([no]) 1181c9e2be55Smrgelse 1182c9e2be55Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1183c9e2be55Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1184c9e2be55Smrg AC_MSG_RESULT([yes]) 1185c9e2be55Smrg else 1186c9e2be55Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1187c9e2be55Smrg fi 1188c9e2be55Smrgfi 1189c9e2be55Smrgrm -f conftest.$ac_ext 1190c9e2be55SmrgAC_SUBST(RAWCPPFLAGS) 1191c9e2be55Smrg]) # XORG_PROG_RAWCPP 1192c9e2be55Smrg 1193c9e2be55Smrg# XORG_MANPAGE_SECTIONS() 1194c9e2be55Smrg# ----------------------- 1195c9e2be55Smrg# Determine which sections man pages go in for the different man page types 1196c9e2be55Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1197c9e2be55Smrg# Not sure if there's any better way than just hardcoding by OS name. 1198c9e2be55Smrg# Override default settings by setting environment variables 1199c9e2be55Smrg 1200c9e2be55SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1201c9e2be55SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1202c9e2be55Smrg 1203c9e2be55Smrgif test x$APP_MAN_SUFFIX = x ; then 1204c9e2be55Smrg case $host_os in 1205c9e2be55Smrg linux*) APP_MAN_SUFFIX=1x ;; 1206c9e2be55Smrg *) APP_MAN_SUFFIX=1 ;; 1207c9e2be55Smrg esac 1208c9e2be55Smrgfi 1209c9e2be55Smrgif test x$APP_MAN_DIR = x ; then 1210c9e2be55Smrg case $host_os in 1211c9e2be55Smrg linux*) APP_MAN_DIR='$(mandir)/man1' ;; 1212c9e2be55Smrg *) APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;; 1213c9e2be55Smrg esac 1214c9e2be55Smrgfi 1215c9e2be55Smrg 1216c9e2be55Smrgif test x$LIB_MAN_SUFFIX = x ; then 1217c9e2be55Smrg case $host_os in 1218c9e2be55Smrg linux*) LIB_MAN_SUFFIX=3x ;; 1219c9e2be55Smrg *) LIB_MAN_SUFFIX=3 ;; 1220c9e2be55Smrg esac 1221c9e2be55Smrgfi 1222c9e2be55Smrgif test x$LIB_MAN_DIR = x ; then 1223c9e2be55Smrg case $host_os in 1224c9e2be55Smrg linux*) LIB_MAN_DIR='$(mandir)/man3' ;; 1225c9e2be55Smrg *) LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;; 1226c9e2be55Smrg esac 1227c9e2be55Smrgfi 1228c9e2be55Smrg 1229c9e2be55Smrgif test x$FILE_MAN_SUFFIX = x ; then 1230c9e2be55Smrg case $host_os in 1231c9e2be55Smrg linux*) FILE_MAN_SUFFIX=5x ;; 1232c9e2be55Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1233c9e2be55Smrg *) FILE_MAN_SUFFIX=5 ;; 1234c9e2be55Smrg esac 1235c9e2be55Smrgfi 1236c9e2be55Smrgif test x$FILE_MAN_DIR = x ; then 1237c9e2be55Smrg case $host_os in 1238c9e2be55Smrg linux*) FILE_MAN_DIR='$(mandir)/man5' ;; 1239c9e2be55Smrg *) FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;; 1240c9e2be55Smrg esac 1241c9e2be55Smrgfi 1242c9e2be55Smrg 1243c9e2be55Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 1244c9e2be55Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 1245c9e2be55Smrgif test x$MISC_MAN_SUFFIX = x ; then 1246c9e2be55Smrg case $host_os in 1247c9e2be55Smrg# linux*) MISC_MAN_SUFFIX=7x ;; 1248c9e2be55Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1249c9e2be55Smrg *) MISC_MAN_SUFFIX=7 ;; 1250c9e2be55Smrg esac 1251c9e2be55Smrgfi 1252c9e2be55Smrgif test x$MISC_MAN_DIR = x ; then 1253c9e2be55Smrg case $host_os in 1254c9e2be55Smrg# linux*) MISC_MAN_DIR='$(mandir)/man7' ;; 1255c9e2be55Smrg *) MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;; 1256c9e2be55Smrg esac 1257c9e2be55Smrgfi 1258c9e2be55Smrg 1259c9e2be55Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 1260c9e2be55Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here 1261c9e2be55Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1262c9e2be55Smrg case $host_os in 1263c9e2be55Smrg# linux*) DRIVER_MAN_SUFFIX=4x ;; 1264c9e2be55Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1265c9e2be55Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1266c9e2be55Smrg esac 1267c9e2be55Smrgfi 1268c9e2be55Smrgif test x$DRIVER_MAN_DIR = x ; then 1269c9e2be55Smrg case $host_os in 1270c9e2be55Smrg# linux*) DRIVER_MAN_DIR='$(mandir)/man4' ;; 1271c9e2be55Smrg *) DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;; 1272c9e2be55Smrg esac 1273c9e2be55Smrgfi 1274c9e2be55Smrg 1275c9e2be55Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1276c9e2be55Smrg case $host_os in 1277c9e2be55Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1278c9e2be55Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1279c9e2be55Smrg esac 1280c9e2be55Smrgfi 1281c9e2be55Smrgif test x$ADMIN_MAN_DIR = x ; then 1282c9e2be55Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1283c9e2be55Smrgfi 1284c9e2be55Smrg 1285c9e2be55Smrg 1286c9e2be55SmrgAC_SUBST([APP_MAN_SUFFIX]) 1287c9e2be55SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1288c9e2be55SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1289c9e2be55SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1290c9e2be55SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1291c9e2be55SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1292c9e2be55SmrgAC_SUBST([APP_MAN_DIR]) 1293c9e2be55SmrgAC_SUBST([LIB_MAN_DIR]) 1294c9e2be55SmrgAC_SUBST([FILE_MAN_DIR]) 1295c9e2be55SmrgAC_SUBST([MISC_MAN_DIR]) 1296c9e2be55SmrgAC_SUBST([DRIVER_MAN_DIR]) 1297c9e2be55SmrgAC_SUBST([ADMIN_MAN_DIR]) 1298c9e2be55Smrg]) # XORG_MANPAGE_SECTIONS 1299c9e2be55Smrg 1300c9e2be55Smrg# XORG_CHECK_LINUXDOC 1301c9e2be55Smrg# ------------------- 1302c9e2be55Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1303c9e2be55Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1304c9e2be55Smrg# Whether or not the necessary tools and files are found can be checked 1305c9e2be55Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1306c9e2be55SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1307c9e2be55SmrgAC_CHECK_FILE( 1308c9e2be55Smrg [$prefix/share/X11/sgml/defs.ent], 1309c9e2be55Smrg [DEFS_ENT_PATH=$prefix/share/X11/sgml], 1310c9e2be55Smrg [DEFS_ENT_PATH=] 1311c9e2be55Smrg) 1312c9e2be55Smrg 1313c9e2be55SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1314c9e2be55SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1315c9e2be55Smrg 1316c9e2be55SmrgAC_MSG_CHECKING([Whether to build documentation]) 1317c9e2be55Smrg 1318c9e2be55Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then 1319c9e2be55Smrg BUILDDOC=yes 1320c9e2be55Smrgelse 1321c9e2be55Smrg BUILDDOC=no 1322c9e2be55Smrgfi 1323c9e2be55Smrg 1324c9e2be55SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1325c9e2be55Smrg 1326c9e2be55SmrgAC_MSG_RESULT([$BUILDDOC]) 1327c9e2be55Smrg 1328c9e2be55SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1329c9e2be55Smrg 1330c9e2be55Smrgif test x$PS2PDF != x ; then 1331c9e2be55Smrg BUILDPDFDOC=yes 1332c9e2be55Smrgelse 1333c9e2be55Smrg BUILDPDFDOC=no 1334c9e2be55Smrgfi 1335c9e2be55Smrg 1336c9e2be55SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1337c9e2be55Smrg 1338c9e2be55SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1339c9e2be55Smrg 1340c9e2be55SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1341c9e2be55SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1342c9e2be55SmrgMAKE_PDF="$PS2PDF" 1343c9e2be55SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0" 1344c9e2be55Smrg 1345c9e2be55SmrgAC_SUBST(MAKE_TEXT) 1346c9e2be55SmrgAC_SUBST(MAKE_PS) 1347c9e2be55SmrgAC_SUBST(MAKE_PDF) 1348c9e2be55SmrgAC_SUBST(MAKE_HTML) 1349c9e2be55Smrg]) # XORG_CHECK_LINUXDOC 1350c9e2be55Smrg 1351c9e2be55Smrg# XORG_CHECK_MALLOC_ZERO 1352c9e2be55Smrg# ---------------------- 1353c9e2be55Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1354c9e2be55Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1355c9e2be55Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1356c9e2be55SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1357c9e2be55SmrgAC_ARG_ENABLE(malloc0returnsnull, 1358c9e2be55Smrg AC_HELP_STRING([--enable-malloc0returnsnull], 1359c9e2be55Smrg [malloc(0) returns NULL (default: auto)]), 1360c9e2be55Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1361c9e2be55Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1362c9e2be55Smrg 1363c9e2be55SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1364c9e2be55Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1365c9e2be55Smrg AC_RUN_IFELSE([ 1366c9e2be55Smrgchar *malloc(); 1367c9e2be55Smrgchar *realloc(); 1368c9e2be55Smrgchar *calloc(); 1369c9e2be55Smrgmain() { 1370c9e2be55Smrg char *m0, *r0, *c0, *p; 1371c9e2be55Smrg m0 = malloc(0); 1372c9e2be55Smrg p = malloc(10); 1373c9e2be55Smrg r0 = realloc(p,0); 1374c9e2be55Smrg c0 = calloc(0); 1375c9e2be55Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1376c9e2be55Smrg}], 1377c9e2be55Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1378c9e2be55Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 1379c9e2be55Smrgfi 1380c9e2be55SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1381c9e2be55Smrg 1382c9e2be55Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1383c9e2be55Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1384c9e2be55Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1385c9e2be55Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1386c9e2be55Smrgelse 1387c9e2be55Smrg MALLOC_ZERO_CFLAGS="" 1388c9e2be55Smrg XMALLOC_ZERO_CFLAGS="" 1389c9e2be55Smrg XTMALLOC_ZERO_CFLAGS="" 1390c9e2be55Smrgfi 1391c9e2be55Smrg 1392c9e2be55SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1393c9e2be55SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1394c9e2be55SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1395c9e2be55Smrg]) # XORG_CHECK_MALLOC_ZERO 1396c9e2be55Smrg 1397c9e2be55Smrgdnl Copyright 2005 Red Hat, Inc 1398c9e2be55Smrgdnl 1399c9e2be55Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1400c9e2be55Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1401c9e2be55Smrgdnl the above copyright notice appear in all copies and that both that 1402c9e2be55Smrgdnl copyright notice and this permission notice appear in supporting 1403c9e2be55Smrgdnl documentation. 1404c9e2be55Smrgdnl 1405c9e2be55Smrgdnl The above copyright notice and this permission notice shall be included 1406c9e2be55Smrgdnl in all copies or substantial portions of the Software. 1407c9e2be55Smrgdnl 1408c9e2be55Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1409c9e2be55Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1410c9e2be55Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1411c9e2be55Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1412c9e2be55Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1413c9e2be55Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1414c9e2be55Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1415c9e2be55Smrgdnl 1416c9e2be55Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1417c9e2be55Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1418c9e2be55Smrgdnl other dealings in this Software without prior written authorization 1419c9e2be55Smrgdnl from the copyright holders. 1420c9e2be55Smrgdnl 1421c9e2be55Smrg 1422c9e2be55Smrg# XORG_RELEASE_VERSION 1423c9e2be55Smrg# -------------------- 1424c9e2be55Smrg# Adds --with/without-release-string and changes the PACKAGE and 1425c9e2be55Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1426c9e2be55Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 1427c9e2be55Smrg 1428c9e2be55SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1429c9e2be55Smrg AC_ARG_WITH(release-version, 1430c9e2be55Smrg AC_HELP_STRING([--with-release-version=STRING], 1431c9e2be55Smrg [Use release version string in package name]), 1432c9e2be55Smrg [RELEASE_VERSION="$withval"], 1433c9e2be55Smrg [RELEASE_VERSION=""]) 1434c9e2be55Smrg if test "x$RELEASE_VERSION" != "x"; then 1435c9e2be55Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1436c9e2be55Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1437c9e2be55Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1438c9e2be55Smrg fi 1439c9e2be55Smrg]) 1440c9e2be55Smrg 1441