aclocal.m4 revision c37a63b8
1c37a63b8Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2264fa531Smrg 3c37a63b8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4c37a63b8Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5264fa531Smrg# This file is free software; the Free Software Foundation 6264fa531Smrg# gives unlimited permission to copy and/or distribute it, 7264fa531Smrg# with or without modifications, as long as this notice is preserved. 8264fa531Smrg 9264fa531Smrg# This program is distributed in the hope that it will be useful, 10264fa531Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11264fa531Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12264fa531Smrg# PARTICULAR PURPOSE. 13264fa531Smrg 14c37a63b8Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15c37a63b8Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16c37a63b8Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17c37a63b8Smrg[m4_warning([this file was generated for autoconf 2.63. 18c37a63b8SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19c37a63b8SmrgIf you have problems, you may need to regenerate the build system entirely. 20c37a63b8SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21264fa531Smrg 22c37a63b8Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23c37a63b8Smrg# 24c37a63b8Smrg# This file is free software; the Free Software Foundation 25c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 26c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 27264fa531Smrg 28264fa531Smrg# AM_AUTOMAKE_VERSION(VERSION) 29264fa531Smrg# ---------------------------- 30264fa531Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31264fa531Smrg# generated from the m4 files accompanying Automake X.Y. 32c37a63b8Smrg# (This private macro should not be called outside this file.) 33c37a63b8SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 34c37a63b8Smrg[am__api_version='1.11' 35c37a63b8Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36c37a63b8Smrgdnl require some minimum version. Point them to the right macro. 37c37a63b8Smrgm4_if([$1], [1.11], [], 38c37a63b8Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39c37a63b8Smrg]) 40c37a63b8Smrg 41c37a63b8Smrg# _AM_AUTOCONF_VERSION(VERSION) 42c37a63b8Smrg# ----------------------------- 43c37a63b8Smrg# aclocal traces this macro to find the Autoconf version. 44c37a63b8Smrg# This is a private macro too. Using m4_define simplifies 45c37a63b8Smrg# the logic in aclocal, which can simply ignore this definition. 46c37a63b8Smrgm4_define([_AM_AUTOCONF_VERSION], []) 47264fa531Smrg 48264fa531Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49264fa531Smrg# ------------------------------- 50c37a63b8Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51c37a63b8Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52264fa531SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53c37a63b8Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 54c37a63b8Smrgm4_ifndef([AC_AUTOCONF_VERSION], 55c37a63b8Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56c37a63b8Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57264fa531Smrg 58c37a63b8Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59264fa531Smrg 60c37a63b8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61264fa531Smrg# 62c37a63b8Smrg# This file is free software; the Free Software Foundation 63c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 64c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 65264fa531Smrg 66264fa531Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67264fa531Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68264fa531Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69264fa531Smrg# 70264fa531Smrg# Of course, Automake must honor this variable whenever it calls a 71264fa531Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 72264fa531Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73264fa531Smrg# depending on how configure is run. This is pretty annoying, since 74264fa531Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75264fa531Smrg# source directory, any form will work fine, but in subdirectories a 76264fa531Smrg# relative path needs to be adjusted first. 77264fa531Smrg# 78264fa531Smrg# $ac_aux_dir/missing 79264fa531Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 80264fa531Smrg# $top_srcdir/$ac_aux_dir/missing 81264fa531Smrg# fails if $ac_aux_dir is absolute, 82264fa531Smrg# fails when called from a subdirectory in a VPATH build with 83264fa531Smrg# a relative $ac_aux_dir 84264fa531Smrg# 85264fa531Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86264fa531Smrg# are both prefixed by $srcdir. In an in-source build this is usually 87264fa531Smrg# harmless because $srcdir is `.', but things will broke when you 88264fa531Smrg# start a VPATH build or use an absolute $srcdir. 89264fa531Smrg# 90264fa531Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91264fa531Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92264fa531Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93264fa531Smrg# and then we would define $MISSING as 94264fa531Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 95264fa531Smrg# This will work as long as MISSING is not called from configure, because 96264fa531Smrg# unfortunately $(top_srcdir) has no meaning in configure. 97264fa531Smrg# However there are other variables, like CC, which are often used in 98264fa531Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99264fa531Smrg# 100264fa531Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 101264fa531Smrg# absolute PATH. The drawback is that using absolute paths prevent a 102264fa531Smrg# configured tree to be moved without reconfiguration. 103264fa531Smrg 104c37a63b8SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105c37a63b8Smrg[dnl Rely on autoconf to set up CDPATH properly. 106c37a63b8SmrgAC_PREREQ([2.50])dnl 107264fa531Smrg# expand $ac_aux_dir to an absolute path 108264fa531Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 109264fa531Smrg]) 110264fa531Smrg 111c37a63b8Smrg# AM_CONDITIONAL -*- Autoconf -*- 112264fa531Smrg 113c37a63b8Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114c37a63b8Smrg# Free Software Foundation, Inc. 115c37a63b8Smrg# 116c37a63b8Smrg# This file is free software; the Free Software Foundation 117c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 118c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 119264fa531Smrg 120c37a63b8Smrg# serial 9 121264fa531Smrg 122c37a63b8Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123c37a63b8Smrg# ------------------------------------- 124c37a63b8Smrg# Define a conditional. 125c37a63b8SmrgAC_DEFUN([AM_CONDITIONAL], 126c37a63b8Smrg[AC_PREREQ(2.52)dnl 127c37a63b8Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128c37a63b8Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129c37a63b8SmrgAC_SUBST([$1_TRUE])dnl 130c37a63b8SmrgAC_SUBST([$1_FALSE])dnl 131c37a63b8Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132c37a63b8Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133c37a63b8Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134c37a63b8Smrgif $2; then 135c37a63b8Smrg $1_TRUE= 136c37a63b8Smrg $1_FALSE='#' 137264fa531Smrgelse 138c37a63b8Smrg $1_TRUE='#' 139c37a63b8Smrg $1_FALSE= 140264fa531Smrgfi 141c37a63b8SmrgAC_CONFIG_COMMANDS_PRE( 142c37a63b8Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143c37a63b8Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 144c37a63b8SmrgUsually this means the macro was only invoked conditionally.]]) 145c37a63b8Smrgfi])]) 146264fa531Smrg 147c37a63b8Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 148c37a63b8Smrg# Free Software Foundation, Inc. 149c37a63b8Smrg# 150c37a63b8Smrg# This file is free software; the Free Software Foundation 151c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 152c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 153264fa531Smrg 154c37a63b8Smrg# serial 10 155264fa531Smrg 156264fa531Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 157264fa531Smrg# written in clear, in which case automake, when reading aclocal.m4, 158264fa531Smrg# will think it sees a *use*, and therefore will trigger all it's 159264fa531Smrg# C support machinery. Also note that it means that autoscan, seeing 160264fa531Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161264fa531Smrg 162264fa531Smrg 163264fa531Smrg# _AM_DEPENDENCIES(NAME) 164264fa531Smrg# ---------------------- 165264fa531Smrg# See how the compiler implements dependency checking. 166264fa531Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 167264fa531Smrg# We try a few techniques and use that to set a single cache variable. 168264fa531Smrg# 169264fa531Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 170264fa531Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 171264fa531Smrg# dependency, and given that the user is not expected to run this macro, 172264fa531Smrg# just rely on AC_PROG_CC. 173264fa531SmrgAC_DEFUN([_AM_DEPENDENCIES], 174264fa531Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 175264fa531SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 176264fa531SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 177264fa531SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178264fa531Smrg 179264fa531Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 180264fa531Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 181264fa531Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 182c37a63b8Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 183264fa531Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 184264fa531Smrg [depcc="$$1" am_compiler_list=]) 185264fa531Smrg 186264fa531SmrgAC_CACHE_CHECK([dependency style of $depcc], 187264fa531Smrg [am_cv_$1_dependencies_compiler_type], 188264fa531Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 189264fa531Smrg # We make a subdir and do the tests there. Otherwise we can end up 190264fa531Smrg # making bogus files that we don't know about and never remove. For 191264fa531Smrg # instance it was reported that on HP-UX the gcc test will end up 192264fa531Smrg # making a dummy file named `D' -- because `-MD' means `put the output 193264fa531Smrg # in D'. 194264fa531Smrg mkdir conftest.dir 195264fa531Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 196264fa531Smrg # using a relative directory. 197264fa531Smrg cp "$am_depcomp" conftest.dir 198264fa531Smrg cd conftest.dir 199264fa531Smrg # We will build objects and dependencies in a subdirectory because 200264fa531Smrg # it helps to detect inapplicable dependency modes. For instance 201264fa531Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 202264fa531Smrg # side effect of compilation, but ICC will put the dependencies in 203264fa531Smrg # the current directory while Tru64 will put them in the object 204264fa531Smrg # directory. 205264fa531Smrg mkdir sub 206264fa531Smrg 207264fa531Smrg am_cv_$1_dependencies_compiler_type=none 208264fa531Smrg if test "$am_compiler_list" = ""; then 209264fa531Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210264fa531Smrg fi 211c37a63b8Smrg am__universal=false 212c37a63b8Smrg m4_case([$1], [CC], 213c37a63b8Smrg [case " $depcc " in #( 214c37a63b8Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 215c37a63b8Smrg esac], 216c37a63b8Smrg [CXX], 217c37a63b8Smrg [case " $depcc " in #( 218c37a63b8Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 219c37a63b8Smrg esac]) 220c37a63b8Smrg 221264fa531Smrg for depmode in $am_compiler_list; do 222264fa531Smrg # Setup a source with many dependencies, because some compilers 223264fa531Smrg # like to wrap large dependency lists on column 80 (with \), and 224264fa531Smrg # we should not choose a depcomp mode which is confused by this. 225264fa531Smrg # 226264fa531Smrg # We need to recreate these files for each test, as the compiler may 227264fa531Smrg # overwrite some of them when testing with obscure command lines. 228264fa531Smrg # This happens at least with the AIX C compiler. 229264fa531Smrg : > sub/conftest.c 230264fa531Smrg for i in 1 2 3 4 5 6; do 231264fa531Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 232c37a63b8Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 233c37a63b8Smrg # Solaris 8's {/usr,}/bin/sh. 234c37a63b8Smrg touch sub/conftst$i.h 235264fa531Smrg done 236264fa531Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237264fa531Smrg 238c37a63b8Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 239c37a63b8Smrg # mode. It turns out that the SunPro C++ compiler does not properly 240c37a63b8Smrg # handle `-M -o', and we need to detect this. Also, some Intel 241c37a63b8Smrg # versions had trouble with output in subdirs 242c37a63b8Smrg am__obj=sub/conftest.${OBJEXT-o} 243c37a63b8Smrg am__minus_obj="-o $am__obj" 244264fa531Smrg case $depmode in 245c37a63b8Smrg gcc) 246c37a63b8Smrg # This depmode causes a compiler race in universal mode. 247c37a63b8Smrg test "$am__universal" = false || continue 248c37a63b8Smrg ;; 249264fa531Smrg nosideeffect) 250264fa531Smrg # after this tag, mechanisms are not by side-effect, so they'll 251264fa531Smrg # only be used when explicitly requested 252264fa531Smrg if test "x$enable_dependency_tracking" = xyes; then 253264fa531Smrg continue 254264fa531Smrg else 255264fa531Smrg break 256264fa531Smrg fi 257264fa531Smrg ;; 258c37a63b8Smrg msvisualcpp | msvcmsys) 259c37a63b8Smrg # This compiler won't grok `-c -o', but also, the minuso test has 260c37a63b8Smrg # not run yet. These depmodes are late enough in the game, and 261c37a63b8Smrg # so weak that their functioning should not be impacted. 262c37a63b8Smrg am__obj=conftest.${OBJEXT-o} 263c37a63b8Smrg am__minus_obj= 264c37a63b8Smrg ;; 265264fa531Smrg none) break ;; 266264fa531Smrg esac 267264fa531Smrg if depmode=$depmode \ 268c37a63b8Smrg source=sub/conftest.c object=$am__obj \ 269264fa531Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270c37a63b8Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 271264fa531Smrg >/dev/null 2>conftest.err && 272c37a63b8Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 273264fa531Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274c37a63b8Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 275264fa531Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 276264fa531Smrg # icc doesn't choke on unknown options, it will just issue warnings 277c37a63b8Smrg # or remarks (even with -Werror). So we grep stderr for any message 278c37a63b8Smrg # that says an option was ignored or not supported. 279c37a63b8Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 280c37a63b8Smrg # icc: Command line warning: ignoring option '-M'; no argument required 281c37a63b8Smrg # The diagnosis changed in icc 8.0: 282c37a63b8Smrg # icc: Command line remark: option '-MP' not supported 283c37a63b8Smrg if (grep 'ignoring option' conftest.err || 284c37a63b8Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 285264fa531Smrg am_cv_$1_dependencies_compiler_type=$depmode 286264fa531Smrg break 287264fa531Smrg fi 288264fa531Smrg fi 289264fa531Smrg done 290264fa531Smrg 291264fa531Smrg cd .. 292264fa531Smrg rm -rf conftest.dir 293264fa531Smrgelse 294264fa531Smrg am_cv_$1_dependencies_compiler_type=none 295264fa531Smrgfi 296264fa531Smrg]) 297264fa531SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 298264fa531SmrgAM_CONDITIONAL([am__fastdep$1], [ 299264fa531Smrg test "x$enable_dependency_tracking" != xno \ 300264fa531Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 301264fa531Smrg]) 302264fa531Smrg 303264fa531Smrg 304264fa531Smrg# AM_SET_DEPDIR 305264fa531Smrg# ------------- 306264fa531Smrg# Choose a directory name for dependency files. 307264fa531Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 308264fa531SmrgAC_DEFUN([AM_SET_DEPDIR], 309264fa531Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 310264fa531SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 311264fa531Smrg]) 312264fa531Smrg 313264fa531Smrg 314264fa531Smrg# AM_DEP_TRACK 315264fa531Smrg# ------------ 316264fa531SmrgAC_DEFUN([AM_DEP_TRACK], 317264fa531Smrg[AC_ARG_ENABLE(dependency-tracking, 318c37a63b8Smrg[ --disable-dependency-tracking speeds up one-time build 319c37a63b8Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 320264fa531Smrgif test "x$enable_dependency_tracking" != xno; then 321264fa531Smrg am_depcomp="$ac_aux_dir/depcomp" 322264fa531Smrg AMDEPBACKSLASH='\' 323264fa531Smrgfi 324264fa531SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 325c37a63b8SmrgAC_SUBST([AMDEPBACKSLASH])dnl 326c37a63b8Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 327264fa531Smrg]) 328264fa531Smrg 329c37a63b8Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330264fa531Smrg 331c37a63b8Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 332c37a63b8Smrg# Free Software Foundation, Inc. 333c37a63b8Smrg# 334c37a63b8Smrg# This file is free software; the Free Software Foundation 335c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 336c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 337264fa531Smrg 338c37a63b8Smrg#serial 5 339264fa531Smrg 340264fa531Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341264fa531Smrg# ------------------------------ 342264fa531SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343c37a63b8Smrg[{ 344c37a63b8Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 345c37a63b8Smrg # are listed without --file. Let's play safe and only enable the eval 346c37a63b8Smrg # if we detect the quoting. 347c37a63b8Smrg case $CONFIG_FILES in 348c37a63b8Smrg *\'*) eval set x "$CONFIG_FILES" ;; 349c37a63b8Smrg *) set x $CONFIG_FILES ;; 350c37a63b8Smrg esac 351c37a63b8Smrg shift 352c37a63b8Smrg for mf 353c37a63b8Smrg do 354c37a63b8Smrg # Strip MF so we end up with the name of the file. 355c37a63b8Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 356c37a63b8Smrg # Check whether this is an Automake generated Makefile or not. 357c37a63b8Smrg # We used to match only the files named `Makefile.in', but 358c37a63b8Smrg # some people rename them; so instead we look at the file content. 359c37a63b8Smrg # Grep'ing the first line is not enough: some people post-process 360c37a63b8Smrg # each Makefile.in and add a new line on top of each file to say so. 361c37a63b8Smrg # Grep'ing the whole file is not good either: AIX grep has a line 362c37a63b8Smrg # limit of 2048, but all sed's we know have understand at least 4000. 363c37a63b8Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364c37a63b8Smrg dirpart=`AS_DIRNAME("$mf")` 365c37a63b8Smrg else 366c37a63b8Smrg continue 367c37a63b8Smrg fi 368c37a63b8Smrg # Extract the definition of DEPDIR, am__include, and am__quote 369c37a63b8Smrg # from the Makefile without running `make'. 370c37a63b8Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371c37a63b8Smrg test -z "$DEPDIR" && continue 372c37a63b8Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 373c37a63b8Smrg test -z "am__include" && continue 374c37a63b8Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375c37a63b8Smrg # When using ansi2knr, U may be empty or an underscore; expand it 376c37a63b8Smrg U=`sed -n 's/^U = //p' < "$mf"` 377c37a63b8Smrg # Find all dependency output files, they are included files with 378c37a63b8Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379c37a63b8Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 380c37a63b8Smrg # expansion. 381c37a63b8Smrg for file in `sed -n " 382c37a63b8Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383c37a63b8Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384c37a63b8Smrg # Make sure the directory exists. 385c37a63b8Smrg test -f "$dirpart/$file" && continue 386c37a63b8Smrg fdir=`AS_DIRNAME(["$file"])` 387c37a63b8Smrg AS_MKDIR_P([$dirpart/$fdir]) 388c37a63b8Smrg # echo "creating $dirpart/$file" 389c37a63b8Smrg echo '# dummy' > "$dirpart/$file" 390c37a63b8Smrg done 391264fa531Smrg done 392c37a63b8Smrg} 393264fa531Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394264fa531Smrg 395264fa531Smrg 396264fa531Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397264fa531Smrg# ----------------------------- 398264fa531Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 399264fa531Smrg# 400264fa531Smrg# This code is only required when automatic dependency tracking 401264fa531Smrg# is enabled. FIXME. This creates each `.P' file that we will 402264fa531Smrg# need in order to bootstrap the dependency handling code. 403264fa531SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404264fa531Smrg[AC_CONFIG_COMMANDS([depfiles], 405264fa531Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406264fa531Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407264fa531Smrg]) 408264fa531Smrg 409c37a63b8Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 410c37a63b8Smrg# Free Software Foundation, Inc. 411c37a63b8Smrg# 412c37a63b8Smrg# This file is free software; the Free Software Foundation 413c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 414c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 415264fa531Smrg 416c37a63b8Smrg# serial 8 417264fa531Smrg 418c37a63b8Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 419c37a63b8SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 420264fa531Smrg 421c37a63b8Smrg# Do all the work for Automake. -*- Autoconf -*- 422264fa531Smrg 423c37a63b8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 424c37a63b8Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 425c37a63b8Smrg# 426c37a63b8Smrg# This file is free software; the Free Software Foundation 427c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 428c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 429264fa531Smrg 430c37a63b8Smrg# serial 16 431264fa531Smrg 432c37a63b8Smrg# This macro actually does too much. Some checks are only needed if 433c37a63b8Smrg# your package does certain things. But this isn't really a big deal. 434c37a63b8Smrg 435c37a63b8Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 436c37a63b8Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 437c37a63b8Smrg# ----------------------------------------------- 438c37a63b8Smrg# The call with PACKAGE and VERSION arguments is the old style 439c37a63b8Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 440c37a63b8Smrg# and VERSION should now be passed to AC_INIT and removed from 441c37a63b8Smrg# the call to AM_INIT_AUTOMAKE. 442c37a63b8Smrg# We support both call styles for the transition. After 443c37a63b8Smrg# the next Automake release, Autoconf can make the AC_INIT 444c37a63b8Smrg# arguments mandatory, and then we can depend on a new Autoconf 445c37a63b8Smrg# release and drop the old call support. 446c37a63b8SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 447c37a63b8Smrg[AC_PREREQ([2.62])dnl 448c37a63b8Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 449c37a63b8Smrgdnl the ones we care about. 450c37a63b8Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 451c37a63b8SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 452c37a63b8SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 453c37a63b8Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 454c37a63b8Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 455c37a63b8Smrg # is not polluted with repeated "-I." 456c37a63b8Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 457c37a63b8Smrg # test to see if srcdir already configured 458c37a63b8Smrg if test -f $srcdir/config.status; then 459c37a63b8Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 460c37a63b8Smrg fi 461264fa531Smrgfi 462c37a63b8Smrg 463c37a63b8Smrg# test whether we have cygpath 464c37a63b8Smrgif test -z "$CYGPATH_W"; then 465c37a63b8Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 466c37a63b8Smrg CYGPATH_W='cygpath -w' 467c37a63b8Smrg else 468c37a63b8Smrg CYGPATH_W=echo 469c37a63b8Smrg fi 470264fa531Smrgfi 471c37a63b8SmrgAC_SUBST([CYGPATH_W]) 472264fa531Smrg 473c37a63b8Smrg# Define the identity of the package. 474c37a63b8Smrgdnl Distinguish between old-style and new-style calls. 475c37a63b8Smrgm4_ifval([$2], 476c37a63b8Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 477c37a63b8Smrg AC_SUBST([PACKAGE], [$1])dnl 478c37a63b8Smrg AC_SUBST([VERSION], [$2])], 479c37a63b8Smrg[_AM_SET_OPTIONS([$1])dnl 480c37a63b8Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 481c37a63b8Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 482c37a63b8Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 483c37a63b8Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 484c37a63b8Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 485264fa531Smrg 486c37a63b8Smrg_AM_IF_OPTION([no-define],, 487c37a63b8Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 488c37a63b8Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 489264fa531Smrg 490c37a63b8Smrg# Some tools Automake needs. 491c37a63b8SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 492c37a63b8SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 493c37a63b8SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 494c37a63b8SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 495c37a63b8SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 496c37a63b8SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 497c37a63b8SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 498c37a63b8SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 499c37a63b8SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 500c37a63b8SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 501c37a63b8Smrg# We need awk for the "check" target. The system "awk" is bad on 502c37a63b8Smrg# some platforms. 503c37a63b8SmrgAC_REQUIRE([AC_PROG_AWK])dnl 504c37a63b8SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505c37a63b8SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506c37a63b8Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507c37a63b8Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508c37a63b8Smrg [_AM_PROG_TAR([v7])])]) 509c37a63b8Smrg_AM_IF_OPTION([no-dependencies],, 510c37a63b8Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511c37a63b8Smrg [_AM_DEPENDENCIES(CC)], 512c37a63b8Smrg [define([AC_PROG_CC], 513c37a63b8Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 514c37a63b8SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515c37a63b8Smrg [_AM_DEPENDENCIES(CXX)], 516c37a63b8Smrg [define([AC_PROG_CXX], 517c37a63b8Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 518c37a63b8SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519c37a63b8Smrg [_AM_DEPENDENCIES(OBJC)], 520c37a63b8Smrg [define([AC_PROG_OBJC], 521c37a63b8Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 522c37a63b8Smrg]) 523c37a63b8Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 524c37a63b8Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 525c37a63b8Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 526c37a63b8Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 527c37a63b8SmrgAC_CONFIG_COMMANDS_PRE(dnl 528c37a63b8Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 529c37a63b8Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 530c37a63b8Smrg]) 531264fa531Smrg 532c37a63b8Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 533c37a63b8Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 534c37a63b8Smrgdnl mangled by Autoconf and run in a shell conditional statement. 535c37a63b8Smrgm4_define([_AC_COMPILER_EXEEXT], 536c37a63b8Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537264fa531Smrg 538264fa531Smrg 539c37a63b8Smrg# When config.status generates a header, we must update the stamp-h file. 540c37a63b8Smrg# This file resides in the same directory as the config header 541c37a63b8Smrg# that is generated. The stamp files are numbered to have different names. 542c37a63b8Smrg 543c37a63b8Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 544c37a63b8Smrg# loop where config.status creates the headers, so we can generate 545c37a63b8Smrg# our stamp files there. 546c37a63b8SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 547c37a63b8Smrg[# Compute $1's index in $config_headers. 548c37a63b8Smrg_am_arg=$1 549c37a63b8Smrg_am_stamp_count=1 550c37a63b8Smrgfor _am_header in $config_headers :; do 551c37a63b8Smrg case $_am_header in 552c37a63b8Smrg $_am_arg | $_am_arg:* ) 553c37a63b8Smrg break ;; 554c37a63b8Smrg * ) 555c37a63b8Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 556c37a63b8Smrg esac 557c37a63b8Smrgdone 558c37a63b8Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 559264fa531Smrg 560c37a63b8Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 561c37a63b8Smrg# 562c37a63b8Smrg# This file is free software; the Free Software Foundation 563c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 564c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 565264fa531Smrg 566c37a63b8Smrg# AM_PROG_INSTALL_SH 567c37a63b8Smrg# ------------------ 568c37a63b8Smrg# Define $install_sh. 569c37a63b8SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 570c37a63b8Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 571c37a63b8Smrgif test x"${install_sh}" != xset; then 572c37a63b8Smrg case $am_aux_dir in 573c37a63b8Smrg *\ * | *\ *) 574c37a63b8Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 575c37a63b8Smrg *) 576c37a63b8Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 577c37a63b8Smrg esac 578264fa531Smrgfi 579c37a63b8SmrgAC_SUBST(install_sh)]) 580264fa531Smrg 581c37a63b8Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 582c37a63b8Smrg# 583c37a63b8Smrg# This file is free software; the Free Software Foundation 584c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 585c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 586264fa531Smrg 587c37a63b8Smrg# serial 2 588264fa531Smrg 589c37a63b8Smrg# Check whether the underlying file-system supports filenames 590c37a63b8Smrg# with a leading dot. For instance MS-DOS doesn't. 591c37a63b8SmrgAC_DEFUN([AM_SET_LEADING_DOT], 592c37a63b8Smrg[rm -rf .tst 2>/dev/null 593c37a63b8Smrgmkdir .tst 2>/dev/null 594c37a63b8Smrgif test -d .tst; then 595c37a63b8Smrg am__leading_dot=. 596c37a63b8Smrgelse 597c37a63b8Smrg am__leading_dot=_ 598c37a63b8Smrgfi 599c37a63b8Smrgrmdir .tst 2>/dev/null 600c37a63b8SmrgAC_SUBST([am__leading_dot])]) 601264fa531Smrg 602c37a63b8Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 603c37a63b8Smrg# From Jim Meyering 604264fa531Smrg 605c37a63b8Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 606c37a63b8Smrg# Free Software Foundation, Inc. 607c37a63b8Smrg# 608c37a63b8Smrg# This file is free software; the Free Software Foundation 609c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 610c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 611264fa531Smrg 612c37a63b8Smrg# serial 5 613c37a63b8Smrg 614c37a63b8Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 615c37a63b8Smrg# ---------------------------------- 616c37a63b8Smrg# Control maintainer-specific portions of Makefiles. 617c37a63b8Smrg# Default is to disable them, unless `enable' is passed literally. 618c37a63b8Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 619c37a63b8Smrg# can override the default with the --enable/--disable switch. 620264fa531SmrgAC_DEFUN([AM_MAINTAINER_MODE], 621c37a63b8Smrg[m4_case(m4_default([$1], [disable]), 622c37a63b8Smrg [enable], [m4_define([am_maintainer_other], [disable])], 623c37a63b8Smrg [disable], [m4_define([am_maintainer_other], [enable])], 624c37a63b8Smrg [m4_define([am_maintainer_other], [enable]) 625c37a63b8Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 626c37a63b8SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 627c37a63b8Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 628c37a63b8Smrg AC_ARG_ENABLE([maintainer-mode], 629c37a63b8Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 630c37a63b8Smrg (and sometimes confusing) to the casual installer], 631c37a63b8Smrg [USE_MAINTAINER_MODE=$enableval], 632c37a63b8Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 633264fa531Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 634c37a63b8Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 635264fa531Smrg MAINT=$MAINTAINER_MODE_TRUE 636c37a63b8Smrg AC_SUBST([MAINT])dnl 637264fa531Smrg] 638264fa531Smrg) 639264fa531Smrg 640264fa531SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 641264fa531Smrg 642c37a63b8Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 643264fa531Smrg 644c37a63b8Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 645c37a63b8Smrg# 646c37a63b8Smrg# This file is free software; the Free Software Foundation 647c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 648c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 649264fa531Smrg 650c37a63b8Smrg# serial 4 651264fa531Smrg 652c37a63b8Smrg# AM_MAKE_INCLUDE() 653c37a63b8Smrg# ----------------- 654c37a63b8Smrg# Check to see how make treats includes. 655c37a63b8SmrgAC_DEFUN([AM_MAKE_INCLUDE], 656c37a63b8Smrg[am_make=${MAKE-make} 657c37a63b8Smrgcat > confinc << 'END' 658c37a63b8Smrgam__doit: 659c37a63b8Smrg @echo this is the am__doit target 660c37a63b8Smrg.PHONY: am__doit 661c37a63b8SmrgEND 662c37a63b8Smrg# If we don't find an include directive, just comment out the code. 663c37a63b8SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 664c37a63b8Smrgam__include="#" 665c37a63b8Smrgam__quote= 666c37a63b8Smrg_am_result=none 667c37a63b8Smrg# First try GNU make style include. 668c37a63b8Smrgecho "include confinc" > confmf 669c37a63b8Smrg# Ignore all kinds of additional output from `make'. 670c37a63b8Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 671c37a63b8Smrg*the\ am__doit\ target*) 672c37a63b8Smrg am__include=include 673c37a63b8Smrg am__quote= 674c37a63b8Smrg _am_result=GNU 675c37a63b8Smrg ;; 676c37a63b8Smrgesac 677c37a63b8Smrg# Now try BSD make style include. 678c37a63b8Smrgif test "$am__include" = "#"; then 679c37a63b8Smrg echo '.include "confinc"' > confmf 680c37a63b8Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 681c37a63b8Smrg *the\ am__doit\ target*) 682c37a63b8Smrg am__include=.include 683c37a63b8Smrg am__quote="\"" 684c37a63b8Smrg _am_result=BSD 685c37a63b8Smrg ;; 686c37a63b8Smrg esac 687c37a63b8Smrgfi 688c37a63b8SmrgAC_SUBST([am__include]) 689c37a63b8SmrgAC_SUBST([am__quote]) 690c37a63b8SmrgAC_MSG_RESULT([$_am_result]) 691c37a63b8Smrgrm -f confinc confmf 692c37a63b8Smrg]) 693264fa531Smrg 694c37a63b8Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 695264fa531Smrg 696c37a63b8Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 697c37a63b8Smrg# Free Software Foundation, Inc. 698c37a63b8Smrg# 699c37a63b8Smrg# This file is free software; the Free Software Foundation 700c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 701c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 702264fa531Smrg 703264fa531Smrg# serial 6 704264fa531Smrg 705c37a63b8Smrg# AM_MISSING_PROG(NAME, PROGRAM) 706c37a63b8Smrg# ------------------------------ 707c37a63b8SmrgAC_DEFUN([AM_MISSING_PROG], 708c37a63b8Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 709c37a63b8Smrg$1=${$1-"${am_missing_run}$2"} 710c37a63b8SmrgAC_SUBST($1)]) 711264fa531Smrg 712264fa531Smrg 713c37a63b8Smrg# AM_MISSING_HAS_RUN 714c37a63b8Smrg# ------------------ 715c37a63b8Smrg# Define MISSING if not defined so far and test if it supports --run. 716c37a63b8Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 717c37a63b8SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 718c37a63b8Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719c37a63b8SmrgAC_REQUIRE_AUX_FILE([missing])dnl 720c37a63b8Smrgif test x"${MISSING+set}" != xset; then 721c37a63b8Smrg case $am_aux_dir in 722c37a63b8Smrg *\ * | *\ *) 723c37a63b8Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724c37a63b8Smrg *) 725c37a63b8Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 726c37a63b8Smrg esac 727264fa531Smrgfi 728c37a63b8Smrg# Use eval to expand $SHELL 729c37a63b8Smrgif eval "$MISSING --run true"; then 730c37a63b8Smrg am_missing_run="$MISSING --run " 731c37a63b8Smrgelse 732c37a63b8Smrg am_missing_run= 733c37a63b8Smrg AC_MSG_WARN([`missing' script is too old or missing]) 734c37a63b8Smrgfi 735c37a63b8Smrg]) 736264fa531Smrg 737c37a63b8Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 738264fa531Smrg# 739c37a63b8Smrg# This file is free software; the Free Software Foundation 740c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 741c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 742c37a63b8Smrg 743c37a63b8Smrg# AM_PROG_MKDIR_P 744c37a63b8Smrg# --------------- 745c37a63b8Smrg# Check for `mkdir -p'. 746c37a63b8SmrgAC_DEFUN([AM_PROG_MKDIR_P], 747c37a63b8Smrg[AC_PREREQ([2.60])dnl 748c37a63b8SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 749c37a63b8Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 750c37a63b8Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 751c37a63b8Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 752c37a63b8Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 753c37a63b8Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 754c37a63b8Smrgdnl adjustment using top_builddir (which is defined more often than 755c37a63b8Smrgdnl MKDIR_P). 756c37a63b8SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 757c37a63b8Smrgcase $mkdir_p in 758c37a63b8Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 759c37a63b8Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 760c37a63b8Smrgesac 761c37a63b8Smrg]) 762c37a63b8Smrg 763c37a63b8Smrg# Helper functions for option handling. -*- Autoconf -*- 764c37a63b8Smrg 765c37a63b8Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 766264fa531Smrg# 767c37a63b8Smrg# This file is free software; the Free Software Foundation 768c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 769c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 770c37a63b8Smrg 771c37a63b8Smrg# serial 4 772c37a63b8Smrg 773c37a63b8Smrg# _AM_MANGLE_OPTION(NAME) 774c37a63b8Smrg# ----------------------- 775c37a63b8SmrgAC_DEFUN([_AM_MANGLE_OPTION], 776c37a63b8Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 777c37a63b8Smrg 778c37a63b8Smrg# _AM_SET_OPTION(NAME) 779c37a63b8Smrg# ------------------------------ 780c37a63b8Smrg# Set option NAME. Presently that only means defining a flag for this option. 781c37a63b8SmrgAC_DEFUN([_AM_SET_OPTION], 782c37a63b8Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 783c37a63b8Smrg 784c37a63b8Smrg# _AM_SET_OPTIONS(OPTIONS) 785c37a63b8Smrg# ---------------------------------- 786c37a63b8Smrg# OPTIONS is a space-separated list of Automake options. 787c37a63b8SmrgAC_DEFUN([_AM_SET_OPTIONS], 788c37a63b8Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 789c37a63b8Smrg 790c37a63b8Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 791c37a63b8Smrg# ------------------------------------------- 792c37a63b8Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 793c37a63b8SmrgAC_DEFUN([_AM_IF_OPTION], 794c37a63b8Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 795c37a63b8Smrg 796c37a63b8Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 797c37a63b8Smrg 798c37a63b8Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 799c37a63b8Smrg# Free Software Foundation, Inc. 800264fa531Smrg# 801c37a63b8Smrg# This file is free software; the Free Software Foundation 802c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 803c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 804264fa531Smrg 805c37a63b8Smrg# serial 5 806264fa531Smrg 807c37a63b8Smrg# AM_SANITY_CHECK 808c37a63b8Smrg# --------------- 809c37a63b8SmrgAC_DEFUN([AM_SANITY_CHECK], 810c37a63b8Smrg[AC_MSG_CHECKING([whether build environment is sane]) 811c37a63b8Smrg# Just in case 812c37a63b8Smrgsleep 1 813c37a63b8Smrgecho timestamp > conftest.file 814c37a63b8Smrg# Reject unsafe characters in $srcdir or the absolute working directory 815c37a63b8Smrg# name. Accept space and tab only in the latter. 816c37a63b8Smrgam_lf=' 817c37a63b8Smrg' 818c37a63b8Smrgcase `pwd` in 819c37a63b8Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 820c37a63b8Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 821c37a63b8Smrgesac 822c37a63b8Smrgcase $srcdir in 823c37a63b8Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 824c37a63b8Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 825c37a63b8Smrgesac 826c37a63b8Smrg 827c37a63b8Smrg# Do `set' in a subshell so we don't clobber the current shell's 828c37a63b8Smrg# arguments. Must try -L first in case configure is actually a 829c37a63b8Smrg# symlink; some systems play weird games with the mod time of symlinks 830c37a63b8Smrg# (eg FreeBSD returns the mod time of the symlink's containing 831c37a63b8Smrg# directory). 832c37a63b8Smrgif ( 833c37a63b8Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 834c37a63b8Smrg if test "$[*]" = "X"; then 835c37a63b8Smrg # -L didn't work. 836c37a63b8Smrg set X `ls -t "$srcdir/configure" conftest.file` 837c37a63b8Smrg fi 838c37a63b8Smrg rm -f conftest.file 839c37a63b8Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 840c37a63b8Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 841c37a63b8Smrg 842c37a63b8Smrg # If neither matched, then we have a broken ls. This can happen 843c37a63b8Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 844c37a63b8Smrg # broken ls alias from the environment. This has actually 845c37a63b8Smrg # happened. Such a system could not be considered "sane". 846c37a63b8Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 847c37a63b8Smrgalias in your environment]) 848c37a63b8Smrg fi 849c37a63b8Smrg 850c37a63b8Smrg test "$[2]" = conftest.file 851c37a63b8Smrg ) 852c37a63b8Smrgthen 853c37a63b8Smrg # Ok. 854c37a63b8Smrg : 855264fa531Smrgelse 856c37a63b8Smrg AC_MSG_ERROR([newly created file is older than distributed files! 857c37a63b8SmrgCheck your system clock]) 858c37a63b8Smrgfi 859c37a63b8SmrgAC_MSG_RESULT(yes)]) 860264fa531Smrg 861c37a63b8Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 862264fa531Smrg# 863c37a63b8Smrg# This file is free software; the Free Software Foundation 864c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 865c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 866c37a63b8Smrg 867c37a63b8Smrg# serial 1 868c37a63b8Smrg 869c37a63b8Smrg# AM_SILENT_RULES([DEFAULT]) 870c37a63b8Smrg# -------------------------- 871c37a63b8Smrg# Enable less verbose build rules; with the default set to DEFAULT 872c37a63b8Smrg# (`yes' being less verbose, `no' or empty being verbose). 873c37a63b8SmrgAC_DEFUN([AM_SILENT_RULES], 874c37a63b8Smrg[AC_ARG_ENABLE([silent-rules], 875c37a63b8Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 876c37a63b8Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 877c37a63b8Smrgcase $enable_silent_rules in 878c37a63b8Smrgyes) AM_DEFAULT_VERBOSITY=0;; 879c37a63b8Smrgno) AM_DEFAULT_VERBOSITY=1;; 880c37a63b8Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 881c37a63b8Smrgesac 882c37a63b8SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 883c37a63b8SmrgAM_BACKSLASH='\' 884c37a63b8SmrgAC_SUBST([AM_BACKSLASH])dnl 885c37a63b8Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 886c37a63b8Smrg]) 887c37a63b8Smrg 888c37a63b8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 889264fa531Smrg# 890c37a63b8Smrg# This file is free software; the Free Software Foundation 891c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 892c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 893c37a63b8Smrg 894c37a63b8Smrg# AM_PROG_INSTALL_STRIP 895c37a63b8Smrg# --------------------- 896c37a63b8Smrg# One issue with vendor `install' (even GNU) is that you can't 897c37a63b8Smrg# specify the program used to strip binaries. This is especially 898c37a63b8Smrg# annoying in cross-compiling environments, where the build's strip 899c37a63b8Smrg# is unlikely to handle the host's binaries. 900c37a63b8Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 901c37a63b8Smrg# always use install-sh in `make install-strip', and initialize 902c37a63b8Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 903c37a63b8SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 904c37a63b8Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 905c37a63b8Smrg# Installed binaries are usually stripped using `strip' when the user 906c37a63b8Smrg# run `make install-strip'. However `strip' might not be the right 907c37a63b8Smrg# tool to use in cross-compilation environments, therefore Automake 908c37a63b8Smrg# will honor the `STRIP' environment variable to overrule this program. 909c37a63b8Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 910c37a63b8Smrgif test "$cross_compiling" != no; then 911c37a63b8Smrg AC_CHECK_TOOL([STRIP], [strip], :) 912c37a63b8Smrgfi 913c37a63b8SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 914c37a63b8SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 915c37a63b8Smrg 916c37a63b8Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 917264fa531Smrg# 918c37a63b8Smrg# This file is free software; the Free Software Foundation 919c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 920c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 921264fa531Smrg 922c37a63b8Smrg# serial 2 923264fa531Smrg 924c37a63b8Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 925c37a63b8Smrg# --------------------------- 926c37a63b8Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 927c37a63b8Smrg# This macro is traced by Automake. 928c37a63b8SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 929264fa531Smrg 930c37a63b8Smrg# AM_SUBST_NOTMAKE(VARIABLE) 931c37a63b8Smrg# --------------------------- 932c37a63b8Smrg# Public sister of _AM_SUBST_NOTMAKE. 933c37a63b8SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934264fa531Smrg 935c37a63b8Smrg# Check how to create a tarball. -*- Autoconf -*- 936c37a63b8Smrg 937c37a63b8Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 938c37a63b8Smrg# 939c37a63b8Smrg# This file is free software; the Free Software Foundation 940c37a63b8Smrg# gives unlimited permission to copy and/or distribute it, 941c37a63b8Smrg# with or without modifications, as long as this notice is preserved. 942c37a63b8Smrg 943c37a63b8Smrg# serial 2 944c37a63b8Smrg 945c37a63b8Smrg# _AM_PROG_TAR(FORMAT) 946c37a63b8Smrg# -------------------- 947c37a63b8Smrg# Check how to create a tarball in format FORMAT. 948c37a63b8Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 949c37a63b8Smrg# 950c37a63b8Smrg# Substitute a variable $(am__tar) that is a command 951c37a63b8Smrg# writing to stdout a FORMAT-tarball containing the directory 952c37a63b8Smrg# $tardir. 953c37a63b8Smrg# tardir=directory && $(am__tar) > result.tar 954c37a63b8Smrg# 955c37a63b8Smrg# Substitute a variable $(am__untar) that extract such 956c37a63b8Smrg# a tarball read from stdin. 957c37a63b8Smrg# $(am__untar) < result.tar 958c37a63b8SmrgAC_DEFUN([_AM_PROG_TAR], 959c37a63b8Smrg[# Always define AMTAR for backward compatibility. 960c37a63b8SmrgAM_MISSING_PROG([AMTAR], [tar]) 961c37a63b8Smrgm4_if([$1], [v7], 962c37a63b8Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 963c37a63b8Smrg [m4_case([$1], [ustar],, [pax],, 964c37a63b8Smrg [m4_fatal([Unknown tar format])]) 965c37a63b8SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 966c37a63b8Smrg# Loop over all known methods to create a tar archive until one works. 967c37a63b8Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 968c37a63b8Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 969c37a63b8Smrg# Do not fold the above two line into one, because Tru64 sh and 970c37a63b8Smrg# Solaris sh will not grok spaces in the rhs of `-'. 971c37a63b8Smrgfor _am_tool in $_am_tools 972c37a63b8Smrgdo 973c37a63b8Smrg case $_am_tool in 974c37a63b8Smrg gnutar) 975c37a63b8Smrg for _am_tar in tar gnutar gtar; 976c37a63b8Smrg do 977c37a63b8Smrg AM_RUN_LOG([$_am_tar --version]) && break 978c37a63b8Smrg done 979c37a63b8Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 980c37a63b8Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 981c37a63b8Smrg am__untar="$_am_tar -xf -" 982c37a63b8Smrg ;; 983c37a63b8Smrg plaintar) 984c37a63b8Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 985c37a63b8Smrg # ustar tarball either. 986c37a63b8Smrg (tar --version) >/dev/null 2>&1 && continue 987c37a63b8Smrg am__tar='tar chf - "$$tardir"' 988c37a63b8Smrg am__tar_='tar chf - "$tardir"' 989c37a63b8Smrg am__untar='tar xf -' 990c37a63b8Smrg ;; 991c37a63b8Smrg pax) 992c37a63b8Smrg am__tar='pax -L -x $1 -w "$$tardir"' 993c37a63b8Smrg am__tar_='pax -L -x $1 -w "$tardir"' 994c37a63b8Smrg am__untar='pax -r' 995c37a63b8Smrg ;; 996c37a63b8Smrg cpio) 997c37a63b8Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 998c37a63b8Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 999c37a63b8Smrg am__untar='cpio -i -H $1 -d' 1000c37a63b8Smrg ;; 1001c37a63b8Smrg none) 1002c37a63b8Smrg am__tar=false 1003c37a63b8Smrg am__tar_=false 1004c37a63b8Smrg am__untar=false 1005c37a63b8Smrg ;; 1006c37a63b8Smrg esac 1007264fa531Smrg 1008c37a63b8Smrg # If the value was cached, stop now. We just wanted to have am__tar 1009c37a63b8Smrg # and am__untar set. 1010c37a63b8Smrg test -n "${am_cv_prog_tar_$1}" && break 1011264fa531Smrg 1012c37a63b8Smrg # tar/untar a dummy directory, and stop if the command works 1013c37a63b8Smrg rm -rf conftest.dir 1014c37a63b8Smrg mkdir conftest.dir 1015c37a63b8Smrg echo GrepMe > conftest.dir/file 1016c37a63b8Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1017c37a63b8Smrg rm -rf conftest.dir 1018c37a63b8Smrg if test -s conftest.tar; then 1019c37a63b8Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1020c37a63b8Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1021c37a63b8Smrg fi 1022c37a63b8Smrgdone 1023c37a63b8Smrgrm -rf conftest.dir 1024264fa531Smrg 1025c37a63b8SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1026c37a63b8SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1027c37a63b8SmrgAC_SUBST([am__tar]) 1028c37a63b8SmrgAC_SUBST([am__untar]) 1029c37a63b8Smrg]) # _AM_PROG_TAR 1030264fa531Smrg 1031c37a63b8Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1032264fa531Smrgdnl 1033c37a63b8Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 1034264fa531Smrgdnl 1035c37a63b8Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036c37a63b8Smrgdnl copy of this software and associated documentation files (the 1037c37a63b8Smrgdnl "Software"), to deal in the Software without restriction, including 1038c37a63b8Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 1039c37a63b8Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 1040c37a63b8Smrgdnl to whom the Software is furnished to do so, provided that the above 1041c37a63b8Smrgdnl copyright notice(s) and this permission notice appear in all copies of 1042c37a63b8Smrgdnl the Software and that both the above copyright notice(s) and this 1043c37a63b8Smrgdnl permission notice appear in supporting documentation. 1044c37a63b8Smrgdnl 1045264fa531Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1046264fa531Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1047c37a63b8Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 1048c37a63b8Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 1049c37a63b8Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 1050c37a63b8Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 1051c37a63b8Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 1052c37a63b8Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 1053c37a63b8Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1054c37a63b8Smrgdnl 1055c37a63b8Smrgdnl Except as contained in this notice, the name of a copyright holder 1056c37a63b8Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 1057c37a63b8Smrgdnl or other dealings in this Software without prior written authorization 1058c37a63b8Smrgdnl of the copyright holder. 1059c37a63b8Smrg 1060c37a63b8Smrg# XORG_MACROS_VERSION(required-version) 1061c37a63b8Smrg# ------------------------------------- 1062c37a63b8Smrg# Minimum version: 1.1.0 1063c37a63b8Smrg# 1064c37a63b8Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1065c37a63b8Smrg# your configure.ac with the minimum required version, such as: 1066c37a63b8Smrg# XORG_MACROS_VERSION(1.1) 1067c37a63b8Smrg# 1068c37a63b8Smrg# To ensure that this macro is defined, also add: 1069c37a63b8Smrg# m4_ifndef([XORG_MACROS_VERSION], 1070c37a63b8Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1071c37a63b8Smrg# 1072c37a63b8Smrg# 1073c37a63b8Smrg# See the "minimum version" comment for each macro you use to see what 1074c37a63b8Smrg# version you require. 1075c37a63b8Smrgm4_defun([XORG_MACROS_VERSION],[ 1076c37a63b8Smrgm4_define([vers_have], [1.3.0]) 1077c37a63b8Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1078c37a63b8Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1079c37a63b8Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1080c37a63b8Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1081c37a63b8Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1082c37a63b8Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1083c37a63b8Smrgm4_undefine([vers_have]) 1084c37a63b8Smrgm4_undefine([maj_have]) 1085c37a63b8Smrgm4_undefine([maj_needed]) 1086c37a63b8Smrg]) # XORG_MACROS_VERSION 1087264fa531Smrg 1088264fa531Smrg# XORG_PROG_RAWCPP() 1089264fa531Smrg# ------------------ 1090c37a63b8Smrg# Minimum version: 1.0.0 1091c37a63b8Smrg# 1092264fa531Smrg# Find cpp program and necessary flags for use in pre-processing text files 1093264fa531Smrg# such as man pages and config files 1094264fa531SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1095264fa531SmrgAC_REQUIRE([AC_PROG_CPP]) 1096264fa531SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1097264fa531Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1098264fa531Smrg 1099264fa531Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1100264fa531Smrg# which is not the best choice for supporting other OS'es, but covers most 1101264fa531Smrg# of the ones we need for now. 1102264fa531SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1103264fa531SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 1104264fa531Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1105264fa531Smrg AC_MSG_RESULT([no]) 1106264fa531Smrgelse 1107264fa531Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1108264fa531Smrg RAWCPPFLAGS=-undef 1109264fa531Smrg AC_MSG_RESULT([yes]) 1110c37a63b8Smrg # under Cygwin unix is still defined even with -undef 1111c37a63b8Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1112c37a63b8Smrg RAWCPPFLAGS="-undef -ansi" 1113c37a63b8Smrg AC_MSG_RESULT([yes, with -ansi]) 1114264fa531Smrg else 1115264fa531Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1116264fa531Smrg fi 1117264fa531Smrgfi 1118264fa531Smrgrm -f conftest.$ac_ext 1119264fa531Smrg 1120264fa531SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1121264fa531SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 1122264fa531Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1123264fa531Smrg AC_MSG_RESULT([no]) 1124264fa531Smrgelse 1125264fa531Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1126264fa531Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1127264fa531Smrg AC_MSG_RESULT([yes]) 1128264fa531Smrg else 1129264fa531Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1130264fa531Smrg fi 1131264fa531Smrgfi 1132264fa531Smrgrm -f conftest.$ac_ext 1133264fa531SmrgAC_SUBST(RAWCPPFLAGS) 1134264fa531Smrg]) # XORG_PROG_RAWCPP 1135264fa531Smrg 1136264fa531Smrg# XORG_MANPAGE_SECTIONS() 1137264fa531Smrg# ----------------------- 1138c37a63b8Smrg# Minimum version: 1.0.0 1139c37a63b8Smrg# 1140264fa531Smrg# Determine which sections man pages go in for the different man page types 1141264fa531Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1142264fa531Smrg# Not sure if there's any better way than just hardcoding by OS name. 1143264fa531Smrg# Override default settings by setting environment variables 1144264fa531Smrg 1145264fa531SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1146264fa531SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1147264fa531Smrg 1148264fa531Smrgif test x$APP_MAN_SUFFIX = x ; then 1149c37a63b8Smrg APP_MAN_SUFFIX=1 1150264fa531Smrgfi 1151264fa531Smrgif test x$APP_MAN_DIR = x ; then 1152c37a63b8Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1153264fa531Smrgfi 1154264fa531Smrg 1155264fa531Smrgif test x$LIB_MAN_SUFFIX = x ; then 1156c37a63b8Smrg LIB_MAN_SUFFIX=3 1157264fa531Smrgfi 1158264fa531Smrgif test x$LIB_MAN_DIR = x ; then 1159c37a63b8Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1160264fa531Smrgfi 1161264fa531Smrg 1162264fa531Smrgif test x$FILE_MAN_SUFFIX = x ; then 1163264fa531Smrg case $host_os in 1164264fa531Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1165264fa531Smrg *) FILE_MAN_SUFFIX=5 ;; 1166264fa531Smrg esac 1167264fa531Smrgfi 1168264fa531Smrgif test x$FILE_MAN_DIR = x ; then 1169c37a63b8Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1170264fa531Smrgfi 1171264fa531Smrg 1172264fa531Smrgif test x$MISC_MAN_SUFFIX = x ; then 1173264fa531Smrg case $host_os in 1174264fa531Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1175264fa531Smrg *) MISC_MAN_SUFFIX=7 ;; 1176264fa531Smrg esac 1177264fa531Smrgfi 1178264fa531Smrgif test x$MISC_MAN_DIR = x ; then 1179c37a63b8Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1180264fa531Smrgfi 1181264fa531Smrg 1182264fa531Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1183264fa531Smrg case $host_os in 1184264fa531Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1185264fa531Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1186264fa531Smrg esac 1187264fa531Smrgfi 1188264fa531Smrgif test x$DRIVER_MAN_DIR = x ; then 1189c37a63b8Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1190264fa531Smrgfi 1191264fa531Smrg 1192264fa531Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1193264fa531Smrg case $host_os in 1194264fa531Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1195264fa531Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1196264fa531Smrg esac 1197264fa531Smrgfi 1198264fa531Smrgif test x$ADMIN_MAN_DIR = x ; then 1199264fa531Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1200264fa531Smrgfi 1201264fa531Smrg 1202264fa531Smrg 1203264fa531SmrgAC_SUBST([APP_MAN_SUFFIX]) 1204264fa531SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1205264fa531SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1206264fa531SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1207264fa531SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1208264fa531SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1209264fa531SmrgAC_SUBST([APP_MAN_DIR]) 1210264fa531SmrgAC_SUBST([LIB_MAN_DIR]) 1211264fa531SmrgAC_SUBST([FILE_MAN_DIR]) 1212264fa531SmrgAC_SUBST([MISC_MAN_DIR]) 1213264fa531SmrgAC_SUBST([DRIVER_MAN_DIR]) 1214264fa531SmrgAC_SUBST([ADMIN_MAN_DIR]) 1215264fa531Smrg]) # XORG_MANPAGE_SECTIONS 1216264fa531Smrg 1217264fa531Smrg# XORG_CHECK_LINUXDOC 1218264fa531Smrg# ------------------- 1219c37a63b8Smrg# Minimum version: 1.0.0 1220c37a63b8Smrg# 1221264fa531Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1222264fa531Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1223264fa531Smrg# Whether or not the necessary tools and files are found can be checked 1224264fa531Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1225264fa531SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1226c37a63b8Smrgif test x$XORG_SGML_PATH = x ; then 1227c37a63b8Smrg XORG_SGML_PATH=$prefix/share/sgml 1228c37a63b8Smrgfi 1229c37a63b8SmrgHAVE_DEFS_ENT= 1230c37a63b8Smrg 1231c37a63b8Smrgif test x"$cross_compiling" = x"yes" ; then 1232c37a63b8Smrg HAVE_DEFS_ENT=no 1233c37a63b8Smrgelse 1234c37a63b8Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1235c37a63b8Smrgfi 1236264fa531Smrg 1237264fa531SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1238264fa531SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 1239264fa531Smrg 1240264fa531SmrgAC_MSG_CHECKING([Whether to build documentation]) 1241264fa531Smrg 1242c37a63b8Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 1243264fa531Smrg BUILDDOC=yes 1244264fa531Smrgelse 1245264fa531Smrg BUILDDOC=no 1246264fa531Smrgfi 1247264fa531Smrg 1248264fa531SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1249264fa531Smrg 1250264fa531SmrgAC_MSG_RESULT([$BUILDDOC]) 1251264fa531Smrg 1252264fa531SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 1253264fa531Smrg 1254c37a63b8Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 1255264fa531Smrg BUILDPDFDOC=yes 1256264fa531Smrgelse 1257264fa531Smrg BUILDPDFDOC=no 1258264fa531Smrgfi 1259264fa531Smrg 1260264fa531SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1261264fa531Smrg 1262264fa531SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1263264fa531Smrg 1264c37a63b8SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 1265c37a63b8SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1266264fa531SmrgMAKE_PDF="$PS2PDF" 1267c37a63b8SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1268264fa531Smrg 1269264fa531SmrgAC_SUBST(MAKE_TEXT) 1270264fa531SmrgAC_SUBST(MAKE_PS) 1271264fa531SmrgAC_SUBST(MAKE_PDF) 1272264fa531SmrgAC_SUBST(MAKE_HTML) 1273264fa531Smrg]) # XORG_CHECK_LINUXDOC 1274264fa531Smrg 1275c37a63b8Smrg# XORG_CHECK_DOCBOOK 1276c37a63b8Smrg# ------------------- 1277c37a63b8Smrg# Minimum version: 1.0.0 1278c37a63b8Smrg# 1279c37a63b8Smrg# Checks for the ability to build output formats from SGML DocBook source. 1280c37a63b8Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1281c37a63b8Smrg# indicates whether the necessary tools and files are found and, if set, 1282c37a63b8Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1283c37a63b8SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1284c37a63b8Smrgif test x$XORG_SGML_PATH = x ; then 1285c37a63b8Smrg XORG_SGML_PATH=$prefix/share/sgml 1286c37a63b8Smrgfi 1287c37a63b8SmrgHAVE_DEFS_ENT= 1288c37a63b8SmrgBUILDTXTDOC=no 1289c37a63b8SmrgBUILDPDFDOC=no 1290c37a63b8SmrgBUILDPSDOC=no 1291c37a63b8SmrgBUILDHTMLDOC=no 1292c37a63b8Smrg 1293c37a63b8SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 1294c37a63b8Smrg 1295c37a63b8SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1296c37a63b8SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1297c37a63b8SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1298c37a63b8SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1299c37a63b8Smrg 1300c37a63b8SmrgAC_MSG_CHECKING([Whether to build text documentation]) 1301c37a63b8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 1302c37a63b8Smrg test x$BUILD_TXTDOC != xno; then 1303c37a63b8Smrg BUILDTXTDOC=yes 1304c37a63b8Smrgfi 1305c37a63b8SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1306c37a63b8SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1307c37a63b8Smrg 1308c37a63b8SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 1309c37a63b8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 1310c37a63b8Smrg test x$BUILD_PDFDOC != xno; then 1311c37a63b8Smrg BUILDPDFDOC=yes 1312c37a63b8Smrgfi 1313c37a63b8SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1314c37a63b8SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1315c37a63b8Smrg 1316c37a63b8SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 1317c37a63b8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 1318c37a63b8Smrg test x$BUILD_PSDOC != xno; then 1319c37a63b8Smrg BUILDPSDOC=yes 1320c37a63b8Smrgfi 1321c37a63b8SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1322c37a63b8SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1323c37a63b8Smrg 1324c37a63b8SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 1325c37a63b8Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 1326c37a63b8Smrg test x$BUILD_HTMLDOC != xno; then 1327c37a63b8Smrg BUILDHTMLDOC=yes 1328c37a63b8Smrgfi 1329c37a63b8SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1330c37a63b8SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1331c37a63b8Smrg 1332c37a63b8SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1333c37a63b8SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1334c37a63b8SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1335c37a63b8SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1336c37a63b8Smrg 1337c37a63b8SmrgAC_SUBST(MAKE_TEXT) 1338c37a63b8SmrgAC_SUBST(MAKE_PS) 1339c37a63b8SmrgAC_SUBST(MAKE_PDF) 1340c37a63b8SmrgAC_SUBST(MAKE_HTML) 1341c37a63b8Smrg]) # XORG_CHECK_DOCBOOK 1342c37a63b8Smrg 1343264fa531Smrg# XORG_CHECK_MALLOC_ZERO 1344264fa531Smrg# ---------------------- 1345c37a63b8Smrg# Minimum version: 1.0.0 1346c37a63b8Smrg# 1347264fa531Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1348264fa531Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1349264fa531Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1350264fa531SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1351264fa531SmrgAC_ARG_ENABLE(malloc0returnsnull, 1352c37a63b8Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1353264fa531Smrg [malloc(0) returns NULL (default: auto)]), 1354264fa531Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1355264fa531Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1356264fa531Smrg 1357264fa531SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1358264fa531Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1359264fa531Smrg AC_RUN_IFELSE([ 1360264fa531Smrgchar *malloc(); 1361264fa531Smrgchar *realloc(); 1362264fa531Smrgchar *calloc(); 1363264fa531Smrgmain() { 1364264fa531Smrg char *m0, *r0, *c0, *p; 1365264fa531Smrg m0 = malloc(0); 1366264fa531Smrg p = malloc(10); 1367264fa531Smrg r0 = realloc(p,0); 1368264fa531Smrg c0 = calloc(0); 1369264fa531Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 1370264fa531Smrg}], 1371264fa531Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1372264fa531Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 1373264fa531Smrgfi 1374264fa531SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1375264fa531Smrg 1376264fa531Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1377264fa531Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1378264fa531Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1379264fa531Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1380264fa531Smrgelse 1381264fa531Smrg MALLOC_ZERO_CFLAGS="" 1382264fa531Smrg XMALLOC_ZERO_CFLAGS="" 1383264fa531Smrg XTMALLOC_ZERO_CFLAGS="" 1384264fa531Smrgfi 1385264fa531Smrg 1386264fa531SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1387264fa531SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1388264fa531SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1389264fa531Smrg]) # XORG_CHECK_MALLOC_ZERO 1390264fa531Smrg 1391c37a63b8Smrg# XORG_WITH_LINT() 1392c37a63b8Smrg# ---------------- 1393c37a63b8Smrg# Minimum version: 1.1.0 1394c37a63b8Smrg# 1395c37a63b8Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 1396c37a63b8Smrg# is specified. (Use --with-lint=sparse for sparse.) 1397c37a63b8Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 1398c37a63b8Smrg# Sets $LINT_FLAGS to flags to pass to source checker 1399c37a63b8Smrg# Sets LINT automake conditional if enabled (default: disabled) 1400c37a63b8Smrg# 1401c37a63b8SmrgAC_DEFUN([XORG_WITH_LINT],[ 1402c37a63b8Smrg 1403c37a63b8Smrg# Allow checking code with lint, sparse, etc. 1404c37a63b8SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1405c37a63b8Smrg [Use a lint-style source code checker (default: disabled)])], 1406c37a63b8Smrg [use_lint=$withval], [use_lint=no]) 1407c37a63b8Smrgif test "x$use_lint" = "xyes" ; then 1408c37a63b8Smrg LINT="lint" 1409c37a63b8Smrgelse 1410c37a63b8Smrg LINT="$use_lint" 1411c37a63b8Smrgfi 1412c37a63b8Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 1413c37a63b8Smrg case $LINT in 1414c37a63b8Smrg lint|*/lint) 1415c37a63b8Smrg case $host_os in 1416c37a63b8Smrg solaris*) 1417c37a63b8Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1418c37a63b8Smrg ;; 1419c37a63b8Smrg esac 1420c37a63b8Smrg ;; 1421c37a63b8Smrg esac 1422c37a63b8Smrgfi 1423c37a63b8Smrg 1424c37a63b8SmrgAC_SUBST(LINT) 1425c37a63b8SmrgAC_SUBST(LINT_FLAGS) 1426c37a63b8SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 1427c37a63b8Smrg 1428c37a63b8Smrg]) # XORG_WITH_LINT 1429c37a63b8Smrg 1430c37a63b8Smrg# XORG_LINT_LIBRARY(LIBNAME) 1431c37a63b8Smrg# -------------------------- 1432c37a63b8Smrg# Minimum version: 1.1.0 1433c37a63b8Smrg# 1434c37a63b8Smrg# Sets up flags for building lint libraries for checking programs that call 1435c37a63b8Smrg# functions in the library. 1436c37a63b8Smrg# Disabled by default, enable with --enable-lint-library 1437c37a63b8Smrg# Sets: 1438c37a63b8Smrg# @LINTLIB@ - name of lint library file to make 1439c37a63b8Smrg# MAKE_LINT_LIB - automake conditional 1440c37a63b8Smrg# 1441c37a63b8Smrg 1442c37a63b8SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1443c37a63b8SmrgAC_REQUIRE([XORG_WITH_LINT]) 1444c37a63b8Smrg# Build lint "library" for more indepth checks of programs calling this library 1445c37a63b8SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1446c37a63b8Smrg [Create lint library (default: disabled)])], 1447c37a63b8Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1448c37a63b8Smrgif test "x$make_lint_lib" != "xno" ; then 1449c37a63b8Smrg if test "x$LINT" = "xno" ; then 1450c37a63b8Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1451c37a63b8Smrg fi 1452c37a63b8Smrg if test "x$make_lint_lib" = "xyes" ; then 1453c37a63b8Smrg LINTLIB=llib-l$1.ln 1454c37a63b8Smrg else 1455c37a63b8Smrg LINTLIB=$make_lint_lib 1456c37a63b8Smrg fi 1457c37a63b8Smrgfi 1458c37a63b8SmrgAC_SUBST(LINTLIB) 1459c37a63b8SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1460c37a63b8Smrg 1461c37a63b8Smrg]) # XORG_LINT_LIBRARY 1462c37a63b8Smrg 1463c37a63b8Smrg# XORG_CWARNFLAGS 1464c37a63b8Smrg# --------------- 1465c37a63b8Smrg# Minimum version: 1.2.0 1466c37a63b8Smrg# 1467c37a63b8Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1468c37a63b8Smrg# 1469c37a63b8SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1470c37a63b8SmrgAC_REQUIRE([AC_PROG_CC]) 1471c37a63b8Smrgif test "x$GCC" = xyes ; then 1472c37a63b8Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 1473c37a63b8Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 1474c37a63b8Smrg-Wbad-function-cast" 1475c37a63b8Smrg case `$CC -dumpversion` in 1476c37a63b8Smrg 3.4.* | 4.*) 1477c37a63b8Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 1478c37a63b8Smrg ;; 1479c37a63b8Smrg esac 1480c37a63b8Smrgelse 1481c37a63b8Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1482c37a63b8Smrg if test "x$SUNCC" = "xyes"; then 1483c37a63b8Smrg CWARNFLAGS="-v" 1484c37a63b8Smrg fi 1485c37a63b8Smrgfi 1486c37a63b8SmrgAC_SUBST(CWARNFLAGS) 1487c37a63b8Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 1488c37a63b8Smrg]) # XORG_CWARNFLAGS 1489c37a63b8Smrg 1490c37a63b8Smrg# XORG_STRICT_OPTION 1491c37a63b8Smrg# ----------------------- 1492c37a63b8Smrg# Minimum version: 1.3.0 1493c37a63b8Smrg# 1494c37a63b8Smrg# Add configure option to enable strict compilation 1495c37a63b8SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1496c37a63b8SmrgAC_REQUIRE([AC_PROG_CC]) 1497c37a63b8SmrgAC_REQUIRE([AC_PROG_CC_C99]) 1498c37a63b8SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1499c37a63b8Smrg 1500c37a63b8SmrgAC_ARG_ENABLE(strict-compilation, 1501c37a63b8Smrg AS_HELP_STRING([--enable-strict-compilation], 1502c37a63b8Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1503c37a63b8Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1504c37a63b8Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1505c37a63b8Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1506c37a63b8Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1507c37a63b8Smrg if test "x$GCC" = xyes ; then 1508c37a63b8Smrg STRICT_CFLAGS="-pedantic -Werror" 1509c37a63b8Smrg elif test "x$SUNCC" = "xyes"; then 1510c37a63b8Smrg STRICT_CFLAGS="-errwarn" 1511c37a63b8Smrg elif test "x$INTELCC" = "xyes"; then 1512c37a63b8Smrg STRICT_CFLAGS="-Werror" 1513c37a63b8Smrg fi 1514c37a63b8Smrgfi 1515c37a63b8SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 1516c37a63b8SmrgAC_SUBST([CWARNFLAGS]) 1517c37a63b8Smrg]) # XORG_STRICT_OPTION 1518c37a63b8Smrg 1519c37a63b8Smrg# XORG_DEFAULT_OPTIONS 1520c37a63b8Smrg# -------------------- 1521c37a63b8Smrg# Minimum version: 1.3.0 1522c37a63b8Smrg# 1523c37a63b8Smrg# Defines default options for X.Org modules. 1524c37a63b8Smrg# 1525c37a63b8SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1526c37a63b8SmrgXORG_CWARNFLAGS 1527c37a63b8SmrgXORG_STRICT_OPTION 1528c37a63b8SmrgXORG_RELEASE_VERSION 1529c37a63b8SmrgXORG_CHANGELOG 1530c37a63b8SmrgXORG_MANPAGE_SECTIONS 1531c37a63b8Smrg]) # XORG_DEFAULT_OPTIONS 1532264fa531Smrgdnl Copyright 2005 Red Hat, Inc 1533264fa531Smrgdnl 1534264fa531Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1535264fa531Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1536264fa531Smrgdnl the above copyright notice appear in all copies and that both that 1537264fa531Smrgdnl copyright notice and this permission notice appear in supporting 1538264fa531Smrgdnl documentation. 1539264fa531Smrgdnl 1540264fa531Smrgdnl The above copyright notice and this permission notice shall be included 1541264fa531Smrgdnl in all copies or substantial portions of the Software. 1542264fa531Smrgdnl 1543264fa531Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1544264fa531Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1545264fa531Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1546264fa531Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1547264fa531Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1548264fa531Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1549264fa531Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1550264fa531Smrgdnl 1551264fa531Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1552264fa531Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1553264fa531Smrgdnl other dealings in this Software without prior written authorization 1554264fa531Smrgdnl from the copyright holders. 1555264fa531Smrgdnl 1556264fa531Smrg 1557264fa531Smrg# XORG_RELEASE_VERSION 1558264fa531Smrg# -------------------- 1559264fa531Smrg# Adds --with/without-release-string and changes the PACKAGE and 1560264fa531Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 1561c37a63b8Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 1562c37a63b8Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1563264fa531Smrg 1564264fa531SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1565264fa531Smrg AC_ARG_WITH(release-version, 1566c37a63b8Smrg AS_HELP_STRING([--with-release-version=STRING], 1567264fa531Smrg [Use release version string in package name]), 1568264fa531Smrg [RELEASE_VERSION="$withval"], 1569264fa531Smrg [RELEASE_VERSION=""]) 1570264fa531Smrg if test "x$RELEASE_VERSION" != "x"; then 1571264fa531Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 1572264fa531Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 1573264fa531Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 1574264fa531Smrg fi 1575c37a63b8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1576c37a63b8Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1577c37a63b8Smrg [Major version of this package]) 1578c37a63b8Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1579c37a63b8Smrg if test "x$PVM" = "x"; then 1580c37a63b8Smrg PVM="0" 1581c37a63b8Smrg fi 1582c37a63b8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1583c37a63b8Smrg [$PVM], 1584c37a63b8Smrg [Minor version of this package]) 1585c37a63b8Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1586c37a63b8Smrg if test "x$PVP" = "x"; then 1587c37a63b8Smrg PVP="0" 1588c37a63b8Smrg fi 1589c37a63b8Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1590c37a63b8Smrg [$PVP], 1591c37a63b8Smrg [Patch version of this package]) 1592264fa531Smrg]) 1593264fa531Smrg 1594c37a63b8Smrg# XORG_CHANGELOG() 1595c37a63b8Smrg# ---------------- 1596c37a63b8Smrg# Minimum version: 1.2.0 1597c37a63b8Smrg# 1598c37a63b8Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1599c37a63b8Smrg# ChangeLog from git. 1600c37a63b8Smrg# 1601c37a63b8Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 1602c37a63b8Smrg# 1603c37a63b8SmrgAC_DEFUN([XORG_CHANGELOG], [ 1604c37a63b8SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 1605c37a63b8Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 1606c37a63b8Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1607c37a63b8SmrgAC_SUBST([CHANGELOG_CMD]) 1608c37a63b8SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 1609c37a63b8Smrg]) # XORG_CHANGELOG 1610c37a63b8Smrg 1611c37a63b8Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1612c37a63b8Smrg# 1613c37a63b8Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1614c37a63b8Smrg# 1615c37a63b8Smrg# This program is free software; you can redistribute it and/or modify 1616c37a63b8Smrg# it under the terms of the GNU General Public License as published by 1617c37a63b8Smrg# the Free Software Foundation; either version 2 of the License, or 1618c37a63b8Smrg# (at your option) any later version. 1619c37a63b8Smrg# 1620c37a63b8Smrg# This program is distributed in the hope that it will be useful, but 1621c37a63b8Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1622c37a63b8Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1623c37a63b8Smrg# General Public License for more details. 1624c37a63b8Smrg# 1625c37a63b8Smrg# You should have received a copy of the GNU General Public License 1626c37a63b8Smrg# along with this program; if not, write to the Free Software 1627c37a63b8Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1628c37a63b8Smrg# 1629c37a63b8Smrg# As a special exception to the GNU General Public License, if you 1630c37a63b8Smrg# distribute this file as part of a program that contains a 1631c37a63b8Smrg# configuration script generated by Autoconf, you may include it under 1632c37a63b8Smrg# the same distribution terms that you use for the rest of that program. 1633c37a63b8Smrg 1634c37a63b8Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1635c37a63b8Smrg# ---------------------------------- 1636c37a63b8SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1637c37a63b8Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1638c37a63b8Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 1639c37a63b8SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 1640c37a63b8Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1641c37a63b8Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1642c37a63b8Smrgfi 1643c37a63b8Smrgif test -n "$PKG_CONFIG"; then 1644c37a63b8Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 1645c37a63b8Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1646c37a63b8Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1647c37a63b8Smrg AC_MSG_RESULT([yes]) 1648c37a63b8Smrg else 1649c37a63b8Smrg AC_MSG_RESULT([no]) 1650c37a63b8Smrg PKG_CONFIG="" 1651c37a63b8Smrg fi 1652c37a63b8Smrg 1653c37a63b8Smrgfi[]dnl 1654c37a63b8Smrg])# PKG_PROG_PKG_CONFIG 1655c37a63b8Smrg 1656c37a63b8Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1657c37a63b8Smrg# 1658c37a63b8Smrg# Check to see whether a particular set of modules exists. Similar 1659c37a63b8Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 1660c37a63b8Smrg# 1661c37a63b8Smrg# 1662c37a63b8Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 1663c37a63b8Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 1664c37a63b8Smrg# PKG_CHECK_EXISTS manually 1665c37a63b8Smrg# -------------------------------------------------------------- 1666c37a63b8SmrgAC_DEFUN([PKG_CHECK_EXISTS], 1667c37a63b8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1668c37a63b8Smrgif test -n "$PKG_CONFIG" && \ 1669c37a63b8Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1670c37a63b8Smrg m4_ifval([$2], [$2], [:]) 1671c37a63b8Smrgm4_ifvaln([$3], [else 1672c37a63b8Smrg $3])dnl 1673c37a63b8Smrgfi]) 1674c37a63b8Smrg 1675c37a63b8Smrg 1676c37a63b8Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1677c37a63b8Smrg# --------------------------------------------- 1678c37a63b8Smrgm4_define([_PKG_CONFIG], 1679c37a63b8Smrg[if test -n "$$1"; then 1680c37a63b8Smrg pkg_cv_[]$1="$$1" 1681c37a63b8Smrg elif test -n "$PKG_CONFIG"; then 1682c37a63b8Smrg PKG_CHECK_EXISTS([$3], 1683c37a63b8Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1684c37a63b8Smrg [pkg_failed=yes]) 1685c37a63b8Smrg else 1686c37a63b8Smrg pkg_failed=untried 1687c37a63b8Smrgfi[]dnl 1688c37a63b8Smrg])# _PKG_CONFIG 1689c37a63b8Smrg 1690c37a63b8Smrg# _PKG_SHORT_ERRORS_SUPPORTED 1691c37a63b8Smrg# ----------------------------- 1692c37a63b8SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1693c37a63b8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1694c37a63b8Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1695c37a63b8Smrg _pkg_short_errors_supported=yes 1696c37a63b8Smrgelse 1697c37a63b8Smrg _pkg_short_errors_supported=no 1698c37a63b8Smrgfi[]dnl 1699c37a63b8Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1700c37a63b8Smrg 1701c37a63b8Smrg 1702c37a63b8Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1703c37a63b8Smrg# [ACTION-IF-NOT-FOUND]) 1704c37a63b8Smrg# 1705c37a63b8Smrg# 1706c37a63b8Smrg# Note that if there is a possibility the first call to 1707c37a63b8Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1708c37a63b8Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1709c37a63b8Smrg# 1710c37a63b8Smrg# 1711c37a63b8Smrg# -------------------------------------------------------------- 1712c37a63b8SmrgAC_DEFUN([PKG_CHECK_MODULES], 1713c37a63b8Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1714c37a63b8SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1715c37a63b8SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1716c37a63b8Smrg 1717c37a63b8Smrgpkg_failed=no 1718c37a63b8SmrgAC_MSG_CHECKING([for $1]) 1719c37a63b8Smrg 1720c37a63b8Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1721c37a63b8Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1722c37a63b8Smrg 1723c37a63b8Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1724c37a63b8Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1725c37a63b8SmrgSee the pkg-config man page for more details.]) 1726c37a63b8Smrg 1727c37a63b8Smrgif test $pkg_failed = yes; then 1728c37a63b8Smrg _PKG_SHORT_ERRORS_SUPPORTED 1729c37a63b8Smrg if test $_pkg_short_errors_supported = yes; then 1730c37a63b8Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1731c37a63b8Smrg else 1732c37a63b8Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1733c37a63b8Smrg fi 1734c37a63b8Smrg # Put the nasty error message in config.log where it belongs 1735c37a63b8Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1736c37a63b8Smrg 1737c37a63b8Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 1738c37a63b8Smrg[Package requirements ($2) were not met: 1739c37a63b8Smrg 1740c37a63b8Smrg$$1_PKG_ERRORS 1741c37a63b8Smrg 1742c37a63b8SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1743c37a63b8Smrginstalled software in a non-standard prefix. 1744c37a63b8Smrg 1745c37a63b8Smrg_PKG_TEXT 1746c37a63b8Smrg])], 1747c37a63b8Smrg [AC_MSG_RESULT([no]) 1748c37a63b8Smrg $4]) 1749c37a63b8Smrgelif test $pkg_failed = untried; then 1750c37a63b8Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 1751c37a63b8Smrg[The pkg-config script could not be found or is too old. Make sure it 1752c37a63b8Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1753c37a63b8Smrgpath to pkg-config. 1754c37a63b8Smrg 1755c37a63b8Smrg_PKG_TEXT 1756c37a63b8Smrg 1757c37a63b8SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 1758c37a63b8Smrg [$4]) 1759c37a63b8Smrgelse 1760c37a63b8Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1761c37a63b8Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1762c37a63b8Smrg AC_MSG_RESULT([yes]) 1763c37a63b8Smrg ifelse([$3], , :, [$3]) 1764c37a63b8Smrgfi[]dnl 1765c37a63b8Smrg])# PKG_CHECK_MODULES 1766c37a63b8Smrg 1767