aclocal.m4 revision 7bd0f98d
17bd0f98dSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2cbeba4aeSmrg 37bd0f98dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 47bd0f98dSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5cbeba4aeSmrg# This file is free software; the Free Software Foundation 6cbeba4aeSmrg# gives unlimited permission to copy and/or distribute it, 7cbeba4aeSmrg# with or without modifications, as long as this notice is preserved. 8cbeba4aeSmrg 9cbeba4aeSmrg# This program is distributed in the hope that it will be useful, 10cbeba4aeSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11cbeba4aeSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12cbeba4aeSmrg# PARTICULAR PURPOSE. 13cbeba4aeSmrg 147bd0f98dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 157bd0f98dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 167bd0f98dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 177bd0f98dSmrg[m4_warning([this file was generated for autoconf 2.65. 187bd0f98dSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 197bd0f98dSmrgIf you have problems, you may need to regenerate the build system entirely. 207bd0f98dSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21cbeba4aeSmrg 227bd0f98dSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 237bd0f98dSmrg# 247bd0f98dSmrg# This file is free software; the Free Software Foundation 257bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 267bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 27cbeba4aeSmrg 28cbeba4aeSmrg# AM_AUTOMAKE_VERSION(VERSION) 29cbeba4aeSmrg# ---------------------------- 30cbeba4aeSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31cbeba4aeSmrg# generated from the m4 files accompanying Automake X.Y. 327bd0f98dSmrg# (This private macro should not be called outside this file.) 337bd0f98dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 347bd0f98dSmrg[am__api_version='1.11' 357bd0f98dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 367bd0f98dSmrgdnl require some minimum version. Point them to the right macro. 377bd0f98dSmrgm4_if([$1], [1.11.1], [], 387bd0f98dSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 397bd0f98dSmrg]) 407bd0f98dSmrg 417bd0f98dSmrg# _AM_AUTOCONF_VERSION(VERSION) 427bd0f98dSmrg# ----------------------------- 437bd0f98dSmrg# aclocal traces this macro to find the Autoconf version. 447bd0f98dSmrg# This is a private macro too. Using m4_define simplifies 457bd0f98dSmrg# the logic in aclocal, which can simply ignore this definition. 467bd0f98dSmrgm4_define([_AM_AUTOCONF_VERSION], []) 47cbeba4aeSmrg 48cbeba4aeSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49cbeba4aeSmrg# ------------------------------- 507bd0f98dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 517bd0f98dSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52cbeba4aeSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 537bd0f98dSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 547bd0f98dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 557bd0f98dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 567bd0f98dSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57cbeba4aeSmrg 587bd0f98dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59cbeba4aeSmrg 607bd0f98dSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61cbeba4aeSmrg# 627bd0f98dSmrg# This file is free software; the Free Software Foundation 637bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 647bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 65cbeba4aeSmrg 66cbeba4aeSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67cbeba4aeSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68cbeba4aeSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69cbeba4aeSmrg# 70cbeba4aeSmrg# Of course, Automake must honor this variable whenever it calls a 71cbeba4aeSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 72cbeba4aeSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73cbeba4aeSmrg# depending on how configure is run. This is pretty annoying, since 74cbeba4aeSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75cbeba4aeSmrg# source directory, any form will work fine, but in subdirectories a 76cbeba4aeSmrg# relative path needs to be adjusted first. 77cbeba4aeSmrg# 78cbeba4aeSmrg# $ac_aux_dir/missing 79cbeba4aeSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 80cbeba4aeSmrg# $top_srcdir/$ac_aux_dir/missing 81cbeba4aeSmrg# fails if $ac_aux_dir is absolute, 82cbeba4aeSmrg# fails when called from a subdirectory in a VPATH build with 83cbeba4aeSmrg# a relative $ac_aux_dir 84cbeba4aeSmrg# 85cbeba4aeSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86cbeba4aeSmrg# are both prefixed by $srcdir. In an in-source build this is usually 87cbeba4aeSmrg# harmless because $srcdir is `.', but things will broke when you 88cbeba4aeSmrg# start a VPATH build or use an absolute $srcdir. 89cbeba4aeSmrg# 90cbeba4aeSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91cbeba4aeSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92cbeba4aeSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93cbeba4aeSmrg# and then we would define $MISSING as 94cbeba4aeSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 95cbeba4aeSmrg# This will work as long as MISSING is not called from configure, because 96cbeba4aeSmrg# unfortunately $(top_srcdir) has no meaning in configure. 97cbeba4aeSmrg# However there are other variables, like CC, which are often used in 98cbeba4aeSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99cbeba4aeSmrg# 100cbeba4aeSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 101cbeba4aeSmrg# absolute PATH. The drawback is that using absolute paths prevent a 102cbeba4aeSmrg# configured tree to be moved without reconfiguration. 103cbeba4aeSmrg 1047bd0f98dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1057bd0f98dSmrg[dnl Rely on autoconf to set up CDPATH properly. 1067bd0f98dSmrgAC_PREREQ([2.50])dnl 107cbeba4aeSmrg# expand $ac_aux_dir to an absolute path 108cbeba4aeSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 109cbeba4aeSmrg]) 110cbeba4aeSmrg 1117bd0f98dSmrg# AM_CONDITIONAL -*- Autoconf -*- 112cbeba4aeSmrg 1137bd0f98dSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1147bd0f98dSmrg# Free Software Foundation, Inc. 1157bd0f98dSmrg# 1167bd0f98dSmrg# This file is free software; the Free Software Foundation 1177bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 1187bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 119cbeba4aeSmrg 1207bd0f98dSmrg# serial 9 121cbeba4aeSmrg 1227bd0f98dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1237bd0f98dSmrg# ------------------------------------- 1247bd0f98dSmrg# Define a conditional. 1257bd0f98dSmrgAC_DEFUN([AM_CONDITIONAL], 1267bd0f98dSmrg[AC_PREREQ(2.52)dnl 1277bd0f98dSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1287bd0f98dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1297bd0f98dSmrgAC_SUBST([$1_TRUE])dnl 1307bd0f98dSmrgAC_SUBST([$1_FALSE])dnl 1317bd0f98dSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1327bd0f98dSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1337bd0f98dSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1347bd0f98dSmrgif $2; then 1357bd0f98dSmrg $1_TRUE= 1367bd0f98dSmrg $1_FALSE='#' 137cbeba4aeSmrgelse 1387bd0f98dSmrg $1_TRUE='#' 1397bd0f98dSmrg $1_FALSE= 140cbeba4aeSmrgfi 1417bd0f98dSmrgAC_CONFIG_COMMANDS_PRE( 1427bd0f98dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1437bd0f98dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1447bd0f98dSmrgUsually this means the macro was only invoked conditionally.]]) 1457bd0f98dSmrgfi])]) 146cbeba4aeSmrg 1477bd0f98dSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1487bd0f98dSmrg# Free Software Foundation, Inc. 1497bd0f98dSmrg# 1507bd0f98dSmrg# This file is free software; the Free Software Foundation 1517bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 1527bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 153cbeba4aeSmrg 1547bd0f98dSmrg# serial 10 155cbeba4aeSmrg 156cbeba4aeSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157cbeba4aeSmrg# written in clear, in which case automake, when reading aclocal.m4, 158cbeba4aeSmrg# will think it sees a *use*, and therefore will trigger all it's 159cbeba4aeSmrg# C support machinery. Also note that it means that autoscan, seeing 160cbeba4aeSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161cbeba4aeSmrg 162cbeba4aeSmrg 163cbeba4aeSmrg# _AM_DEPENDENCIES(NAME) 164cbeba4aeSmrg# ---------------------- 165cbeba4aeSmrg# See how the compiler implements dependency checking. 166cbeba4aeSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167cbeba4aeSmrg# We try a few techniques and use that to set a single cache variable. 168cbeba4aeSmrg# 169cbeba4aeSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170cbeba4aeSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171cbeba4aeSmrg# dependency, and given that the user is not expected to run this macro, 172cbeba4aeSmrg# just rely on AC_PROG_CC. 173cbeba4aeSmrgAC_DEFUN([_AM_DEPENDENCIES], 174cbeba4aeSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175cbeba4aeSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176cbeba4aeSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177cbeba4aeSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178cbeba4aeSmrg 179cbeba4aeSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180cbeba4aeSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181cbeba4aeSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1827bd0f98dSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183cbeba4aeSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184cbeba4aeSmrg [depcc="$$1" am_compiler_list=]) 185cbeba4aeSmrg 186cbeba4aeSmrgAC_CACHE_CHECK([dependency style of $depcc], 187cbeba4aeSmrg [am_cv_$1_dependencies_compiler_type], 188cbeba4aeSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189cbeba4aeSmrg # We make a subdir and do the tests there. Otherwise we can end up 190cbeba4aeSmrg # making bogus files that we don't know about and never remove. For 191cbeba4aeSmrg # instance it was reported that on HP-UX the gcc test will end up 192cbeba4aeSmrg # making a dummy file named `D' -- because `-MD' means `put the output 193cbeba4aeSmrg # in D'. 194cbeba4aeSmrg mkdir conftest.dir 195cbeba4aeSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 196cbeba4aeSmrg # using a relative directory. 197cbeba4aeSmrg cp "$am_depcomp" conftest.dir 198cbeba4aeSmrg cd conftest.dir 199cbeba4aeSmrg # We will build objects and dependencies in a subdirectory because 200cbeba4aeSmrg # it helps to detect inapplicable dependency modes. For instance 201cbeba4aeSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 202cbeba4aeSmrg # side effect of compilation, but ICC will put the dependencies in 203cbeba4aeSmrg # the current directory while Tru64 will put them in the object 204cbeba4aeSmrg # directory. 205cbeba4aeSmrg mkdir sub 206cbeba4aeSmrg 207cbeba4aeSmrg am_cv_$1_dependencies_compiler_type=none 208cbeba4aeSmrg if test "$am_compiler_list" = ""; then 209cbeba4aeSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210cbeba4aeSmrg fi 2117bd0f98dSmrg am__universal=false 2127bd0f98dSmrg m4_case([$1], [CC], 2137bd0f98dSmrg [case " $depcc " in #( 2147bd0f98dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2157bd0f98dSmrg esac], 2167bd0f98dSmrg [CXX], 2177bd0f98dSmrg [case " $depcc " in #( 2187bd0f98dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2197bd0f98dSmrg esac]) 2207bd0f98dSmrg 221cbeba4aeSmrg for depmode in $am_compiler_list; do 222cbeba4aeSmrg # Setup a source with many dependencies, because some compilers 223cbeba4aeSmrg # like to wrap large dependency lists on column 80 (with \), and 224cbeba4aeSmrg # we should not choose a depcomp mode which is confused by this. 225cbeba4aeSmrg # 226cbeba4aeSmrg # We need to recreate these files for each test, as the compiler may 227cbeba4aeSmrg # overwrite some of them when testing with obscure command lines. 228cbeba4aeSmrg # This happens at least with the AIX C compiler. 229cbeba4aeSmrg : > sub/conftest.c 230cbeba4aeSmrg for i in 1 2 3 4 5 6; do 231cbeba4aeSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2327bd0f98dSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2337bd0f98dSmrg # Solaris 8's {/usr,}/bin/sh. 2347bd0f98dSmrg touch sub/conftst$i.h 235cbeba4aeSmrg done 236cbeba4aeSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237cbeba4aeSmrg 2387bd0f98dSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2397bd0f98dSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2407bd0f98dSmrg # handle `-M -o', and we need to detect this. Also, some Intel 2417bd0f98dSmrg # versions had trouble with output in subdirs 2427bd0f98dSmrg am__obj=sub/conftest.${OBJEXT-o} 2437bd0f98dSmrg am__minus_obj="-o $am__obj" 244cbeba4aeSmrg case $depmode in 2457bd0f98dSmrg gcc) 2467bd0f98dSmrg # This depmode causes a compiler race in universal mode. 2477bd0f98dSmrg test "$am__universal" = false || continue 2487bd0f98dSmrg ;; 249cbeba4aeSmrg nosideeffect) 250cbeba4aeSmrg # after this tag, mechanisms are not by side-effect, so they'll 251cbeba4aeSmrg # only be used when explicitly requested 252cbeba4aeSmrg if test "x$enable_dependency_tracking" = xyes; then 253cbeba4aeSmrg continue 254cbeba4aeSmrg else 255cbeba4aeSmrg break 256cbeba4aeSmrg fi 257cbeba4aeSmrg ;; 2587bd0f98dSmrg msvisualcpp | msvcmsys) 2597bd0f98dSmrg # This compiler won't grok `-c -o', but also, the minuso test has 2607bd0f98dSmrg # not run yet. These depmodes are late enough in the game, and 2617bd0f98dSmrg # so weak that their functioning should not be impacted. 2627bd0f98dSmrg am__obj=conftest.${OBJEXT-o} 2637bd0f98dSmrg am__minus_obj= 2647bd0f98dSmrg ;; 265cbeba4aeSmrg none) break ;; 266cbeba4aeSmrg esac 267cbeba4aeSmrg if depmode=$depmode \ 2687bd0f98dSmrg source=sub/conftest.c object=$am__obj \ 269cbeba4aeSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2707bd0f98dSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271cbeba4aeSmrg >/dev/null 2>conftest.err && 2727bd0f98dSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273cbeba4aeSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2747bd0f98dSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275cbeba4aeSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276cbeba4aeSmrg # icc doesn't choke on unknown options, it will just issue warnings 2777bd0f98dSmrg # or remarks (even with -Werror). So we grep stderr for any message 2787bd0f98dSmrg # that says an option was ignored or not supported. 2797bd0f98dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2807bd0f98dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2817bd0f98dSmrg # The diagnosis changed in icc 8.0: 2827bd0f98dSmrg # icc: Command line remark: option '-MP' not supported 2837bd0f98dSmrg if (grep 'ignoring option' conftest.err || 2847bd0f98dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285cbeba4aeSmrg am_cv_$1_dependencies_compiler_type=$depmode 286cbeba4aeSmrg break 287cbeba4aeSmrg fi 288cbeba4aeSmrg fi 289cbeba4aeSmrg done 290cbeba4aeSmrg 291cbeba4aeSmrg cd .. 292cbeba4aeSmrg rm -rf conftest.dir 293cbeba4aeSmrgelse 294cbeba4aeSmrg am_cv_$1_dependencies_compiler_type=none 295cbeba4aeSmrgfi 296cbeba4aeSmrg]) 297cbeba4aeSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298cbeba4aeSmrgAM_CONDITIONAL([am__fastdep$1], [ 299cbeba4aeSmrg test "x$enable_dependency_tracking" != xno \ 300cbeba4aeSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301cbeba4aeSmrg]) 302cbeba4aeSmrg 303cbeba4aeSmrg 304cbeba4aeSmrg# AM_SET_DEPDIR 305cbeba4aeSmrg# ------------- 306cbeba4aeSmrg# Choose a directory name for dependency files. 307cbeba4aeSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308cbeba4aeSmrgAC_DEFUN([AM_SET_DEPDIR], 309cbeba4aeSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310cbeba4aeSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311cbeba4aeSmrg]) 312cbeba4aeSmrg 313cbeba4aeSmrg 314cbeba4aeSmrg# AM_DEP_TRACK 315cbeba4aeSmrg# ------------ 316cbeba4aeSmrgAC_DEFUN([AM_DEP_TRACK], 317cbeba4aeSmrg[AC_ARG_ENABLE(dependency-tracking, 3187bd0f98dSmrg[ --disable-dependency-tracking speeds up one-time build 3197bd0f98dSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 320cbeba4aeSmrgif test "x$enable_dependency_tracking" != xno; then 321cbeba4aeSmrg am_depcomp="$ac_aux_dir/depcomp" 322cbeba4aeSmrg AMDEPBACKSLASH='\' 323cbeba4aeSmrgfi 324cbeba4aeSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3257bd0f98dSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3267bd0f98dSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327cbeba4aeSmrg]) 328cbeba4aeSmrg 3297bd0f98dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330cbeba4aeSmrg 3317bd0f98dSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 3327bd0f98dSmrg# Free Software Foundation, Inc. 3337bd0f98dSmrg# 3347bd0f98dSmrg# This file is free software; the Free Software Foundation 3357bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 3367bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 337cbeba4aeSmrg 3387bd0f98dSmrg#serial 5 339cbeba4aeSmrg 340cbeba4aeSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341cbeba4aeSmrg# ------------------------------ 342cbeba4aeSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3437bd0f98dSmrg[{ 3447bd0f98dSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3457bd0f98dSmrg # are listed without --file. Let's play safe and only enable the eval 3467bd0f98dSmrg # if we detect the quoting. 3477bd0f98dSmrg case $CONFIG_FILES in 3487bd0f98dSmrg *\'*) eval set x "$CONFIG_FILES" ;; 3497bd0f98dSmrg *) set x $CONFIG_FILES ;; 3507bd0f98dSmrg esac 3517bd0f98dSmrg shift 3527bd0f98dSmrg for mf 3537bd0f98dSmrg do 3547bd0f98dSmrg # Strip MF so we end up with the name of the file. 3557bd0f98dSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3567bd0f98dSmrg # Check whether this is an Automake generated Makefile or not. 3577bd0f98dSmrg # We used to match only the files named `Makefile.in', but 3587bd0f98dSmrg # some people rename them; so instead we look at the file content. 3597bd0f98dSmrg # Grep'ing the first line is not enough: some people post-process 3607bd0f98dSmrg # each Makefile.in and add a new line on top of each file to say so. 3617bd0f98dSmrg # Grep'ing the whole file is not good either: AIX grep has a line 3627bd0f98dSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3637bd0f98dSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3647bd0f98dSmrg dirpart=`AS_DIRNAME("$mf")` 3657bd0f98dSmrg else 3667bd0f98dSmrg continue 3677bd0f98dSmrg fi 3687bd0f98dSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3697bd0f98dSmrg # from the Makefile without running `make'. 3707bd0f98dSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3717bd0f98dSmrg test -z "$DEPDIR" && continue 3727bd0f98dSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3737bd0f98dSmrg test -z "am__include" && continue 3747bd0f98dSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3757bd0f98dSmrg # When using ansi2knr, U may be empty or an underscore; expand it 3767bd0f98dSmrg U=`sed -n 's/^U = //p' < "$mf"` 3777bd0f98dSmrg # Find all dependency output files, they are included files with 3787bd0f98dSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3797bd0f98dSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 3807bd0f98dSmrg # expansion. 3817bd0f98dSmrg for file in `sed -n " 3827bd0f98dSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3837bd0f98dSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3847bd0f98dSmrg # Make sure the directory exists. 3857bd0f98dSmrg test -f "$dirpart/$file" && continue 3867bd0f98dSmrg fdir=`AS_DIRNAME(["$file"])` 3877bd0f98dSmrg AS_MKDIR_P([$dirpart/$fdir]) 3887bd0f98dSmrg # echo "creating $dirpart/$file" 3897bd0f98dSmrg echo '# dummy' > "$dirpart/$file" 3907bd0f98dSmrg done 391cbeba4aeSmrg done 3927bd0f98dSmrg} 393cbeba4aeSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394cbeba4aeSmrg 395cbeba4aeSmrg 396cbeba4aeSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397cbeba4aeSmrg# ----------------------------- 398cbeba4aeSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399cbeba4aeSmrg# 400cbeba4aeSmrg# This code is only required when automatic dependency tracking 401cbeba4aeSmrg# is enabled. FIXME. This creates each `.P' file that we will 402cbeba4aeSmrg# need in order to bootstrap the dependency handling code. 403cbeba4aeSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404cbeba4aeSmrg[AC_CONFIG_COMMANDS([depfiles], 405cbeba4aeSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406cbeba4aeSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407cbeba4aeSmrg]) 408cbeba4aeSmrg 4097bd0f98dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 4107bd0f98dSmrg# Free Software Foundation, Inc. 4117bd0f98dSmrg# 4127bd0f98dSmrg# This file is free software; the Free Software Foundation 4137bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 4147bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 415cbeba4aeSmrg 4167bd0f98dSmrg# serial 8 417cbeba4aeSmrg 4187bd0f98dSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 4197bd0f98dSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420cbeba4aeSmrg 4217bd0f98dSmrg# Do all the work for Automake. -*- Autoconf -*- 422cbeba4aeSmrg 4237bd0f98dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4247bd0f98dSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 4257bd0f98dSmrg# 4267bd0f98dSmrg# This file is free software; the Free Software Foundation 4277bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 4287bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 429cbeba4aeSmrg 4307bd0f98dSmrg# serial 16 431cbeba4aeSmrg 4327bd0f98dSmrg# This macro actually does too much. Some checks are only needed if 4337bd0f98dSmrg# your package does certain things. But this isn't really a big deal. 4347bd0f98dSmrg 4357bd0f98dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4367bd0f98dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4377bd0f98dSmrg# ----------------------------------------------- 4387bd0f98dSmrg# The call with PACKAGE and VERSION arguments is the old style 4397bd0f98dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4407bd0f98dSmrg# and VERSION should now be passed to AC_INIT and removed from 4417bd0f98dSmrg# the call to AM_INIT_AUTOMAKE. 4427bd0f98dSmrg# We support both call styles for the transition. After 4437bd0f98dSmrg# the next Automake release, Autoconf can make the AC_INIT 4447bd0f98dSmrg# arguments mandatory, and then we can depend on a new Autoconf 4457bd0f98dSmrg# release and drop the old call support. 4467bd0f98dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4477bd0f98dSmrg[AC_PREREQ([2.62])dnl 4487bd0f98dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4497bd0f98dSmrgdnl the ones we care about. 4507bd0f98dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4517bd0f98dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4527bd0f98dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4537bd0f98dSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4547bd0f98dSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4557bd0f98dSmrg # is not polluted with repeated "-I." 4567bd0f98dSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4577bd0f98dSmrg # test to see if srcdir already configured 4587bd0f98dSmrg if test -f $srcdir/config.status; then 4597bd0f98dSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4607bd0f98dSmrg fi 461cbeba4aeSmrgfi 4627bd0f98dSmrg 4637bd0f98dSmrg# test whether we have cygpath 4647bd0f98dSmrgif test -z "$CYGPATH_W"; then 4657bd0f98dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4667bd0f98dSmrg CYGPATH_W='cygpath -w' 4677bd0f98dSmrg else 4687bd0f98dSmrg CYGPATH_W=echo 4697bd0f98dSmrg fi 470cbeba4aeSmrgfi 4717bd0f98dSmrgAC_SUBST([CYGPATH_W]) 472cbeba4aeSmrg 4737bd0f98dSmrg# Define the identity of the package. 4747bd0f98dSmrgdnl Distinguish between old-style and new-style calls. 4757bd0f98dSmrgm4_ifval([$2], 4767bd0f98dSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4777bd0f98dSmrg AC_SUBST([PACKAGE], [$1])dnl 4787bd0f98dSmrg AC_SUBST([VERSION], [$2])], 4797bd0f98dSmrg[_AM_SET_OPTIONS([$1])dnl 4807bd0f98dSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4817bd0f98dSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4827bd0f98dSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4837bd0f98dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4847bd0f98dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485cbeba4aeSmrg 4867bd0f98dSmrg_AM_IF_OPTION([no-define],, 4877bd0f98dSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4887bd0f98dSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489cbeba4aeSmrg 4907bd0f98dSmrg# Some tools Automake needs. 4917bd0f98dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4927bd0f98dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4937bd0f98dSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4947bd0f98dSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4957bd0f98dSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4967bd0f98dSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4977bd0f98dSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4987bd0f98dSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4997bd0f98dSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 5007bd0f98dSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 5017bd0f98dSmrg# We need awk for the "check" target. The system "awk" is bad on 5027bd0f98dSmrg# some platforms. 5037bd0f98dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5047bd0f98dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5057bd0f98dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5067bd0f98dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5077bd0f98dSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5087bd0f98dSmrg [_AM_PROG_TAR([v7])])]) 5097bd0f98dSmrg_AM_IF_OPTION([no-dependencies],, 5107bd0f98dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5117bd0f98dSmrg [_AM_DEPENDENCIES(CC)], 5127bd0f98dSmrg [define([AC_PROG_CC], 5137bd0f98dSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5147bd0f98dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5157bd0f98dSmrg [_AM_DEPENDENCIES(CXX)], 5167bd0f98dSmrg [define([AC_PROG_CXX], 5177bd0f98dSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5187bd0f98dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5197bd0f98dSmrg [_AM_DEPENDENCIES(OBJC)], 5207bd0f98dSmrg [define([AC_PROG_OBJC], 5217bd0f98dSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5227bd0f98dSmrg]) 5237bd0f98dSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5247bd0f98dSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 5257bd0f98dSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5267bd0f98dSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5277bd0f98dSmrgAC_CONFIG_COMMANDS_PRE(dnl 5287bd0f98dSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5297bd0f98dSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5307bd0f98dSmrg]) 531cbeba4aeSmrg 5327bd0f98dSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5337bd0f98dSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5347bd0f98dSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5357bd0f98dSmrgm4_define([_AC_COMPILER_EXEEXT], 5367bd0f98dSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537cbeba4aeSmrg 538cbeba4aeSmrg 5397bd0f98dSmrg# When config.status generates a header, we must update the stamp-h file. 5407bd0f98dSmrg# This file resides in the same directory as the config header 5417bd0f98dSmrg# that is generated. The stamp files are numbered to have different names. 5427bd0f98dSmrg 5437bd0f98dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5447bd0f98dSmrg# loop where config.status creates the headers, so we can generate 5457bd0f98dSmrg# our stamp files there. 5467bd0f98dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5477bd0f98dSmrg[# Compute $1's index in $config_headers. 5487bd0f98dSmrg_am_arg=$1 5497bd0f98dSmrg_am_stamp_count=1 5507bd0f98dSmrgfor _am_header in $config_headers :; do 5517bd0f98dSmrg case $_am_header in 5527bd0f98dSmrg $_am_arg | $_am_arg:* ) 5537bd0f98dSmrg break ;; 5547bd0f98dSmrg * ) 5557bd0f98dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5567bd0f98dSmrg esac 5577bd0f98dSmrgdone 5587bd0f98dSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559cbeba4aeSmrg 5607bd0f98dSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 5617bd0f98dSmrg# 5627bd0f98dSmrg# This file is free software; the Free Software Foundation 5637bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 5647bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 565cbeba4aeSmrg 5667bd0f98dSmrg# AM_PROG_INSTALL_SH 5677bd0f98dSmrg# ------------------ 5687bd0f98dSmrg# Define $install_sh. 5697bd0f98dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5707bd0f98dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5717bd0f98dSmrgif test x"${install_sh}" != xset; then 5727bd0f98dSmrg case $am_aux_dir in 5737bd0f98dSmrg *\ * | *\ *) 5747bd0f98dSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5757bd0f98dSmrg *) 5767bd0f98dSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5777bd0f98dSmrg esac 578cbeba4aeSmrgfi 5797bd0f98dSmrgAC_SUBST(install_sh)]) 580cbeba4aeSmrg 5817bd0f98dSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5827bd0f98dSmrg# 5837bd0f98dSmrg# This file is free software; the Free Software Foundation 5847bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 5857bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 586cbeba4aeSmrg 5877bd0f98dSmrg# serial 2 588cbeba4aeSmrg 5897bd0f98dSmrg# Check whether the underlying file-system supports filenames 5907bd0f98dSmrg# with a leading dot. For instance MS-DOS doesn't. 5917bd0f98dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 5927bd0f98dSmrg[rm -rf .tst 2>/dev/null 5937bd0f98dSmrgmkdir .tst 2>/dev/null 5947bd0f98dSmrgif test -d .tst; then 5957bd0f98dSmrg am__leading_dot=. 5967bd0f98dSmrgelse 5977bd0f98dSmrg am__leading_dot=_ 5987bd0f98dSmrgfi 5997bd0f98dSmrgrmdir .tst 2>/dev/null 6007bd0f98dSmrgAC_SUBST([am__leading_dot])]) 601cbeba4aeSmrg 6027bd0f98dSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6037bd0f98dSmrg# From Jim Meyering 604cbeba4aeSmrg 6057bd0f98dSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 6067bd0f98dSmrg# Free Software Foundation, Inc. 6077bd0f98dSmrg# 6087bd0f98dSmrg# This file is free software; the Free Software Foundation 6097bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 6107bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 611cbeba4aeSmrg 6127bd0f98dSmrg# serial 5 613cbeba4aeSmrg 6147bd0f98dSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 6157bd0f98dSmrg# ---------------------------------- 6167bd0f98dSmrg# Control maintainer-specific portions of Makefiles. 6177bd0f98dSmrg# Default is to disable them, unless `enable' is passed literally. 6187bd0f98dSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 6197bd0f98dSmrg# can override the default with the --enable/--disable switch. 620cbeba4aeSmrgAC_DEFUN([AM_MAINTAINER_MODE], 6217bd0f98dSmrg[m4_case(m4_default([$1], [disable]), 6227bd0f98dSmrg [enable], [m4_define([am_maintainer_other], [disable])], 6237bd0f98dSmrg [disable], [m4_define([am_maintainer_other], [enable])], 6247bd0f98dSmrg [m4_define([am_maintainer_other], [enable]) 6257bd0f98dSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6267bd0f98dSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 6277bd0f98dSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 6287bd0f98dSmrg AC_ARG_ENABLE([maintainer-mode], 6297bd0f98dSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 6307bd0f98dSmrg (and sometimes confusing) to the casual installer], 6317bd0f98dSmrg [USE_MAINTAINER_MODE=$enableval], 6327bd0f98dSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633cbeba4aeSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6347bd0f98dSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635cbeba4aeSmrg MAINT=$MAINTAINER_MODE_TRUE 6367bd0f98dSmrg AC_SUBST([MAINT])dnl 637cbeba4aeSmrg] 638cbeba4aeSmrg) 639cbeba4aeSmrg 640cbeba4aeSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641cbeba4aeSmrg 6427bd0f98dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643cbeba4aeSmrg 6447bd0f98dSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 6457bd0f98dSmrg# 6467bd0f98dSmrg# This file is free software; the Free Software Foundation 6477bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 6487bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 649cbeba4aeSmrg 6507bd0f98dSmrg# serial 4 651cbeba4aeSmrg 6527bd0f98dSmrg# AM_MAKE_INCLUDE() 6537bd0f98dSmrg# ----------------- 6547bd0f98dSmrg# Check to see how make treats includes. 6557bd0f98dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6567bd0f98dSmrg[am_make=${MAKE-make} 6577bd0f98dSmrgcat > confinc << 'END' 6587bd0f98dSmrgam__doit: 6597bd0f98dSmrg @echo this is the am__doit target 6607bd0f98dSmrg.PHONY: am__doit 6617bd0f98dSmrgEND 6627bd0f98dSmrg# If we don't find an include directive, just comment out the code. 6637bd0f98dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6647bd0f98dSmrgam__include="#" 6657bd0f98dSmrgam__quote= 6667bd0f98dSmrg_am_result=none 6677bd0f98dSmrg# First try GNU make style include. 6687bd0f98dSmrgecho "include confinc" > confmf 6697bd0f98dSmrg# Ignore all kinds of additional output from `make'. 6707bd0f98dSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6717bd0f98dSmrg*the\ am__doit\ target*) 6727bd0f98dSmrg am__include=include 6737bd0f98dSmrg am__quote= 6747bd0f98dSmrg _am_result=GNU 6757bd0f98dSmrg ;; 6767bd0f98dSmrgesac 6777bd0f98dSmrg# Now try BSD make style include. 6787bd0f98dSmrgif test "$am__include" = "#"; then 6797bd0f98dSmrg echo '.include "confinc"' > confmf 6807bd0f98dSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 6817bd0f98dSmrg *the\ am__doit\ target*) 6827bd0f98dSmrg am__include=.include 6837bd0f98dSmrg am__quote="\"" 6847bd0f98dSmrg _am_result=BSD 6857bd0f98dSmrg ;; 6867bd0f98dSmrg esac 6877bd0f98dSmrgfi 6887bd0f98dSmrgAC_SUBST([am__include]) 6897bd0f98dSmrgAC_SUBST([am__quote]) 6907bd0f98dSmrgAC_MSG_RESULT([$_am_result]) 6917bd0f98dSmrgrm -f confinc confmf 6927bd0f98dSmrg]) 693cbeba4aeSmrg 6947bd0f98dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695cbeba4aeSmrg 6967bd0f98dSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 6977bd0f98dSmrg# Free Software Foundation, Inc. 6987bd0f98dSmrg# 6997bd0f98dSmrg# This file is free software; the Free Software Foundation 7007bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 7017bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 702cbeba4aeSmrg 703cbeba4aeSmrg# serial 6 704cbeba4aeSmrg 7057bd0f98dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7067bd0f98dSmrg# ------------------------------ 7077bd0f98dSmrgAC_DEFUN([AM_MISSING_PROG], 7087bd0f98dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7097bd0f98dSmrg$1=${$1-"${am_missing_run}$2"} 7107bd0f98dSmrgAC_SUBST($1)]) 711cbeba4aeSmrg 712cbeba4aeSmrg 7137bd0f98dSmrg# AM_MISSING_HAS_RUN 7147bd0f98dSmrg# ------------------ 7157bd0f98dSmrg# Define MISSING if not defined so far and test if it supports --run. 7167bd0f98dSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7177bd0f98dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7187bd0f98dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7197bd0f98dSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7207bd0f98dSmrgif test x"${MISSING+set}" != xset; then 7217bd0f98dSmrg case $am_aux_dir in 7227bd0f98dSmrg *\ * | *\ *) 7237bd0f98dSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7247bd0f98dSmrg *) 7257bd0f98dSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7267bd0f98dSmrg esac 7277bd0f98dSmrgfi 7287bd0f98dSmrg# Use eval to expand $SHELL 7297bd0f98dSmrgif eval "$MISSING --run true"; then 7307bd0f98dSmrg am_missing_run="$MISSING --run " 7317bd0f98dSmrgelse 7327bd0f98dSmrg am_missing_run= 7337bd0f98dSmrg AC_MSG_WARN([`missing' script is too old or missing]) 7347bd0f98dSmrgfi 7357bd0f98dSmrg]) 736cbeba4aeSmrg 7377bd0f98dSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7387bd0f98dSmrg# 7397bd0f98dSmrg# This file is free software; the Free Software Foundation 7407bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 7417bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 742cbeba4aeSmrg 7437bd0f98dSmrg# AM_PROG_MKDIR_P 7447bd0f98dSmrg# --------------- 7457bd0f98dSmrg# Check for `mkdir -p'. 7467bd0f98dSmrgAC_DEFUN([AM_PROG_MKDIR_P], 7477bd0f98dSmrg[AC_PREREQ([2.60])dnl 7487bd0f98dSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7497bd0f98dSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7507bd0f98dSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 7517bd0f98dSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7527bd0f98dSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7537bd0f98dSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7547bd0f98dSmrgdnl adjustment using top_builddir (which is defined more often than 7557bd0f98dSmrgdnl MKDIR_P). 7567bd0f98dSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7577bd0f98dSmrgcase $mkdir_p in 7587bd0f98dSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 7597bd0f98dSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7607bd0f98dSmrgesac 761cbeba4aeSmrg]) 762cbeba4aeSmrg 7637bd0f98dSmrg# Helper functions for option handling. -*- Autoconf -*- 7647bd0f98dSmrg 7657bd0f98dSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766cbeba4aeSmrg# 7677bd0f98dSmrg# This file is free software; the Free Software Foundation 7687bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 7697bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 770cbeba4aeSmrg 7717bd0f98dSmrg# serial 4 7727bd0f98dSmrg 7737bd0f98dSmrg# _AM_MANGLE_OPTION(NAME) 7747bd0f98dSmrg# ----------------------- 7757bd0f98dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7767bd0f98dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7777bd0f98dSmrg 7787bd0f98dSmrg# _AM_SET_OPTION(NAME) 7797bd0f98dSmrg# ------------------------------ 7807bd0f98dSmrg# Set option NAME. Presently that only means defining a flag for this option. 7817bd0f98dSmrgAC_DEFUN([_AM_SET_OPTION], 7827bd0f98dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7837bd0f98dSmrg 7847bd0f98dSmrg# _AM_SET_OPTIONS(OPTIONS) 785cbeba4aeSmrg# ---------------------------------- 7867bd0f98dSmrg# OPTIONS is a space-separated list of Automake options. 7877bd0f98dSmrgAC_DEFUN([_AM_SET_OPTIONS], 7887bd0f98dSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789cbeba4aeSmrg 7907bd0f98dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7917bd0f98dSmrg# ------------------------------------------- 7927bd0f98dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7937bd0f98dSmrgAC_DEFUN([_AM_IF_OPTION], 7947bd0f98dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7957bd0f98dSmrg 7967bd0f98dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7977bd0f98dSmrg 7987bd0f98dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 7997bd0f98dSmrg# Free Software Foundation, Inc. 800cbeba4aeSmrg# 8017bd0f98dSmrg# This file is free software; the Free Software Foundation 8027bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 8037bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 804cbeba4aeSmrg 8057bd0f98dSmrg# serial 5 806cbeba4aeSmrg 8077bd0f98dSmrg# AM_SANITY_CHECK 8087bd0f98dSmrg# --------------- 8097bd0f98dSmrgAC_DEFUN([AM_SANITY_CHECK], 8107bd0f98dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8117bd0f98dSmrg# Just in case 8127bd0f98dSmrgsleep 1 8137bd0f98dSmrgecho timestamp > conftest.file 8147bd0f98dSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8157bd0f98dSmrg# name. Accept space and tab only in the latter. 8167bd0f98dSmrgam_lf=' 8177bd0f98dSmrg' 8187bd0f98dSmrgcase `pwd` in 8197bd0f98dSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8207bd0f98dSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8217bd0f98dSmrgesac 8227bd0f98dSmrgcase $srcdir in 8237bd0f98dSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8247bd0f98dSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8257bd0f98dSmrgesac 826cbeba4aeSmrg 8277bd0f98dSmrg# Do `set' in a subshell so we don't clobber the current shell's 8287bd0f98dSmrg# arguments. Must try -L first in case configure is actually a 8297bd0f98dSmrg# symlink; some systems play weird games with the mod time of symlinks 8307bd0f98dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8317bd0f98dSmrg# directory). 8327bd0f98dSmrgif ( 8337bd0f98dSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8347bd0f98dSmrg if test "$[*]" = "X"; then 8357bd0f98dSmrg # -L didn't work. 8367bd0f98dSmrg set X `ls -t "$srcdir/configure" conftest.file` 8377bd0f98dSmrg fi 8387bd0f98dSmrg rm -f conftest.file 8397bd0f98dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8407bd0f98dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8417bd0f98dSmrg 8427bd0f98dSmrg # If neither matched, then we have a broken ls. This can happen 8437bd0f98dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8447bd0f98dSmrg # broken ls alias from the environment. This has actually 8457bd0f98dSmrg # happened. Such a system could not be considered "sane". 8467bd0f98dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8477bd0f98dSmrgalias in your environment]) 8487bd0f98dSmrg fi 849cbeba4aeSmrg 8507bd0f98dSmrg test "$[2]" = conftest.file 8517bd0f98dSmrg ) 8527bd0f98dSmrgthen 8537bd0f98dSmrg # Ok. 8547bd0f98dSmrg : 8557bd0f98dSmrgelse 8567bd0f98dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8577bd0f98dSmrgCheck your system clock]) 8587bd0f98dSmrgfi 8597bd0f98dSmrgAC_MSG_RESULT(yes)]) 860cbeba4aeSmrg 8617bd0f98dSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 862cbeba4aeSmrg# 8637bd0f98dSmrg# This file is free software; the Free Software Foundation 8647bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 8657bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 8667bd0f98dSmrg 8677bd0f98dSmrg# serial 1 8687bd0f98dSmrg 8697bd0f98dSmrg# AM_SILENT_RULES([DEFAULT]) 8707bd0f98dSmrg# -------------------------- 8717bd0f98dSmrg# Enable less verbose build rules; with the default set to DEFAULT 8727bd0f98dSmrg# (`yes' being less verbose, `no' or empty being verbose). 8737bd0f98dSmrgAC_DEFUN([AM_SILENT_RULES], 8747bd0f98dSmrg[AC_ARG_ENABLE([silent-rules], 8757bd0f98dSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8767bd0f98dSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8777bd0f98dSmrgcase $enable_silent_rules in 8787bd0f98dSmrgyes) AM_DEFAULT_VERBOSITY=0;; 8797bd0f98dSmrgno) AM_DEFAULT_VERBOSITY=1;; 8807bd0f98dSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8817bd0f98dSmrgesac 8827bd0f98dSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8837bd0f98dSmrgAM_BACKSLASH='\' 8847bd0f98dSmrgAC_SUBST([AM_BACKSLASH])dnl 8857bd0f98dSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8867bd0f98dSmrg]) 8877bd0f98dSmrg 8887bd0f98dSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889cbeba4aeSmrg# 8907bd0f98dSmrg# This file is free software; the Free Software Foundation 8917bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 8927bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 8937bd0f98dSmrg 8947bd0f98dSmrg# AM_PROG_INSTALL_STRIP 8957bd0f98dSmrg# --------------------- 8967bd0f98dSmrg# One issue with vendor `install' (even GNU) is that you can't 8977bd0f98dSmrg# specify the program used to strip binaries. This is especially 8987bd0f98dSmrg# annoying in cross-compiling environments, where the build's strip 8997bd0f98dSmrg# is unlikely to handle the host's binaries. 9007bd0f98dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9017bd0f98dSmrg# always use install-sh in `make install-strip', and initialize 9027bd0f98dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9037bd0f98dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9047bd0f98dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9057bd0f98dSmrg# Installed binaries are usually stripped using `strip' when the user 9067bd0f98dSmrg# run `make install-strip'. However `strip' might not be the right 9077bd0f98dSmrg# tool to use in cross-compilation environments, therefore Automake 9087bd0f98dSmrg# will honor the `STRIP' environment variable to overrule this program. 9097bd0f98dSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9107bd0f98dSmrgif test "$cross_compiling" != no; then 9117bd0f98dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9127bd0f98dSmrgfi 9137bd0f98dSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9147bd0f98dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9157bd0f98dSmrg 9167bd0f98dSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 917cbeba4aeSmrg# 9187bd0f98dSmrg# This file is free software; the Free Software Foundation 9197bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 9207bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 921cbeba4aeSmrg 9227bd0f98dSmrg# serial 2 923cbeba4aeSmrg 9247bd0f98dSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9257bd0f98dSmrg# --------------------------- 9267bd0f98dSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9277bd0f98dSmrg# This macro is traced by Automake. 9287bd0f98dSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929cbeba4aeSmrg 9307bd0f98dSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9317bd0f98dSmrg# --------------------------- 9327bd0f98dSmrg# Public sister of _AM_SUBST_NOTMAKE. 9337bd0f98dSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934cbeba4aeSmrg 9357bd0f98dSmrg# Check how to create a tarball. -*- Autoconf -*- 936cbeba4aeSmrg 9377bd0f98dSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9387bd0f98dSmrg# 9397bd0f98dSmrg# This file is free software; the Free Software Foundation 9407bd0f98dSmrg# gives unlimited permission to copy and/or distribute it, 9417bd0f98dSmrg# with or without modifications, as long as this notice is preserved. 942cbeba4aeSmrg 9437bd0f98dSmrg# serial 2 944cbeba4aeSmrg 9457bd0f98dSmrg# _AM_PROG_TAR(FORMAT) 9467bd0f98dSmrg# -------------------- 9477bd0f98dSmrg# Check how to create a tarball in format FORMAT. 9487bd0f98dSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9497bd0f98dSmrg# 9507bd0f98dSmrg# Substitute a variable $(am__tar) that is a command 9517bd0f98dSmrg# writing to stdout a FORMAT-tarball containing the directory 9527bd0f98dSmrg# $tardir. 9537bd0f98dSmrg# tardir=directory && $(am__tar) > result.tar 9547bd0f98dSmrg# 9557bd0f98dSmrg# Substitute a variable $(am__untar) that extract such 9567bd0f98dSmrg# a tarball read from stdin. 9577bd0f98dSmrg# $(am__untar) < result.tar 9587bd0f98dSmrgAC_DEFUN([_AM_PROG_TAR], 9597bd0f98dSmrg[# Always define AMTAR for backward compatibility. 9607bd0f98dSmrgAM_MISSING_PROG([AMTAR], [tar]) 9617bd0f98dSmrgm4_if([$1], [v7], 9627bd0f98dSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9637bd0f98dSmrg [m4_case([$1], [ustar],, [pax],, 9647bd0f98dSmrg [m4_fatal([Unknown tar format])]) 9657bd0f98dSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9667bd0f98dSmrg# Loop over all known methods to create a tar archive until one works. 9677bd0f98dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9687bd0f98dSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9697bd0f98dSmrg# Do not fold the above two line into one, because Tru64 sh and 9707bd0f98dSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9717bd0f98dSmrgfor _am_tool in $_am_tools 9727bd0f98dSmrgdo 9737bd0f98dSmrg case $_am_tool in 9747bd0f98dSmrg gnutar) 9757bd0f98dSmrg for _am_tar in tar gnutar gtar; 9767bd0f98dSmrg do 9777bd0f98dSmrg AM_RUN_LOG([$_am_tar --version]) && break 9787bd0f98dSmrg done 9797bd0f98dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9807bd0f98dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9817bd0f98dSmrg am__untar="$_am_tar -xf -" 9827bd0f98dSmrg ;; 9837bd0f98dSmrg plaintar) 9847bd0f98dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9857bd0f98dSmrg # ustar tarball either. 9867bd0f98dSmrg (tar --version) >/dev/null 2>&1 && continue 9877bd0f98dSmrg am__tar='tar chf - "$$tardir"' 9887bd0f98dSmrg am__tar_='tar chf - "$tardir"' 9897bd0f98dSmrg am__untar='tar xf -' 9907bd0f98dSmrg ;; 9917bd0f98dSmrg pax) 9927bd0f98dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9937bd0f98dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9947bd0f98dSmrg am__untar='pax -r' 9957bd0f98dSmrg ;; 9967bd0f98dSmrg cpio) 9977bd0f98dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9987bd0f98dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9997bd0f98dSmrg am__untar='cpio -i -H $1 -d' 10007bd0f98dSmrg ;; 10017bd0f98dSmrg none) 10027bd0f98dSmrg am__tar=false 10037bd0f98dSmrg am__tar_=false 10047bd0f98dSmrg am__untar=false 10057bd0f98dSmrg ;; 10067bd0f98dSmrg esac 1007cbeba4aeSmrg 10087bd0f98dSmrg # If the value was cached, stop now. We just wanted to have am__tar 10097bd0f98dSmrg # and am__untar set. 10107bd0f98dSmrg test -n "${am_cv_prog_tar_$1}" && break 1011cbeba4aeSmrg 10127bd0f98dSmrg # tar/untar a dummy directory, and stop if the command works 10137bd0f98dSmrg rm -rf conftest.dir 10147bd0f98dSmrg mkdir conftest.dir 10157bd0f98dSmrg echo GrepMe > conftest.dir/file 10167bd0f98dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10177bd0f98dSmrg rm -rf conftest.dir 10187bd0f98dSmrg if test -s conftest.tar; then 10197bd0f98dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10207bd0f98dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10217bd0f98dSmrg fi 10227bd0f98dSmrgdone 10237bd0f98dSmrgrm -rf conftest.dir 1024cbeba4aeSmrg 10257bd0f98dSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10267bd0f98dSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10277bd0f98dSmrgAC_SUBST([am__tar]) 10287bd0f98dSmrgAC_SUBST([am__untar]) 10297bd0f98dSmrg]) # _AM_PROG_TAR 1030cbeba4aeSmrg 10317bd0f98dSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032cbeba4aeSmrgdnl 10337bd0f98dSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1034cbeba4aeSmrgdnl 10357bd0f98dSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 10367bd0f98dSmrgdnl copy of this software and associated documentation files (the 10377bd0f98dSmrgdnl "Software"), to deal in the Software without restriction, including 10387bd0f98dSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 10397bd0f98dSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 10407bd0f98dSmrgdnl to whom the Software is furnished to do so, provided that the above 10417bd0f98dSmrgdnl copyright notice(s) and this permission notice appear in all copies of 10427bd0f98dSmrgdnl the Software and that both the above copyright notice(s) and this 10437bd0f98dSmrgdnl permission notice appear in supporting documentation. 10447bd0f98dSmrgdnl 1045cbeba4aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1046cbeba4aeSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10477bd0f98dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 10487bd0f98dSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 10497bd0f98dSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 10507bd0f98dSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 10517bd0f98dSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 10527bd0f98dSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 10537bd0f98dSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 10547bd0f98dSmrgdnl 10557bd0f98dSmrgdnl Except as contained in this notice, the name of a copyright holder 10567bd0f98dSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 10577bd0f98dSmrgdnl or other dealings in this Software without prior written authorization 10587bd0f98dSmrgdnl of the copyright holder. 10597bd0f98dSmrg 10607bd0f98dSmrg# XORG_MACROS_VERSION(required-version) 10617bd0f98dSmrg# ------------------------------------- 10627bd0f98dSmrg# Minimum version: 1.1.0 10637bd0f98dSmrg# 10647bd0f98dSmrg# If you're using a macro added in Version 1.1 or newer, include this in 10657bd0f98dSmrg# your configure.ac with the minimum required version, such as: 10667bd0f98dSmrg# XORG_MACROS_VERSION(1.1) 10677bd0f98dSmrg# 10687bd0f98dSmrg# To ensure that this macro is defined, also add: 10697bd0f98dSmrg# m4_ifndef([XORG_MACROS_VERSION], 10707bd0f98dSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10717bd0f98dSmrg# 10727bd0f98dSmrg# 10737bd0f98dSmrg# See the "minimum version" comment for each macro you use to see what 10747bd0f98dSmrg# version you require. 10757bd0f98dSmrgm4_defun([XORG_MACROS_VERSION],[ 10767bd0f98dSmrgm4_define([vers_have], [1.3.0]) 10777bd0f98dSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 10787bd0f98dSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 10797bd0f98dSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 10807bd0f98dSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 10817bd0f98dSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 10827bd0f98dSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 10837bd0f98dSmrgm4_undefine([vers_have]) 10847bd0f98dSmrgm4_undefine([maj_have]) 10857bd0f98dSmrgm4_undefine([maj_needed]) 10867bd0f98dSmrg]) # XORG_MACROS_VERSION 1087cbeba4aeSmrg 1088cbeba4aeSmrg# XORG_PROG_RAWCPP() 1089cbeba4aeSmrg# ------------------ 10907bd0f98dSmrg# Minimum version: 1.0.0 10917bd0f98dSmrg# 1092cbeba4aeSmrg# Find cpp program and necessary flags for use in pre-processing text files 1093cbeba4aeSmrg# such as man pages and config files 1094cbeba4aeSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1095cbeba4aeSmrgAC_REQUIRE([AC_PROG_CPP]) 1096cbeba4aeSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1097cbeba4aeSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1098cbeba4aeSmrg 1099cbeba4aeSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1100cbeba4aeSmrg# which is not the best choice for supporting other OS'es, but covers most 1101cbeba4aeSmrg# of the ones we need for now. 1102cbeba4aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1103cbeba4aeSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1104cbeba4aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1105cbeba4aeSmrg AC_MSG_RESULT([no]) 1106cbeba4aeSmrgelse 1107cbeba4aeSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1108cbeba4aeSmrg RAWCPPFLAGS=-undef 1109cbeba4aeSmrg AC_MSG_RESULT([yes]) 11107bd0f98dSmrg # under Cygwin unix is still defined even with -undef 11117bd0f98dSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11127bd0f98dSmrg RAWCPPFLAGS="-undef -ansi" 11137bd0f98dSmrg AC_MSG_RESULT([yes, with -ansi]) 1114cbeba4aeSmrg else 1115cbeba4aeSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1116cbeba4aeSmrg fi 1117cbeba4aeSmrgfi 1118cbeba4aeSmrgrm -f conftest.$ac_ext 1119cbeba4aeSmrg 1120cbeba4aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1121cbeba4aeSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1122cbeba4aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1123cbeba4aeSmrg AC_MSG_RESULT([no]) 1124cbeba4aeSmrgelse 1125cbeba4aeSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1126cbeba4aeSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1127cbeba4aeSmrg AC_MSG_RESULT([yes]) 1128cbeba4aeSmrg else 1129cbeba4aeSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1130cbeba4aeSmrg fi 1131cbeba4aeSmrgfi 1132cbeba4aeSmrgrm -f conftest.$ac_ext 1133cbeba4aeSmrgAC_SUBST(RAWCPPFLAGS) 1134cbeba4aeSmrg]) # XORG_PROG_RAWCPP 1135cbeba4aeSmrg 1136cbeba4aeSmrg# XORG_MANPAGE_SECTIONS() 1137cbeba4aeSmrg# ----------------------- 11387bd0f98dSmrg# Minimum version: 1.0.0 11397bd0f98dSmrg# 1140cbeba4aeSmrg# Determine which sections man pages go in for the different man page types 1141cbeba4aeSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1142cbeba4aeSmrg# Not sure if there's any better way than just hardcoding by OS name. 1143cbeba4aeSmrg# Override default settings by setting environment variables 1144cbeba4aeSmrg 1145cbeba4aeSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1146cbeba4aeSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1147cbeba4aeSmrg 1148cbeba4aeSmrgif test x$APP_MAN_SUFFIX = x ; then 11497bd0f98dSmrg APP_MAN_SUFFIX=1 1150cbeba4aeSmrgfi 1151cbeba4aeSmrgif test x$APP_MAN_DIR = x ; then 11527bd0f98dSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1153cbeba4aeSmrgfi 1154cbeba4aeSmrg 1155cbeba4aeSmrgif test x$LIB_MAN_SUFFIX = x ; then 11567bd0f98dSmrg LIB_MAN_SUFFIX=3 1157cbeba4aeSmrgfi 1158cbeba4aeSmrgif test x$LIB_MAN_DIR = x ; then 11597bd0f98dSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1160cbeba4aeSmrgfi 1161cbeba4aeSmrg 1162cbeba4aeSmrgif test x$FILE_MAN_SUFFIX = x ; then 1163cbeba4aeSmrg case $host_os in 1164cbeba4aeSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1165cbeba4aeSmrg *) FILE_MAN_SUFFIX=5 ;; 1166cbeba4aeSmrg esac 1167cbeba4aeSmrgfi 1168cbeba4aeSmrgif test x$FILE_MAN_DIR = x ; then 11697bd0f98dSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1170cbeba4aeSmrgfi 1171cbeba4aeSmrg 1172cbeba4aeSmrgif test x$MISC_MAN_SUFFIX = x ; then 1173cbeba4aeSmrg case $host_os in 1174cbeba4aeSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1175cbeba4aeSmrg *) MISC_MAN_SUFFIX=7 ;; 1176cbeba4aeSmrg esac 1177cbeba4aeSmrgfi 1178cbeba4aeSmrgif test x$MISC_MAN_DIR = x ; then 11797bd0f98dSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1180cbeba4aeSmrgfi 1181cbeba4aeSmrg 1182cbeba4aeSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1183cbeba4aeSmrg case $host_os in 1184cbeba4aeSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1185cbeba4aeSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1186cbeba4aeSmrg esac 1187cbeba4aeSmrgfi 1188cbeba4aeSmrgif test x$DRIVER_MAN_DIR = x ; then 11897bd0f98dSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1190cbeba4aeSmrgfi 1191cbeba4aeSmrg 1192cbeba4aeSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1193cbeba4aeSmrg case $host_os in 1194cbeba4aeSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1195cbeba4aeSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1196cbeba4aeSmrg esac 1197cbeba4aeSmrgfi 1198cbeba4aeSmrgif test x$ADMIN_MAN_DIR = x ; then 1199cbeba4aeSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1200cbeba4aeSmrgfi 1201cbeba4aeSmrg 1202cbeba4aeSmrg 1203cbeba4aeSmrgAC_SUBST([APP_MAN_SUFFIX]) 1204cbeba4aeSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1205cbeba4aeSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1206cbeba4aeSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1207cbeba4aeSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1208cbeba4aeSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1209cbeba4aeSmrgAC_SUBST([APP_MAN_DIR]) 1210cbeba4aeSmrgAC_SUBST([LIB_MAN_DIR]) 1211cbeba4aeSmrgAC_SUBST([FILE_MAN_DIR]) 1212cbeba4aeSmrgAC_SUBST([MISC_MAN_DIR]) 1213cbeba4aeSmrgAC_SUBST([DRIVER_MAN_DIR]) 1214cbeba4aeSmrgAC_SUBST([ADMIN_MAN_DIR]) 1215cbeba4aeSmrg]) # XORG_MANPAGE_SECTIONS 1216cbeba4aeSmrg 1217cbeba4aeSmrg# XORG_CHECK_LINUXDOC 1218cbeba4aeSmrg# ------------------- 12197bd0f98dSmrg# Minimum version: 1.0.0 12207bd0f98dSmrg# 1221cbeba4aeSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1222cbeba4aeSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1223cbeba4aeSmrg# Whether or not the necessary tools and files are found can be checked 1224cbeba4aeSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1225cbeba4aeSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12267bd0f98dSmrgif test x$XORG_SGML_PATH = x ; then 12277bd0f98dSmrg XORG_SGML_PATH=$prefix/share/sgml 12287bd0f98dSmrgfi 12297bd0f98dSmrgHAVE_DEFS_ENT= 12307bd0f98dSmrg 12317bd0f98dSmrgif test x"$cross_compiling" = x"yes" ; then 12327bd0f98dSmrg HAVE_DEFS_ENT=no 12337bd0f98dSmrgelse 12347bd0f98dSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12357bd0f98dSmrgfi 1236cbeba4aeSmrg 1237cbeba4aeSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1238cbeba4aeSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1239cbeba4aeSmrg 1240cbeba4aeSmrgAC_MSG_CHECKING([Whether to build documentation]) 1241cbeba4aeSmrg 12427bd0f98dSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1243cbeba4aeSmrg BUILDDOC=yes 1244cbeba4aeSmrgelse 1245cbeba4aeSmrg BUILDDOC=no 1246cbeba4aeSmrgfi 1247cbeba4aeSmrg 1248cbeba4aeSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1249cbeba4aeSmrg 1250cbeba4aeSmrgAC_MSG_RESULT([$BUILDDOC]) 1251cbeba4aeSmrg 1252cbeba4aeSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1253cbeba4aeSmrg 12547bd0f98dSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1255cbeba4aeSmrg BUILDPDFDOC=yes 1256cbeba4aeSmrgelse 1257cbeba4aeSmrg BUILDPDFDOC=no 1258cbeba4aeSmrgfi 1259cbeba4aeSmrg 1260cbeba4aeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1261cbeba4aeSmrg 1262cbeba4aeSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1263cbeba4aeSmrg 12647bd0f98dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 12657bd0f98dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1266cbeba4aeSmrgMAKE_PDF="$PS2PDF" 12677bd0f98dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1268cbeba4aeSmrg 1269cbeba4aeSmrgAC_SUBST(MAKE_TEXT) 1270cbeba4aeSmrgAC_SUBST(MAKE_PS) 1271cbeba4aeSmrgAC_SUBST(MAKE_PDF) 1272cbeba4aeSmrgAC_SUBST(MAKE_HTML) 1273cbeba4aeSmrg]) # XORG_CHECK_LINUXDOC 1274cbeba4aeSmrg 12757bd0f98dSmrg# XORG_CHECK_DOCBOOK 12767bd0f98dSmrg# ------------------- 12777bd0f98dSmrg# Minimum version: 1.0.0 12787bd0f98dSmrg# 12797bd0f98dSmrg# Checks for the ability to build output formats from SGML DocBook source. 12807bd0f98dSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 12817bd0f98dSmrg# indicates whether the necessary tools and files are found and, if set, 12827bd0f98dSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 12837bd0f98dSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 12847bd0f98dSmrgif test x$XORG_SGML_PATH = x ; then 12857bd0f98dSmrg XORG_SGML_PATH=$prefix/share/sgml 12867bd0f98dSmrgfi 12877bd0f98dSmrgHAVE_DEFS_ENT= 12887bd0f98dSmrgBUILDTXTDOC=no 12897bd0f98dSmrgBUILDPDFDOC=no 12907bd0f98dSmrgBUILDPSDOC=no 12917bd0f98dSmrgBUILDHTMLDOC=no 12927bd0f98dSmrg 12937bd0f98dSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12947bd0f98dSmrg 12957bd0f98dSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 12967bd0f98dSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 12977bd0f98dSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 12987bd0f98dSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 12997bd0f98dSmrg 13007bd0f98dSmrgAC_MSG_CHECKING([Whether to build text documentation]) 13017bd0f98dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 13027bd0f98dSmrg test x$BUILD_TXTDOC != xno; then 13037bd0f98dSmrg BUILDTXTDOC=yes 13047bd0f98dSmrgfi 13057bd0f98dSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13067bd0f98dSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13077bd0f98dSmrg 13087bd0f98dSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 13097bd0f98dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 13107bd0f98dSmrg test x$BUILD_PDFDOC != xno; then 13117bd0f98dSmrg BUILDPDFDOC=yes 13127bd0f98dSmrgfi 13137bd0f98dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13147bd0f98dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13157bd0f98dSmrg 13167bd0f98dSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 13177bd0f98dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 13187bd0f98dSmrg test x$BUILD_PSDOC != xno; then 13197bd0f98dSmrg BUILDPSDOC=yes 13207bd0f98dSmrgfi 13217bd0f98dSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13227bd0f98dSmrgAC_MSG_RESULT([$BUILDPSDOC]) 13237bd0f98dSmrg 13247bd0f98dSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 13257bd0f98dSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 13267bd0f98dSmrg test x$BUILD_HTMLDOC != xno; then 13277bd0f98dSmrg BUILDHTMLDOC=yes 13287bd0f98dSmrgfi 13297bd0f98dSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13307bd0f98dSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13317bd0f98dSmrg 13327bd0f98dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13337bd0f98dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13347bd0f98dSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13357bd0f98dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13367bd0f98dSmrg 13377bd0f98dSmrgAC_SUBST(MAKE_TEXT) 13387bd0f98dSmrgAC_SUBST(MAKE_PS) 13397bd0f98dSmrgAC_SUBST(MAKE_PDF) 13407bd0f98dSmrgAC_SUBST(MAKE_HTML) 13417bd0f98dSmrg]) # XORG_CHECK_DOCBOOK 13427bd0f98dSmrg 1343cbeba4aeSmrg# XORG_CHECK_MALLOC_ZERO 1344cbeba4aeSmrg# ---------------------- 13457bd0f98dSmrg# Minimum version: 1.0.0 13467bd0f98dSmrg# 1347cbeba4aeSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1348cbeba4aeSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1349cbeba4aeSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1350cbeba4aeSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1351cbeba4aeSmrgAC_ARG_ENABLE(malloc0returnsnull, 13527bd0f98dSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1353cbeba4aeSmrg [malloc(0) returns NULL (default: auto)]), 1354cbeba4aeSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1355cbeba4aeSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1356cbeba4aeSmrg 1357cbeba4aeSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1358cbeba4aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1359cbeba4aeSmrg AC_RUN_IFELSE([ 1360cbeba4aeSmrgchar *malloc(); 1361cbeba4aeSmrgchar *realloc(); 1362cbeba4aeSmrgchar *calloc(); 1363cbeba4aeSmrgmain() { 1364cbeba4aeSmrg char *m0, *r0, *c0, *p; 1365cbeba4aeSmrg m0 = malloc(0); 1366cbeba4aeSmrg p = malloc(10); 1367cbeba4aeSmrg r0 = realloc(p,0); 1368cbeba4aeSmrg c0 = calloc(0); 1369cbeba4aeSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1370cbeba4aeSmrg}], 1371cbeba4aeSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1372cbeba4aeSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 1373cbeba4aeSmrgfi 1374cbeba4aeSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1375cbeba4aeSmrg 1376cbeba4aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1377cbeba4aeSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1378cbeba4aeSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1379cbeba4aeSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1380cbeba4aeSmrgelse 1381cbeba4aeSmrg MALLOC_ZERO_CFLAGS="" 1382cbeba4aeSmrg XMALLOC_ZERO_CFLAGS="" 1383cbeba4aeSmrg XTMALLOC_ZERO_CFLAGS="" 1384cbeba4aeSmrgfi 1385cbeba4aeSmrg 1386cbeba4aeSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1387cbeba4aeSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1388cbeba4aeSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1389cbeba4aeSmrg]) # XORG_CHECK_MALLOC_ZERO 1390cbeba4aeSmrg 13917bd0f98dSmrg# XORG_WITH_LINT() 13927bd0f98dSmrg# ---------------- 13937bd0f98dSmrg# Minimum version: 1.1.0 13947bd0f98dSmrg# 13957bd0f98dSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 13967bd0f98dSmrg# is specified. (Use --with-lint=sparse for sparse.) 13977bd0f98dSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 13987bd0f98dSmrg# Sets $LINT_FLAGS to flags to pass to source checker 13997bd0f98dSmrg# Sets LINT automake conditional if enabled (default: disabled) 14007bd0f98dSmrg# 14017bd0f98dSmrgAC_DEFUN([XORG_WITH_LINT],[ 14027bd0f98dSmrg 14037bd0f98dSmrg# Allow checking code with lint, sparse, etc. 14047bd0f98dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 14057bd0f98dSmrg [Use a lint-style source code checker (default: disabled)])], 14067bd0f98dSmrg [use_lint=$withval], [use_lint=no]) 14077bd0f98dSmrgif test "x$use_lint" = "xyes" ; then 14087bd0f98dSmrg LINT="lint" 14097bd0f98dSmrgelse 14107bd0f98dSmrg LINT="$use_lint" 14117bd0f98dSmrgfi 14127bd0f98dSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 14137bd0f98dSmrg case $LINT in 14147bd0f98dSmrg lint|*/lint) 14157bd0f98dSmrg case $host_os in 14167bd0f98dSmrg solaris*) 14177bd0f98dSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 14187bd0f98dSmrg ;; 14197bd0f98dSmrg esac 14207bd0f98dSmrg ;; 14217bd0f98dSmrg esac 14227bd0f98dSmrgfi 14237bd0f98dSmrg 14247bd0f98dSmrgAC_SUBST(LINT) 14257bd0f98dSmrgAC_SUBST(LINT_FLAGS) 14267bd0f98dSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 14277bd0f98dSmrg 14287bd0f98dSmrg]) # XORG_WITH_LINT 14297bd0f98dSmrg 14307bd0f98dSmrg# XORG_LINT_LIBRARY(LIBNAME) 14317bd0f98dSmrg# -------------------------- 14327bd0f98dSmrg# Minimum version: 1.1.0 14337bd0f98dSmrg# 14347bd0f98dSmrg# Sets up flags for building lint libraries for checking programs that call 14357bd0f98dSmrg# functions in the library. 14367bd0f98dSmrg# Disabled by default, enable with --enable-lint-library 14377bd0f98dSmrg# Sets: 14387bd0f98dSmrg# @LINTLIB@ - name of lint library file to make 14397bd0f98dSmrg# MAKE_LINT_LIB - automake conditional 14407bd0f98dSmrg# 14417bd0f98dSmrg 14427bd0f98dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 14437bd0f98dSmrgAC_REQUIRE([XORG_WITH_LINT]) 14447bd0f98dSmrg# Build lint "library" for more indepth checks of programs calling this library 14457bd0f98dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 14467bd0f98dSmrg [Create lint library (default: disabled)])], 14477bd0f98dSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 14487bd0f98dSmrgif test "x$make_lint_lib" != "xno" ; then 14497bd0f98dSmrg if test "x$LINT" = "xno" ; then 14507bd0f98dSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 14517bd0f98dSmrg fi 14527bd0f98dSmrg if test "x$make_lint_lib" = "xyes" ; then 14537bd0f98dSmrg LINTLIB=llib-l$1.ln 14547bd0f98dSmrg else 14557bd0f98dSmrg LINTLIB=$make_lint_lib 14567bd0f98dSmrg fi 14577bd0f98dSmrgfi 14587bd0f98dSmrgAC_SUBST(LINTLIB) 14597bd0f98dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 14607bd0f98dSmrg 14617bd0f98dSmrg]) # XORG_LINT_LIBRARY 14627bd0f98dSmrg 14637bd0f98dSmrg# XORG_CWARNFLAGS 14647bd0f98dSmrg# --------------- 14657bd0f98dSmrg# Minimum version: 1.2.0 14667bd0f98dSmrg# 14677bd0f98dSmrg# Defines CWARNFLAGS to enable C compiler warnings. 14687bd0f98dSmrg# 14697bd0f98dSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 14707bd0f98dSmrgAC_REQUIRE([AC_PROG_CC]) 14717bd0f98dSmrgif test "x$GCC" = xyes ; then 14727bd0f98dSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 14737bd0f98dSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 14747bd0f98dSmrg-Wbad-function-cast" 14757bd0f98dSmrg case `$CC -dumpversion` in 14767bd0f98dSmrg 3.4.* | 4.*) 14777bd0f98dSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 14787bd0f98dSmrg ;; 14797bd0f98dSmrg esac 14807bd0f98dSmrgelse 14817bd0f98dSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 14827bd0f98dSmrg if test "x$SUNCC" = "xyes"; then 14837bd0f98dSmrg CWARNFLAGS="-v" 14847bd0f98dSmrg fi 14857bd0f98dSmrgfi 14867bd0f98dSmrgAC_SUBST(CWARNFLAGS) 14877bd0f98dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 14887bd0f98dSmrg]) # XORG_CWARNFLAGS 14897bd0f98dSmrg 14907bd0f98dSmrg# XORG_STRICT_OPTION 14917bd0f98dSmrg# ----------------------- 14927bd0f98dSmrg# Minimum version: 1.3.0 14937bd0f98dSmrg# 14947bd0f98dSmrg# Add configure option to enable strict compilation 14957bd0f98dSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 14967bd0f98dSmrgAC_REQUIRE([AC_PROG_CC]) 14977bd0f98dSmrgAC_REQUIRE([AC_PROG_CC_C99]) 14987bd0f98dSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 14997bd0f98dSmrg 15007bd0f98dSmrgAC_ARG_ENABLE(strict-compilation, 15017bd0f98dSmrg AS_HELP_STRING([--enable-strict-compilation], 15027bd0f98dSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 15037bd0f98dSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 15047bd0f98dSmrgif test "x$STRICT_COMPILE" = "xyes"; then 15057bd0f98dSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 15067bd0f98dSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 15077bd0f98dSmrg if test "x$GCC" = xyes ; then 15087bd0f98dSmrg STRICT_CFLAGS="-pedantic -Werror" 15097bd0f98dSmrg elif test "x$SUNCC" = "xyes"; then 15107bd0f98dSmrg STRICT_CFLAGS="-errwarn" 15117bd0f98dSmrg elif test "x$INTELCC" = "xyes"; then 15127bd0f98dSmrg STRICT_CFLAGS="-Werror" 15137bd0f98dSmrg fi 15147bd0f98dSmrgfi 15157bd0f98dSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 15167bd0f98dSmrgAC_SUBST([CWARNFLAGS]) 15177bd0f98dSmrg]) # XORG_STRICT_OPTION 15187bd0f98dSmrg 15197bd0f98dSmrg# XORG_DEFAULT_OPTIONS 15207bd0f98dSmrg# -------------------- 15217bd0f98dSmrg# Minimum version: 1.3.0 15227bd0f98dSmrg# 15237bd0f98dSmrg# Defines default options for X.Org modules. 15247bd0f98dSmrg# 15257bd0f98dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 15267bd0f98dSmrgXORG_CWARNFLAGS 15277bd0f98dSmrgXORG_STRICT_OPTION 15287bd0f98dSmrgXORG_RELEASE_VERSION 15297bd0f98dSmrgXORG_CHANGELOG 15307bd0f98dSmrgXORG_INSTALL 15317bd0f98dSmrgXORG_MANPAGE_SECTIONS 15327bd0f98dSmrg]) # XORG_DEFAULT_OPTIONS 15337bd0f98dSmrg 15347bd0f98dSmrg# XORG_INSTALL() 15357bd0f98dSmrg# ---------------- 15367bd0f98dSmrg# Minimum version: 1.4.0 15377bd0f98dSmrg# 15387bd0f98dSmrg# Defines the variable INSTALL_CMD as the command to copy 15397bd0f98dSmrg# INSTALL from $prefix/share/doc/util-macros. 15407bd0f98dSmrg# 15417bd0f98dSmrgAC_DEFUN([XORG_INSTALL], [ 15427bd0f98dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 15437bd0f98dSmrgmacros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros) 15447bd0f98dSmrgINSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 15457bd0f98dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 15467bd0f98dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 15477bd0f98dSmrgecho 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 15487bd0f98dSmrgAC_SUBST([INSTALL_CMD]) 15497bd0f98dSmrg]) # XORG_INSTALL 1550cbeba4aeSmrgdnl Copyright 2005 Red Hat, Inc 1551cbeba4aeSmrgdnl 1552cbeba4aeSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1553cbeba4aeSmrgdnl documentation for any purpose is hereby granted without fee, provided that 1554cbeba4aeSmrgdnl the above copyright notice appear in all copies and that both that 1555cbeba4aeSmrgdnl copyright notice and this permission notice appear in supporting 1556cbeba4aeSmrgdnl documentation. 1557cbeba4aeSmrgdnl 1558cbeba4aeSmrgdnl The above copyright notice and this permission notice shall be included 1559cbeba4aeSmrgdnl in all copies or substantial portions of the Software. 1560cbeba4aeSmrgdnl 1561cbeba4aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1562cbeba4aeSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1563cbeba4aeSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1564cbeba4aeSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1565cbeba4aeSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1566cbeba4aeSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1567cbeba4aeSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 1568cbeba4aeSmrgdnl 1569cbeba4aeSmrgdnl Except as contained in this notice, the name of the copyright holders shall 1570cbeba4aeSmrgdnl not be used in advertising or otherwise to promote the sale, use or 1571cbeba4aeSmrgdnl other dealings in this Software without prior written authorization 1572cbeba4aeSmrgdnl from the copyright holders. 1573cbeba4aeSmrgdnl 1574cbeba4aeSmrg 1575cbeba4aeSmrg# XORG_RELEASE_VERSION 1576cbeba4aeSmrg# -------------------- 1577cbeba4aeSmrg# Adds --with/without-release-string and changes the PACKAGE and 1578cbeba4aeSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 15797bd0f98dSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 15807bd0f98dSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1581cbeba4aeSmrg 1582cbeba4aeSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1583cbeba4aeSmrg AC_ARG_WITH(release-version, 15847bd0f98dSmrg AS_HELP_STRING([--with-release-version=STRING], 1585cbeba4aeSmrg [Use release version string in package name]), 1586cbeba4aeSmrg [RELEASE_VERSION="$withval"], 1587cbeba4aeSmrg [RELEASE_VERSION=""]) 1588cbeba4aeSmrg if test "x$RELEASE_VERSION" != "x"; then 1589cbeba4aeSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1590cbeba4aeSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1591cbeba4aeSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1592cbeba4aeSmrg fi 15937bd0f98dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 15947bd0f98dSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 15957bd0f98dSmrg [Major version of this package]) 15967bd0f98dSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 15977bd0f98dSmrg if test "x$PVM" = "x"; then 15987bd0f98dSmrg PVM="0" 15997bd0f98dSmrg fi 16007bd0f98dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 16017bd0f98dSmrg [$PVM], 16027bd0f98dSmrg [Minor version of this package]) 16037bd0f98dSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 16047bd0f98dSmrg if test "x$PVP" = "x"; then 16057bd0f98dSmrg PVP="0" 16067bd0f98dSmrg fi 16077bd0f98dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 16087bd0f98dSmrg [$PVP], 16097bd0f98dSmrg [Patch version of this package]) 1610cbeba4aeSmrg]) 1611cbeba4aeSmrg 16127bd0f98dSmrg# XORG_CHANGELOG() 16137bd0f98dSmrg# ---------------- 16147bd0f98dSmrg# Minimum version: 1.2.0 16157bd0f98dSmrg# 16167bd0f98dSmrg# Defines the variable CHANGELOG_CMD as the command to generate 16177bd0f98dSmrg# ChangeLog from git. 16187bd0f98dSmrg# 16197bd0f98dSmrg# 16207bd0f98dSmrgAC_DEFUN([XORG_CHANGELOG], [ 16217bd0f98dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 16227bd0f98dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 16237bd0f98dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 16247bd0f98dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 16257bd0f98dSmrgAC_SUBST([CHANGELOG_CMD]) 16267bd0f98dSmrg]) # XORG_CHANGELOG 16277bd0f98dSmrg 16287bd0f98dSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 16297bd0f98dSmrg# 16307bd0f98dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 16317bd0f98dSmrg# 16327bd0f98dSmrg# This program is free software; you can redistribute it and/or modify 16337bd0f98dSmrg# it under the terms of the GNU General Public License as published by 16347bd0f98dSmrg# the Free Software Foundation; either version 2 of the License, or 16357bd0f98dSmrg# (at your option) any later version. 16367bd0f98dSmrg# 16377bd0f98dSmrg# This program is distributed in the hope that it will be useful, but 16387bd0f98dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 16397bd0f98dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16407bd0f98dSmrg# General Public License for more details. 16417bd0f98dSmrg# 16427bd0f98dSmrg# You should have received a copy of the GNU General Public License 16437bd0f98dSmrg# along with this program; if not, write to the Free Software 16447bd0f98dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16457bd0f98dSmrg# 16467bd0f98dSmrg# As a special exception to the GNU General Public License, if you 16477bd0f98dSmrg# distribute this file as part of a program that contains a 16487bd0f98dSmrg# configuration script generated by Autoconf, you may include it under 16497bd0f98dSmrg# the same distribution terms that you use for the rest of that program. 16507bd0f98dSmrg 16517bd0f98dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 16527bd0f98dSmrg# ---------------------------------- 16537bd0f98dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 16547bd0f98dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 16557bd0f98dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 16567bd0f98dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 16577bd0f98dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 16587bd0f98dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 16597bd0f98dSmrgfi 16607bd0f98dSmrgif test -n "$PKG_CONFIG"; then 16617bd0f98dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 16627bd0f98dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 16637bd0f98dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 16647bd0f98dSmrg AC_MSG_RESULT([yes]) 16657bd0f98dSmrg else 16667bd0f98dSmrg AC_MSG_RESULT([no]) 16677bd0f98dSmrg PKG_CONFIG="" 16687bd0f98dSmrg fi 16697bd0f98dSmrg 16707bd0f98dSmrgfi[]dnl 16717bd0f98dSmrg])# PKG_PROG_PKG_CONFIG 16727bd0f98dSmrg 16737bd0f98dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 16747bd0f98dSmrg# 16757bd0f98dSmrg# Check to see whether a particular set of modules exists. Similar 16767bd0f98dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 16777bd0f98dSmrg# 16787bd0f98dSmrg# 16797bd0f98dSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 16807bd0f98dSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 16817bd0f98dSmrg# PKG_CHECK_EXISTS manually 16827bd0f98dSmrg# -------------------------------------------------------------- 16837bd0f98dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 16847bd0f98dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 16857bd0f98dSmrgif test -n "$PKG_CONFIG" && \ 16867bd0f98dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 16877bd0f98dSmrg m4_ifval([$2], [$2], [:]) 16887bd0f98dSmrgm4_ifvaln([$3], [else 16897bd0f98dSmrg $3])dnl 16907bd0f98dSmrgfi]) 16917bd0f98dSmrg 16927bd0f98dSmrg 16937bd0f98dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 16947bd0f98dSmrg# --------------------------------------------- 16957bd0f98dSmrgm4_define([_PKG_CONFIG], 16967bd0f98dSmrg[if test -n "$$1"; then 16977bd0f98dSmrg pkg_cv_[]$1="$$1" 16987bd0f98dSmrg elif test -n "$PKG_CONFIG"; then 16997bd0f98dSmrg PKG_CHECK_EXISTS([$3], 17007bd0f98dSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 17017bd0f98dSmrg [pkg_failed=yes]) 17027bd0f98dSmrg else 17037bd0f98dSmrg pkg_failed=untried 17047bd0f98dSmrgfi[]dnl 17057bd0f98dSmrg])# _PKG_CONFIG 17067bd0f98dSmrg 17077bd0f98dSmrg# _PKG_SHORT_ERRORS_SUPPORTED 17087bd0f98dSmrg# ----------------------------- 17097bd0f98dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 17107bd0f98dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 17117bd0f98dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 17127bd0f98dSmrg _pkg_short_errors_supported=yes 17137bd0f98dSmrgelse 17147bd0f98dSmrg _pkg_short_errors_supported=no 17157bd0f98dSmrgfi[]dnl 17167bd0f98dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 17177bd0f98dSmrg 17187bd0f98dSmrg 17197bd0f98dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 17207bd0f98dSmrg# [ACTION-IF-NOT-FOUND]) 17217bd0f98dSmrg# 17227bd0f98dSmrg# 17237bd0f98dSmrg# Note that if there is a possibility the first call to 17247bd0f98dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 17257bd0f98dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 17267bd0f98dSmrg# 17277bd0f98dSmrg# 17287bd0f98dSmrg# -------------------------------------------------------------- 17297bd0f98dSmrgAC_DEFUN([PKG_CHECK_MODULES], 17307bd0f98dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 17317bd0f98dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 17327bd0f98dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 17337bd0f98dSmrg 17347bd0f98dSmrgpkg_failed=no 17357bd0f98dSmrgAC_MSG_CHECKING([for $1]) 17367bd0f98dSmrg 17377bd0f98dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 17387bd0f98dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 17397bd0f98dSmrg 17407bd0f98dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 17417bd0f98dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 17427bd0f98dSmrgSee the pkg-config man page for more details.]) 17437bd0f98dSmrg 17447bd0f98dSmrgif test $pkg_failed = yes; then 17457bd0f98dSmrg _PKG_SHORT_ERRORS_SUPPORTED 17467bd0f98dSmrg if test $_pkg_short_errors_supported = yes; then 17477bd0f98dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 17487bd0f98dSmrg else 17497bd0f98dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 17507bd0f98dSmrg fi 17517bd0f98dSmrg # Put the nasty error message in config.log where it belongs 17527bd0f98dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 17537bd0f98dSmrg 17547bd0f98dSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 17557bd0f98dSmrg[Package requirements ($2) were not met: 17567bd0f98dSmrg 17577bd0f98dSmrg$$1_PKG_ERRORS 17587bd0f98dSmrg 17597bd0f98dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 17607bd0f98dSmrginstalled software in a non-standard prefix. 17617bd0f98dSmrg 17627bd0f98dSmrg_PKG_TEXT 17637bd0f98dSmrg])], 17647bd0f98dSmrg [AC_MSG_RESULT([no]) 17657bd0f98dSmrg $4]) 17667bd0f98dSmrgelif test $pkg_failed = untried; then 17677bd0f98dSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 17687bd0f98dSmrg[The pkg-config script could not be found or is too old. Make sure it 17697bd0f98dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 17707bd0f98dSmrgpath to pkg-config. 17717bd0f98dSmrg 17727bd0f98dSmrg_PKG_TEXT 17737bd0f98dSmrg 17747bd0f98dSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 17757bd0f98dSmrg [$4]) 17767bd0f98dSmrgelse 17777bd0f98dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 17787bd0f98dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 17797bd0f98dSmrg AC_MSG_RESULT([yes]) 17807bd0f98dSmrg ifelse([$3], , :, [$3]) 17817bd0f98dSmrgfi[]dnl 17827bd0f98dSmrg])# PKG_CHECK_MODULES 17837bd0f98dSmrg 1784