aclocal.m4 revision 5eeb4e8f
15eeb4e8fSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 25eeb4e8fSmrg 35eeb4e8fSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4972599cfSmrg 5972599cfSmrg# This file is free software; the Free Software Foundation 6972599cfSmrg# gives unlimited permission to copy and/or distribute it, 7972599cfSmrg# with or without modifications, as long as this notice is preserved. 8972599cfSmrg 9972599cfSmrg# This program is distributed in the hope that it will be useful, 10972599cfSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11972599cfSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12972599cfSmrg# PARTICULAR PURPOSE. 13972599cfSmrg 145eeb4e8fSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15972599cfSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16972599cfSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 175eeb4e8fSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 185eeb4e8fSmrg[m4_warning([this file was generated for autoconf 2.69. 19972599cfSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20972599cfSmrgIf you have problems, you may need to regenerate the build system entirely. 215eeb4e8fSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22972599cfSmrg 235eeb4e8fSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 24972599cfSmrg# 25972599cfSmrg# This file is free software; the Free Software Foundation 26972599cfSmrg# gives unlimited permission to copy and/or distribute it, 27972599cfSmrg# with or without modifications, as long as this notice is preserved. 28972599cfSmrg 29972599cfSmrg# AM_AUTOMAKE_VERSION(VERSION) 30972599cfSmrg# ---------------------------- 31972599cfSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 32972599cfSmrg# generated from the m4 files accompanying Automake X.Y. 33972599cfSmrg# (This private macro should not be called outside this file.) 34972599cfSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 355eeb4e8fSmrg[am__api_version='1.15' 36972599cfSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37972599cfSmrgdnl require some minimum version. Point them to the right macro. 385eeb4e8fSmrgm4_if([$1], [1.15], [], 39972599cfSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40972599cfSmrg]) 41972599cfSmrg 42972599cfSmrg# _AM_AUTOCONF_VERSION(VERSION) 43972599cfSmrg# ----------------------------- 44972599cfSmrg# aclocal traces this macro to find the Autoconf version. 45972599cfSmrg# This is a private macro too. Using m4_define simplifies 46972599cfSmrg# the logic in aclocal, which can simply ignore this definition. 47972599cfSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48972599cfSmrg 49972599cfSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 50972599cfSmrg# ------------------------------- 51972599cfSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52972599cfSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53972599cfSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 545eeb4e8fSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 55972599cfSmrgm4_ifndef([AC_AUTOCONF_VERSION], 56972599cfSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57972599cfSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58972599cfSmrg 59972599cfSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60972599cfSmrg 615eeb4e8fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 62972599cfSmrg# 63972599cfSmrg# This file is free software; the Free Software Foundation 64972599cfSmrg# gives unlimited permission to copy and/or distribute it, 65972599cfSmrg# with or without modifications, as long as this notice is preserved. 66972599cfSmrg 67972599cfSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 685eeb4e8fSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 695eeb4e8fSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70972599cfSmrg# 71972599cfSmrg# Of course, Automake must honor this variable whenever it calls a 72972599cfSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 73972599cfSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 74972599cfSmrg# depending on how configure is run. This is pretty annoying, since 75972599cfSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76972599cfSmrg# source directory, any form will work fine, but in subdirectories a 77972599cfSmrg# relative path needs to be adjusted first. 78972599cfSmrg# 79972599cfSmrg# $ac_aux_dir/missing 80972599cfSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 81972599cfSmrg# $top_srcdir/$ac_aux_dir/missing 82972599cfSmrg# fails if $ac_aux_dir is absolute, 83972599cfSmrg# fails when called from a subdirectory in a VPATH build with 84972599cfSmrg# a relative $ac_aux_dir 85972599cfSmrg# 86972599cfSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87972599cfSmrg# are both prefixed by $srcdir. In an in-source build this is usually 885eeb4e8fSmrg# harmless because $srcdir is '.', but things will broke when you 89972599cfSmrg# start a VPATH build or use an absolute $srcdir. 90972599cfSmrg# 91972599cfSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92972599cfSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93972599cfSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94972599cfSmrg# and then we would define $MISSING as 95972599cfSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 96972599cfSmrg# This will work as long as MISSING is not called from configure, because 97972599cfSmrg# unfortunately $(top_srcdir) has no meaning in configure. 98972599cfSmrg# However there are other variables, like CC, which are often used in 99972599cfSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100972599cfSmrg# 101972599cfSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 102972599cfSmrg# absolute PATH. The drawback is that using absolute paths prevent a 103972599cfSmrg# configured tree to be moved without reconfiguration. 104972599cfSmrg 105972599cfSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1065eeb4e8fSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1075eeb4e8fSmrg# Expand $ac_aux_dir to an absolute path. 1085eeb4e8fSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109972599cfSmrg]) 110972599cfSmrg 111972599cfSmrg# AM_CONDITIONAL -*- Autoconf -*- 112972599cfSmrg 1135eeb4e8fSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 114972599cfSmrg# 115972599cfSmrg# This file is free software; the Free Software Foundation 116972599cfSmrg# gives unlimited permission to copy and/or distribute it, 117972599cfSmrg# with or without modifications, as long as this notice is preserved. 118972599cfSmrg 119972599cfSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120972599cfSmrg# ------------------------------------- 121972599cfSmrg# Define a conditional. 122972599cfSmrgAC_DEFUN([AM_CONDITIONAL], 1235eeb4e8fSmrg[AC_PREREQ([2.52])dnl 1245eeb4e8fSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1255eeb4e8fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126972599cfSmrgAC_SUBST([$1_TRUE])dnl 127972599cfSmrgAC_SUBST([$1_FALSE])dnl 128972599cfSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129972599cfSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130972599cfSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 131972599cfSmrgif $2; then 132972599cfSmrg $1_TRUE= 133972599cfSmrg $1_FALSE='#' 134972599cfSmrgelse 135972599cfSmrg $1_TRUE='#' 136972599cfSmrg $1_FALSE= 137972599cfSmrgfi 138972599cfSmrgAC_CONFIG_COMMANDS_PRE( 139972599cfSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140972599cfSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 141972599cfSmrgUsually this means the macro was only invoked conditionally.]]) 142972599cfSmrgfi])]) 143972599cfSmrg 1445eeb4e8fSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 145972599cfSmrg# 146972599cfSmrg# This file is free software; the Free Software Foundation 147972599cfSmrg# gives unlimited permission to copy and/or distribute it, 148972599cfSmrg# with or without modifications, as long as this notice is preserved. 149972599cfSmrg 150972599cfSmrg 1515eeb4e8fSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 152972599cfSmrg# written in clear, in which case automake, when reading aclocal.m4, 153972599cfSmrg# will think it sees a *use*, and therefore will trigger all it's 154972599cfSmrg# C support machinery. Also note that it means that autoscan, seeing 155972599cfSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156972599cfSmrg 157972599cfSmrg 158972599cfSmrg# _AM_DEPENDENCIES(NAME) 159972599cfSmrg# ---------------------- 160972599cfSmrg# See how the compiler implements dependency checking. 1615eeb4e8fSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 162972599cfSmrg# We try a few techniques and use that to set a single cache variable. 163972599cfSmrg# 164972599cfSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 165972599cfSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 166972599cfSmrg# dependency, and given that the user is not expected to run this macro, 167972599cfSmrg# just rely on AC_PROG_CC. 168972599cfSmrgAC_DEFUN([_AM_DEPENDENCIES], 169972599cfSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 170972599cfSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 171972599cfSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 172972599cfSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173972599cfSmrg 1745eeb4e8fSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1755eeb4e8fSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1765eeb4e8fSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1775eeb4e8fSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1785eeb4e8fSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1795eeb4e8fSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1805eeb4e8fSmrg [depcc="$$1" am_compiler_list=]) 181972599cfSmrg 182972599cfSmrgAC_CACHE_CHECK([dependency style of $depcc], 183972599cfSmrg [am_cv_$1_dependencies_compiler_type], 184972599cfSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 185972599cfSmrg # We make a subdir and do the tests there. Otherwise we can end up 186972599cfSmrg # making bogus files that we don't know about and never remove. For 187972599cfSmrg # instance it was reported that on HP-UX the gcc test will end up 1885eeb4e8fSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1895eeb4e8fSmrg # in D". 190972599cfSmrg rm -rf conftest.dir 191972599cfSmrg mkdir conftest.dir 192972599cfSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 193972599cfSmrg # using a relative directory. 194972599cfSmrg cp "$am_depcomp" conftest.dir 195972599cfSmrg cd conftest.dir 196972599cfSmrg # We will build objects and dependencies in a subdirectory because 197972599cfSmrg # it helps to detect inapplicable dependency modes. For instance 198972599cfSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 199972599cfSmrg # side effect of compilation, but ICC will put the dependencies in 200972599cfSmrg # the current directory while Tru64 will put them in the object 201972599cfSmrg # directory. 202972599cfSmrg mkdir sub 203972599cfSmrg 204972599cfSmrg am_cv_$1_dependencies_compiler_type=none 205972599cfSmrg if test "$am_compiler_list" = ""; then 206972599cfSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 207972599cfSmrg fi 208972599cfSmrg am__universal=false 209972599cfSmrg m4_case([$1], [CC], 210972599cfSmrg [case " $depcc " in #( 211972599cfSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 212972599cfSmrg esac], 213972599cfSmrg [CXX], 214972599cfSmrg [case " $depcc " in #( 215972599cfSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 216972599cfSmrg esac]) 217972599cfSmrg 218972599cfSmrg for depmode in $am_compiler_list; do 219972599cfSmrg # Setup a source with many dependencies, because some compilers 220972599cfSmrg # like to wrap large dependency lists on column 80 (with \), and 221972599cfSmrg # we should not choose a depcomp mode which is confused by this. 222972599cfSmrg # 223972599cfSmrg # We need to recreate these files for each test, as the compiler may 224972599cfSmrg # overwrite some of them when testing with obscure command lines. 225972599cfSmrg # This happens at least with the AIX C compiler. 226972599cfSmrg : > sub/conftest.c 227972599cfSmrg for i in 1 2 3 4 5 6; do 228972599cfSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2295eeb4e8fSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2305eeb4e8fSmrg # Solaris 10 /bin/sh. 2315eeb4e8fSmrg echo '/* dummy */' > sub/conftst$i.h 232972599cfSmrg done 233972599cfSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234972599cfSmrg 2355eeb4e8fSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 236972599cfSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2375eeb4e8fSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2385eeb4e8fSmrg # versions had trouble with output in subdirs. 239972599cfSmrg am__obj=sub/conftest.${OBJEXT-o} 240972599cfSmrg am__minus_obj="-o $am__obj" 241972599cfSmrg case $depmode in 242972599cfSmrg gcc) 243972599cfSmrg # This depmode causes a compiler race in universal mode. 244972599cfSmrg test "$am__universal" = false || continue 245972599cfSmrg ;; 246972599cfSmrg nosideeffect) 2475eeb4e8fSmrg # After this tag, mechanisms are not by side-effect, so they'll 2485eeb4e8fSmrg # only be used when explicitly requested. 249972599cfSmrg if test "x$enable_dependency_tracking" = xyes; then 250972599cfSmrg continue 251972599cfSmrg else 252972599cfSmrg break 253972599cfSmrg fi 254972599cfSmrg ;; 255972599cfSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2565eeb4e8fSmrg # This compiler won't grok '-c -o', but also, the minuso test has 257972599cfSmrg # not run yet. These depmodes are late enough in the game, and 258972599cfSmrg # so weak that their functioning should not be impacted. 259972599cfSmrg am__obj=conftest.${OBJEXT-o} 260972599cfSmrg am__minus_obj= 261972599cfSmrg ;; 262972599cfSmrg none) break ;; 263972599cfSmrg esac 264972599cfSmrg if depmode=$depmode \ 265972599cfSmrg source=sub/conftest.c object=$am__obj \ 266972599cfSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 267972599cfSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 268972599cfSmrg >/dev/null 2>conftest.err && 269972599cfSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 270972599cfSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 271972599cfSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 272972599cfSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 273972599cfSmrg # icc doesn't choke on unknown options, it will just issue warnings 274972599cfSmrg # or remarks (even with -Werror). So we grep stderr for any message 275972599cfSmrg # that says an option was ignored or not supported. 276972599cfSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 277972599cfSmrg # icc: Command line warning: ignoring option '-M'; no argument required 278972599cfSmrg # The diagnosis changed in icc 8.0: 279972599cfSmrg # icc: Command line remark: option '-MP' not supported 280972599cfSmrg if (grep 'ignoring option' conftest.err || 281972599cfSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 282972599cfSmrg am_cv_$1_dependencies_compiler_type=$depmode 283972599cfSmrg break 284972599cfSmrg fi 285972599cfSmrg fi 286972599cfSmrg done 287972599cfSmrg 288972599cfSmrg cd .. 289972599cfSmrg rm -rf conftest.dir 290972599cfSmrgelse 291972599cfSmrg am_cv_$1_dependencies_compiler_type=none 292972599cfSmrgfi 293972599cfSmrg]) 294972599cfSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 295972599cfSmrgAM_CONDITIONAL([am__fastdep$1], [ 296972599cfSmrg test "x$enable_dependency_tracking" != xno \ 297972599cfSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298972599cfSmrg]) 299972599cfSmrg 300972599cfSmrg 301972599cfSmrg# AM_SET_DEPDIR 302972599cfSmrg# ------------- 303972599cfSmrg# Choose a directory name for dependency files. 3045eeb4e8fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 305972599cfSmrgAC_DEFUN([AM_SET_DEPDIR], 306972599cfSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 307972599cfSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 308972599cfSmrg]) 309972599cfSmrg 310972599cfSmrg 311972599cfSmrg# AM_DEP_TRACK 312972599cfSmrg# ------------ 313972599cfSmrgAC_DEFUN([AM_DEP_TRACK], 3145eeb4e8fSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3155eeb4e8fSmrgAS_HELP_STRING( 3165eeb4e8fSmrg [--enable-dependency-tracking], 3175eeb4e8fSmrg [do not reject slow dependency extractors]) 3185eeb4e8fSmrgAS_HELP_STRING( 3195eeb4e8fSmrg [--disable-dependency-tracking], 3205eeb4e8fSmrg [speeds up one-time build])]) 321972599cfSmrgif test "x$enable_dependency_tracking" != xno; then 322972599cfSmrg am_depcomp="$ac_aux_dir/depcomp" 323972599cfSmrg AMDEPBACKSLASH='\' 324972599cfSmrg am__nodep='_no' 325972599cfSmrgfi 326972599cfSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 327972599cfSmrgAC_SUBST([AMDEPBACKSLASH])dnl 328972599cfSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 329972599cfSmrgAC_SUBST([am__nodep])dnl 330972599cfSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331972599cfSmrg]) 332972599cfSmrg 333972599cfSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334972599cfSmrg 3355eeb4e8fSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 336972599cfSmrg# 337972599cfSmrg# This file is free software; the Free Software Foundation 338972599cfSmrg# gives unlimited permission to copy and/or distribute it, 339972599cfSmrg# with or without modifications, as long as this notice is preserved. 340972599cfSmrg 341972599cfSmrg 342972599cfSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 343972599cfSmrg# ------------------------------ 344972599cfSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 345972599cfSmrg[{ 3465eeb4e8fSmrg # Older Autoconf quotes --file arguments for eval, but not when files 347972599cfSmrg # are listed without --file. Let's play safe and only enable the eval 348972599cfSmrg # if we detect the quoting. 349972599cfSmrg case $CONFIG_FILES in 350972599cfSmrg *\'*) eval set x "$CONFIG_FILES" ;; 351972599cfSmrg *) set x $CONFIG_FILES ;; 352972599cfSmrg esac 353972599cfSmrg shift 354972599cfSmrg for mf 355972599cfSmrg do 356972599cfSmrg # Strip MF so we end up with the name of the file. 357972599cfSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 358972599cfSmrg # Check whether this is an Automake generated Makefile or not. 3595eeb4e8fSmrg # We used to match only the files named 'Makefile.in', but 360972599cfSmrg # some people rename them; so instead we look at the file content. 361972599cfSmrg # Grep'ing the first line is not enough: some people post-process 362972599cfSmrg # each Makefile.in and add a new line on top of each file to say so. 363972599cfSmrg # Grep'ing the whole file is not good either: AIX grep has a line 364972599cfSmrg # limit of 2048, but all sed's we know have understand at least 4000. 365972599cfSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 366972599cfSmrg dirpart=`AS_DIRNAME("$mf")` 367972599cfSmrg else 368972599cfSmrg continue 369972599cfSmrg fi 370972599cfSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3715eeb4e8fSmrg # from the Makefile without running 'make'. 372972599cfSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 373972599cfSmrg test -z "$DEPDIR" && continue 374972599cfSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3755eeb4e8fSmrg test -z "$am__include" && continue 376972599cfSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 377972599cfSmrg # Find all dependency output files, they are included files with 378972599cfSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379972599cfSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 380972599cfSmrg # expansion. 381972599cfSmrg for file in `sed -n " 382972599cfSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3835eeb4e8fSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 384972599cfSmrg # Make sure the directory exists. 385972599cfSmrg test -f "$dirpart/$file" && continue 386972599cfSmrg fdir=`AS_DIRNAME(["$file"])` 387972599cfSmrg AS_MKDIR_P([$dirpart/$fdir]) 388972599cfSmrg # echo "creating $dirpart/$file" 389972599cfSmrg echo '# dummy' > "$dirpart/$file" 390972599cfSmrg done 391972599cfSmrg done 392972599cfSmrg} 393972599cfSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394972599cfSmrg 395972599cfSmrg 396972599cfSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397972599cfSmrg# ----------------------------- 398972599cfSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 399972599cfSmrg# 400972599cfSmrg# This code is only required when automatic dependency tracking 4015eeb4e8fSmrg# is enabled. FIXME. This creates each '.P' file that we will 402972599cfSmrg# need in order to bootstrap the dependency handling code. 403972599cfSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 404972599cfSmrg[AC_CONFIG_COMMANDS([depfiles], 405972599cfSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 406972599cfSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 407972599cfSmrg]) 408972599cfSmrg 409972599cfSmrg# Do all the work for Automake. -*- Autoconf -*- 410972599cfSmrg 4115eeb4e8fSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 412972599cfSmrg# 413972599cfSmrg# This file is free software; the Free Software Foundation 414972599cfSmrg# gives unlimited permission to copy and/or distribute it, 415972599cfSmrg# with or without modifications, as long as this notice is preserved. 416972599cfSmrg 417972599cfSmrg# This macro actually does too much. Some checks are only needed if 418972599cfSmrg# your package does certain things. But this isn't really a big deal. 419972599cfSmrg 4205eeb4e8fSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4215eeb4e8fSmrgm4_define([AC_PROG_CC], 4225eeb4e8fSmrgm4_defn([AC_PROG_CC]) 4235eeb4e8fSmrg[_AM_PROG_CC_C_O 4245eeb4e8fSmrg]) 4255eeb4e8fSmrg 426972599cfSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 427972599cfSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 428972599cfSmrg# ----------------------------------------------- 429972599cfSmrg# The call with PACKAGE and VERSION arguments is the old style 430972599cfSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 431972599cfSmrg# and VERSION should now be passed to AC_INIT and removed from 432972599cfSmrg# the call to AM_INIT_AUTOMAKE. 433972599cfSmrg# We support both call styles for the transition. After 434972599cfSmrg# the next Automake release, Autoconf can make the AC_INIT 435972599cfSmrg# arguments mandatory, and then we can depend on a new Autoconf 436972599cfSmrg# release and drop the old call support. 437972599cfSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4385eeb4e8fSmrg[AC_PREREQ([2.65])dnl 439972599cfSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 440972599cfSmrgdnl the ones we care about. 441972599cfSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 442972599cfSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 443972599cfSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 444972599cfSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 445972599cfSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 446972599cfSmrg # is not polluted with repeated "-I." 447972599cfSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 448972599cfSmrg # test to see if srcdir already configured 449972599cfSmrg if test -f $srcdir/config.status; then 450972599cfSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 451972599cfSmrg fi 452972599cfSmrgfi 453972599cfSmrg 454972599cfSmrg# test whether we have cygpath 455972599cfSmrgif test -z "$CYGPATH_W"; then 456972599cfSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 457972599cfSmrg CYGPATH_W='cygpath -w' 458972599cfSmrg else 459972599cfSmrg CYGPATH_W=echo 460972599cfSmrg fi 461972599cfSmrgfi 462972599cfSmrgAC_SUBST([CYGPATH_W]) 463972599cfSmrg 464972599cfSmrg# Define the identity of the package. 465972599cfSmrgdnl Distinguish between old-style and new-style calls. 466972599cfSmrgm4_ifval([$2], 4675eeb4e8fSmrg[AC_DIAGNOSE([obsolete], 4685eeb4e8fSmrg [$0: two- and three-arguments forms are deprecated.]) 4695eeb4e8fSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 470972599cfSmrg AC_SUBST([PACKAGE], [$1])dnl 471972599cfSmrg AC_SUBST([VERSION], [$2])], 472972599cfSmrg[_AM_SET_OPTIONS([$1])dnl 473972599cfSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4745eeb4e8fSmrgm4_if( 4755eeb4e8fSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 4765eeb4e8fSmrg [ok:ok],, 477972599cfSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 478972599cfSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 479972599cfSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 480972599cfSmrg 481972599cfSmrg_AM_IF_OPTION([no-define],, 4825eeb4e8fSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4835eeb4e8fSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 484972599cfSmrg 485972599cfSmrg# Some tools Automake needs. 486972599cfSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 487972599cfSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4885eeb4e8fSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4895eeb4e8fSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4905eeb4e8fSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4915eeb4e8fSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4925eeb4e8fSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 493972599cfSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 494972599cfSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4955eeb4e8fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4965eeb4e8fSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4975eeb4e8fSmrg# dies out for good. For more background, see: 4985eeb4e8fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4995eeb4e8fSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 5005eeb4e8fSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 5015eeb4e8fSmrg# We need awk for the "check" target (and possibly the TAP driver). The 5025eeb4e8fSmrg# system "awk" is bad on some platforms. 503972599cfSmrgAC_REQUIRE([AC_PROG_AWK])dnl 504972599cfSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 505972599cfSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 506972599cfSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507972599cfSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508972599cfSmrg [_AM_PROG_TAR([v7])])]) 509972599cfSmrg_AM_IF_OPTION([no-dependencies],, 510972599cfSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5115eeb4e8fSmrg [_AM_DEPENDENCIES([CC])], 5125eeb4e8fSmrg [m4_define([AC_PROG_CC], 5135eeb4e8fSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 514972599cfSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5155eeb4e8fSmrg [_AM_DEPENDENCIES([CXX])], 5165eeb4e8fSmrg [m4_define([AC_PROG_CXX], 5175eeb4e8fSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 518972599cfSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5195eeb4e8fSmrg [_AM_DEPENDENCIES([OBJC])], 5205eeb4e8fSmrg [m4_define([AC_PROG_OBJC], 5215eeb4e8fSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5225eeb4e8fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5235eeb4e8fSmrg [_AM_DEPENDENCIES([OBJCXX])], 5245eeb4e8fSmrg [m4_define([AC_PROG_OBJCXX], 5255eeb4e8fSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 526972599cfSmrg]) 5275eeb4e8fSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5285eeb4e8fSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 5295eeb4e8fSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5305eeb4e8fSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 531972599cfSmrgAC_CONFIG_COMMANDS_PRE(dnl 532972599cfSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 533972599cfSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5345eeb4e8fSmrg 5355eeb4e8fSmrg# POSIX will say in a future version that running "rm -f" with no argument 5365eeb4e8fSmrg# is OK; and we want to be able to make that assumption in our Makefile 5375eeb4e8fSmrg# recipes. So use an aggressive probe to check that the usage we want is 5385eeb4e8fSmrg# actually supported "in the wild" to an acceptable degree. 5395eeb4e8fSmrg# See automake bug#10828. 5405eeb4e8fSmrg# To make any issue more visible, cause the running configure to be aborted 5415eeb4e8fSmrg# by default if the 'rm' program in use doesn't match our expectations; the 5425eeb4e8fSmrg# user can still override this though. 5435eeb4e8fSmrgif rm -f && rm -fr && rm -rf; then : OK; else 5445eeb4e8fSmrg cat >&2 <<'END' 5455eeb4e8fSmrgOops! 5465eeb4e8fSmrg 5475eeb4e8fSmrgYour 'rm' program seems unable to run without file operands specified 5485eeb4e8fSmrgon the command line, even when the '-f' option is present. This is contrary 5495eeb4e8fSmrgto the behaviour of most rm programs out there, and not conforming with 5505eeb4e8fSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5515eeb4e8fSmrg 5525eeb4e8fSmrgPlease tell bug-automake@gnu.org about your system, including the value 5535eeb4e8fSmrgof your $PATH and any error possibly output before this message. This 5545eeb4e8fSmrgcan help us improve future automake versions. 5555eeb4e8fSmrg 5565eeb4e8fSmrgEND 5575eeb4e8fSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5585eeb4e8fSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 5595eeb4e8fSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5605eeb4e8fSmrg echo >&2 5615eeb4e8fSmrg else 5625eeb4e8fSmrg cat >&2 <<'END' 5635eeb4e8fSmrgAborting the configuration process, to ensure you take notice of the issue. 5645eeb4e8fSmrg 5655eeb4e8fSmrgYou can download and install GNU coreutils to get an 'rm' implementation 5665eeb4e8fSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 5675eeb4e8fSmrg 5685eeb4e8fSmrgIf you want to complete the configuration process using your problematic 5695eeb4e8fSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5705eeb4e8fSmrgto "yes", and re-run configure. 5715eeb4e8fSmrg 5725eeb4e8fSmrgEND 5735eeb4e8fSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5745eeb4e8fSmrg fi 5755eeb4e8fSmrgfi 5765eeb4e8fSmrgdnl The trailing newline in this macro's definition is deliberate, for 5775eeb4e8fSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 5785eeb4e8fSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 579972599cfSmrg]) 580972599cfSmrg 5815eeb4e8fSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 582972599cfSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 583972599cfSmrgdnl mangled by Autoconf and run in a shell conditional statement. 584972599cfSmrgm4_define([_AC_COMPILER_EXEEXT], 585972599cfSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 586972599cfSmrg 587972599cfSmrg# When config.status generates a header, we must update the stamp-h file. 588972599cfSmrg# This file resides in the same directory as the config header 589972599cfSmrg# that is generated. The stamp files are numbered to have different names. 590972599cfSmrg 591972599cfSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 592972599cfSmrg# loop where config.status creates the headers, so we can generate 593972599cfSmrg# our stamp files there. 594972599cfSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 595972599cfSmrg[# Compute $1's index in $config_headers. 596972599cfSmrg_am_arg=$1 597972599cfSmrg_am_stamp_count=1 598972599cfSmrgfor _am_header in $config_headers :; do 599972599cfSmrg case $_am_header in 600972599cfSmrg $_am_arg | $_am_arg:* ) 601972599cfSmrg break ;; 602972599cfSmrg * ) 603972599cfSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 604972599cfSmrg esac 605972599cfSmrgdone 606972599cfSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 607972599cfSmrg 6085eeb4e8fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 609972599cfSmrg# 610972599cfSmrg# This file is free software; the Free Software Foundation 611972599cfSmrg# gives unlimited permission to copy and/or distribute it, 612972599cfSmrg# with or without modifications, as long as this notice is preserved. 613972599cfSmrg 614972599cfSmrg# AM_PROG_INSTALL_SH 615972599cfSmrg# ------------------ 616972599cfSmrg# Define $install_sh. 617972599cfSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 618972599cfSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6195eeb4e8fSmrgif test x"${install_sh+set}" != xset; then 620972599cfSmrg case $am_aux_dir in 621972599cfSmrg *\ * | *\ *) 622972599cfSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 623972599cfSmrg *) 624972599cfSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 625972599cfSmrg esac 626972599cfSmrgfi 6275eeb4e8fSmrgAC_SUBST([install_sh])]) 628972599cfSmrg 6295eeb4e8fSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 630972599cfSmrg# 631972599cfSmrg# This file is free software; the Free Software Foundation 632972599cfSmrg# gives unlimited permission to copy and/or distribute it, 633972599cfSmrg# with or without modifications, as long as this notice is preserved. 634972599cfSmrg 635972599cfSmrg# Check whether the underlying file-system supports filenames 636972599cfSmrg# with a leading dot. For instance MS-DOS doesn't. 637972599cfSmrgAC_DEFUN([AM_SET_LEADING_DOT], 638972599cfSmrg[rm -rf .tst 2>/dev/null 639972599cfSmrgmkdir .tst 2>/dev/null 640972599cfSmrgif test -d .tst; then 641972599cfSmrg am__leading_dot=. 642972599cfSmrgelse 643972599cfSmrg am__leading_dot=_ 644972599cfSmrgfi 645972599cfSmrgrmdir .tst 2>/dev/null 646972599cfSmrgAC_SUBST([am__leading_dot])]) 647972599cfSmrg 648972599cfSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 649972599cfSmrg 6505eeb4e8fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 651972599cfSmrg# 652972599cfSmrg# This file is free software; the Free Software Foundation 653972599cfSmrg# gives unlimited permission to copy and/or distribute it, 654972599cfSmrg# with or without modifications, as long as this notice is preserved. 655972599cfSmrg 656972599cfSmrg# AM_MAKE_INCLUDE() 657972599cfSmrg# ----------------- 658972599cfSmrg# Check to see how make treats includes. 659972599cfSmrgAC_DEFUN([AM_MAKE_INCLUDE], 660972599cfSmrg[am_make=${MAKE-make} 661972599cfSmrgcat > confinc << 'END' 662972599cfSmrgam__doit: 663972599cfSmrg @echo this is the am__doit target 664972599cfSmrg.PHONY: am__doit 665972599cfSmrgEND 666972599cfSmrg# If we don't find an include directive, just comment out the code. 667972599cfSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 668972599cfSmrgam__include="#" 669972599cfSmrgam__quote= 670972599cfSmrg_am_result=none 671972599cfSmrg# First try GNU make style include. 672972599cfSmrgecho "include confinc" > confmf 6735eeb4e8fSmrg# Ignore all kinds of additional output from 'make'. 674972599cfSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 675972599cfSmrg*the\ am__doit\ target*) 676972599cfSmrg am__include=include 677972599cfSmrg am__quote= 678972599cfSmrg _am_result=GNU 679972599cfSmrg ;; 680972599cfSmrgesac 681972599cfSmrg# Now try BSD make style include. 682972599cfSmrgif test "$am__include" = "#"; then 683972599cfSmrg echo '.include "confinc"' > confmf 684972599cfSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 685972599cfSmrg *the\ am__doit\ target*) 686972599cfSmrg am__include=.include 687972599cfSmrg am__quote="\"" 688972599cfSmrg _am_result=BSD 689972599cfSmrg ;; 690972599cfSmrg esac 691972599cfSmrgfi 692972599cfSmrgAC_SUBST([am__include]) 693972599cfSmrgAC_SUBST([am__quote]) 694972599cfSmrgAC_MSG_RESULT([$_am_result]) 695972599cfSmrgrm -f confinc confmf 696972599cfSmrg]) 697972599cfSmrg 698972599cfSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 699972599cfSmrg 7005eeb4e8fSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 701972599cfSmrg# 702972599cfSmrg# This file is free software; the Free Software Foundation 703972599cfSmrg# gives unlimited permission to copy and/or distribute it, 704972599cfSmrg# with or without modifications, as long as this notice is preserved. 705972599cfSmrg 706972599cfSmrg# AM_MISSING_PROG(NAME, PROGRAM) 707972599cfSmrg# ------------------------------ 708972599cfSmrgAC_DEFUN([AM_MISSING_PROG], 709972599cfSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 710972599cfSmrg$1=${$1-"${am_missing_run}$2"} 711972599cfSmrgAC_SUBST($1)]) 712972599cfSmrg 713972599cfSmrg# AM_MISSING_HAS_RUN 714972599cfSmrg# ------------------ 7155eeb4e8fSmrg# Define MISSING if not defined so far and test if it is modern enough. 7165eeb4e8fSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 717972599cfSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 718972599cfSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 719972599cfSmrgAC_REQUIRE_AUX_FILE([missing])dnl 720972599cfSmrgif test x"${MISSING+set}" != xset; then 721972599cfSmrg case $am_aux_dir in 722972599cfSmrg *\ * | *\ *) 723972599cfSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724972599cfSmrg *) 725972599cfSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 726972599cfSmrg esac 727972599cfSmrgfi 728972599cfSmrg# Use eval to expand $SHELL 7295eeb4e8fSmrgif eval "$MISSING --is-lightweight"; then 7305eeb4e8fSmrg am_missing_run="$MISSING " 731972599cfSmrgelse 732972599cfSmrg am_missing_run= 7335eeb4e8fSmrg AC_MSG_WARN(['missing' script is too old or missing]) 734972599cfSmrgfi 735972599cfSmrg]) 736972599cfSmrg 737972599cfSmrg# Helper functions for option handling. -*- Autoconf -*- 738972599cfSmrg 7395eeb4e8fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 740972599cfSmrg# 741972599cfSmrg# This file is free software; the Free Software Foundation 742972599cfSmrg# gives unlimited permission to copy and/or distribute it, 743972599cfSmrg# with or without modifications, as long as this notice is preserved. 744972599cfSmrg 745972599cfSmrg# _AM_MANGLE_OPTION(NAME) 746972599cfSmrg# ----------------------- 747972599cfSmrgAC_DEFUN([_AM_MANGLE_OPTION], 748972599cfSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 749972599cfSmrg 750972599cfSmrg# _AM_SET_OPTION(NAME) 751972599cfSmrg# -------------------- 752972599cfSmrg# Set option NAME. Presently that only means defining a flag for this option. 753972599cfSmrgAC_DEFUN([_AM_SET_OPTION], 7545eeb4e8fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 755972599cfSmrg 756972599cfSmrg# _AM_SET_OPTIONS(OPTIONS) 757972599cfSmrg# ------------------------ 758972599cfSmrg# OPTIONS is a space-separated list of Automake options. 759972599cfSmrgAC_DEFUN([_AM_SET_OPTIONS], 760972599cfSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 761972599cfSmrg 762972599cfSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 763972599cfSmrg# ------------------------------------------- 764972599cfSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 765972599cfSmrgAC_DEFUN([_AM_IF_OPTION], 766972599cfSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 767972599cfSmrg 7685eeb4e8fSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 7695eeb4e8fSmrg# 7705eeb4e8fSmrg# This file is free software; the Free Software Foundation 7715eeb4e8fSmrg# gives unlimited permission to copy and/or distribute it, 7725eeb4e8fSmrg# with or without modifications, as long as this notice is preserved. 773972599cfSmrg 7745eeb4e8fSmrg# _AM_PROG_CC_C_O 7755eeb4e8fSmrg# --------------- 7765eeb4e8fSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7775eeb4e8fSmrg# to automatically call this. 7785eeb4e8fSmrgAC_DEFUN([_AM_PROG_CC_C_O], 7795eeb4e8fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7805eeb4e8fSmrgAC_REQUIRE_AUX_FILE([compile])dnl 7815eeb4e8fSmrgAC_LANG_PUSH([C])dnl 7825eeb4e8fSmrgAC_CACHE_CHECK( 7835eeb4e8fSmrg [whether $CC understands -c and -o together], 7845eeb4e8fSmrg [am_cv_prog_cc_c_o], 7855eeb4e8fSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7865eeb4e8fSmrg # Make sure it works both with $CC and with simple cc. 7875eeb4e8fSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 7885eeb4e8fSmrg # compilers refuse to overwrite an existing .o file with -o, 7895eeb4e8fSmrg # though they will create one. 7905eeb4e8fSmrg am_cv_prog_cc_c_o=yes 7915eeb4e8fSmrg for am_i in 1 2; do 7925eeb4e8fSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7935eeb4e8fSmrg && test -f conftest2.$ac_objext; then 7945eeb4e8fSmrg : OK 7955eeb4e8fSmrg else 7965eeb4e8fSmrg am_cv_prog_cc_c_o=no 7975eeb4e8fSmrg break 7985eeb4e8fSmrg fi 7995eeb4e8fSmrg done 8005eeb4e8fSmrg rm -f core conftest* 8015eeb4e8fSmrg unset am_i]) 8025eeb4e8fSmrgif test "$am_cv_prog_cc_c_o" != yes; then 8035eeb4e8fSmrg # Losing compiler, so override with the script. 8045eeb4e8fSmrg # FIXME: It is wrong to rewrite CC. 8055eeb4e8fSmrg # But if we don't then we get into trouble of one sort or another. 8065eeb4e8fSmrg # A longer-term fix would be to have automake use am__CC in this case, 8075eeb4e8fSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8085eeb4e8fSmrg CC="$am_aux_dir/compile $CC" 8095eeb4e8fSmrgfi 8105eeb4e8fSmrgAC_LANG_POP([C])]) 8115eeb4e8fSmrg 8125eeb4e8fSmrg# For backward compatibility. 8135eeb4e8fSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8145eeb4e8fSmrg 8155eeb4e8fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 816972599cfSmrg# 817972599cfSmrg# This file is free software; the Free Software Foundation 818972599cfSmrg# gives unlimited permission to copy and/or distribute it, 819972599cfSmrg# with or without modifications, as long as this notice is preserved. 820972599cfSmrg 8215eeb4e8fSmrg# AM_RUN_LOG(COMMAND) 8225eeb4e8fSmrg# ------------------- 8235eeb4e8fSmrg# Run COMMAND, save the exit status in ac_status, and log it. 8245eeb4e8fSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8255eeb4e8fSmrgAC_DEFUN([AM_RUN_LOG], 8265eeb4e8fSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8275eeb4e8fSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8285eeb4e8fSmrg ac_status=$? 8295eeb4e8fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8305eeb4e8fSmrg (exit $ac_status); }]) 8315eeb4e8fSmrg 8325eeb4e8fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8335eeb4e8fSmrg 8345eeb4e8fSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 8355eeb4e8fSmrg# 8365eeb4e8fSmrg# This file is free software; the Free Software Foundation 8375eeb4e8fSmrg# gives unlimited permission to copy and/or distribute it, 8385eeb4e8fSmrg# with or without modifications, as long as this notice is preserved. 839972599cfSmrg 840972599cfSmrg# AM_SANITY_CHECK 841972599cfSmrg# --------------- 842972599cfSmrgAC_DEFUN([AM_SANITY_CHECK], 843972599cfSmrg[AC_MSG_CHECKING([whether build environment is sane]) 844972599cfSmrg# Reject unsafe characters in $srcdir or the absolute working directory 845972599cfSmrg# name. Accept space and tab only in the latter. 846972599cfSmrgam_lf=' 847972599cfSmrg' 848972599cfSmrgcase `pwd` in 849972599cfSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 850972599cfSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 851972599cfSmrgesac 852972599cfSmrgcase $srcdir in 853972599cfSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8545eeb4e8fSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 855972599cfSmrgesac 856972599cfSmrg 8575eeb4e8fSmrg# Do 'set' in a subshell so we don't clobber the current shell's 858972599cfSmrg# arguments. Must try -L first in case configure is actually a 859972599cfSmrg# symlink; some systems play weird games with the mod time of symlinks 860972599cfSmrg# (eg FreeBSD returns the mod time of the symlink's containing 861972599cfSmrg# directory). 862972599cfSmrgif ( 8635eeb4e8fSmrg am_has_slept=no 8645eeb4e8fSmrg for am_try in 1 2; do 8655eeb4e8fSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 8665eeb4e8fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8675eeb4e8fSmrg if test "$[*]" = "X"; then 8685eeb4e8fSmrg # -L didn't work. 8695eeb4e8fSmrg set X `ls -t "$srcdir/configure" conftest.file` 8705eeb4e8fSmrg fi 8715eeb4e8fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8725eeb4e8fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8735eeb4e8fSmrg 8745eeb4e8fSmrg # If neither matched, then we have a broken ls. This can happen 8755eeb4e8fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8765eeb4e8fSmrg # broken ls alias from the environment. This has actually 8775eeb4e8fSmrg # happened. Such a system could not be considered "sane". 8785eeb4e8fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8795eeb4e8fSmrg alias in your environment]) 8805eeb4e8fSmrg fi 8815eeb4e8fSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8825eeb4e8fSmrg break 8835eeb4e8fSmrg fi 8845eeb4e8fSmrg # Just in case. 8855eeb4e8fSmrg sleep 1 8865eeb4e8fSmrg am_has_slept=yes 8875eeb4e8fSmrg done 888972599cfSmrg test "$[2]" = conftest.file 889972599cfSmrg ) 890972599cfSmrgthen 891972599cfSmrg # Ok. 892972599cfSmrg : 893972599cfSmrgelse 894972599cfSmrg AC_MSG_ERROR([newly created file is older than distributed files! 895972599cfSmrgCheck your system clock]) 896972599cfSmrgfi 8975eeb4e8fSmrgAC_MSG_RESULT([yes]) 8985eeb4e8fSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8995eeb4e8fSmrg# generated files are strictly newer. 9005eeb4e8fSmrgam_sleep_pid= 9015eeb4e8fSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9025eeb4e8fSmrg ( sleep 1 ) & 9035eeb4e8fSmrg am_sleep_pid=$! 9045eeb4e8fSmrgfi 9055eeb4e8fSmrgAC_CONFIG_COMMANDS_PRE( 9065eeb4e8fSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9075eeb4e8fSmrg if test -n "$am_sleep_pid"; then 9085eeb4e8fSmrg # Hide warnings about reused PIDs. 9095eeb4e8fSmrg wait $am_sleep_pid 2>/dev/null 9105eeb4e8fSmrg fi 9115eeb4e8fSmrg AC_MSG_RESULT([done])]) 9125eeb4e8fSmrgrm -f conftest.file 9135eeb4e8fSmrg]) 914972599cfSmrg 9155eeb4e8fSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 916972599cfSmrg# 917972599cfSmrg# This file is free software; the Free Software Foundation 918972599cfSmrg# gives unlimited permission to copy and/or distribute it, 919972599cfSmrg# with or without modifications, as long as this notice is preserved. 920972599cfSmrg 921972599cfSmrg# AM_SILENT_RULES([DEFAULT]) 922972599cfSmrg# -------------------------- 923972599cfSmrg# Enable less verbose build rules; with the default set to DEFAULT 9245eeb4e8fSmrg# ("yes" being less verbose, "no" or empty being verbose). 925972599cfSmrgAC_DEFUN([AM_SILENT_RULES], 9265eeb4e8fSmrg[AC_ARG_ENABLE([silent-rules], [dnl 9275eeb4e8fSmrgAS_HELP_STRING( 9285eeb4e8fSmrg [--enable-silent-rules], 9295eeb4e8fSmrg [less verbose build output (undo: "make V=1")]) 9305eeb4e8fSmrgAS_HELP_STRING( 9315eeb4e8fSmrg [--disable-silent-rules], 9325eeb4e8fSmrg [verbose build output (undo: "make V=0")])dnl 9335eeb4e8fSmrg]) 9345eeb4e8fSmrgcase $enable_silent_rules in @%:@ ((( 9355eeb4e8fSmrg yes) AM_DEFAULT_VERBOSITY=0;; 9365eeb4e8fSmrg no) AM_DEFAULT_VERBOSITY=1;; 9375eeb4e8fSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 938972599cfSmrgesac 9395eeb4e8fSmrgdnl 9405eeb4e8fSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9415eeb4e8fSmrgdnl do not support nested variable expansions. 9425eeb4e8fSmrgdnl See automake bug#9928 and bug#10237. 9435eeb4e8fSmrgam_make=${MAKE-make} 9445eeb4e8fSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9455eeb4e8fSmrg [am_cv_make_support_nested_variables], 9465eeb4e8fSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9475eeb4e8fSmrgBAR0=false 9485eeb4e8fSmrgBAR1=true 9495eeb4e8fSmrgV=1 9505eeb4e8fSmrgam__doit: 9515eeb4e8fSmrg @$(TRUE) 9525eeb4e8fSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9535eeb4e8fSmrg am_cv_make_support_nested_variables=yes 9545eeb4e8fSmrgelse 9555eeb4e8fSmrg am_cv_make_support_nested_variables=no 9565eeb4e8fSmrgfi]) 9575eeb4e8fSmrgif test $am_cv_make_support_nested_variables = yes; then 9585eeb4e8fSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9595eeb4e8fSmrg AM_V='$(V)' 9605eeb4e8fSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9615eeb4e8fSmrgelse 9625eeb4e8fSmrg AM_V=$AM_DEFAULT_VERBOSITY 9635eeb4e8fSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9645eeb4e8fSmrgfi 9655eeb4e8fSmrgAC_SUBST([AM_V])dnl 9665eeb4e8fSmrgAM_SUBST_NOTMAKE([AM_V])dnl 9675eeb4e8fSmrgAC_SUBST([AM_DEFAULT_V])dnl 9685eeb4e8fSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 969972599cfSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 970972599cfSmrgAM_BACKSLASH='\' 971972599cfSmrgAC_SUBST([AM_BACKSLASH])dnl 972972599cfSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 973972599cfSmrg]) 974972599cfSmrg 9755eeb4e8fSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 976972599cfSmrg# 977972599cfSmrg# This file is free software; the Free Software Foundation 978972599cfSmrg# gives unlimited permission to copy and/or distribute it, 979972599cfSmrg# with or without modifications, as long as this notice is preserved. 980972599cfSmrg 981972599cfSmrg# AM_PROG_INSTALL_STRIP 982972599cfSmrg# --------------------- 9835eeb4e8fSmrg# One issue with vendor 'install' (even GNU) is that you can't 984972599cfSmrg# specify the program used to strip binaries. This is especially 985972599cfSmrg# annoying in cross-compiling environments, where the build's strip 986972599cfSmrg# is unlikely to handle the host's binaries. 987972599cfSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9885eeb4e8fSmrg# always use install-sh in "make install-strip", and initialize 989972599cfSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 990972599cfSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 991972599cfSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9925eeb4e8fSmrg# Installed binaries are usually stripped using 'strip' when the user 9935eeb4e8fSmrg# run "make install-strip". However 'strip' might not be the right 994972599cfSmrg# tool to use in cross-compilation environments, therefore Automake 9955eeb4e8fSmrg# will honor the 'STRIP' environment variable to overrule this program. 9965eeb4e8fSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 997972599cfSmrgif test "$cross_compiling" != no; then 998972599cfSmrg AC_CHECK_TOOL([STRIP], [strip], :) 999972599cfSmrgfi 1000972599cfSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1001972599cfSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1002972599cfSmrg 10035eeb4e8fSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1004972599cfSmrg# 1005972599cfSmrg# This file is free software; the Free Software Foundation 1006972599cfSmrg# gives unlimited permission to copy and/or distribute it, 1007972599cfSmrg# with or without modifications, as long as this notice is preserved. 1008972599cfSmrg 1009972599cfSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1010972599cfSmrg# --------------------------- 1011972599cfSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1012972599cfSmrg# This macro is traced by Automake. 1013972599cfSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1014972599cfSmrg 1015972599cfSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1016972599cfSmrg# -------------------------- 1017972599cfSmrg# Public sister of _AM_SUBST_NOTMAKE. 1018972599cfSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1019972599cfSmrg 1020972599cfSmrg# Check how to create a tarball. -*- Autoconf -*- 1021972599cfSmrg 10225eeb4e8fSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 1023972599cfSmrg# 1024972599cfSmrg# This file is free software; the Free Software Foundation 1025972599cfSmrg# gives unlimited permission to copy and/or distribute it, 1026972599cfSmrg# with or without modifications, as long as this notice is preserved. 1027972599cfSmrg 1028972599cfSmrg# _AM_PROG_TAR(FORMAT) 1029972599cfSmrg# -------------------- 1030972599cfSmrg# Check how to create a tarball in format FORMAT. 10315eeb4e8fSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1032972599cfSmrg# 1033972599cfSmrg# Substitute a variable $(am__tar) that is a command 1034972599cfSmrg# writing to stdout a FORMAT-tarball containing the directory 1035972599cfSmrg# $tardir. 1036972599cfSmrg# tardir=directory && $(am__tar) > result.tar 1037972599cfSmrg# 1038972599cfSmrg# Substitute a variable $(am__untar) that extract such 1039972599cfSmrg# a tarball read from stdin. 1040972599cfSmrg# $(am__untar) < result.tar 10415eeb4e8fSmrg# 1042972599cfSmrgAC_DEFUN([_AM_PROG_TAR], 10435eeb4e8fSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10445eeb4e8fSmrg# in the wild :-( We should find a proper way to deprecate it ... 10455eeb4e8fSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10465eeb4e8fSmrg 10475eeb4e8fSmrg# We'll loop over all known methods to create a tar archive until one works. 1048972599cfSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1049972599cfSmrg 10505eeb4e8fSmrgm4_if([$1], [v7], 10515eeb4e8fSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10525eeb4e8fSmrg 10535eeb4e8fSmrg [m4_case([$1], 10545eeb4e8fSmrg [ustar], 10555eeb4e8fSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10565eeb4e8fSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10575eeb4e8fSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10585eeb4e8fSmrg # and bug#13588). 10595eeb4e8fSmrg am_max_uid=2097151 # 2^21 - 1 10605eeb4e8fSmrg am_max_gid=$am_max_uid 10615eeb4e8fSmrg # The $UID and $GID variables are not portable, so we need to resort 10625eeb4e8fSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10635eeb4e8fSmrg # below are definitely unexpected, so allow the users to see them 10645eeb4e8fSmrg # (that is, avoid stderr redirection). 10655eeb4e8fSmrg am_uid=`id -u || echo unknown` 10665eeb4e8fSmrg am_gid=`id -g || echo unknown` 10675eeb4e8fSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10685eeb4e8fSmrg if test $am_uid -le $am_max_uid; then 10695eeb4e8fSmrg AC_MSG_RESULT([yes]) 10705eeb4e8fSmrg else 10715eeb4e8fSmrg AC_MSG_RESULT([no]) 10725eeb4e8fSmrg _am_tools=none 10735eeb4e8fSmrg fi 10745eeb4e8fSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10755eeb4e8fSmrg if test $am_gid -le $am_max_gid; then 10765eeb4e8fSmrg AC_MSG_RESULT([yes]) 10775eeb4e8fSmrg else 10785eeb4e8fSmrg AC_MSG_RESULT([no]) 10795eeb4e8fSmrg _am_tools=none 10805eeb4e8fSmrg fi], 10815eeb4e8fSmrg 10825eeb4e8fSmrg [pax], 10835eeb4e8fSmrg [], 10845eeb4e8fSmrg 10855eeb4e8fSmrg [m4_fatal([Unknown tar format])]) 10865eeb4e8fSmrg 10875eeb4e8fSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10885eeb4e8fSmrg 10895eeb4e8fSmrg # Go ahead even if we have the value already cached. We do so because we 10905eeb4e8fSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10915eeb4e8fSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10925eeb4e8fSmrg 10935eeb4e8fSmrg for _am_tool in $_am_tools; do 10945eeb4e8fSmrg case $_am_tool in 10955eeb4e8fSmrg gnutar) 10965eeb4e8fSmrg for _am_tar in tar gnutar gtar; do 10975eeb4e8fSmrg AM_RUN_LOG([$_am_tar --version]) && break 10985eeb4e8fSmrg done 10995eeb4e8fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11005eeb4e8fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11015eeb4e8fSmrg am__untar="$_am_tar -xf -" 11025eeb4e8fSmrg ;; 11035eeb4e8fSmrg plaintar) 11045eeb4e8fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11055eeb4e8fSmrg # ustar tarball either. 11065eeb4e8fSmrg (tar --version) >/dev/null 2>&1 && continue 11075eeb4e8fSmrg am__tar='tar chf - "$$tardir"' 11085eeb4e8fSmrg am__tar_='tar chf - "$tardir"' 11095eeb4e8fSmrg am__untar='tar xf -' 11105eeb4e8fSmrg ;; 11115eeb4e8fSmrg pax) 11125eeb4e8fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11135eeb4e8fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11145eeb4e8fSmrg am__untar='pax -r' 11155eeb4e8fSmrg ;; 11165eeb4e8fSmrg cpio) 11175eeb4e8fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11185eeb4e8fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11195eeb4e8fSmrg am__untar='cpio -i -H $1 -d' 11205eeb4e8fSmrg ;; 11215eeb4e8fSmrg none) 11225eeb4e8fSmrg am__tar=false 11235eeb4e8fSmrg am__tar_=false 11245eeb4e8fSmrg am__untar=false 11255eeb4e8fSmrg ;; 11265eeb4e8fSmrg esac 1127972599cfSmrg 11285eeb4e8fSmrg # If the value was cached, stop now. We just wanted to have am__tar 11295eeb4e8fSmrg # and am__untar set. 11305eeb4e8fSmrg test -n "${am_cv_prog_tar_$1}" && break 11315eeb4e8fSmrg 11325eeb4e8fSmrg # tar/untar a dummy directory, and stop if the command works. 11335eeb4e8fSmrg rm -rf conftest.dir 11345eeb4e8fSmrg mkdir conftest.dir 11355eeb4e8fSmrg echo GrepMe > conftest.dir/file 11365eeb4e8fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11375eeb4e8fSmrg rm -rf conftest.dir 11385eeb4e8fSmrg if test -s conftest.tar; then 11395eeb4e8fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11405eeb4e8fSmrg AM_RUN_LOG([cat conftest.dir/file]) 11415eeb4e8fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11425eeb4e8fSmrg fi 11435eeb4e8fSmrg done 1144972599cfSmrg rm -rf conftest.dir 1145972599cfSmrg 11465eeb4e8fSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11475eeb4e8fSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11485eeb4e8fSmrg 1149972599cfSmrgAC_SUBST([am__tar]) 1150972599cfSmrgAC_SUBST([am__untar]) 1151972599cfSmrg]) # _AM_PROG_TAR 1152972599cfSmrg 1153972599cfSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 1154972599cfSmrg# 1155972599cfSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 1156972599cfSmrg# 1157972599cfSmrg# This program is free software; you can redistribute it and/or modify 1158972599cfSmrg# it under the terms of the GNU General Public License as published by 1159972599cfSmrg# the Free Software Foundation; either version 2 of the License, or 1160972599cfSmrg# (at your option) any later version. 1161972599cfSmrg# 1162972599cfSmrg# This program is distributed in the hope that it will be useful, but 1163972599cfSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1164972599cfSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1165972599cfSmrg# General Public License for more details. 1166972599cfSmrg# 1167972599cfSmrg# You should have received a copy of the GNU General Public License 1168972599cfSmrg# along with this program; if not, write to the Free Software 1169972599cfSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 1170972599cfSmrg# 1171972599cfSmrg# As a special exception to the GNU General Public License, if you 1172972599cfSmrg# distribute this file as part of a program that contains a 1173972599cfSmrg# configuration script generated by Autoconf, you may include it under 1174972599cfSmrg# the same distribution terms that you use for the rest of that program. 1175972599cfSmrg 1176972599cfSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1177972599cfSmrg# ---------------------------------- 1178972599cfSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 1179972599cfSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1180972599cfSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 1181972599cfSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 1182972599cfSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1183972599cfSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1184972599cfSmrgfi 1185972599cfSmrgif test -n "$PKG_CONFIG"; then 1186972599cfSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 1187972599cfSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1188972599cfSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1189972599cfSmrg AC_MSG_RESULT([yes]) 1190972599cfSmrg else 1191972599cfSmrg AC_MSG_RESULT([no]) 1192972599cfSmrg PKG_CONFIG="" 1193972599cfSmrg fi 1194972599cfSmrg 1195972599cfSmrgfi[]dnl 1196972599cfSmrg])# PKG_PROG_PKG_CONFIG 1197972599cfSmrg 1198972599cfSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1199972599cfSmrg# 1200972599cfSmrg# Check to see whether a particular set of modules exists. Similar 1201972599cfSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 1202972599cfSmrg# 1203972599cfSmrg# 1204972599cfSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 1205972599cfSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 1206972599cfSmrg# PKG_CHECK_EXISTS manually 1207972599cfSmrg# -------------------------------------------------------------- 1208972599cfSmrgAC_DEFUN([PKG_CHECK_EXISTS], 1209972599cfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1210972599cfSmrgif test -n "$PKG_CONFIG" && \ 1211972599cfSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1212972599cfSmrg m4_ifval([$2], [$2], [:]) 1213972599cfSmrgm4_ifvaln([$3], [else 1214972599cfSmrg $3])dnl 1215972599cfSmrgfi]) 1216972599cfSmrg 1217972599cfSmrg 1218972599cfSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1219972599cfSmrg# --------------------------------------------- 1220972599cfSmrgm4_define([_PKG_CONFIG], 1221972599cfSmrg[if test -n "$$1"; then 1222972599cfSmrg pkg_cv_[]$1="$$1" 1223972599cfSmrg elif test -n "$PKG_CONFIG"; then 1224972599cfSmrg PKG_CHECK_EXISTS([$3], 1225972599cfSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 1226972599cfSmrg [pkg_failed=yes]) 1227972599cfSmrg else 1228972599cfSmrg pkg_failed=untried 1229972599cfSmrgfi[]dnl 1230972599cfSmrg])# _PKG_CONFIG 1231972599cfSmrg 1232972599cfSmrg# _PKG_SHORT_ERRORS_SUPPORTED 1233972599cfSmrg# ----------------------------- 1234972599cfSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1235972599cfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1236972599cfSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1237972599cfSmrg _pkg_short_errors_supported=yes 1238972599cfSmrgelse 1239972599cfSmrg _pkg_short_errors_supported=no 1240972599cfSmrgfi[]dnl 1241972599cfSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 1242972599cfSmrg 1243972599cfSmrg 1244972599cfSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1245972599cfSmrg# [ACTION-IF-NOT-FOUND]) 1246972599cfSmrg# 1247972599cfSmrg# 1248972599cfSmrg# Note that if there is a possibility the first call to 1249972599cfSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1250972599cfSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1251972599cfSmrg# 1252972599cfSmrg# 1253972599cfSmrg# -------------------------------------------------------------- 1254972599cfSmrgAC_DEFUN([PKG_CHECK_MODULES], 1255972599cfSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1256972599cfSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1257972599cfSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1258972599cfSmrg 1259972599cfSmrgpkg_failed=no 1260972599cfSmrgAC_MSG_CHECKING([for $1]) 1261972599cfSmrg 1262972599cfSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1263972599cfSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1264972599cfSmrg 1265972599cfSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1266972599cfSmrgand $1[]_LIBS to avoid the need to call pkg-config. 1267972599cfSmrgSee the pkg-config man page for more details.]) 1268972599cfSmrg 1269972599cfSmrgif test $pkg_failed = yes; then 1270972599cfSmrg _PKG_SHORT_ERRORS_SUPPORTED 1271972599cfSmrg if test $_pkg_short_errors_supported = yes; then 1272972599cfSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1273972599cfSmrg else 1274972599cfSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1275972599cfSmrg fi 1276972599cfSmrg # Put the nasty error message in config.log where it belongs 1277972599cfSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1278972599cfSmrg 1279972599cfSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 1280972599cfSmrg[Package requirements ($2) were not met: 1281972599cfSmrg 1282972599cfSmrg$$1_PKG_ERRORS 1283972599cfSmrg 1284972599cfSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1285972599cfSmrginstalled software in a non-standard prefix. 1286972599cfSmrg 1287972599cfSmrg_PKG_TEXT 1288972599cfSmrg])], 1289972599cfSmrg [AC_MSG_RESULT([no]) 1290972599cfSmrg $4]) 1291972599cfSmrgelif test $pkg_failed = untried; then 1292972599cfSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 1293972599cfSmrg[The pkg-config script could not be found or is too old. Make sure it 1294972599cfSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 1295972599cfSmrgpath to pkg-config. 1296972599cfSmrg 1297972599cfSmrg_PKG_TEXT 1298972599cfSmrg 1299972599cfSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 1300972599cfSmrg [$4]) 1301972599cfSmrgelse 1302972599cfSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1303972599cfSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1304972599cfSmrg AC_MSG_RESULT([yes]) 1305972599cfSmrg ifelse([$3], , :, [$3]) 1306972599cfSmrgfi[]dnl 1307972599cfSmrg])# PKG_CHECK_MODULES 1308972599cfSmrg 1309972599cfSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1310972599cfSmrgdnl 1311972599cfSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 13125eeb4e8fSmrgdnl 1313972599cfSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1314972599cfSmrgdnl copy of this software and associated documentation files (the "Software"), 1315972599cfSmrgdnl to deal in the Software without restriction, including without limitation 1316972599cfSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1317972599cfSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1318972599cfSmrgdnl Software is furnished to do so, subject to the following conditions: 1319972599cfSmrgdnl 1320972599cfSmrgdnl The above copyright notice and this permission notice (including the next 1321972599cfSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1322972599cfSmrgdnl Software. 1323972599cfSmrgdnl 1324972599cfSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1325972599cfSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1326972599cfSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1327972599cfSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1328972599cfSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1329972599cfSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1330972599cfSmrgdnl DEALINGS IN THE SOFTWARE. 1331972599cfSmrg 1332972599cfSmrg# XORG_MACROS_VERSION(required-version) 1333972599cfSmrg# ------------------------------------- 1334972599cfSmrg# Minimum version: 1.1.0 1335972599cfSmrg# 1336972599cfSmrg# If you're using a macro added in Version 1.1 or newer, include this in 1337972599cfSmrg# your configure.ac with the minimum required version, such as: 1338972599cfSmrg# XORG_MACROS_VERSION(1.1) 1339972599cfSmrg# 1340972599cfSmrg# To ensure that this macro is defined, also add: 1341972599cfSmrg# m4_ifndef([XORG_MACROS_VERSION], 1342972599cfSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1343972599cfSmrg# 1344972599cfSmrg# 13455eeb4e8fSmrg# See the "minimum version" comment for each macro you use to see what 1346972599cfSmrg# version you require. 1347972599cfSmrgm4_defun([XORG_MACROS_VERSION],[ 13485eeb4e8fSmrgm4_define([vers_have], [1.19.0]) 1349972599cfSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1350972599cfSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1351972599cfSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1352972599cfSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1353972599cfSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1354972599cfSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1355972599cfSmrgm4_undefine([vers_have]) 1356972599cfSmrgm4_undefine([maj_have]) 1357972599cfSmrgm4_undefine([maj_needed]) 1358972599cfSmrg]) # XORG_MACROS_VERSION 1359972599cfSmrg 1360972599cfSmrg# XORG_PROG_RAWCPP() 1361972599cfSmrg# ------------------ 1362972599cfSmrg# Minimum version: 1.0.0 1363972599cfSmrg# 1364972599cfSmrg# Find cpp program and necessary flags for use in pre-processing text files 1365972599cfSmrg# such as man pages and config files 1366972599cfSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1367972599cfSmrgAC_REQUIRE([AC_PROG_CPP]) 13685eeb4e8fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1369972599cfSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1370972599cfSmrg 1371972599cfSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1372972599cfSmrg# which is not the best choice for supporting other OS'es, but covers most 1373972599cfSmrg# of the ones we need for now. 1374972599cfSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1375972599cfSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1376972599cfSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1377972599cfSmrg AC_MSG_RESULT([no]) 1378972599cfSmrgelse 1379972599cfSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1380972599cfSmrg RAWCPPFLAGS=-undef 1381972599cfSmrg AC_MSG_RESULT([yes]) 1382972599cfSmrg # under Cygwin unix is still defined even with -undef 1383972599cfSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1384972599cfSmrg RAWCPPFLAGS="-undef -ansi" 1385972599cfSmrg AC_MSG_RESULT([yes, with -ansi]) 1386972599cfSmrg else 1387972599cfSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1388972599cfSmrg fi 1389972599cfSmrgfi 1390972599cfSmrgrm -f conftest.$ac_ext 1391972599cfSmrg 1392972599cfSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1393972599cfSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1394972599cfSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1395972599cfSmrg AC_MSG_RESULT([no]) 1396972599cfSmrgelse 1397972599cfSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 13985eeb4e8fSmrg TRADITIONALCPPFLAGS="-traditional" 1399972599cfSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1400972599cfSmrg AC_MSG_RESULT([yes]) 1401972599cfSmrg else 1402972599cfSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1403972599cfSmrg fi 1404972599cfSmrgfi 1405972599cfSmrgrm -f conftest.$ac_ext 1406972599cfSmrgAC_SUBST(RAWCPPFLAGS) 14075eeb4e8fSmrgAC_SUBST(TRADITIONALCPPFLAGS) 1408972599cfSmrg]) # XORG_PROG_RAWCPP 1409972599cfSmrg 1410972599cfSmrg# XORG_MANPAGE_SECTIONS() 1411972599cfSmrg# ----------------------- 1412972599cfSmrg# Minimum version: 1.0.0 1413972599cfSmrg# 1414972599cfSmrg# Determine which sections man pages go in for the different man page types 1415972599cfSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1416972599cfSmrg# Not sure if there's any better way than just hardcoding by OS name. 1417972599cfSmrg# Override default settings by setting environment variables 1418972599cfSmrg# Added MAN_SUBSTS in version 1.8 1419972599cfSmrg# Added AC_PROG_SED in version 1.8 1420972599cfSmrg 1421972599cfSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1422972599cfSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1423972599cfSmrgAC_REQUIRE([AC_PROG_SED]) 1424972599cfSmrg 1425972599cfSmrgif test x$APP_MAN_SUFFIX = x ; then 1426972599cfSmrg APP_MAN_SUFFIX=1 1427972599cfSmrgfi 1428972599cfSmrgif test x$APP_MAN_DIR = x ; then 1429972599cfSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1430972599cfSmrgfi 1431972599cfSmrg 1432972599cfSmrgif test x$LIB_MAN_SUFFIX = x ; then 1433972599cfSmrg LIB_MAN_SUFFIX=3 1434972599cfSmrgfi 1435972599cfSmrgif test x$LIB_MAN_DIR = x ; then 1436972599cfSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1437972599cfSmrgfi 1438972599cfSmrg 1439972599cfSmrgif test x$FILE_MAN_SUFFIX = x ; then 1440972599cfSmrg case $host_os in 1441972599cfSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 1442972599cfSmrg *) FILE_MAN_SUFFIX=5 ;; 1443972599cfSmrg esac 1444972599cfSmrgfi 1445972599cfSmrgif test x$FILE_MAN_DIR = x ; then 1446972599cfSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1447972599cfSmrgfi 1448972599cfSmrg 1449972599cfSmrgif test x$MISC_MAN_SUFFIX = x ; then 1450972599cfSmrg case $host_os in 1451972599cfSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 1452972599cfSmrg *) MISC_MAN_SUFFIX=7 ;; 1453972599cfSmrg esac 1454972599cfSmrgfi 1455972599cfSmrgif test x$MISC_MAN_DIR = x ; then 1456972599cfSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1457972599cfSmrgfi 1458972599cfSmrg 1459972599cfSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 1460972599cfSmrg case $host_os in 1461972599cfSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1462972599cfSmrg *) DRIVER_MAN_SUFFIX=4 ;; 1463972599cfSmrg esac 1464972599cfSmrgfi 1465972599cfSmrgif test x$DRIVER_MAN_DIR = x ; then 1466972599cfSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1467972599cfSmrgfi 1468972599cfSmrg 1469972599cfSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 1470972599cfSmrg case $host_os in 1471972599cfSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1472972599cfSmrg *) ADMIN_MAN_SUFFIX=8 ;; 1473972599cfSmrg esac 1474972599cfSmrgfi 1475972599cfSmrgif test x$ADMIN_MAN_DIR = x ; then 1476972599cfSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1477972599cfSmrgfi 1478972599cfSmrg 1479972599cfSmrg 1480972599cfSmrgAC_SUBST([APP_MAN_SUFFIX]) 1481972599cfSmrgAC_SUBST([LIB_MAN_SUFFIX]) 1482972599cfSmrgAC_SUBST([FILE_MAN_SUFFIX]) 1483972599cfSmrgAC_SUBST([MISC_MAN_SUFFIX]) 1484972599cfSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1485972599cfSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1486972599cfSmrgAC_SUBST([APP_MAN_DIR]) 1487972599cfSmrgAC_SUBST([LIB_MAN_DIR]) 1488972599cfSmrgAC_SUBST([FILE_MAN_DIR]) 1489972599cfSmrgAC_SUBST([MISC_MAN_DIR]) 1490972599cfSmrgAC_SUBST([DRIVER_MAN_DIR]) 1491972599cfSmrgAC_SUBST([ADMIN_MAN_DIR]) 1492972599cfSmrg 1493972599cfSmrgXORG_MAN_PAGE="X Version 11" 1494972599cfSmrgAC_SUBST([XORG_MAN_PAGE]) 1495972599cfSmrgMAN_SUBSTS="\ 1496972599cfSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1497972599cfSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1498972599cfSmrg -e 's|__xservername__|Xorg|g' \ 1499972599cfSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1500972599cfSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1501972599cfSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1502972599cfSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1503972599cfSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1504972599cfSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1505972599cfSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1506972599cfSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1507972599cfSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1508972599cfSmrgAC_SUBST([MAN_SUBSTS]) 1509972599cfSmrg 1510972599cfSmrg]) # XORG_MANPAGE_SECTIONS 1511972599cfSmrg 1512972599cfSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1513972599cfSmrg# ------------------------ 1514972599cfSmrg# Minimum version: 1.7.0 1515972599cfSmrg# 1516972599cfSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1517972599cfSmrg# provided by xorg-sgml-doctools, if installed. 1518972599cfSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1519972599cfSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1520972599cfSmrgXORG_SGML_PATH= 1521972599cfSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1522972599cfSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1523972599cfSmrg [m4_ifval([$1],[:], 1524972599cfSmrg [if test x"$cross_compiling" != x"yes" ; then 1525972599cfSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1526972599cfSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1527972599cfSmrg fi]) 1528972599cfSmrg ]) 1529972599cfSmrg 1530972599cfSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1531972599cfSmrg# the path and the name of the doc stylesheet 1532972599cfSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1533972599cfSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1534972599cfSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1535972599cfSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1536972599cfSmrgelse 1537972599cfSmrg AC_MSG_RESULT([no]) 1538972599cfSmrgfi 1539972599cfSmrg 1540972599cfSmrgAC_SUBST(XORG_SGML_PATH) 1541972599cfSmrgAC_SUBST(STYLESHEET_SRCDIR) 1542972599cfSmrgAC_SUBST(XSL_STYLESHEET) 1543972599cfSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1544972599cfSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1545972599cfSmrg 1546972599cfSmrg# XORG_CHECK_LINUXDOC 1547972599cfSmrg# ------------------- 1548972599cfSmrg# Minimum version: 1.0.0 1549972599cfSmrg# 1550972599cfSmrg# Defines the variable MAKE_TEXT if the necessary tools and 1551972599cfSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1552972599cfSmrg# Whether or not the necessary tools and files are found can be checked 1553972599cfSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1554972599cfSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1555972599cfSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1556972599cfSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1557972599cfSmrg 1558972599cfSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1559972599cfSmrg 1560972599cfSmrgAC_MSG_CHECKING([whether to build documentation]) 1561972599cfSmrg 1562972599cfSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1563972599cfSmrg BUILDDOC=yes 1564972599cfSmrgelse 1565972599cfSmrg BUILDDOC=no 1566972599cfSmrgfi 1567972599cfSmrg 1568972599cfSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1569972599cfSmrg 1570972599cfSmrgAC_MSG_RESULT([$BUILDDOC]) 1571972599cfSmrg 1572972599cfSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1573972599cfSmrg 1574972599cfSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1575972599cfSmrg BUILDPDFDOC=yes 1576972599cfSmrgelse 1577972599cfSmrg BUILDPDFDOC=no 1578972599cfSmrgfi 1579972599cfSmrg 1580972599cfSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1581972599cfSmrg 1582972599cfSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1583972599cfSmrg 1584972599cfSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1585972599cfSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1586972599cfSmrgMAKE_PDF="$PS2PDF" 1587972599cfSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1588972599cfSmrg 1589972599cfSmrgAC_SUBST(MAKE_TEXT) 1590972599cfSmrgAC_SUBST(MAKE_PS) 1591972599cfSmrgAC_SUBST(MAKE_PDF) 1592972599cfSmrgAC_SUBST(MAKE_HTML) 1593972599cfSmrg]) # XORG_CHECK_LINUXDOC 1594972599cfSmrg 1595972599cfSmrg# XORG_CHECK_DOCBOOK 1596972599cfSmrg# ------------------- 1597972599cfSmrg# Minimum version: 1.0.0 1598972599cfSmrg# 1599972599cfSmrg# Checks for the ability to build output formats from SGML DocBook source. 1600972599cfSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1601972599cfSmrg# indicates whether the necessary tools and files are found and, if set, 1602972599cfSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1603972599cfSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1604972599cfSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1605972599cfSmrg 1606972599cfSmrgBUILDTXTDOC=no 1607972599cfSmrgBUILDPDFDOC=no 1608972599cfSmrgBUILDPSDOC=no 1609972599cfSmrgBUILDHTMLDOC=no 1610972599cfSmrg 1611972599cfSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1612972599cfSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1613972599cfSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1614972599cfSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1615972599cfSmrg 1616972599cfSmrgAC_MSG_CHECKING([whether to build text documentation]) 1617972599cfSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1618972599cfSmrg test x$BUILD_TXTDOC != xno; then 1619972599cfSmrg BUILDTXTDOC=yes 1620972599cfSmrgfi 1621972599cfSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1622972599cfSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1623972599cfSmrg 1624972599cfSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1625972599cfSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1626972599cfSmrg test x$BUILD_PDFDOC != xno; then 1627972599cfSmrg BUILDPDFDOC=yes 1628972599cfSmrgfi 1629972599cfSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1630972599cfSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1631972599cfSmrg 1632972599cfSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1633972599cfSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1634972599cfSmrg test x$BUILD_PSDOC != xno; then 1635972599cfSmrg BUILDPSDOC=yes 1636972599cfSmrgfi 1637972599cfSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1638972599cfSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1639972599cfSmrg 1640972599cfSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1641972599cfSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1642972599cfSmrg test x$BUILD_HTMLDOC != xno; then 1643972599cfSmrg BUILDHTMLDOC=yes 1644972599cfSmrgfi 1645972599cfSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1646972599cfSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1647972599cfSmrg 1648972599cfSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1649972599cfSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1650972599cfSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1651972599cfSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1652972599cfSmrg 1653972599cfSmrgAC_SUBST(MAKE_TEXT) 1654972599cfSmrgAC_SUBST(MAKE_PS) 1655972599cfSmrgAC_SUBST(MAKE_PDF) 1656972599cfSmrgAC_SUBST(MAKE_HTML) 1657972599cfSmrg]) # XORG_CHECK_DOCBOOK 1658972599cfSmrg 1659972599cfSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1660972599cfSmrg# ---------------- 1661972599cfSmrg# Minimum version: 1.5.0 1662972599cfSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1663972599cfSmrg# 1664972599cfSmrg# Documentation tools are not always available on all platforms and sometimes 1665972599cfSmrg# not at the appropriate level. This macro enables a module to test for the 1666972599cfSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1667972599cfSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1668972599cfSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1669972599cfSmrg# --with-xmlto assumes 'auto'. 1670972599cfSmrg# 1671972599cfSmrg# Interface to module: 1672972599cfSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1673972599cfSmrg# XMLTO: returns the path of the xmlto program found 1674972599cfSmrg# returns the path set by the user in the environment 1675972599cfSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1676972599cfSmrg# 'no' user instructs the module not to use xmlto 1677972599cfSmrg# 1678972599cfSmrg# Added in version 1.10.0 1679972599cfSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1680972599cfSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1681972599cfSmrg# 1682972599cfSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1683972599cfSmrg# 1684972599cfSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1685972599cfSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1686972599cfSmrgm4_define([_defopt], m4_default([$2], [auto])) 1687972599cfSmrgAC_ARG_WITH(xmlto, 1688972599cfSmrg AS_HELP_STRING([--with-xmlto], 1689972599cfSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1690972599cfSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1691972599cfSmrgm4_undefine([_defopt]) 1692972599cfSmrg 1693972599cfSmrgif test "x$use_xmlto" = x"auto"; then 1694972599cfSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1695972599cfSmrg if test "x$XMLTO" = "x"; then 1696972599cfSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1697972599cfSmrg have_xmlto=no 1698972599cfSmrg else 1699972599cfSmrg have_xmlto=yes 1700972599cfSmrg fi 1701972599cfSmrgelif test "x$use_xmlto" = x"yes" ; then 1702972599cfSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1703972599cfSmrg if test "x$XMLTO" = "x"; then 1704972599cfSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1705972599cfSmrg fi 1706972599cfSmrg have_xmlto=yes 1707972599cfSmrgelif test "x$use_xmlto" = x"no" ; then 1708972599cfSmrg if test "x$XMLTO" != "x"; then 1709972599cfSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1710972599cfSmrg fi 1711972599cfSmrg have_xmlto=no 1712972599cfSmrgelse 1713972599cfSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1714972599cfSmrgfi 1715972599cfSmrg 1716972599cfSmrg# Test for a minimum version of xmlto, if provided. 1717972599cfSmrgm4_ifval([$1], 1718972599cfSmrg[if test "$have_xmlto" = yes; then 1719972599cfSmrg # scrape the xmlto version 1720972599cfSmrg AC_MSG_CHECKING([the xmlto version]) 1721972599cfSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1722972599cfSmrg AC_MSG_RESULT([$xmlto_version]) 1723972599cfSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1724972599cfSmrg [if test "x$use_xmlto" = xauto; then 1725972599cfSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1726972599cfSmrg have_xmlto=no 1727972599cfSmrg else 1728972599cfSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1729972599cfSmrg fi]) 1730972599cfSmrgfi]) 1731972599cfSmrg 1732972599cfSmrg# Test for the ability of xmlto to generate a text target 1733972599cfSmrghave_xmlto_text=no 1734972599cfSmrgcat > conftest.xml << "EOF" 1735972599cfSmrgEOF 1736972599cfSmrgAS_IF([test "$have_xmlto" = yes], 1737972599cfSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1738972599cfSmrg [have_xmlto_text=yes], 1739972599cfSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1740972599cfSmrgrm -f conftest.xml 1741972599cfSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1742972599cfSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1743972599cfSmrg]) # XORG_WITH_XMLTO 1744972599cfSmrg 1745972599cfSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1746972599cfSmrg# -------------------------------------------- 1747972599cfSmrg# Minimum version: 1.12.0 1748972599cfSmrg# Minimum version for optional DEFAULT argument: 1.12.0 1749972599cfSmrg# 1750972599cfSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1751972599cfSmrg# XML-based language used for the transformation of XML documents. 1752972599cfSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1753972599cfSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1754972599cfSmrg# The XSLT processor is often used as a standalone tool for transformations. 1755972599cfSmrg# It should not be assumed that this tool is used only to work with documnetation. 1756972599cfSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1757972599cfSmrg# 1758972599cfSmrg# Interface to module: 1759972599cfSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1760972599cfSmrg# XSLTPROC: returns the path of the xsltproc program found 1761972599cfSmrg# returns the path set by the user in the environment 1762972599cfSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1763972599cfSmrg# 'no' user instructs the module not to use xsltproc 1764972599cfSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1765972599cfSmrg# 1766972599cfSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1767972599cfSmrg# 1768972599cfSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1769972599cfSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1770972599cfSmrg# Preserves the interface, should it be implemented later 1771972599cfSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1772972599cfSmrgm4_define([_defopt], m4_default([$2], [auto])) 1773972599cfSmrgAC_ARG_WITH(xsltproc, 1774972599cfSmrg AS_HELP_STRING([--with-xsltproc], 1775972599cfSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1776972599cfSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1777972599cfSmrgm4_undefine([_defopt]) 1778972599cfSmrg 1779972599cfSmrgif test "x$use_xsltproc" = x"auto"; then 1780972599cfSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1781972599cfSmrg if test "x$XSLTPROC" = "x"; then 1782972599cfSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1783972599cfSmrg have_xsltproc=no 1784972599cfSmrg else 1785972599cfSmrg have_xsltproc=yes 1786972599cfSmrg fi 1787972599cfSmrgelif test "x$use_xsltproc" = x"yes" ; then 1788972599cfSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1789972599cfSmrg if test "x$XSLTPROC" = "x"; then 1790972599cfSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1791972599cfSmrg fi 1792972599cfSmrg have_xsltproc=yes 1793972599cfSmrgelif test "x$use_xsltproc" = x"no" ; then 1794972599cfSmrg if test "x$XSLTPROC" != "x"; then 1795972599cfSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1796972599cfSmrg fi 1797972599cfSmrg have_xsltproc=no 1798972599cfSmrgelse 1799972599cfSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1800972599cfSmrgfi 1801972599cfSmrg 1802972599cfSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1803972599cfSmrg]) # XORG_WITH_XSLTPROC 1804972599cfSmrg 1805972599cfSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1806972599cfSmrg# ---------------------------------------- 1807972599cfSmrg# Minimum version: 1.15.0 1808972599cfSmrg# 1809972599cfSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 1810972599cfSmrg# scanning arbitrary text files, extracting information from those text files, 1811972599cfSmrg# and printing reports based on that information. 1812972599cfSmrg# 1813972599cfSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1814972599cfSmrg# 1815972599cfSmrg# Interface to module: 1816972599cfSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 1817972599cfSmrg# PERL: returns the path of the perl program found 1818972599cfSmrg# returns the path set by the user in the environment 1819972599cfSmrg# --with-perl: 'yes' user instructs the module to use perl 1820972599cfSmrg# 'no' user instructs the module not to use perl 1821972599cfSmrg# have_perl: returns yes if perl found in PATH or no 1822972599cfSmrg# 1823972599cfSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1824972599cfSmrg# 1825972599cfSmrgAC_DEFUN([XORG_WITH_PERL],[ 1826972599cfSmrgAC_ARG_VAR([PERL], [Path to perl command]) 1827972599cfSmrg# Preserves the interface, should it be implemented later 1828972599cfSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1829972599cfSmrgm4_define([_defopt], m4_default([$2], [auto])) 1830972599cfSmrgAC_ARG_WITH(perl, 1831972599cfSmrg AS_HELP_STRING([--with-perl], 1832972599cfSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 1833972599cfSmrg [use_perl=$withval], [use_perl=]_defopt) 1834972599cfSmrgm4_undefine([_defopt]) 1835972599cfSmrg 1836972599cfSmrgif test "x$use_perl" = x"auto"; then 1837972599cfSmrg AC_PATH_PROG([PERL], [perl]) 1838972599cfSmrg if test "x$PERL" = "x"; then 1839972599cfSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1840972599cfSmrg have_perl=no 1841972599cfSmrg else 1842972599cfSmrg have_perl=yes 1843972599cfSmrg fi 1844972599cfSmrgelif test "x$use_perl" = x"yes" ; then 1845972599cfSmrg AC_PATH_PROG([PERL], [perl]) 1846972599cfSmrg if test "x$PERL" = "x"; then 1847972599cfSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1848972599cfSmrg fi 1849972599cfSmrg have_perl=yes 1850972599cfSmrgelif test "x$use_perl" = x"no" ; then 1851972599cfSmrg if test "x$PERL" != "x"; then 1852972599cfSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1853972599cfSmrg fi 1854972599cfSmrg have_perl=no 1855972599cfSmrgelse 1856972599cfSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1857972599cfSmrgfi 1858972599cfSmrg 1859972599cfSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1860972599cfSmrg]) # XORG_WITH_PERL 1861972599cfSmrg 1862972599cfSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1863972599cfSmrg# ---------------- 1864972599cfSmrg# Minimum version: 1.5.0 1865972599cfSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1866972599cfSmrg# 1867972599cfSmrg# Documentation tools are not always available on all platforms and sometimes 1868972599cfSmrg# not at the appropriate level. This macro enables a module to test for the 1869972599cfSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1870972599cfSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1871972599cfSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1872972599cfSmrg# --with-asciidoc assumes 'auto'. 1873972599cfSmrg# 1874972599cfSmrg# Interface to module: 1875972599cfSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1876972599cfSmrg# ASCIIDOC: returns the path of the asciidoc program found 1877972599cfSmrg# returns the path set by the user in the environment 1878972599cfSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1879972599cfSmrg# 'no' user instructs the module not to use asciidoc 1880972599cfSmrg# 1881972599cfSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1882972599cfSmrg# 1883972599cfSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1884972599cfSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1885972599cfSmrgm4_define([_defopt], m4_default([$2], [auto])) 1886972599cfSmrgAC_ARG_WITH(asciidoc, 1887972599cfSmrg AS_HELP_STRING([--with-asciidoc], 1888972599cfSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1889972599cfSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1890972599cfSmrgm4_undefine([_defopt]) 1891972599cfSmrg 1892972599cfSmrgif test "x$use_asciidoc" = x"auto"; then 1893972599cfSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1894972599cfSmrg if test "x$ASCIIDOC" = "x"; then 1895972599cfSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1896972599cfSmrg have_asciidoc=no 1897972599cfSmrg else 1898972599cfSmrg have_asciidoc=yes 1899972599cfSmrg fi 1900972599cfSmrgelif test "x$use_asciidoc" = x"yes" ; then 1901972599cfSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1902972599cfSmrg if test "x$ASCIIDOC" = "x"; then 1903972599cfSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1904972599cfSmrg fi 1905972599cfSmrg have_asciidoc=yes 1906972599cfSmrgelif test "x$use_asciidoc" = x"no" ; then 1907972599cfSmrg if test "x$ASCIIDOC" != "x"; then 1908972599cfSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1909972599cfSmrg fi 1910972599cfSmrg have_asciidoc=no 1911972599cfSmrgelse 1912972599cfSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1913972599cfSmrgfi 1914972599cfSmrgm4_ifval([$1], 1915972599cfSmrg[if test "$have_asciidoc" = yes; then 1916972599cfSmrg # scrape the asciidoc version 1917972599cfSmrg AC_MSG_CHECKING([the asciidoc version]) 1918972599cfSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1919972599cfSmrg AC_MSG_RESULT([$asciidoc_version]) 1920972599cfSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1921972599cfSmrg [if test "x$use_asciidoc" = xauto; then 1922972599cfSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1923972599cfSmrg have_asciidoc=no 1924972599cfSmrg else 1925972599cfSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1926972599cfSmrg fi]) 1927972599cfSmrgfi]) 1928972599cfSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1929972599cfSmrg]) # XORG_WITH_ASCIIDOC 1930972599cfSmrg 1931972599cfSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 19325eeb4e8fSmrg# ------------------------------------------- 1933972599cfSmrg# Minimum version: 1.5.0 1934972599cfSmrg# Minimum version for optional DEFAULT argument: 1.11.0 19355eeb4e8fSmrg# Minimum version for optional DOT checking: 1.18.0 1936972599cfSmrg# 1937972599cfSmrg# Documentation tools are not always available on all platforms and sometimes 1938972599cfSmrg# not at the appropriate level. This macro enables a module to test for the 1939972599cfSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1940972599cfSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1941972599cfSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1942972599cfSmrg# --with-doxygen assumes 'auto'. 1943972599cfSmrg# 1944972599cfSmrg# Interface to module: 1945972599cfSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1946972599cfSmrg# DOXYGEN: returns the path of the doxygen program found 1947972599cfSmrg# returns the path set by the user in the environment 1948972599cfSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1949972599cfSmrg# 'no' user instructs the module not to use doxygen 1950972599cfSmrg# 1951972599cfSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1952972599cfSmrg# 1953972599cfSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1954972599cfSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 19555eeb4e8fSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 1956972599cfSmrgm4_define([_defopt], m4_default([$2], [auto])) 1957972599cfSmrgAC_ARG_WITH(doxygen, 1958972599cfSmrg AS_HELP_STRING([--with-doxygen], 1959972599cfSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1960972599cfSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1961972599cfSmrgm4_undefine([_defopt]) 1962972599cfSmrg 1963972599cfSmrgif test "x$use_doxygen" = x"auto"; then 1964972599cfSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1965972599cfSmrg if test "x$DOXYGEN" = "x"; then 1966972599cfSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1967972599cfSmrg have_doxygen=no 1968972599cfSmrg else 1969972599cfSmrg have_doxygen=yes 1970972599cfSmrg fi 1971972599cfSmrgelif test "x$use_doxygen" = x"yes" ; then 1972972599cfSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1973972599cfSmrg if test "x$DOXYGEN" = "x"; then 1974972599cfSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1975972599cfSmrg fi 1976972599cfSmrg have_doxygen=yes 1977972599cfSmrgelif test "x$use_doxygen" = x"no" ; then 1978972599cfSmrg if test "x$DOXYGEN" != "x"; then 1979972599cfSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1980972599cfSmrg fi 1981972599cfSmrg have_doxygen=no 1982972599cfSmrgelse 1983972599cfSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1984972599cfSmrgfi 1985972599cfSmrgm4_ifval([$1], 1986972599cfSmrg[if test "$have_doxygen" = yes; then 1987972599cfSmrg # scrape the doxygen version 1988972599cfSmrg AC_MSG_CHECKING([the doxygen version]) 1989972599cfSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1990972599cfSmrg AC_MSG_RESULT([$doxygen_version]) 1991972599cfSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1992972599cfSmrg [if test "x$use_doxygen" = xauto; then 1993972599cfSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1994972599cfSmrg have_doxygen=no 1995972599cfSmrg else 1996972599cfSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1997972599cfSmrg fi]) 1998972599cfSmrgfi]) 19995eeb4e8fSmrg 20005eeb4e8fSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 20015eeb4e8fSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 20025eeb4e8fSmrgdnl HAVE_DOT = @HAVE_DOT@ 20035eeb4e8fSmrgHAVE_DOT=no 20045eeb4e8fSmrgif test "x$have_doxygen" = "xyes"; then 20055eeb4e8fSmrg AC_PATH_PROG([DOT], [dot]) 20065eeb4e8fSmrg if test "x$DOT" != "x"; then 20075eeb4e8fSmrg HAVE_DOT=yes 20085eeb4e8fSmrg fi 20095eeb4e8fSmrgfi 20105eeb4e8fSmrg 20115eeb4e8fSmrgAC_SUBST([HAVE_DOT]) 20125eeb4e8fSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 2013972599cfSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 2014972599cfSmrg]) # XORG_WITH_DOXYGEN 2015972599cfSmrg 2016972599cfSmrg# XORG_WITH_GROFF([DEFAULT]) 2017972599cfSmrg# ---------------- 2018972599cfSmrg# Minimum version: 1.6.0 2019972599cfSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2020972599cfSmrg# 2021972599cfSmrg# Documentation tools are not always available on all platforms and sometimes 2022972599cfSmrg# not at the appropriate level. This macro enables a module to test for the 2023972599cfSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2024972599cfSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 2025972599cfSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 2026972599cfSmrg# --with-groff assumes 'auto'. 2027972599cfSmrg# 2028972599cfSmrg# Interface to module: 2029972599cfSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 2030972599cfSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 2031972599cfSmrg# HAVE_GROFF_MS: the -ms macros package 2032972599cfSmrg# GROFF: returns the path of the groff program found 2033972599cfSmrg# returns the path set by the user in the environment 2034972599cfSmrg# --with-groff: 'yes' user instructs the module to use groff 2035972599cfSmrg# 'no' user instructs the module not to use groff 2036972599cfSmrg# 2037972599cfSmrg# Added in version 1.9.0: 2038972599cfSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 2039972599cfSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 2040972599cfSmrg# psselect from the psutils package. 2041972599cfSmrg# the ghostcript package. Refer to the grohtml man pages 2042972599cfSmrg# 2043972599cfSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 2044972599cfSmrg# 2045972599cfSmrg# OS and distros often splits groff in a basic and full package, the former 2046972599cfSmrg# having the groff program and the later having devices, fonts and macros 2047972599cfSmrg# Checking for the groff executable is not enough. 2048972599cfSmrg# 2049972599cfSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 2050972599cfSmrg# unset HAVE_GROFF or GROFF env variables. 2051972599cfSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 2052972599cfSmrg# 2053972599cfSmrgAC_DEFUN([XORG_WITH_GROFF],[ 2054972599cfSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 2055972599cfSmrgm4_define([_defopt], m4_default([$1], [auto])) 2056972599cfSmrgAC_ARG_WITH(groff, 2057972599cfSmrg AS_HELP_STRING([--with-groff], 2058972599cfSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 2059972599cfSmrg [use_groff=$withval], [use_groff=]_defopt) 2060972599cfSmrgm4_undefine([_defopt]) 2061972599cfSmrg 2062972599cfSmrgif test "x$use_groff" = x"auto"; then 2063972599cfSmrg AC_PATH_PROG([GROFF], [groff]) 2064972599cfSmrg if test "x$GROFF" = "x"; then 2065972599cfSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 2066972599cfSmrg have_groff=no 2067972599cfSmrg else 2068972599cfSmrg have_groff=yes 2069972599cfSmrg fi 2070972599cfSmrgelif test "x$use_groff" = x"yes" ; then 2071972599cfSmrg AC_PATH_PROG([GROFF], [groff]) 2072972599cfSmrg if test "x$GROFF" = "x"; then 2073972599cfSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 2074972599cfSmrg fi 2075972599cfSmrg have_groff=yes 2076972599cfSmrgelif test "x$use_groff" = x"no" ; then 2077972599cfSmrg if test "x$GROFF" != "x"; then 2078972599cfSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 2079972599cfSmrg fi 2080972599cfSmrg have_groff=no 2081972599cfSmrgelse 2082972599cfSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2083972599cfSmrgfi 2084972599cfSmrg 2085972599cfSmrg# We have groff, test for the presence of the macro packages 2086972599cfSmrgif test "x$have_groff" = x"yes"; then 2087972599cfSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 2088972599cfSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 2089972599cfSmrg groff_ms_works=yes 2090972599cfSmrg else 2091972599cfSmrg groff_ms_works=no 2092972599cfSmrg fi 2093972599cfSmrg AC_MSG_RESULT([$groff_ms_works]) 2094972599cfSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 2095972599cfSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 2096972599cfSmrg groff_mm_works=yes 2097972599cfSmrg else 2098972599cfSmrg groff_mm_works=no 2099972599cfSmrg fi 2100972599cfSmrg AC_MSG_RESULT([$groff_mm_works]) 2101972599cfSmrgfi 2102972599cfSmrg 2103972599cfSmrg# We have groff, test for HTML dependencies, one command per package 2104972599cfSmrgif test "x$have_groff" = x"yes"; then 2105972599cfSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 2106972599cfSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 2107972599cfSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 2108972599cfSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 2109972599cfSmrg have_groff_html=yes 2110972599cfSmrg else 2111972599cfSmrg have_groff_html=no 2112972599cfSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 2113972599cfSmrg fi 2114972599cfSmrgfi 2115972599cfSmrg 2116972599cfSmrg# Set Automake conditionals for Makefiles 2117972599cfSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 2118972599cfSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 2119972599cfSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 2120972599cfSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 2121972599cfSmrg]) # XORG_WITH_GROFF 2122972599cfSmrg 2123972599cfSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 2124972599cfSmrg# --------------------------------------- 2125972599cfSmrg# Minimum version: 1.6.0 2126972599cfSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2127972599cfSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 2128972599cfSmrg# 2129972599cfSmrg# Documentation tools are not always available on all platforms and sometimes 2130972599cfSmrg# not at the appropriate level. This macro enables a module to test for the 2131972599cfSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2132972599cfSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 2133972599cfSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 2134972599cfSmrg# --with-fop assumes 'auto'. 2135972599cfSmrg# 2136972599cfSmrg# Interface to module: 2137972599cfSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 2138972599cfSmrg# FOP: returns the path of the fop program found 2139972599cfSmrg# returns the path set by the user in the environment 2140972599cfSmrg# --with-fop: 'yes' user instructs the module to use fop 2141972599cfSmrg# 'no' user instructs the module not to use fop 2142972599cfSmrg# 2143972599cfSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 2144972599cfSmrg# 2145972599cfSmrgAC_DEFUN([XORG_WITH_FOP],[ 2146972599cfSmrgAC_ARG_VAR([FOP], [Path to fop command]) 2147972599cfSmrgm4_define([_defopt], m4_default([$2], [auto])) 2148972599cfSmrgAC_ARG_WITH(fop, 2149972599cfSmrg AS_HELP_STRING([--with-fop], 2150972599cfSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 2151972599cfSmrg [use_fop=$withval], [use_fop=]_defopt) 2152972599cfSmrgm4_undefine([_defopt]) 2153972599cfSmrg 2154972599cfSmrgif test "x$use_fop" = x"auto"; then 2155972599cfSmrg AC_PATH_PROG([FOP], [fop]) 2156972599cfSmrg if test "x$FOP" = "x"; then 2157972599cfSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 2158972599cfSmrg have_fop=no 2159972599cfSmrg else 2160972599cfSmrg have_fop=yes 2161972599cfSmrg fi 2162972599cfSmrgelif test "x$use_fop" = x"yes" ; then 2163972599cfSmrg AC_PATH_PROG([FOP], [fop]) 2164972599cfSmrg if test "x$FOP" = "x"; then 2165972599cfSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 2166972599cfSmrg fi 2167972599cfSmrg have_fop=yes 2168972599cfSmrgelif test "x$use_fop" = x"no" ; then 2169972599cfSmrg if test "x$FOP" != "x"; then 2170972599cfSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 2171972599cfSmrg fi 2172972599cfSmrg have_fop=no 2173972599cfSmrgelse 2174972599cfSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 2175972599cfSmrgfi 2176972599cfSmrg 2177972599cfSmrg# Test for a minimum version of fop, if provided. 2178972599cfSmrgm4_ifval([$1], 2179972599cfSmrg[if test "$have_fop" = yes; then 2180972599cfSmrg # scrape the fop version 2181972599cfSmrg AC_MSG_CHECKING([for fop minimum version]) 2182972599cfSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 2183972599cfSmrg AC_MSG_RESULT([$fop_version]) 2184972599cfSmrg AS_VERSION_COMPARE([$fop_version], [$1], 2185972599cfSmrg [if test "x$use_fop" = xauto; then 2186972599cfSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 2187972599cfSmrg have_fop=no 2188972599cfSmrg else 2189972599cfSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 2190972599cfSmrg fi]) 2191972599cfSmrgfi]) 2192972599cfSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 2193972599cfSmrg]) # XORG_WITH_FOP 2194972599cfSmrg 21955eeb4e8fSmrg# XORG_WITH_M4([MIN-VERSION]) 21965eeb4e8fSmrg# --------------------------- 21975eeb4e8fSmrg# Minimum version: 1.19.0 21985eeb4e8fSmrg# 21995eeb4e8fSmrg# This macro attempts to locate an m4 macro processor which supports 22005eeb4e8fSmrg# -I option and is only useful for modules relying on M4 in order to 22015eeb4e8fSmrg# expand macros in source code files. 22025eeb4e8fSmrg# 22035eeb4e8fSmrg# Interface to module: 22045eeb4e8fSmrg# M4: returns the path of the m4 program found 22055eeb4e8fSmrg# returns the path set by the user in the environment 22065eeb4e8fSmrg# 22075eeb4e8fSmrgAC_DEFUN([XORG_WITH_M4], [ 22085eeb4e8fSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 22095eeb4e8fSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 22105eeb4e8fSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 22115eeb4e8fSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 22125eeb4e8fSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 22135eeb4e8fSmrg [$PATH:/usr/gnu/bin])]) 22145eeb4e8fSmrg 22155eeb4e8fSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 22165eeb4e8fSmrg]) # XORG_WITH_M4 22175eeb4e8fSmrg 2218972599cfSmrg# XORG_WITH_PS2PDF([DEFAULT]) 2219972599cfSmrg# ---------------- 2220972599cfSmrg# Minimum version: 1.6.0 2221972599cfSmrg# Minimum version for optional DEFAULT argument: 1.11.0 2222972599cfSmrg# 2223972599cfSmrg# Documentation tools are not always available on all platforms and sometimes 2224972599cfSmrg# not at the appropriate level. This macro enables a module to test for the 2225972599cfSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 2226972599cfSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 2227972599cfSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 2228972599cfSmrg# --with-ps2pdf assumes 'auto'. 2229972599cfSmrg# 2230972599cfSmrg# Interface to module: 2231972599cfSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 2232972599cfSmrg# PS2PDF: returns the path of the ps2pdf program found 2233972599cfSmrg# returns the path set by the user in the environment 2234972599cfSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 2235972599cfSmrg# 'no' user instructs the module not to use ps2pdf 2236972599cfSmrg# 2237972599cfSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 2238972599cfSmrg# 2239972599cfSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 2240972599cfSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 2241972599cfSmrgm4_define([_defopt], m4_default([$1], [auto])) 2242972599cfSmrgAC_ARG_WITH(ps2pdf, 2243972599cfSmrg AS_HELP_STRING([--with-ps2pdf], 2244972599cfSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 2245972599cfSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 2246972599cfSmrgm4_undefine([_defopt]) 2247972599cfSmrg 2248972599cfSmrgif test "x$use_ps2pdf" = x"auto"; then 2249972599cfSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2250972599cfSmrg if test "x$PS2PDF" = "x"; then 2251972599cfSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 2252972599cfSmrg have_ps2pdf=no 2253972599cfSmrg else 2254972599cfSmrg have_ps2pdf=yes 2255972599cfSmrg fi 2256972599cfSmrgelif test "x$use_ps2pdf" = x"yes" ; then 2257972599cfSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 2258972599cfSmrg if test "x$PS2PDF" = "x"; then 2259972599cfSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 2260972599cfSmrg fi 2261972599cfSmrg have_ps2pdf=yes 2262972599cfSmrgelif test "x$use_ps2pdf" = x"no" ; then 2263972599cfSmrg if test "x$PS2PDF" != "x"; then 2264972599cfSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2265972599cfSmrg fi 2266972599cfSmrg have_ps2pdf=no 2267972599cfSmrgelse 2268972599cfSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2269972599cfSmrgfi 2270972599cfSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2271972599cfSmrg]) # XORG_WITH_PS2PDF 2272972599cfSmrg 2273972599cfSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 2274972599cfSmrg# ---------------- 2275972599cfSmrg# Minimum version: 1.6.0 2276972599cfSmrg# 2277972599cfSmrg# Documentation tools are not always available on all platforms and sometimes 2278972599cfSmrg# not at the appropriate level. This macro enables a builder to skip all 2279972599cfSmrg# documentation targets except traditional man pages. 2280972599cfSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2281972599cfSmrg# maximum flexibilty in controlling documentation building. 2282972599cfSmrg# Refer to: 2283972599cfSmrg# XORG_WITH_XMLTO --with-xmlto 2284972599cfSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2285972599cfSmrg# XORG_WITH_DOXYGEN --with-doxygen 2286972599cfSmrg# XORG_WITH_FOP --with-fop 2287972599cfSmrg# XORG_WITH_GROFF --with-groff 2288972599cfSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2289972599cfSmrg# 2290972599cfSmrg# Interface to module: 2291972599cfSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2292972599cfSmrg# --enable-docs: 'yes' user instructs the module to generate docs 2293972599cfSmrg# 'no' user instructs the module not to generate docs 2294972599cfSmrg# parm1: specify the default value, yes or no. 2295972599cfSmrg# 2296972599cfSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2297972599cfSmrgm4_define([docs_default], m4_default([$1], [yes])) 2298972599cfSmrgAC_ARG_ENABLE(docs, 2299972599cfSmrg AS_HELP_STRING([--enable-docs], 2300972599cfSmrg [Enable building the documentation (default: ]docs_default[)]), 2301972599cfSmrg [build_docs=$enableval], [build_docs=]docs_default) 2302972599cfSmrgm4_undefine([docs_default]) 2303972599cfSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2304972599cfSmrgAC_MSG_CHECKING([whether to build documentation]) 2305972599cfSmrgAC_MSG_RESULT([$build_docs]) 2306972599cfSmrg]) # XORG_ENABLE_DOCS 2307972599cfSmrg 2308972599cfSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2309972599cfSmrg# ---------------- 2310972599cfSmrg# Minimum version: 1.6.0 2311972599cfSmrg# 2312972599cfSmrg# This macro enables a builder to skip all developer documentation. 2313972599cfSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2314972599cfSmrg# maximum flexibilty in controlling documentation building. 2315972599cfSmrg# Refer to: 2316972599cfSmrg# XORG_WITH_XMLTO --with-xmlto 2317972599cfSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2318972599cfSmrg# XORG_WITH_DOXYGEN --with-doxygen 2319972599cfSmrg# XORG_WITH_FOP --with-fop 2320972599cfSmrg# XORG_WITH_GROFF --with-groff 2321972599cfSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2322972599cfSmrg# 2323972599cfSmrg# Interface to module: 2324972599cfSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2325972599cfSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2326972599cfSmrg# 'no' user instructs the module not to generate developer docs 2327972599cfSmrg# parm1: specify the default value, yes or no. 2328972599cfSmrg# 2329972599cfSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2330972599cfSmrgm4_define([devel_default], m4_default([$1], [yes])) 2331972599cfSmrgAC_ARG_ENABLE(devel-docs, 2332972599cfSmrg AS_HELP_STRING([--enable-devel-docs], 2333972599cfSmrg [Enable building the developer documentation (default: ]devel_default[)]), 2334972599cfSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2335972599cfSmrgm4_undefine([devel_default]) 2336972599cfSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2337972599cfSmrgAC_MSG_CHECKING([whether to build developer documentation]) 2338972599cfSmrgAC_MSG_RESULT([$build_devel_docs]) 2339972599cfSmrg]) # XORG_ENABLE_DEVEL_DOCS 2340972599cfSmrg 2341972599cfSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 2342972599cfSmrg# ---------------- 2343972599cfSmrg# Minimum version: 1.6.0 2344972599cfSmrg# 2345972599cfSmrg# This macro enables a builder to skip all functional specification targets. 2346972599cfSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2347972599cfSmrg# maximum flexibilty in controlling documentation building. 2348972599cfSmrg# Refer to: 2349972599cfSmrg# XORG_WITH_XMLTO --with-xmlto 2350972599cfSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 2351972599cfSmrg# XORG_WITH_DOXYGEN --with-doxygen 2352972599cfSmrg# XORG_WITH_FOP --with-fop 2353972599cfSmrg# XORG_WITH_GROFF --with-groff 2354972599cfSmrg# XORG_WITH_PS2PDF --with-ps2pdf 2355972599cfSmrg# 2356972599cfSmrg# Interface to module: 2357972599cfSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2358972599cfSmrg# --enable-specs: 'yes' user instructs the module to generate specs 2359972599cfSmrg# 'no' user instructs the module not to generate specs 2360972599cfSmrg# parm1: specify the default value, yes or no. 2361972599cfSmrg# 2362972599cfSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2363972599cfSmrgm4_define([spec_default], m4_default([$1], [yes])) 2364972599cfSmrgAC_ARG_ENABLE(specs, 2365972599cfSmrg AS_HELP_STRING([--enable-specs], 2366972599cfSmrg [Enable building the specs (default: ]spec_default[)]), 2367972599cfSmrg [build_specs=$enableval], [build_specs=]spec_default) 2368972599cfSmrgm4_undefine([spec_default]) 2369972599cfSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2370972599cfSmrgAC_MSG_CHECKING([whether to build functional specifications]) 2371972599cfSmrgAC_MSG_RESULT([$build_specs]) 2372972599cfSmrg]) # XORG_ENABLE_SPECS 2373972599cfSmrg 2374972599cfSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2375972599cfSmrg# ---------------------------------------------- 2376972599cfSmrg# Minimum version: 1.13.0 2377972599cfSmrg# 2378972599cfSmrg# This macro enables a builder to enable/disable unit testing 2379972599cfSmrg# It makes no assumption about the test cases implementation 2380972599cfSmrg# Test cases may or may not use Automake "Support for test suites" 2381972599cfSmrg# They may or may not use the software utility library GLib 2382972599cfSmrg# 2383972599cfSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2384972599cfSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2385972599cfSmrg# The variable enable_unit_tests is used by other macros in this file. 2386972599cfSmrg# 2387972599cfSmrg# Interface to module: 2388972599cfSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2389972599cfSmrg# enable_unit_tests: used in configure.ac for additional configuration 2390972599cfSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2391972599cfSmrg# 'no' user instructs the module not to build tests 2392972599cfSmrg# parm1: specify the default value, yes or no. 2393972599cfSmrg# 2394972599cfSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2395972599cfSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2396972599cfSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2397972599cfSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2398972599cfSmrgm4_define([_defopt], m4_default([$1], [auto])) 2399972599cfSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2400972599cfSmrg [Enable building unit test cases (default: ]_defopt[)]), 2401972599cfSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2402972599cfSmrgm4_undefine([_defopt]) 2403972599cfSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2404972599cfSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2405972599cfSmrgAC_MSG_RESULT([$enable_unit_tests]) 2406972599cfSmrg]) # XORG_ENABLE_UNIT_TESTS 2407972599cfSmrg 2408972599cfSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2409972599cfSmrg# ------------------------------------------------------ 2410972599cfSmrg# Minimum version: 1.17.0 2411972599cfSmrg# 2412972599cfSmrg# This macro enables a builder to enable/disable integration testing 2413972599cfSmrg# It makes no assumption about the test cases' implementation 2414972599cfSmrg# Test cases may or may not use Automake "Support for test suites" 2415972599cfSmrg# 2416972599cfSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2417972599cfSmrg# usually requires less dependencies and may be built and run under less 2418972599cfSmrg# stringent environments than integration tests. 2419972599cfSmrg# 2420972599cfSmrg# Interface to module: 2421972599cfSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2422972599cfSmrg# enable_integration_tests: used in configure.ac for additional configuration 2423972599cfSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2424972599cfSmrg# 'no' user instructs the module not to build tests 2425972599cfSmrg# parm1: specify the default value, yes or no. 2426972599cfSmrg# 2427972599cfSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2428972599cfSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2429972599cfSmrgm4_define([_defopt], m4_default([$1], [auto])) 2430972599cfSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2431972599cfSmrg [Enable building integration test cases (default: ]_defopt[)]), 2432972599cfSmrg [enable_integration_tests=$enableval], 2433972599cfSmrg [enable_integration_tests=]_defopt) 2434972599cfSmrgm4_undefine([_defopt]) 2435972599cfSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2436972599cfSmrg [test "x$enable_integration_tests" != xno]) 2437972599cfSmrgAC_MSG_CHECKING([whether to build unit test cases]) 2438972599cfSmrgAC_MSG_RESULT([$enable_integration_tests]) 2439972599cfSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 2440972599cfSmrg 2441972599cfSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2442972599cfSmrg# ---------------------------------------- 2443972599cfSmrg# Minimum version: 1.13.0 2444972599cfSmrg# 2445972599cfSmrg# GLib is a library which provides advanced data structures and functions. 2446972599cfSmrg# This macro enables a module to test for the presence of Glib. 2447972599cfSmrg# 2448972599cfSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2449972599cfSmrg# Otherwise the value of $enable_unit_tests is blank. 2450972599cfSmrg# 2451972599cfSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2452972599cfSmrg# test support usually requires less dependencies and may be built and run under 2453972599cfSmrg# less stringent environments than integration tests. 2454972599cfSmrg# 2455972599cfSmrg# Interface to module: 2456972599cfSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 2457972599cfSmrg# with_glib: used in configure.ac to know if GLib has been found 2458972599cfSmrg# --with-glib: 'yes' user instructs the module to use glib 2459972599cfSmrg# 'no' user instructs the module not to use glib 2460972599cfSmrg# 2461972599cfSmrgAC_DEFUN([XORG_WITH_GLIB],[ 2462972599cfSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2463972599cfSmrgm4_define([_defopt], m4_default([$2], [auto])) 2464972599cfSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2465972599cfSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 2466972599cfSmrg [with_glib=$withval], [with_glib=]_defopt) 2467972599cfSmrgm4_undefine([_defopt]) 2468972599cfSmrg 2469972599cfSmrghave_glib=no 2470972599cfSmrg# Do not probe GLib if user explicitly disabled unit testing 2471972599cfSmrgif test "x$enable_unit_tests" != x"no"; then 2472972599cfSmrg # Do not probe GLib if user explicitly disabled it 2473972599cfSmrg if test "x$with_glib" != x"no"; then 2474972599cfSmrg m4_ifval( 2475972599cfSmrg [$1], 2476972599cfSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2477972599cfSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2478972599cfSmrg ) 2479972599cfSmrg fi 2480972599cfSmrgfi 2481972599cfSmrg 2482972599cfSmrg# Not having GLib when unit testing has been explicitly requested is an error 2483972599cfSmrgif test "x$enable_unit_tests" = x"yes"; then 2484972599cfSmrg if test "x$have_glib" = x"no"; then 2485972599cfSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2486972599cfSmrg fi 2487972599cfSmrgfi 2488972599cfSmrg 2489972599cfSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 2490972599cfSmrgif test "x$enable_unit_tests" = x"no"; then 2491972599cfSmrg if test "x$with_glib" = x"yes"; then 2492972599cfSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2493972599cfSmrg fi 2494972599cfSmrgfi 2495972599cfSmrg 2496972599cfSmrg# Not having GLib when it has been explicitly requested is an error 2497972599cfSmrgif test "x$with_glib" = x"yes"; then 2498972599cfSmrg if test "x$have_glib" = x"no"; then 2499972599cfSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2500972599cfSmrg fi 2501972599cfSmrgfi 2502972599cfSmrg 2503972599cfSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2504972599cfSmrg]) # XORG_WITH_GLIB 2505972599cfSmrg 2506972599cfSmrg# XORG_LD_WRAP([required|optional]) 2507972599cfSmrg# --------------------------------- 2508972599cfSmrg# Minimum version: 1.13.0 2509972599cfSmrg# 2510972599cfSmrg# Check if linker supports -wrap, passed via compiler flags 2511972599cfSmrg# 2512972599cfSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2513972599cfSmrg# Otherwise the value of $enable_unit_tests is blank. 2514972599cfSmrg# 2515972599cfSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2516972599cfSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2517972599cfSmrg# available, an argument of "optional" allows use when some unit tests require 2518972599cfSmrg# ld -wrap and others do not. 2519972599cfSmrg# 2520972599cfSmrgAC_DEFUN([XORG_LD_WRAP],[ 2521972599cfSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2522972599cfSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 2523972599cfSmrg void __wrap_exit(int status) { return; }], 2524972599cfSmrg [exit(0);])]) 2525972599cfSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 2526972599cfSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2527972599cfSmrg if test "x$have_ld_wrap" = x"no"; then 2528972599cfSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2529972599cfSmrg fi 2530972599cfSmrgfi 2531972599cfSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2532972599cfSmrg# 2533972599cfSmrg]) # XORG_LD_WRAP 2534972599cfSmrg 2535972599cfSmrg# XORG_CHECK_LINKER_FLAGS 2536972599cfSmrg# ----------------------- 2537972599cfSmrg# SYNOPSIS 2538972599cfSmrg# 2539972599cfSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2540972599cfSmrg# 2541972599cfSmrg# DESCRIPTION 2542972599cfSmrg# 2543972599cfSmrg# Check whether the given linker FLAGS work with the current language's 2544972599cfSmrg# linker, or whether they give an error. 2545972599cfSmrg# 2546972599cfSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2547972599cfSmrg# success/failure. 2548972599cfSmrg# 2549972599cfSmrg# PROGRAM-SOURCE is the program source to link with, if needed 2550972599cfSmrg# 2551972599cfSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2552972599cfSmrg# 2553972599cfSmrg# LICENSE 2554972599cfSmrg# 2555972599cfSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2556972599cfSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2557972599cfSmrg# Copyright (c) 2009 Matteo Frigo 2558972599cfSmrg# 2559972599cfSmrg# This program is free software: you can redistribute it and/or modify it 2560972599cfSmrg# under the terms of the GNU General Public License as published by the 2561972599cfSmrg# Free Software Foundation, either version 3 of the License, or (at your 2562972599cfSmrg# option) any later version. 2563972599cfSmrg# 2564972599cfSmrg# This program is distributed in the hope that it will be useful, but 2565972599cfSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2566972599cfSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2567972599cfSmrg# Public License for more details. 2568972599cfSmrg# 2569972599cfSmrg# You should have received a copy of the GNU General Public License along 2570972599cfSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2571972599cfSmrg# 2572972599cfSmrg# As a special exception, the respective Autoconf Macro's copyright owner 2573972599cfSmrg# gives unlimited permission to copy, distribute and modify the configure 2574972599cfSmrg# scripts that are the output of Autoconf when processing the Macro. You 2575972599cfSmrg# need not follow the terms of the GNU General Public License when using 2576972599cfSmrg# or distributing such scripts, even though portions of the text of the 2577972599cfSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 2578972599cfSmrg# all other use of the material that constitutes the Autoconf Macro. 2579972599cfSmrg# 2580972599cfSmrg# This special exception to the GPL applies to versions of the Autoconf 2581972599cfSmrg# Macro released by the Autoconf Archive. When you make and distribute a 2582972599cfSmrg# modified version of the Autoconf Macro, you may extend this special 2583972599cfSmrg# exception to the GPL to apply to your modified version as well.# 2584972599cfSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2585972599cfSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2586972599cfSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2587972599cfSmrgAS_LITERAL_IF([$1], 2588972599cfSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2589972599cfSmrg ax_save_FLAGS=$LDFLAGS 2590972599cfSmrg LDFLAGS="$1" 2591972599cfSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2592972599cfSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2593972599cfSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2594972599cfSmrg LDFLAGS=$ax_save_FLAGS])], 2595972599cfSmrg [ax_save_FLAGS=$LDFLAGS 2596972599cfSmrg LDFLAGS="$1" 2597972599cfSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2598972599cfSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2599972599cfSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2600972599cfSmrg LDFLAGS=$ax_save_FLAGS]) 2601972599cfSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2602972599cfSmrgAC_MSG_RESULT($xorg_check_linker_flags) 2603972599cfSmrgif test "x$xorg_check_linker_flags" = xyes; then 2604972599cfSmrg m4_default([$2], :) 2605972599cfSmrgelse 2606972599cfSmrg m4_default([$3], :) 2607972599cfSmrgfi 2608972599cfSmrg]) # XORG_CHECK_LINKER_FLAGS 2609972599cfSmrg 2610972599cfSmrg# XORG_MEMORY_CHECK_FLAGS 2611972599cfSmrg# ----------------------- 2612972599cfSmrg# Minimum version: 1.16.0 2613972599cfSmrg# 2614972599cfSmrg# This macro attempts to find appropriate memory checking functionality 2615972599cfSmrg# for various platforms which unit testing code may use to catch various 2616972599cfSmrg# forms of memory allocation and access errors in testing. 2617972599cfSmrg# 2618972599cfSmrg# Interface to module: 2619972599cfSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2620972599cfSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2621972599cfSmrg# 2622972599cfSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2623972599cfSmrg# 2624972599cfSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2625972599cfSmrg 2626972599cfSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2627972599cfSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2628972599cfSmrg [Environment variables to enable memory checking in tests]) 2629972599cfSmrg 2630972599cfSmrg# Check for different types of support on different platforms 2631972599cfSmrgcase $host_os in 2632972599cfSmrg solaris*) 2633972599cfSmrg AC_CHECK_LIB([umem], [umem_alloc], 2634972599cfSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2635972599cfSmrg ;; 2636972599cfSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2637972599cfSmrg # both directly and inverted, so should not be 0 or 255. 2638972599cfSmrg malloc_debug_env='MALLOC_PERTURB_=15' 2639972599cfSmrg ;; 2640972599cfSmrg darwin*) 2641972599cfSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2642972599cfSmrg ;; 2643972599cfSmrg *bsd*) 2644972599cfSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2645972599cfSmrg ;; 2646972599cfSmrgesac 2647972599cfSmrg 2648972599cfSmrg# User supplied flags override default flags 2649972599cfSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2650972599cfSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2651972599cfSmrgfi 2652972599cfSmrg 2653972599cfSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2654972599cfSmrg]) # XORG_WITH_LINT 2655972599cfSmrg 2656972599cfSmrg# XORG_CHECK_MALLOC_ZERO 2657972599cfSmrg# ---------------------- 2658972599cfSmrg# Minimum version: 1.0.0 2659972599cfSmrg# 2660972599cfSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2661972599cfSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 2662972599cfSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2663972599cfSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2664972599cfSmrgAC_ARG_ENABLE(malloc0returnsnull, 2665972599cfSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 2666972599cfSmrg [malloc(0) returns NULL (default: auto)]), 2667972599cfSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2668972599cfSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2669972599cfSmrg 2670972599cfSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2671972599cfSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 26725eeb4e8fSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 26735eeb4e8fSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2674972599cfSmrg#include <stdlib.h> 2675972599cfSmrg],[ 2676972599cfSmrg char *m0, *r0, *c0, *p; 2677972599cfSmrg m0 = malloc(0); 2678972599cfSmrg p = malloc(10); 2679972599cfSmrg r0 = realloc(p,0); 2680972599cfSmrg c0 = calloc(0,10); 2681972599cfSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2682972599cfSmrg])], 26835eeb4e8fSmrg [xorg_cv_malloc0_returns_null=yes], 26845eeb4e8fSmrg [xorg_cv_malloc0_returns_null=no])]) 26855eeb4e8fSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2686972599cfSmrgfi 2687972599cfSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2688972599cfSmrg 2689972599cfSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2690972599cfSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2691972599cfSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2692972599cfSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2693972599cfSmrgelse 2694972599cfSmrg MALLOC_ZERO_CFLAGS="" 2695972599cfSmrg XMALLOC_ZERO_CFLAGS="" 2696972599cfSmrg XTMALLOC_ZERO_CFLAGS="" 2697972599cfSmrgfi 2698972599cfSmrg 2699972599cfSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2700972599cfSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2701972599cfSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2702972599cfSmrg]) # XORG_CHECK_MALLOC_ZERO 2703972599cfSmrg 2704972599cfSmrg# XORG_WITH_LINT() 2705972599cfSmrg# ---------------- 2706972599cfSmrg# Minimum version: 1.1.0 2707972599cfSmrg# 2708972599cfSmrg# This macro enables the use of a tool that flags some suspicious and 2709972599cfSmrg# non-portable constructs (likely to be bugs) in C language source code. 2710972599cfSmrg# It will attempt to locate the tool and use appropriate options. 2711972599cfSmrg# There are various lint type tools on different platforms. 2712972599cfSmrg# 2713972599cfSmrg# Interface to module: 2714972599cfSmrg# LINT: returns the path to the tool found on the platform 2715972599cfSmrg# or the value set to LINT on the configure cmd line 2716972599cfSmrg# also an Automake conditional 2717972599cfSmrg# LINT_FLAGS: an Automake variable with appropriate flags 2718972599cfSmrg# 2719972599cfSmrg# --with-lint: 'yes' user instructs the module to use lint 2720972599cfSmrg# 'no' user instructs the module not to use lint (default) 2721972599cfSmrg# 2722972599cfSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2723972599cfSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2724972599cfSmrg# 2725972599cfSmrgAC_DEFUN([XORG_WITH_LINT],[ 2726972599cfSmrg 2727972599cfSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2728972599cfSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2729972599cfSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2730972599cfSmrg [Use a lint-style source code checker (default: disabled)])], 2731972599cfSmrg [use_lint=$withval], [use_lint=no]) 2732972599cfSmrg 2733972599cfSmrg# Obtain platform specific info like program name and options 2734972599cfSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2735972599cfSmrgcase $host_os in 2736972599cfSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2737972599cfSmrg lint_name=splint 2738972599cfSmrg lint_options="-badflag" 2739972599cfSmrg ;; 2740972599cfSmrg *freebsd* | *netbsd*) 2741972599cfSmrg lint_name=lint 2742972599cfSmrg lint_options="-u -b" 2743972599cfSmrg ;; 2744972599cfSmrg *solaris*) 2745972599cfSmrg lint_name=lint 2746972599cfSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2747972599cfSmrg ;; 2748972599cfSmrgesac 2749972599cfSmrg 2750972599cfSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2751972599cfSmrgif test "x$use_lint" = x"yes" ; then 2752972599cfSmrg AC_PATH_PROG([LINT], [$lint_name]) 2753972599cfSmrg if test "x$LINT" = "x"; then 2754972599cfSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2755972599cfSmrg fi 2756972599cfSmrgelif test "x$use_lint" = x"no" ; then 2757972599cfSmrg if test "x$LINT" != "x"; then 2758972599cfSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2759972599cfSmrg fi 2760972599cfSmrgelse 2761972599cfSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2762972599cfSmrgfi 2763972599cfSmrg 2764972599cfSmrg# User supplied flags override default flags 2765972599cfSmrgif test "x$LINT_FLAGS" != "x"; then 2766972599cfSmrg lint_options=$LINT_FLAGS 2767972599cfSmrgfi 2768972599cfSmrg 2769972599cfSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2770972599cfSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2771972599cfSmrg 2772972599cfSmrg]) # XORG_WITH_LINT 2773972599cfSmrg 2774972599cfSmrg# XORG_LINT_LIBRARY(LIBNAME) 2775972599cfSmrg# -------------------------- 2776972599cfSmrg# Minimum version: 1.1.0 2777972599cfSmrg# 2778972599cfSmrg# Sets up flags for building lint libraries for checking programs that call 2779972599cfSmrg# functions in the library. 2780972599cfSmrg# 2781972599cfSmrg# Interface to module: 2782972599cfSmrg# LINTLIB - Automake variable with the name of lint library file to make 2783972599cfSmrg# MAKE_LINT_LIB - Automake conditional 2784972599cfSmrg# 2785972599cfSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2786972599cfSmrg# - 'no' user instructs the module not to create a lint library (default) 2787972599cfSmrg 2788972599cfSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2789972599cfSmrgAC_REQUIRE([XORG_WITH_LINT]) 2790972599cfSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2791972599cfSmrg [Create lint library (default: disabled)])], 2792972599cfSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2793972599cfSmrg 2794972599cfSmrgif test "x$make_lint_lib" = x"yes" ; then 2795972599cfSmrg LINTLIB=llib-l$1.ln 2796972599cfSmrg if test "x$LINT" = "x"; then 2797972599cfSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2798972599cfSmrg fi 2799972599cfSmrgelif test "x$make_lint_lib" != x"no" ; then 2800972599cfSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2801972599cfSmrgfi 2802972599cfSmrg 2803972599cfSmrgAC_SUBST(LINTLIB) 2804972599cfSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2805972599cfSmrg 2806972599cfSmrg]) # XORG_LINT_LIBRARY 2807972599cfSmrg 2808972599cfSmrg# XORG_COMPILER_BRAND 2809972599cfSmrg# ------------------- 2810972599cfSmrg# Minimum version: 1.14.0 2811972599cfSmrg# 2812972599cfSmrg# Checks for various brands of compilers and sets flags as appropriate: 2813972599cfSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2814972599cfSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2815972599cfSmrg# clang compiler - sets CLANGCC to "yes" 2816972599cfSmrg# Intel compiler - sets INTELCC to "yes" 2817972599cfSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2818972599cfSmrg# 2819972599cfSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2820972599cfSmrgAC_LANG_CASE( 2821972599cfSmrg [C], [ 2822972599cfSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2823972599cfSmrg ], 2824972599cfSmrg [C++], [ 2825972599cfSmrg AC_REQUIRE([AC_PROG_CXX]) 2826972599cfSmrg ] 2827972599cfSmrg) 2828972599cfSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2829972599cfSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2830972599cfSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2831972599cfSmrg]) # XORG_COMPILER_BRAND 2832972599cfSmrg 2833972599cfSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2834972599cfSmrg# --------------- 2835972599cfSmrg# Minimum version: 1.16.0 2836972599cfSmrg# 2837972599cfSmrg# Test if the compiler works when passed the given flag as a command line argument. 2838972599cfSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2839972599cfSmrg# next flag in the list until there are no more options. 2840972599cfSmrg# 2841972599cfSmrg# Note that this does not guarantee that the compiler supports the flag as some 2842972599cfSmrg# compilers will simply ignore arguments that they do not understand, but we do 2843972599cfSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2844972599cfSmrg# -Werror=unused-command-line-argument 2845972599cfSmrg# 2846972599cfSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2847972599cfSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2848972599cfSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2849972599cfSmrg 2850972599cfSmrgAC_LANG_COMPILER_REQUIRE 2851972599cfSmrg 2852972599cfSmrgAC_LANG_CASE( 2853972599cfSmrg [C], [ 2854972599cfSmrg AC_REQUIRE([AC_PROG_CC_C99]) 2855972599cfSmrg define([PREFIX], [C]) 2856972599cfSmrg define([CACHE_PREFIX], [cc]) 2857972599cfSmrg define([COMPILER], [$CC]) 2858972599cfSmrg ], 2859972599cfSmrg [C++], [ 2860972599cfSmrg define([PREFIX], [CXX]) 2861972599cfSmrg define([CACHE_PREFIX], [cxx]) 2862972599cfSmrg define([COMPILER], [$CXX]) 2863972599cfSmrg ] 2864972599cfSmrg) 2865972599cfSmrg 2866972599cfSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 2867972599cfSmrg 2868972599cfSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 2869972599cfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2870972599cfSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 2871972599cfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 2872972599cfSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 2873972599cfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 2874972599cfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 2875972599cfSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 2876972599cfSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2877972599cfSmrgfi 2878972599cfSmrg 2879972599cfSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 2880972599cfSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 2881972599cfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2882972599cfSmrg fi 2883972599cfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 2884972599cfSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 2885972599cfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 2886972599cfSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 2887972599cfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 2888972599cfSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 2889972599cfSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 2890972599cfSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2891972599cfSmrgfi 2892972599cfSmrg 2893972599cfSmrgfound="no" 2894972599cfSmrgm4_foreach([flag], m4_cdr($@), [ 2895972599cfSmrg if test $found = "no" ; then 28965eeb4e8fSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 2897972599cfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2898972599cfSmrg fi 2899972599cfSmrg 29005eeb4e8fSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 2901972599cfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 2902972599cfSmrg fi 2903972599cfSmrg 2904972599cfSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 2905972599cfSmrg 2906972599cfSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 2907972599cfSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 2908972599cfSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 2909972599cfSmrg AC_CACHE_VAL($cacheid, 2910972599cfSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 2911972599cfSmrg [eval $cacheid=yes], 2912972599cfSmrg [eval $cacheid=no])]) 2913972599cfSmrg 2914972599cfSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2915972599cfSmrg 2916972599cfSmrg eval supported=\$$cacheid 2917972599cfSmrg AC_MSG_RESULT([$supported]) 2918972599cfSmrg if test "$supported" = "yes" ; then 2919972599cfSmrg $1="$$1 ]flag[" 2920972599cfSmrg found="yes" 2921972599cfSmrg fi 2922972599cfSmrg fi 2923972599cfSmrg]) 2924972599cfSmrg]) # XORG_TESTSET_CFLAG 2925972599cfSmrg 2926972599cfSmrg# XORG_COMPILER_FLAGS 2927972599cfSmrg# --------------- 2928972599cfSmrg# Minimum version: 1.16.0 2929972599cfSmrg# 2930972599cfSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 2931972599cfSmrg# arguments supported by the selected compiler which do NOT alter the generated 2932972599cfSmrg# code. These arguments will cause the compiler to print various warnings 2933972599cfSmrg# during compilation AND turn a conservative set of warnings into errors. 2934972599cfSmrg# 2935972599cfSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 2936972599cfSmrg# future versions of util-macros as options are added to new compilers. 2937972599cfSmrg# 2938972599cfSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 2939972599cfSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 2940972599cfSmrg 2941972599cfSmrgAC_ARG_ENABLE(selective-werror, 2942972599cfSmrg AS_HELP_STRING([--disable-selective-werror], 2943972599cfSmrg [Turn off selective compiler errors. (default: enabled)]), 2944972599cfSmrg [SELECTIVE_WERROR=$enableval], 2945972599cfSmrg [SELECTIVE_WERROR=yes]) 2946972599cfSmrg 2947972599cfSmrgAC_LANG_CASE( 2948972599cfSmrg [C], [ 2949972599cfSmrg define([PREFIX], [C]) 2950972599cfSmrg ], 2951972599cfSmrg [C++], [ 2952972599cfSmrg define([PREFIX], [CXX]) 2953972599cfSmrg ] 2954972599cfSmrg) 2955972599cfSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 2956972599cfSmrgif test "x$SUNCC" = "xyes"; then 2957972599cfSmrg [BASE_]PREFIX[FLAGS]="-v" 2958972599cfSmrgelse 2959972599cfSmrg [BASE_]PREFIX[FLAGS]="" 2960972599cfSmrgfi 2961972599cfSmrg 2962972599cfSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 2963972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 2964972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 2965972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 2966972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 2967972599cfSmrg 2968972599cfSmrgAC_LANG_CASE( 2969972599cfSmrg [C], [ 2970972599cfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 2971972599cfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 2972972599cfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 2973972599cfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 29745eeb4e8fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 2975972599cfSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 2976972599cfSmrg ] 2977972599cfSmrg) 2978972599cfSmrg 2979972599cfSmrg# This chunk adds additional warnings that could catch undesired effects. 2980972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 2981972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 2982972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 2983972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 2984972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 2985972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 29865eeb4e8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 2987972599cfSmrg 2988972599cfSmrg# These are currently disabled because they are noisy. They will be enabled 2989972599cfSmrg# in the future once the codebase is sufficiently modernized to silence 2990972599cfSmrg# them. For now, I don't want them to drown out the other warnings. 2991972599cfSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 2992972599cfSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 29935eeb4e8fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 2994972599cfSmrg 2995972599cfSmrg# Turn some warnings into errors, so we don't accidently get successful builds 2996972599cfSmrg# when there are problems that should be fixed. 2997972599cfSmrg 2998972599cfSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 2999972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 3000972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 3001972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 3002972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 3003972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 3004972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 3005972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 3006972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 3007972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 3008972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 3009972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 3010972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 3011972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 3012972599cfSmrgelse 3013972599cfSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 3014972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 3015972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 3016972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 3017972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 3018972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 3019972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 3020972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 3021972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 3022972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 3023972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 3024972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 3025972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 3026972599cfSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 3027972599cfSmrgfi 3028972599cfSmrg 3029972599cfSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3030972599cfSmrg]) # XORG_COMPILER_FLAGS 3031972599cfSmrg 3032972599cfSmrg# XORG_CWARNFLAGS 3033972599cfSmrg# --------------- 3034972599cfSmrg# Minimum version: 1.2.0 3035972599cfSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3036972599cfSmrg# 3037972599cfSmrg# Defines CWARNFLAGS to enable C compiler warnings. 3038972599cfSmrg# 3039972599cfSmrg# This function is deprecated because it defines -fno-strict-aliasing 3040972599cfSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 3041972599cfSmrg# is needed, then it should be added explicitly in the module when 3042972599cfSmrg# it is updated to use BASE_CFLAGS. 3043972599cfSmrg# 3044972599cfSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 3045972599cfSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3046972599cfSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3047972599cfSmrgAC_LANG_CASE( 3048972599cfSmrg [C], [ 3049972599cfSmrg CWARNFLAGS="$BASE_CFLAGS" 3050972599cfSmrg if test "x$GCC" = xyes ; then 3051972599cfSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 3052972599cfSmrg fi 3053972599cfSmrg AC_SUBST(CWARNFLAGS) 3054972599cfSmrg ] 3055972599cfSmrg) 3056972599cfSmrg]) # XORG_CWARNFLAGS 3057972599cfSmrg 3058972599cfSmrg# XORG_STRICT_OPTION 3059972599cfSmrg# ----------------------- 3060972599cfSmrg# Minimum version: 1.3.0 3061972599cfSmrg# 3062972599cfSmrg# Add configure option to enable strict compilation flags, such as treating 3063972599cfSmrg# warnings as fatal errors. 3064972599cfSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 3065972599cfSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 3066972599cfSmrg# 3067972599cfSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 3068972599cfSmrg# when strict compilation is unconditionally desired. 3069972599cfSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 3070972599cfSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 3071972599cfSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3072972599cfSmrg 3073972599cfSmrgAC_ARG_ENABLE(strict-compilation, 3074972599cfSmrg AS_HELP_STRING([--enable-strict-compilation], 3075972599cfSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 3076972599cfSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3077972599cfSmrg 3078972599cfSmrgAC_LANG_CASE( 3079972599cfSmrg [C], [ 3080972599cfSmrg define([PREFIX], [C]) 3081972599cfSmrg ], 3082972599cfSmrg [C++], [ 3083972599cfSmrg define([PREFIX], [CXX]) 3084972599cfSmrg ] 3085972599cfSmrg) 3086972599cfSmrg 3087972599cfSmrg[STRICT_]PREFIX[FLAGS]="" 3088972599cfSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 3089972599cfSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3090972599cfSmrg 3091972599cfSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 3092972599cfSmrg# activate it with -Werror, so we add it here explicitly. 3093972599cfSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3094972599cfSmrg 3095972599cfSmrgif test "x$STRICT_COMPILE" = "xyes"; then 3096972599cfSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 3097972599cfSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 3098972599cfSmrgfi 3099972599cfSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 3100972599cfSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 3101972599cfSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 3102972599cfSmrg]) # XORG_STRICT_OPTION 3103972599cfSmrg 3104972599cfSmrg# XORG_DEFAULT_OPTIONS 3105972599cfSmrg# -------------------- 3106972599cfSmrg# Minimum version: 1.3.0 3107972599cfSmrg# 3108972599cfSmrg# Defines default options for X.Org modules. 3109972599cfSmrg# 3110972599cfSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 3111972599cfSmrgAC_REQUIRE([AC_PROG_INSTALL]) 3112972599cfSmrgXORG_COMPILER_FLAGS 3113972599cfSmrgXORG_CWARNFLAGS 3114972599cfSmrgXORG_STRICT_OPTION 3115972599cfSmrgXORG_RELEASE_VERSION 3116972599cfSmrgXORG_CHANGELOG 3117972599cfSmrgXORG_INSTALL 3118972599cfSmrgXORG_MANPAGE_SECTIONS 3119972599cfSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 3120972599cfSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 3121972599cfSmrg]) # XORG_DEFAULT_OPTIONS 3122972599cfSmrg 3123972599cfSmrg# XORG_INSTALL() 3124972599cfSmrg# ---------------- 3125972599cfSmrg# Minimum version: 1.4.0 3126972599cfSmrg# 3127972599cfSmrg# Defines the variable INSTALL_CMD as the command to copy 3128972599cfSmrg# INSTALL from $prefix/share/util-macros. 3129972599cfSmrg# 3130972599cfSmrgAC_DEFUN([XORG_INSTALL], [ 3131972599cfSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 3132972599cfSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 3133972599cfSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 3134972599cfSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 3135972599cfSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 3136972599cfSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 3137972599cfSmrgAC_SUBST([INSTALL_CMD]) 3138972599cfSmrg]) # XORG_INSTALL 3139972599cfSmrgdnl Copyright 2005 Red Hat, Inc 3140972599cfSmrgdnl 3141972599cfSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 3142972599cfSmrgdnl documentation for any purpose is hereby granted without fee, provided that 3143972599cfSmrgdnl the above copyright notice appear in all copies and that both that 3144972599cfSmrgdnl copyright notice and this permission notice appear in supporting 3145972599cfSmrgdnl documentation. 3146972599cfSmrgdnl 3147972599cfSmrgdnl The above copyright notice and this permission notice shall be included 3148972599cfSmrgdnl in all copies or substantial portions of the Software. 3149972599cfSmrgdnl 3150972599cfSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 3151972599cfSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 3152972599cfSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 3153972599cfSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 3154972599cfSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3155972599cfSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3156972599cfSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 3157972599cfSmrgdnl 3158972599cfSmrgdnl Except as contained in this notice, the name of the copyright holders shall 3159972599cfSmrgdnl not be used in advertising or otherwise to promote the sale, use or 3160972599cfSmrgdnl other dealings in this Software without prior written authorization 3161972599cfSmrgdnl from the copyright holders. 3162972599cfSmrgdnl 3163972599cfSmrg 3164972599cfSmrg# XORG_RELEASE_VERSION 3165972599cfSmrg# -------------------- 3166972599cfSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 31675eeb4e8fSmrg 3168972599cfSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 3169972599cfSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 3170972599cfSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 3171972599cfSmrg [Major version of this package]) 3172972599cfSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 3173972599cfSmrg if test "x$PVM" = "x"; then 3174972599cfSmrg PVM="0" 3175972599cfSmrg fi 3176972599cfSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 3177972599cfSmrg [$PVM], 3178972599cfSmrg [Minor version of this package]) 3179972599cfSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 3180972599cfSmrg if test "x$PVP" = "x"; then 3181972599cfSmrg PVP="0" 3182972599cfSmrg fi 3183972599cfSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 3184972599cfSmrg [$PVP], 3185972599cfSmrg [Patch version of this package]) 3186972599cfSmrg]) 3187972599cfSmrg 3188972599cfSmrg# XORG_CHANGELOG() 3189972599cfSmrg# ---------------- 3190972599cfSmrg# Minimum version: 1.2.0 3191972599cfSmrg# 3192972599cfSmrg# Defines the variable CHANGELOG_CMD as the command to generate 3193972599cfSmrg# ChangeLog from git. 3194972599cfSmrg# 3195972599cfSmrg# 3196972599cfSmrgAC_DEFUN([XORG_CHANGELOG], [ 3197972599cfSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 3198972599cfSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 3199972599cfSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 3200972599cfSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 3201972599cfSmrgAC_SUBST([CHANGELOG_CMD]) 3202972599cfSmrg]) # XORG_CHANGELOG 3203972599cfSmrg 3204