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