aclocal.m4 revision 8f65982a
18f65982aSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 29aa228fdSmrg 39aa228fdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 48f65982aSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 59aa228fdSmrg# This file is free software; the Free Software Foundation 69aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 79aa228fdSmrg# with or without modifications, as long as this notice is preserved. 89aa228fdSmrg 99aa228fdSmrg# This program is distributed in the hope that it will be useful, 109aa228fdSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 119aa228fdSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 129aa228fdSmrg# PARTICULAR PURPOSE. 139aa228fdSmrg 148f65982aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 158f65982aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 168f65982aSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 178f65982aSmrg[m4_warning([this file was generated for autoconf 2.68. 188f65982aSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 198f65982aSmrgIf you have problems, you may need to regenerate the build system entirely. 208f65982aSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 219aa228fdSmrg 228f65982aSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 239aa228fdSmrg# 249aa228fdSmrg# This file is free software; the Free Software Foundation 259aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 269aa228fdSmrg# with or without modifications, as long as this notice is preserved. 279aa228fdSmrg 289aa228fdSmrg# AM_AUTOMAKE_VERSION(VERSION) 299aa228fdSmrg# ---------------------------- 309aa228fdSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 319aa228fdSmrg# generated from the m4 files accompanying Automake X.Y. 329aa228fdSmrg# (This private macro should not be called outside this file.) 339aa228fdSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 348f65982aSmrg[am__api_version='1.11' 359aa228fdSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 369aa228fdSmrgdnl require some minimum version. Point them to the right macro. 378f65982aSmrgm4_if([$1], [1.11.1], [], 389aa228fdSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 399aa228fdSmrg]) 409aa228fdSmrg 419aa228fdSmrg# _AM_AUTOCONF_VERSION(VERSION) 429aa228fdSmrg# ----------------------------- 439aa228fdSmrg# aclocal traces this macro to find the Autoconf version. 449aa228fdSmrg# This is a private macro too. Using m4_define simplifies 459aa228fdSmrg# the logic in aclocal, which can simply ignore this definition. 469aa228fdSmrgm4_define([_AM_AUTOCONF_VERSION], []) 479aa228fdSmrg 489aa228fdSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 499aa228fdSmrg# ------------------------------- 509aa228fdSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 518f65982aSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 529aa228fdSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 538f65982aSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 548f65982aSmrgm4_ifndef([AC_AUTOCONF_VERSION], 558f65982aSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 568f65982aSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 579aa228fdSmrg 589aa228fdSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 599aa228fdSmrg 609aa228fdSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 619aa228fdSmrg# 629aa228fdSmrg# This file is free software; the Free Software Foundation 639aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 649aa228fdSmrg# with or without modifications, as long as this notice is preserved. 659aa228fdSmrg 669aa228fdSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 679aa228fdSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 689aa228fdSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 699aa228fdSmrg# 709aa228fdSmrg# Of course, Automake must honor this variable whenever it calls a 719aa228fdSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 729aa228fdSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 739aa228fdSmrg# depending on how configure is run. This is pretty annoying, since 749aa228fdSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 759aa228fdSmrg# source directory, any form will work fine, but in subdirectories a 769aa228fdSmrg# relative path needs to be adjusted first. 779aa228fdSmrg# 789aa228fdSmrg# $ac_aux_dir/missing 799aa228fdSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 809aa228fdSmrg# $top_srcdir/$ac_aux_dir/missing 819aa228fdSmrg# fails if $ac_aux_dir is absolute, 829aa228fdSmrg# fails when called from a subdirectory in a VPATH build with 839aa228fdSmrg# a relative $ac_aux_dir 849aa228fdSmrg# 859aa228fdSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 869aa228fdSmrg# are both prefixed by $srcdir. In an in-source build this is usually 879aa228fdSmrg# harmless because $srcdir is `.', but things will broke when you 889aa228fdSmrg# start a VPATH build or use an absolute $srcdir. 899aa228fdSmrg# 909aa228fdSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 919aa228fdSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 929aa228fdSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 939aa228fdSmrg# and then we would define $MISSING as 949aa228fdSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 959aa228fdSmrg# This will work as long as MISSING is not called from configure, because 969aa228fdSmrg# unfortunately $(top_srcdir) has no meaning in configure. 979aa228fdSmrg# However there are other variables, like CC, which are often used in 989aa228fdSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 999aa228fdSmrg# 1009aa228fdSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1019aa228fdSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1029aa228fdSmrg# configured tree to be moved without reconfiguration. 1039aa228fdSmrg 1049aa228fdSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1059aa228fdSmrg[dnl Rely on autoconf to set up CDPATH properly. 1069aa228fdSmrgAC_PREREQ([2.50])dnl 1079aa228fdSmrg# expand $ac_aux_dir to an absolute path 1089aa228fdSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 1099aa228fdSmrg]) 1109aa228fdSmrg 1119aa228fdSmrg# AM_CONDITIONAL -*- Autoconf -*- 1129aa228fdSmrg 1138f65982aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1149aa228fdSmrg# Free Software Foundation, Inc. 1159aa228fdSmrg# 1169aa228fdSmrg# This file is free software; the Free Software Foundation 1179aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 1189aa228fdSmrg# with or without modifications, as long as this notice is preserved. 1199aa228fdSmrg 1208f65982aSmrg# serial 9 1219aa228fdSmrg 1229aa228fdSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1239aa228fdSmrg# ------------------------------------- 1249aa228fdSmrg# Define a conditional. 1259aa228fdSmrgAC_DEFUN([AM_CONDITIONAL], 1269aa228fdSmrg[AC_PREREQ(2.52)dnl 1279aa228fdSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1289aa228fdSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1299aa228fdSmrgAC_SUBST([$1_TRUE])dnl 1309aa228fdSmrgAC_SUBST([$1_FALSE])dnl 1319aa228fdSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1329aa228fdSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1338f65982aSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1349aa228fdSmrgif $2; then 1359aa228fdSmrg $1_TRUE= 1369aa228fdSmrg $1_FALSE='#' 1379aa228fdSmrgelse 1389aa228fdSmrg $1_TRUE='#' 1399aa228fdSmrg $1_FALSE= 1409aa228fdSmrgfi 1419aa228fdSmrgAC_CONFIG_COMMANDS_PRE( 1429aa228fdSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1439aa228fdSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1449aa228fdSmrgUsually this means the macro was only invoked conditionally.]]) 1459aa228fdSmrgfi])]) 1469aa228fdSmrg 1478f65982aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1489aa228fdSmrg# Free Software Foundation, Inc. 1499aa228fdSmrg# 1509aa228fdSmrg# This file is free software; the Free Software Foundation 1519aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 1529aa228fdSmrg# with or without modifications, as long as this notice is preserved. 1539aa228fdSmrg 1548f65982aSmrg# serial 10 1559aa228fdSmrg 1569aa228fdSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1579aa228fdSmrg# written in clear, in which case automake, when reading aclocal.m4, 1589aa228fdSmrg# will think it sees a *use*, and therefore will trigger all it's 1599aa228fdSmrg# C support machinery. Also note that it means that autoscan, seeing 1609aa228fdSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1619aa228fdSmrg 1629aa228fdSmrg 1639aa228fdSmrg# _AM_DEPENDENCIES(NAME) 1649aa228fdSmrg# ---------------------- 1659aa228fdSmrg# See how the compiler implements dependency checking. 1669aa228fdSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1679aa228fdSmrg# We try a few techniques and use that to set a single cache variable. 1689aa228fdSmrg# 1699aa228fdSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1709aa228fdSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1719aa228fdSmrg# dependency, and given that the user is not expected to run this macro, 1729aa228fdSmrg# just rely on AC_PROG_CC. 1739aa228fdSmrgAC_DEFUN([_AM_DEPENDENCIES], 1749aa228fdSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1759aa228fdSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1769aa228fdSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1779aa228fdSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1789aa228fdSmrg 1799aa228fdSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1809aa228fdSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1819aa228fdSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1829aa228fdSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1839aa228fdSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1849aa228fdSmrg [depcc="$$1" am_compiler_list=]) 1859aa228fdSmrg 1869aa228fdSmrgAC_CACHE_CHECK([dependency style of $depcc], 1879aa228fdSmrg [am_cv_$1_dependencies_compiler_type], 1889aa228fdSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1899aa228fdSmrg # We make a subdir and do the tests there. Otherwise we can end up 1909aa228fdSmrg # making bogus files that we don't know about and never remove. For 1919aa228fdSmrg # instance it was reported that on HP-UX the gcc test will end up 1929aa228fdSmrg # making a dummy file named `D' -- because `-MD' means `put the output 1939aa228fdSmrg # in D'. 1949aa228fdSmrg mkdir conftest.dir 1959aa228fdSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1969aa228fdSmrg # using a relative directory. 1979aa228fdSmrg cp "$am_depcomp" conftest.dir 1989aa228fdSmrg cd conftest.dir 1999aa228fdSmrg # We will build objects and dependencies in a subdirectory because 2009aa228fdSmrg # it helps to detect inapplicable dependency modes. For instance 2019aa228fdSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 2029aa228fdSmrg # side effect of compilation, but ICC will put the dependencies in 2039aa228fdSmrg # the current directory while Tru64 will put them in the object 2049aa228fdSmrg # directory. 2059aa228fdSmrg mkdir sub 2069aa228fdSmrg 2079aa228fdSmrg am_cv_$1_dependencies_compiler_type=none 2089aa228fdSmrg if test "$am_compiler_list" = ""; then 2099aa228fdSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2109aa228fdSmrg fi 2118f65982aSmrg am__universal=false 2128f65982aSmrg m4_case([$1], [CC], 2138f65982aSmrg [case " $depcc " in #( 2148f65982aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2158f65982aSmrg esac], 2168f65982aSmrg [CXX], 2178f65982aSmrg [case " $depcc " in #( 2188f65982aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2198f65982aSmrg esac]) 2208f65982aSmrg 2219aa228fdSmrg for depmode in $am_compiler_list; do 2229aa228fdSmrg # Setup a source with many dependencies, because some compilers 2239aa228fdSmrg # like to wrap large dependency lists on column 80 (with \), and 2249aa228fdSmrg # we should not choose a depcomp mode which is confused by this. 2259aa228fdSmrg # 2269aa228fdSmrg # We need to recreate these files for each test, as the compiler may 2279aa228fdSmrg # overwrite some of them when testing with obscure command lines. 2289aa228fdSmrg # This happens at least with the AIX C compiler. 2299aa228fdSmrg : > sub/conftest.c 2309aa228fdSmrg for i in 1 2 3 4 5 6; do 2319aa228fdSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2329aa228fdSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2339aa228fdSmrg # Solaris 8's {/usr,}/bin/sh. 2349aa228fdSmrg touch sub/conftst$i.h 2359aa228fdSmrg done 2369aa228fdSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2379aa228fdSmrg 2388f65982aSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2398f65982aSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2408f65982aSmrg # handle `-M -o', and we need to detect this. Also, some Intel 2418f65982aSmrg # versions had trouble with output in subdirs 2428f65982aSmrg am__obj=sub/conftest.${OBJEXT-o} 2438f65982aSmrg am__minus_obj="-o $am__obj" 2449aa228fdSmrg case $depmode in 2458f65982aSmrg gcc) 2468f65982aSmrg # This depmode causes a compiler race in universal mode. 2478f65982aSmrg test "$am__universal" = false || continue 2488f65982aSmrg ;; 2499aa228fdSmrg nosideeffect) 2509aa228fdSmrg # after this tag, mechanisms are not by side-effect, so they'll 2519aa228fdSmrg # only be used when explicitly requested 2529aa228fdSmrg if test "x$enable_dependency_tracking" = xyes; then 2539aa228fdSmrg continue 2549aa228fdSmrg else 2559aa228fdSmrg break 2569aa228fdSmrg fi 2579aa228fdSmrg ;; 2588f65982aSmrg msvisualcpp | msvcmsys) 2598f65982aSmrg # This compiler won't grok `-c -o', but also, the minuso test has 2608f65982aSmrg # not run yet. These depmodes are late enough in the game, and 2618f65982aSmrg # so weak that their functioning should not be impacted. 2628f65982aSmrg am__obj=conftest.${OBJEXT-o} 2638f65982aSmrg am__minus_obj= 2648f65982aSmrg ;; 2659aa228fdSmrg none) break ;; 2669aa228fdSmrg esac 2679aa228fdSmrg if depmode=$depmode \ 2688f65982aSmrg source=sub/conftest.c object=$am__obj \ 2699aa228fdSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2708f65982aSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2719aa228fdSmrg >/dev/null 2>conftest.err && 2729aa228fdSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2739aa228fdSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2748f65982aSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2759aa228fdSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2769aa228fdSmrg # icc doesn't choke on unknown options, it will just issue warnings 2779aa228fdSmrg # or remarks (even with -Werror). So we grep stderr for any message 2789aa228fdSmrg # that says an option was ignored or not supported. 2799aa228fdSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2809aa228fdSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2819aa228fdSmrg # The diagnosis changed in icc 8.0: 2829aa228fdSmrg # icc: Command line remark: option '-MP' not supported 2839aa228fdSmrg if (grep 'ignoring option' conftest.err || 2849aa228fdSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2859aa228fdSmrg am_cv_$1_dependencies_compiler_type=$depmode 2869aa228fdSmrg break 2879aa228fdSmrg fi 2889aa228fdSmrg fi 2899aa228fdSmrg done 2909aa228fdSmrg 2919aa228fdSmrg cd .. 2929aa228fdSmrg rm -rf conftest.dir 2939aa228fdSmrgelse 2949aa228fdSmrg am_cv_$1_dependencies_compiler_type=none 2959aa228fdSmrgfi 2969aa228fdSmrg]) 2979aa228fdSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2989aa228fdSmrgAM_CONDITIONAL([am__fastdep$1], [ 2999aa228fdSmrg test "x$enable_dependency_tracking" != xno \ 3009aa228fdSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 3019aa228fdSmrg]) 3029aa228fdSmrg 3039aa228fdSmrg 3049aa228fdSmrg# AM_SET_DEPDIR 3059aa228fdSmrg# ------------- 3069aa228fdSmrg# Choose a directory name for dependency files. 3079aa228fdSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 3089aa228fdSmrgAC_DEFUN([AM_SET_DEPDIR], 3099aa228fdSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3109aa228fdSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3119aa228fdSmrg]) 3129aa228fdSmrg 3139aa228fdSmrg 3149aa228fdSmrg# AM_DEP_TRACK 3159aa228fdSmrg# ------------ 3169aa228fdSmrgAC_DEFUN([AM_DEP_TRACK], 3179aa228fdSmrg[AC_ARG_ENABLE(dependency-tracking, 3189aa228fdSmrg[ --disable-dependency-tracking speeds up one-time build 3199aa228fdSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 3209aa228fdSmrgif test "x$enable_dependency_tracking" != xno; then 3219aa228fdSmrg am_depcomp="$ac_aux_dir/depcomp" 3229aa228fdSmrg AMDEPBACKSLASH='\' 3239aa228fdSmrgfi 3249aa228fdSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3259aa228fdSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3269aa228fdSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3279aa228fdSmrg]) 3289aa228fdSmrg 3299aa228fdSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3309aa228fdSmrg 3318f65982aSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 3329aa228fdSmrg# Free Software Foundation, Inc. 3339aa228fdSmrg# 3349aa228fdSmrg# This file is free software; the Free Software Foundation 3359aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 3369aa228fdSmrg# with or without modifications, as long as this notice is preserved. 3379aa228fdSmrg 3388f65982aSmrg#serial 5 3399aa228fdSmrg 3409aa228fdSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3419aa228fdSmrg# ------------------------------ 3429aa228fdSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3438f65982aSmrg[{ 3448f65982aSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3458f65982aSmrg # are listed without --file. Let's play safe and only enable the eval 3468f65982aSmrg # if we detect the quoting. 3478f65982aSmrg case $CONFIG_FILES in 3488f65982aSmrg *\'*) eval set x "$CONFIG_FILES" ;; 3498f65982aSmrg *) set x $CONFIG_FILES ;; 3508f65982aSmrg esac 3518f65982aSmrg shift 3528f65982aSmrg for mf 3538f65982aSmrg do 3548f65982aSmrg # Strip MF so we end up with the name of the file. 3558f65982aSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3568f65982aSmrg # Check whether this is an Automake generated Makefile or not. 3578f65982aSmrg # We used to match only the files named `Makefile.in', but 3588f65982aSmrg # some people rename them; so instead we look at the file content. 3598f65982aSmrg # Grep'ing the first line is not enough: some people post-process 3608f65982aSmrg # each Makefile.in and add a new line on top of each file to say so. 3618f65982aSmrg # Grep'ing the whole file is not good either: AIX grep has a line 3628f65982aSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3638f65982aSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3648f65982aSmrg dirpart=`AS_DIRNAME("$mf")` 3658f65982aSmrg else 3668f65982aSmrg continue 3678f65982aSmrg fi 3688f65982aSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3698f65982aSmrg # from the Makefile without running `make'. 3708f65982aSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3718f65982aSmrg test -z "$DEPDIR" && continue 3728f65982aSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3738f65982aSmrg test -z "am__include" && continue 3748f65982aSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3758f65982aSmrg # When using ansi2knr, U may be empty or an underscore; expand it 3768f65982aSmrg U=`sed -n 's/^U = //p' < "$mf"` 3778f65982aSmrg # Find all dependency output files, they are included files with 3788f65982aSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3798f65982aSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 3808f65982aSmrg # expansion. 3818f65982aSmrg for file in `sed -n " 3828f65982aSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3838f65982aSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3848f65982aSmrg # Make sure the directory exists. 3858f65982aSmrg test -f "$dirpart/$file" && continue 3868f65982aSmrg fdir=`AS_DIRNAME(["$file"])` 3878f65982aSmrg AS_MKDIR_P([$dirpart/$fdir]) 3888f65982aSmrg # echo "creating $dirpart/$file" 3898f65982aSmrg echo '# dummy' > "$dirpart/$file" 3908f65982aSmrg done 3919aa228fdSmrg done 3928f65982aSmrg} 3939aa228fdSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3949aa228fdSmrg 3959aa228fdSmrg 3969aa228fdSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3979aa228fdSmrg# ----------------------------- 3989aa228fdSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 3999aa228fdSmrg# 4009aa228fdSmrg# This code is only required when automatic dependency tracking 4019aa228fdSmrg# is enabled. FIXME. This creates each `.P' file that we will 4029aa228fdSmrg# need in order to bootstrap the dependency handling code. 4039aa228fdSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4049aa228fdSmrg[AC_CONFIG_COMMANDS([depfiles], 4059aa228fdSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4069aa228fdSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4079aa228fdSmrg]) 4089aa228fdSmrg 4099aa228fdSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 4109aa228fdSmrg# Free Software Foundation, Inc. 4119aa228fdSmrg# 4129aa228fdSmrg# This file is free software; the Free Software Foundation 4139aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 4149aa228fdSmrg# with or without modifications, as long as this notice is preserved. 4159aa228fdSmrg 4169aa228fdSmrg# serial 8 4179aa228fdSmrg 4189aa228fdSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 4199aa228fdSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 4209aa228fdSmrg 4219aa228fdSmrg# Do all the work for Automake. -*- Autoconf -*- 4229aa228fdSmrg 4239aa228fdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4248f65982aSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 4259aa228fdSmrg# 4269aa228fdSmrg# This file is free software; the Free Software Foundation 4279aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 4289aa228fdSmrg# with or without modifications, as long as this notice is preserved. 4299aa228fdSmrg 4308f65982aSmrg# serial 16 4319aa228fdSmrg 4329aa228fdSmrg# This macro actually does too much. Some checks are only needed if 4339aa228fdSmrg# your package does certain things. But this isn't really a big deal. 4349aa228fdSmrg 4359aa228fdSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4369aa228fdSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4379aa228fdSmrg# ----------------------------------------------- 4389aa228fdSmrg# The call with PACKAGE and VERSION arguments is the old style 4399aa228fdSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4409aa228fdSmrg# and VERSION should now be passed to AC_INIT and removed from 4419aa228fdSmrg# the call to AM_INIT_AUTOMAKE. 4429aa228fdSmrg# We support both call styles for the transition. After 4439aa228fdSmrg# the next Automake release, Autoconf can make the AC_INIT 4449aa228fdSmrg# arguments mandatory, and then we can depend on a new Autoconf 4459aa228fdSmrg# release and drop the old call support. 4469aa228fdSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4478f65982aSmrg[AC_PREREQ([2.62])dnl 4489aa228fdSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4499aa228fdSmrgdnl the ones we care about. 4509aa228fdSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4519aa228fdSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4529aa228fdSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4539aa228fdSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4549aa228fdSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4559aa228fdSmrg # is not polluted with repeated "-I." 4569aa228fdSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4579aa228fdSmrg # test to see if srcdir already configured 4589aa228fdSmrg if test -f $srcdir/config.status; then 4599aa228fdSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4609aa228fdSmrg fi 4619aa228fdSmrgfi 4629aa228fdSmrg 4639aa228fdSmrg# test whether we have cygpath 4649aa228fdSmrgif test -z "$CYGPATH_W"; then 4659aa228fdSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4669aa228fdSmrg CYGPATH_W='cygpath -w' 4679aa228fdSmrg else 4689aa228fdSmrg CYGPATH_W=echo 4699aa228fdSmrg fi 4709aa228fdSmrgfi 4719aa228fdSmrgAC_SUBST([CYGPATH_W]) 4729aa228fdSmrg 4739aa228fdSmrg# Define the identity of the package. 4749aa228fdSmrgdnl Distinguish between old-style and new-style calls. 4759aa228fdSmrgm4_ifval([$2], 4769aa228fdSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4779aa228fdSmrg AC_SUBST([PACKAGE], [$1])dnl 4789aa228fdSmrg AC_SUBST([VERSION], [$2])], 4799aa228fdSmrg[_AM_SET_OPTIONS([$1])dnl 4809aa228fdSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4819aa228fdSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4829aa228fdSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4839aa228fdSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4849aa228fdSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4859aa228fdSmrg 4869aa228fdSmrg_AM_IF_OPTION([no-define],, 4879aa228fdSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4889aa228fdSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4899aa228fdSmrg 4909aa228fdSmrg# Some tools Automake needs. 4919aa228fdSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4929aa228fdSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4939aa228fdSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4949aa228fdSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4959aa228fdSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4969aa228fdSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4979aa228fdSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4988f65982aSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4998f65982aSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 5009aa228fdSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 5019aa228fdSmrg# We need awk for the "check" target. The system "awk" is bad on 5029aa228fdSmrg# some platforms. 5039aa228fdSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5049aa228fdSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5059aa228fdSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5069aa228fdSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5078f65982aSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5088f65982aSmrg [_AM_PROG_TAR([v7])])]) 5099aa228fdSmrg_AM_IF_OPTION([no-dependencies],, 5109aa228fdSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5118f65982aSmrg [_AM_DEPENDENCIES(CC)], 5128f65982aSmrg [define([AC_PROG_CC], 5138f65982aSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5149aa228fdSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5158f65982aSmrg [_AM_DEPENDENCIES(CXX)], 5168f65982aSmrg [define([AC_PROG_CXX], 5178f65982aSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5189aa228fdSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5198f65982aSmrg [_AM_DEPENDENCIES(OBJC)], 5208f65982aSmrg [define([AC_PROG_OBJC], 5218f65982aSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5229aa228fdSmrg]) 5238f65982aSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5248f65982aSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 5258f65982aSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5268f65982aSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5278f65982aSmrgAC_CONFIG_COMMANDS_PRE(dnl 5288f65982aSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5298f65982aSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5309aa228fdSmrg]) 5319aa228fdSmrg 5328f65982aSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5338f65982aSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5348f65982aSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5358f65982aSmrgm4_define([_AC_COMPILER_EXEEXT], 5368f65982aSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5378f65982aSmrg 5389aa228fdSmrg 5399aa228fdSmrg# When config.status generates a header, we must update the stamp-h file. 5409aa228fdSmrg# This file resides in the same directory as the config header 5419aa228fdSmrg# that is generated. The stamp files are numbered to have different names. 5429aa228fdSmrg 5439aa228fdSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5449aa228fdSmrg# loop where config.status creates the headers, so we can generate 5459aa228fdSmrg# our stamp files there. 5469aa228fdSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5479aa228fdSmrg[# Compute $1's index in $config_headers. 5488f65982aSmrg_am_arg=$1 5499aa228fdSmrg_am_stamp_count=1 5509aa228fdSmrgfor _am_header in $config_headers :; do 5519aa228fdSmrg case $_am_header in 5528f65982aSmrg $_am_arg | $_am_arg:* ) 5539aa228fdSmrg break ;; 5549aa228fdSmrg * ) 5559aa228fdSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5569aa228fdSmrg esac 5579aa228fdSmrgdone 5588f65982aSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5599aa228fdSmrg 5608f65982aSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 5619aa228fdSmrg# 5629aa228fdSmrg# This file is free software; the Free Software Foundation 5639aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 5649aa228fdSmrg# with or without modifications, as long as this notice is preserved. 5659aa228fdSmrg 5669aa228fdSmrg# AM_PROG_INSTALL_SH 5679aa228fdSmrg# ------------------ 5689aa228fdSmrg# Define $install_sh. 5699aa228fdSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5709aa228fdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5718f65982aSmrgif test x"${install_sh}" != xset; then 5728f65982aSmrg case $am_aux_dir in 5738f65982aSmrg *\ * | *\ *) 5748f65982aSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5758f65982aSmrg *) 5768f65982aSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5778f65982aSmrg esac 5788f65982aSmrgfi 5799aa228fdSmrgAC_SUBST(install_sh)]) 5809aa228fdSmrg 5819aa228fdSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5829aa228fdSmrg# 5839aa228fdSmrg# This file is free software; the Free Software Foundation 5849aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 5859aa228fdSmrg# with or without modifications, as long as this notice is preserved. 5869aa228fdSmrg 5879aa228fdSmrg# serial 2 5889aa228fdSmrg 5899aa228fdSmrg# Check whether the underlying file-system supports filenames 5909aa228fdSmrg# with a leading dot. For instance MS-DOS doesn't. 5919aa228fdSmrgAC_DEFUN([AM_SET_LEADING_DOT], 5929aa228fdSmrg[rm -rf .tst 2>/dev/null 5939aa228fdSmrgmkdir .tst 2>/dev/null 5949aa228fdSmrgif test -d .tst; then 5959aa228fdSmrg am__leading_dot=. 5969aa228fdSmrgelse 5979aa228fdSmrg am__leading_dot=_ 5989aa228fdSmrgfi 5999aa228fdSmrgrmdir .tst 2>/dev/null 6009aa228fdSmrgAC_SUBST([am__leading_dot])]) 6019aa228fdSmrg 6029aa228fdSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6039aa228fdSmrg# From Jim Meyering 6049aa228fdSmrg 6058f65982aSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 6069aa228fdSmrg# Free Software Foundation, Inc. 6079aa228fdSmrg# 6089aa228fdSmrg# This file is free software; the Free Software Foundation 6099aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 6109aa228fdSmrg# with or without modifications, as long as this notice is preserved. 6119aa228fdSmrg 6128f65982aSmrg# serial 5 6139aa228fdSmrg 6148f65982aSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 6158f65982aSmrg# ---------------------------------- 6168f65982aSmrg# Control maintainer-specific portions of Makefiles. 6178f65982aSmrg# Default is to disable them, unless `enable' is passed literally. 6188f65982aSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 6198f65982aSmrg# can override the default with the --enable/--disable switch. 6209aa228fdSmrgAC_DEFUN([AM_MAINTAINER_MODE], 6218f65982aSmrg[m4_case(m4_default([$1], [disable]), 6228f65982aSmrg [enable], [m4_define([am_maintainer_other], [disable])], 6238f65982aSmrg [disable], [m4_define([am_maintainer_other], [enable])], 6248f65982aSmrg [m4_define([am_maintainer_other], [enable]) 6258f65982aSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6268f65982aSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 6278f65982aSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 6288f65982aSmrg AC_ARG_ENABLE([maintainer-mode], 6298f65982aSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 6309aa228fdSmrg (and sometimes confusing) to the casual installer], 6318f65982aSmrg [USE_MAINTAINER_MODE=$enableval], 6328f65982aSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 6339aa228fdSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6348f65982aSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 6359aa228fdSmrg MAINT=$MAINTAINER_MODE_TRUE 6368f65982aSmrg AC_SUBST([MAINT])dnl 6379aa228fdSmrg] 6389aa228fdSmrg) 6399aa228fdSmrg 6409aa228fdSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6419aa228fdSmrg 6429aa228fdSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6439aa228fdSmrg 6448f65982aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 6459aa228fdSmrg# 6469aa228fdSmrg# This file is free software; the Free Software Foundation 6479aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 6489aa228fdSmrg# with or without modifications, as long as this notice is preserved. 6499aa228fdSmrg 6508f65982aSmrg# serial 4 6519aa228fdSmrg 6529aa228fdSmrg# AM_MAKE_INCLUDE() 6539aa228fdSmrg# ----------------- 6549aa228fdSmrg# Check to see how make treats includes. 6559aa228fdSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6569aa228fdSmrg[am_make=${MAKE-make} 6579aa228fdSmrgcat > confinc << 'END' 6589aa228fdSmrgam__doit: 6598f65982aSmrg @echo this is the am__doit target 6609aa228fdSmrg.PHONY: am__doit 6619aa228fdSmrgEND 6629aa228fdSmrg# If we don't find an include directive, just comment out the code. 6639aa228fdSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6649aa228fdSmrgam__include="#" 6659aa228fdSmrgam__quote= 6669aa228fdSmrg_am_result=none 6679aa228fdSmrg# First try GNU make style include. 6689aa228fdSmrgecho "include confinc" > confmf 6698f65982aSmrg# Ignore all kinds of additional output from `make'. 6708f65982aSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6718f65982aSmrg*the\ am__doit\ target*) 6728f65982aSmrg am__include=include 6738f65982aSmrg am__quote= 6748f65982aSmrg _am_result=GNU 6758f65982aSmrg ;; 6768f65982aSmrgesac 6779aa228fdSmrg# Now try BSD make style include. 6789aa228fdSmrgif test "$am__include" = "#"; then 6799aa228fdSmrg echo '.include "confinc"' > confmf 6808f65982aSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 6818f65982aSmrg *the\ am__doit\ target*) 6828f65982aSmrg am__include=.include 6838f65982aSmrg am__quote="\"" 6848f65982aSmrg _am_result=BSD 6858f65982aSmrg ;; 6868f65982aSmrg esac 6879aa228fdSmrgfi 6889aa228fdSmrgAC_SUBST([am__include]) 6899aa228fdSmrgAC_SUBST([am__quote]) 6909aa228fdSmrgAC_MSG_RESULT([$_am_result]) 6919aa228fdSmrgrm -f confinc confmf 6929aa228fdSmrg]) 6939aa228fdSmrg 6949aa228fdSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6959aa228fdSmrg 6968f65982aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 6979aa228fdSmrg# Free Software Foundation, Inc. 6989aa228fdSmrg# 6999aa228fdSmrg# This file is free software; the Free Software Foundation 7009aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 7019aa228fdSmrg# with or without modifications, as long as this notice is preserved. 7029aa228fdSmrg 7038f65982aSmrg# serial 6 7049aa228fdSmrg 7059aa228fdSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7069aa228fdSmrg# ------------------------------ 7079aa228fdSmrgAC_DEFUN([AM_MISSING_PROG], 7089aa228fdSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7099aa228fdSmrg$1=${$1-"${am_missing_run}$2"} 7109aa228fdSmrgAC_SUBST($1)]) 7119aa228fdSmrg 7129aa228fdSmrg 7139aa228fdSmrg# AM_MISSING_HAS_RUN 7149aa228fdSmrg# ------------------ 7159aa228fdSmrg# Define MISSING if not defined so far and test if it supports --run. 7169aa228fdSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7179aa228fdSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7189aa228fdSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7199aa228fdSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7208f65982aSmrgif test x"${MISSING+set}" != xset; then 7218f65982aSmrg case $am_aux_dir in 7228f65982aSmrg *\ * | *\ *) 7238f65982aSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7248f65982aSmrg *) 7258f65982aSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7268f65982aSmrg esac 7278f65982aSmrgfi 7289aa228fdSmrg# Use eval to expand $SHELL 7299aa228fdSmrgif eval "$MISSING --run true"; then 7309aa228fdSmrg am_missing_run="$MISSING --run " 7319aa228fdSmrgelse 7329aa228fdSmrg am_missing_run= 7339aa228fdSmrg AC_MSG_WARN([`missing' script is too old or missing]) 7349aa228fdSmrgfi 7359aa228fdSmrg]) 7369aa228fdSmrg 7379aa228fdSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7389aa228fdSmrg# 7399aa228fdSmrg# This file is free software; the Free Software Foundation 7409aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 7419aa228fdSmrg# with or without modifications, as long as this notice is preserved. 7429aa228fdSmrg 7439aa228fdSmrg# AM_PROG_MKDIR_P 7449aa228fdSmrg# --------------- 7459aa228fdSmrg# Check for `mkdir -p'. 7469aa228fdSmrgAC_DEFUN([AM_PROG_MKDIR_P], 7479aa228fdSmrg[AC_PREREQ([2.60])dnl 7489aa228fdSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7499aa228fdSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7509aa228fdSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 7519aa228fdSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7529aa228fdSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7539aa228fdSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7549aa228fdSmrgdnl adjustment using top_builddir (which is defined more often than 7559aa228fdSmrgdnl MKDIR_P). 7569aa228fdSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7579aa228fdSmrgcase $mkdir_p in 7589aa228fdSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 7599aa228fdSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7609aa228fdSmrgesac 7619aa228fdSmrg]) 7629aa228fdSmrg 7639aa228fdSmrg# Helper functions for option handling. -*- Autoconf -*- 7649aa228fdSmrg 7658f65982aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 7669aa228fdSmrg# 7679aa228fdSmrg# This file is free software; the Free Software Foundation 7689aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 7699aa228fdSmrg# with or without modifications, as long as this notice is preserved. 7709aa228fdSmrg 7718f65982aSmrg# serial 4 7729aa228fdSmrg 7739aa228fdSmrg# _AM_MANGLE_OPTION(NAME) 7749aa228fdSmrg# ----------------------- 7759aa228fdSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7769aa228fdSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7779aa228fdSmrg 7789aa228fdSmrg# _AM_SET_OPTION(NAME) 7799aa228fdSmrg# ------------------------------ 7809aa228fdSmrg# Set option NAME. Presently that only means defining a flag for this option. 7819aa228fdSmrgAC_DEFUN([_AM_SET_OPTION], 7829aa228fdSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7839aa228fdSmrg 7849aa228fdSmrg# _AM_SET_OPTIONS(OPTIONS) 7859aa228fdSmrg# ---------------------------------- 7869aa228fdSmrg# OPTIONS is a space-separated list of Automake options. 7879aa228fdSmrgAC_DEFUN([_AM_SET_OPTIONS], 7888f65982aSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7899aa228fdSmrg 7909aa228fdSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7919aa228fdSmrg# ------------------------------------------- 7929aa228fdSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7939aa228fdSmrgAC_DEFUN([_AM_IF_OPTION], 7949aa228fdSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7959aa228fdSmrg 7969aa228fdSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7979aa228fdSmrg 7988f65982aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 7999aa228fdSmrg# Free Software Foundation, Inc. 8009aa228fdSmrg# 8019aa228fdSmrg# This file is free software; the Free Software Foundation 8029aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 8039aa228fdSmrg# with or without modifications, as long as this notice is preserved. 8049aa228fdSmrg 8058f65982aSmrg# serial 5 8069aa228fdSmrg 8079aa228fdSmrg# AM_SANITY_CHECK 8089aa228fdSmrg# --------------- 8099aa228fdSmrgAC_DEFUN([AM_SANITY_CHECK], 8109aa228fdSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8119aa228fdSmrg# Just in case 8129aa228fdSmrgsleep 1 8139aa228fdSmrgecho timestamp > conftest.file 8148f65982aSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8158f65982aSmrg# name. Accept space and tab only in the latter. 8168f65982aSmrgam_lf=' 8178f65982aSmrg' 8188f65982aSmrgcase `pwd` in 8198f65982aSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8208f65982aSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8218f65982aSmrgesac 8228f65982aSmrgcase $srcdir in 8238f65982aSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8248f65982aSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8258f65982aSmrgesac 8268f65982aSmrg 8279aa228fdSmrg# Do `set' in a subshell so we don't clobber the current shell's 8289aa228fdSmrg# arguments. Must try -L first in case configure is actually a 8299aa228fdSmrg# symlink; some systems play weird games with the mod time of symlinks 8309aa228fdSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8319aa228fdSmrg# directory). 8329aa228fdSmrgif ( 8338f65982aSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8349aa228fdSmrg if test "$[*]" = "X"; then 8359aa228fdSmrg # -L didn't work. 8368f65982aSmrg set X `ls -t "$srcdir/configure" conftest.file` 8379aa228fdSmrg fi 8389aa228fdSmrg rm -f conftest.file 8399aa228fdSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8409aa228fdSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8419aa228fdSmrg 8429aa228fdSmrg # If neither matched, then we have a broken ls. This can happen 8439aa228fdSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8449aa228fdSmrg # broken ls alias from the environment. This has actually 8459aa228fdSmrg # happened. Such a system could not be considered "sane". 8469aa228fdSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8479aa228fdSmrgalias in your environment]) 8489aa228fdSmrg fi 8499aa228fdSmrg 8509aa228fdSmrg test "$[2]" = conftest.file 8519aa228fdSmrg ) 8529aa228fdSmrgthen 8539aa228fdSmrg # Ok. 8549aa228fdSmrg : 8559aa228fdSmrgelse 8569aa228fdSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8579aa228fdSmrgCheck your system clock]) 8589aa228fdSmrgfi 8599aa228fdSmrgAC_MSG_RESULT(yes)]) 8609aa228fdSmrg 8618f65982aSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 8628f65982aSmrg# 8638f65982aSmrg# This file is free software; the Free Software Foundation 8648f65982aSmrg# gives unlimited permission to copy and/or distribute it, 8658f65982aSmrg# with or without modifications, as long as this notice is preserved. 8668f65982aSmrg 8678f65982aSmrg# serial 1 8688f65982aSmrg 8698f65982aSmrg# AM_SILENT_RULES([DEFAULT]) 8708f65982aSmrg# -------------------------- 8718f65982aSmrg# Enable less verbose build rules; with the default set to DEFAULT 8728f65982aSmrg# (`yes' being less verbose, `no' or empty being verbose). 8738f65982aSmrgAC_DEFUN([AM_SILENT_RULES], 8748f65982aSmrg[AC_ARG_ENABLE([silent-rules], 8758f65982aSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8768f65982aSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8778f65982aSmrgcase $enable_silent_rules in 8788f65982aSmrgyes) AM_DEFAULT_VERBOSITY=0;; 8798f65982aSmrgno) AM_DEFAULT_VERBOSITY=1;; 8808f65982aSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8818f65982aSmrgesac 8828f65982aSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8838f65982aSmrgAM_BACKSLASH='\' 8848f65982aSmrgAC_SUBST([AM_BACKSLASH])dnl 8858f65982aSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8868f65982aSmrg]) 8878f65982aSmrg 8889aa228fdSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8899aa228fdSmrg# 8909aa228fdSmrg# This file is free software; the Free Software Foundation 8919aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 8929aa228fdSmrg# with or without modifications, as long as this notice is preserved. 8939aa228fdSmrg 8949aa228fdSmrg# AM_PROG_INSTALL_STRIP 8959aa228fdSmrg# --------------------- 8969aa228fdSmrg# One issue with vendor `install' (even GNU) is that you can't 8979aa228fdSmrg# specify the program used to strip binaries. This is especially 8989aa228fdSmrg# annoying in cross-compiling environments, where the build's strip 8999aa228fdSmrg# is unlikely to handle the host's binaries. 9009aa228fdSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9019aa228fdSmrg# always use install-sh in `make install-strip', and initialize 9029aa228fdSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9039aa228fdSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9049aa228fdSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9059aa228fdSmrg# Installed binaries are usually stripped using `strip' when the user 9069aa228fdSmrg# run `make install-strip'. However `strip' might not be the right 9079aa228fdSmrg# tool to use in cross-compilation environments, therefore Automake 9089aa228fdSmrg# will honor the `STRIP' environment variable to overrule this program. 9099aa228fdSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9109aa228fdSmrgif test "$cross_compiling" != no; then 9119aa228fdSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9129aa228fdSmrgfi 9139aa228fdSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9149aa228fdSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9159aa228fdSmrg 9168f65982aSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9179aa228fdSmrg# 9189aa228fdSmrg# This file is free software; the Free Software Foundation 9199aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 9209aa228fdSmrg# with or without modifications, as long as this notice is preserved. 9219aa228fdSmrg 9228f65982aSmrg# serial 2 9238f65982aSmrg 9249aa228fdSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9259aa228fdSmrg# --------------------------- 9268f65982aSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9279aa228fdSmrg# This macro is traced by Automake. 9289aa228fdSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9299aa228fdSmrg 9308f65982aSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9318f65982aSmrg# --------------------------- 9328f65982aSmrg# Public sister of _AM_SUBST_NOTMAKE. 9338f65982aSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9348f65982aSmrg 9359aa228fdSmrg# Check how to create a tarball. -*- Autoconf -*- 9369aa228fdSmrg 9379aa228fdSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9389aa228fdSmrg# 9399aa228fdSmrg# This file is free software; the Free Software Foundation 9409aa228fdSmrg# gives unlimited permission to copy and/or distribute it, 9419aa228fdSmrg# with or without modifications, as long as this notice is preserved. 9429aa228fdSmrg 9439aa228fdSmrg# serial 2 9449aa228fdSmrg 9459aa228fdSmrg# _AM_PROG_TAR(FORMAT) 9469aa228fdSmrg# -------------------- 9479aa228fdSmrg# Check how to create a tarball in format FORMAT. 9489aa228fdSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9499aa228fdSmrg# 9509aa228fdSmrg# Substitute a variable $(am__tar) that is a command 9519aa228fdSmrg# writing to stdout a FORMAT-tarball containing the directory 9529aa228fdSmrg# $tardir. 9539aa228fdSmrg# tardir=directory && $(am__tar) > result.tar 9549aa228fdSmrg# 9559aa228fdSmrg# Substitute a variable $(am__untar) that extract such 9569aa228fdSmrg# a tarball read from stdin. 9579aa228fdSmrg# $(am__untar) < result.tar 9589aa228fdSmrgAC_DEFUN([_AM_PROG_TAR], 9599aa228fdSmrg[# Always define AMTAR for backward compatibility. 9609aa228fdSmrgAM_MISSING_PROG([AMTAR], [tar]) 9619aa228fdSmrgm4_if([$1], [v7], 9629aa228fdSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9639aa228fdSmrg [m4_case([$1], [ustar],, [pax],, 9649aa228fdSmrg [m4_fatal([Unknown tar format])]) 9659aa228fdSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9669aa228fdSmrg# Loop over all known methods to create a tar archive until one works. 9679aa228fdSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9689aa228fdSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9699aa228fdSmrg# Do not fold the above two line into one, because Tru64 sh and 9709aa228fdSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9719aa228fdSmrgfor _am_tool in $_am_tools 9729aa228fdSmrgdo 9739aa228fdSmrg case $_am_tool in 9749aa228fdSmrg gnutar) 9759aa228fdSmrg for _am_tar in tar gnutar gtar; 9769aa228fdSmrg do 9779aa228fdSmrg AM_RUN_LOG([$_am_tar --version]) && break 9789aa228fdSmrg done 9799aa228fdSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9809aa228fdSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9819aa228fdSmrg am__untar="$_am_tar -xf -" 9829aa228fdSmrg ;; 9839aa228fdSmrg plaintar) 9849aa228fdSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9859aa228fdSmrg # ustar tarball either. 9869aa228fdSmrg (tar --version) >/dev/null 2>&1 && continue 9879aa228fdSmrg am__tar='tar chf - "$$tardir"' 9889aa228fdSmrg am__tar_='tar chf - "$tardir"' 9899aa228fdSmrg am__untar='tar xf -' 9909aa228fdSmrg ;; 9919aa228fdSmrg pax) 9929aa228fdSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9939aa228fdSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9949aa228fdSmrg am__untar='pax -r' 9959aa228fdSmrg ;; 9969aa228fdSmrg cpio) 9979aa228fdSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9989aa228fdSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9999aa228fdSmrg am__untar='cpio -i -H $1 -d' 10009aa228fdSmrg ;; 10019aa228fdSmrg none) 10029aa228fdSmrg am__tar=false 10039aa228fdSmrg am__tar_=false 10049aa228fdSmrg am__untar=false 10059aa228fdSmrg ;; 10069aa228fdSmrg esac 10079aa228fdSmrg 10089aa228fdSmrg # If the value was cached, stop now. We just wanted to have am__tar 10099aa228fdSmrg # and am__untar set. 10109aa228fdSmrg test -n "${am_cv_prog_tar_$1}" && break 10119aa228fdSmrg 10129aa228fdSmrg # tar/untar a dummy directory, and stop if the command works 10139aa228fdSmrg rm -rf conftest.dir 10149aa228fdSmrg mkdir conftest.dir 10159aa228fdSmrg echo GrepMe > conftest.dir/file 10169aa228fdSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10179aa228fdSmrg rm -rf conftest.dir 10189aa228fdSmrg if test -s conftest.tar; then 10199aa228fdSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10209aa228fdSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10219aa228fdSmrg fi 10229aa228fdSmrgdone 10239aa228fdSmrgrm -rf conftest.dir 10249aa228fdSmrg 10259aa228fdSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10269aa228fdSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10279aa228fdSmrgAC_SUBST([am__tar]) 10289aa228fdSmrgAC_SUBST([am__untar]) 10299aa228fdSmrg]) # _AM_PROG_TAR 10309aa228fdSmrg 103183d7c197Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 10329aa228fdSmrgdnl 10338f65982aSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 10349aa228fdSmrgdnl 10359aa228fdSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 10368f65982aSmrgdnl copy of this software and associated documentation files (the "Software"), 10378f65982aSmrgdnl to deal in the Software without restriction, including without limitation 10388f65982aSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 10398f65982aSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 10408f65982aSmrgdnl Software is furnished to do so, subject to the following conditions: 10419aa228fdSmrgdnl 10428f65982aSmrgdnl The above copyright notice and this permission notice (including the next 10438f65982aSmrgdnl paragraph) shall be included in all copies or substantial portions of the 10448f65982aSmrgdnl Software. 10459aa228fdSmrgdnl 10468f65982aSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10478f65982aSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 10488f65982aSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 10498f65982aSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 10508f65982aSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 10518f65982aSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 10528f65982aSmrgdnl DEALINGS IN THE SOFTWARE. 10539aa228fdSmrg 10549aa228fdSmrg# XORG_MACROS_VERSION(required-version) 10559aa228fdSmrg# ------------------------------------- 10569aa228fdSmrg# Minimum version: 1.1.0 10579aa228fdSmrg# 10589aa228fdSmrg# If you're using a macro added in Version 1.1 or newer, include this in 10599aa228fdSmrg# your configure.ac with the minimum required version, such as: 10609aa228fdSmrg# XORG_MACROS_VERSION(1.1) 10619aa228fdSmrg# 106283d7c197Smrg# To ensure that this macro is defined, also add: 106383d7c197Smrg# m4_ifndef([XORG_MACROS_VERSION], 106483d7c197Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10659aa228fdSmrg# 10669aa228fdSmrg# 10679aa228fdSmrg# See the "minimum version" comment for each macro you use to see what 10689aa228fdSmrg# version you require. 106983d7c197Smrgm4_defun([XORG_MACROS_VERSION],[ 10708f65982aSmrgm4_define([vers_have], [1.11.0]) 107183d7c197Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107283d7c197Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107383d7c197Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 107483d7c197Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 107583d7c197Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 107683d7c197Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 107783d7c197Smrgm4_undefine([vers_have]) 107883d7c197Smrgm4_undefine([maj_have]) 107983d7c197Smrgm4_undefine([maj_needed]) 10809aa228fdSmrg]) # XORG_MACROS_VERSION 10819aa228fdSmrg 10829aa228fdSmrg# XORG_PROG_RAWCPP() 10839aa228fdSmrg# ------------------ 10849aa228fdSmrg# Minimum version: 1.0.0 10859aa228fdSmrg# 10869aa228fdSmrg# Find cpp program and necessary flags for use in pre-processing text files 10879aa228fdSmrg# such as man pages and config files 10889aa228fdSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10899aa228fdSmrgAC_REQUIRE([AC_PROG_CPP]) 10909aa228fdSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10919aa228fdSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10929aa228fdSmrg 10939aa228fdSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 10949aa228fdSmrg# which is not the best choice for supporting other OS'es, but covers most 10959aa228fdSmrg# of the ones we need for now. 10969aa228fdSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 10979aa228fdSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 10989aa228fdSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10999aa228fdSmrg AC_MSG_RESULT([no]) 11009aa228fdSmrgelse 11019aa228fdSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11029aa228fdSmrg RAWCPPFLAGS=-undef 11039aa228fdSmrg AC_MSG_RESULT([yes]) 110483d7c197Smrg # under Cygwin unix is still defined even with -undef 110583d7c197Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110683d7c197Smrg RAWCPPFLAGS="-undef -ansi" 110783d7c197Smrg AC_MSG_RESULT([yes, with -ansi]) 11089aa228fdSmrg else 11099aa228fdSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11109aa228fdSmrg fi 11119aa228fdSmrgfi 11129aa228fdSmrgrm -f conftest.$ac_ext 11139aa228fdSmrg 11149aa228fdSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11159aa228fdSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11169aa228fdSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11179aa228fdSmrg AC_MSG_RESULT([no]) 11189aa228fdSmrgelse 11199aa228fdSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11209aa228fdSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11219aa228fdSmrg AC_MSG_RESULT([yes]) 11229aa228fdSmrg else 11239aa228fdSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11249aa228fdSmrg fi 11259aa228fdSmrgfi 11269aa228fdSmrgrm -f conftest.$ac_ext 11279aa228fdSmrgAC_SUBST(RAWCPPFLAGS) 11289aa228fdSmrg]) # XORG_PROG_RAWCPP 11299aa228fdSmrg 11309aa228fdSmrg# XORG_MANPAGE_SECTIONS() 11319aa228fdSmrg# ----------------------- 11329aa228fdSmrg# Minimum version: 1.0.0 11339aa228fdSmrg# 11349aa228fdSmrg# Determine which sections man pages go in for the different man page types 11359aa228fdSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11369aa228fdSmrg# Not sure if there's any better way than just hardcoding by OS name. 11379aa228fdSmrg# Override default settings by setting environment variables 11388f65982aSmrg# Added MAN_SUBSTS in version 1.8 11398f65982aSmrg# Added AC_PROG_SED in version 1.8 11409aa228fdSmrg 11419aa228fdSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11429aa228fdSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11438f65982aSmrgAC_REQUIRE([AC_PROG_SED]) 11449aa228fdSmrg 11459aa228fdSmrgif test x$APP_MAN_SUFFIX = x ; then 11469aa228fdSmrg APP_MAN_SUFFIX=1 11479aa228fdSmrgfi 11489aa228fdSmrgif test x$APP_MAN_DIR = x ; then 11499aa228fdSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 11509aa228fdSmrgfi 11519aa228fdSmrg 11529aa228fdSmrgif test x$LIB_MAN_SUFFIX = x ; then 11539aa228fdSmrg LIB_MAN_SUFFIX=3 11549aa228fdSmrgfi 11559aa228fdSmrgif test x$LIB_MAN_DIR = x ; then 11569aa228fdSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 11579aa228fdSmrgfi 11589aa228fdSmrg 11599aa228fdSmrgif test x$FILE_MAN_SUFFIX = x ; then 11609aa228fdSmrg case $host_os in 11619aa228fdSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 11629aa228fdSmrg *) FILE_MAN_SUFFIX=5 ;; 11639aa228fdSmrg esac 11649aa228fdSmrgfi 11659aa228fdSmrgif test x$FILE_MAN_DIR = x ; then 11669aa228fdSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 11679aa228fdSmrgfi 11689aa228fdSmrg 11699aa228fdSmrgif test x$MISC_MAN_SUFFIX = x ; then 11709aa228fdSmrg case $host_os in 11719aa228fdSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 11729aa228fdSmrg *) MISC_MAN_SUFFIX=7 ;; 11739aa228fdSmrg esac 11749aa228fdSmrgfi 11759aa228fdSmrgif test x$MISC_MAN_DIR = x ; then 11769aa228fdSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 11779aa228fdSmrgfi 11789aa228fdSmrg 11799aa228fdSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 11809aa228fdSmrg case $host_os in 11819aa228fdSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 11829aa228fdSmrg *) DRIVER_MAN_SUFFIX=4 ;; 11839aa228fdSmrg esac 11849aa228fdSmrgfi 11859aa228fdSmrgif test x$DRIVER_MAN_DIR = x ; then 11869aa228fdSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 11879aa228fdSmrgfi 11889aa228fdSmrg 11899aa228fdSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 11909aa228fdSmrg case $host_os in 11919aa228fdSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 11929aa228fdSmrg *) ADMIN_MAN_SUFFIX=8 ;; 11939aa228fdSmrg esac 11949aa228fdSmrgfi 11959aa228fdSmrgif test x$ADMIN_MAN_DIR = x ; then 11969aa228fdSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 11979aa228fdSmrgfi 11989aa228fdSmrg 11999aa228fdSmrg 12009aa228fdSmrgAC_SUBST([APP_MAN_SUFFIX]) 12019aa228fdSmrgAC_SUBST([LIB_MAN_SUFFIX]) 12029aa228fdSmrgAC_SUBST([FILE_MAN_SUFFIX]) 12039aa228fdSmrgAC_SUBST([MISC_MAN_SUFFIX]) 12049aa228fdSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12059aa228fdSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12069aa228fdSmrgAC_SUBST([APP_MAN_DIR]) 12079aa228fdSmrgAC_SUBST([LIB_MAN_DIR]) 12089aa228fdSmrgAC_SUBST([FILE_MAN_DIR]) 12099aa228fdSmrgAC_SUBST([MISC_MAN_DIR]) 12109aa228fdSmrgAC_SUBST([DRIVER_MAN_DIR]) 12119aa228fdSmrgAC_SUBST([ADMIN_MAN_DIR]) 12128f65982aSmrg 12138f65982aSmrgXORG_MAN_PAGE="X Version 11" 12148f65982aSmrgAC_SUBST([XORG_MAN_PAGE]) 12158f65982aSmrgMAN_SUBSTS="\ 12168f65982aSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 12178f65982aSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 12188f65982aSmrg -e 's|__xservername__|Xorg|g' \ 12198f65982aSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 12208f65982aSmrg -e 's|__projectroot__|\$(prefix)|g' \ 12218f65982aSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 12228f65982aSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 12238f65982aSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 12248f65982aSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 12258f65982aSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 12268f65982aSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 12278f65982aSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 12288f65982aSmrgAC_SUBST([MAN_SUBSTS]) 12298f65982aSmrg 12309aa228fdSmrg]) # XORG_MANPAGE_SECTIONS 12319aa228fdSmrg 12328f65982aSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 12338f65982aSmrg# ------------------------ 12348f65982aSmrg# Minimum version: 1.7.0 12358f65982aSmrg# 12368f65982aSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 12378f65982aSmrg# provided by xorg-sgml-doctools, if installed. 12388f65982aSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 12398f65982aSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 12408f65982aSmrgXORG_SGML_PATH= 12418f65982aSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 12428f65982aSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 12438f65982aSmrg [m4_ifval([$1],[:], 12448f65982aSmrg [if test x"$cross_compiling" != x"yes" ; then 12458f65982aSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 12468f65982aSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 12478f65982aSmrg fi]) 12488f65982aSmrg ]) 12498f65982aSmrg 12508f65982aSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 12518f65982aSmrg# the path and the name of the doc stylesheet 12528f65982aSmrgif test "x$XORG_SGML_PATH" != "x" ; then 12538f65982aSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 12548f65982aSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 12558f65982aSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 12568f65982aSmrgelse 12578f65982aSmrg AC_MSG_RESULT([no]) 12588f65982aSmrgfi 12598f65982aSmrg 12608f65982aSmrgAC_SUBST(XORG_SGML_PATH) 12618f65982aSmrgAC_SUBST(STYLESHEET_SRCDIR) 12628f65982aSmrgAC_SUBST(XSL_STYLESHEET) 12638f65982aSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 12648f65982aSmrg]) # XORG_CHECK_SGML_DOCTOOLS 12658f65982aSmrg 12669aa228fdSmrg# XORG_CHECK_LINUXDOC 12679aa228fdSmrg# ------------------- 12689aa228fdSmrg# Minimum version: 1.0.0 12699aa228fdSmrg# 12709aa228fdSmrg# Defines the variable MAKE_TEXT if the necessary tools and 12719aa228fdSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12729aa228fdSmrg# Whether or not the necessary tools and files are found can be checked 12739aa228fdSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12749aa228fdSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 12758f65982aSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 12768f65982aSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 12779aa228fdSmrg 12789aa228fdSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12799aa228fdSmrg 12808f65982aSmrgAC_MSG_CHECKING([whether to build documentation]) 12819aa228fdSmrg 12828f65982aSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 12839aa228fdSmrg BUILDDOC=yes 12849aa228fdSmrgelse 12859aa228fdSmrg BUILDDOC=no 12869aa228fdSmrgfi 12879aa228fdSmrg 12889aa228fdSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12899aa228fdSmrg 12909aa228fdSmrgAC_MSG_RESULT([$BUILDDOC]) 12919aa228fdSmrg 12928f65982aSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 12939aa228fdSmrg 12948f65982aSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 12959aa228fdSmrg BUILDPDFDOC=yes 12969aa228fdSmrgelse 12979aa228fdSmrg BUILDPDFDOC=no 12989aa228fdSmrgfi 12999aa228fdSmrg 13009aa228fdSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13019aa228fdSmrg 13029aa228fdSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13039aa228fdSmrg 13048f65982aSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 13059aa228fdSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 13069aa228fdSmrgMAKE_PDF="$PS2PDF" 13079aa228fdSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 13089aa228fdSmrg 13099aa228fdSmrgAC_SUBST(MAKE_TEXT) 13109aa228fdSmrgAC_SUBST(MAKE_PS) 13119aa228fdSmrgAC_SUBST(MAKE_PDF) 13129aa228fdSmrgAC_SUBST(MAKE_HTML) 13139aa228fdSmrg]) # XORG_CHECK_LINUXDOC 13149aa228fdSmrg 13159aa228fdSmrg# XORG_CHECK_DOCBOOK 13169aa228fdSmrg# ------------------- 13179aa228fdSmrg# Minimum version: 1.0.0 13189aa228fdSmrg# 13199aa228fdSmrg# Checks for the ability to build output formats from SGML DocBook source. 13209aa228fdSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 13219aa228fdSmrg# indicates whether the necessary tools and files are found and, if set, 13229aa228fdSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 13239aa228fdSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 13248f65982aSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 13258f65982aSmrg 13269aa228fdSmrgBUILDTXTDOC=no 13279aa228fdSmrgBUILDPDFDOC=no 13289aa228fdSmrgBUILDPSDOC=no 13299aa228fdSmrgBUILDHTMLDOC=no 13309aa228fdSmrg 13319aa228fdSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 13329aa228fdSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 13339aa228fdSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 13349aa228fdSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 13359aa228fdSmrg 13368f65982aSmrgAC_MSG_CHECKING([whether to build text documentation]) 13378f65982aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 13389aa228fdSmrg test x$BUILD_TXTDOC != xno; then 13399aa228fdSmrg BUILDTXTDOC=yes 13409aa228fdSmrgfi 13419aa228fdSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13429aa228fdSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13439aa228fdSmrg 13448f65982aSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 13458f65982aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 13469aa228fdSmrg test x$BUILD_PDFDOC != xno; then 13479aa228fdSmrg BUILDPDFDOC=yes 13489aa228fdSmrgfi 13499aa228fdSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13509aa228fdSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13519aa228fdSmrg 13528f65982aSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 13538f65982aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 13549aa228fdSmrg test x$BUILD_PSDOC != xno; then 13559aa228fdSmrg BUILDPSDOC=yes 13569aa228fdSmrgfi 13579aa228fdSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13589aa228fdSmrgAC_MSG_RESULT([$BUILDPSDOC]) 13599aa228fdSmrg 13608f65982aSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 13618f65982aSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 13629aa228fdSmrg test x$BUILD_HTMLDOC != xno; then 13639aa228fdSmrg BUILDHTMLDOC=yes 13649aa228fdSmrgfi 13659aa228fdSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13669aa228fdSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13679aa228fdSmrg 13689aa228fdSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13699aa228fdSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13709aa228fdSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13719aa228fdSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13729aa228fdSmrg 13739aa228fdSmrgAC_SUBST(MAKE_TEXT) 13749aa228fdSmrgAC_SUBST(MAKE_PS) 13759aa228fdSmrgAC_SUBST(MAKE_PDF) 13769aa228fdSmrgAC_SUBST(MAKE_HTML) 13779aa228fdSmrg]) # XORG_CHECK_DOCBOOK 13789aa228fdSmrg 13798f65982aSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 13808f65982aSmrg# ---------------- 13818f65982aSmrg# Minimum version: 1.5.0 13828f65982aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 13838f65982aSmrg# 13848f65982aSmrg# Documentation tools are not always available on all platforms and sometimes 13858f65982aSmrg# not at the appropriate level. This macro enables a module to test for the 13868f65982aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 13878f65982aSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 13888f65982aSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 13898f65982aSmrg# --with-xmlto assumes 'auto'. 13908f65982aSmrg# 13918f65982aSmrg# Interface to module: 13928f65982aSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 13938f65982aSmrg# XMLTO: returns the path of the xmlto program found 13948f65982aSmrg# returns the path set by the user in the environment 13958f65982aSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 13968f65982aSmrg# 'no' user instructs the module not to use xmlto 13978f65982aSmrg# 13988f65982aSmrg# Added in version 1.10.0 13998f65982aSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 14008f65982aSmrg# xmlto for text output requires either lynx, links, or w3m browsers 14018f65982aSmrg# 14028f65982aSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 14038f65982aSmrg# 14048f65982aSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 14058f65982aSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 14068f65982aSmrgm4_define([_defopt], m4_default([$2], [auto])) 14078f65982aSmrgAC_ARG_WITH(xmlto, 14088f65982aSmrg AS_HELP_STRING([--with-xmlto], 14098f65982aSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 14108f65982aSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 14118f65982aSmrgm4_undefine([_defopt]) 14128f65982aSmrg 14138f65982aSmrgif test "x$use_xmlto" = x"auto"; then 14148f65982aSmrg AC_PATH_PROG([XMLTO], [xmlto]) 14158f65982aSmrg if test "x$XMLTO" = "x"; then 14168f65982aSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 14178f65982aSmrg have_xmlto=no 14188f65982aSmrg else 14198f65982aSmrg have_xmlto=yes 14208f65982aSmrg fi 14218f65982aSmrgelif test "x$use_xmlto" = x"yes" ; then 14228f65982aSmrg AC_PATH_PROG([XMLTO], [xmlto]) 14238f65982aSmrg if test "x$XMLTO" = "x"; then 14248f65982aSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 14258f65982aSmrg fi 14268f65982aSmrg have_xmlto=yes 14278f65982aSmrgelif test "x$use_xmlto" = x"no" ; then 14288f65982aSmrg if test "x$XMLTO" != "x"; then 14298f65982aSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 14308f65982aSmrg fi 14318f65982aSmrg have_xmlto=no 14328f65982aSmrgelse 14338f65982aSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 14348f65982aSmrgfi 14358f65982aSmrg 14368f65982aSmrg# Test for a minimum version of xmlto, if provided. 14378f65982aSmrgm4_ifval([$1], 14388f65982aSmrg[if test "$have_xmlto" = yes; then 14398f65982aSmrg # scrape the xmlto version 14408f65982aSmrg AC_MSG_CHECKING([the xmlto version]) 14418f65982aSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 14428f65982aSmrg AC_MSG_RESULT([$xmlto_version]) 14438f65982aSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 14448f65982aSmrg [if test "x$use_xmlto" = xauto; then 14458f65982aSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 14468f65982aSmrg have_xmlto=no 14478f65982aSmrg else 14488f65982aSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 14498f65982aSmrg fi]) 14508f65982aSmrgfi]) 14518f65982aSmrg 14528f65982aSmrg# Test for the ability of xmlto to generate a text target 14538f65982aSmrghave_xmlto_text=no 14548f65982aSmrgcat > conftest.xml << "EOF" 14558f65982aSmrgEOF 14568f65982aSmrgAS_IF([test "$have_xmlto" = yes], 14578f65982aSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 14588f65982aSmrg [have_xmlto_text=yes], 14598f65982aSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 14608f65982aSmrgrm -f conftest.xml 14618f65982aSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 14628f65982aSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 14638f65982aSmrg]) # XORG_WITH_XMLTO 14648f65982aSmrg 14658f65982aSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 14668f65982aSmrg# ---------------- 14678f65982aSmrg# Minimum version: 1.5.0 14688f65982aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 14698f65982aSmrg# 14708f65982aSmrg# Documentation tools are not always available on all platforms and sometimes 14718f65982aSmrg# not at the appropriate level. This macro enables a module to test for the 14728f65982aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 14738f65982aSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 14748f65982aSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 14758f65982aSmrg# --with-asciidoc assumes 'auto'. 14768f65982aSmrg# 14778f65982aSmrg# Interface to module: 14788f65982aSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 14798f65982aSmrg# ASCIIDOC: returns the path of the asciidoc program found 14808f65982aSmrg# returns the path set by the user in the environment 14818f65982aSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 14828f65982aSmrg# 'no' user instructs the module not to use asciidoc 14838f65982aSmrg# 14848f65982aSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 14858f65982aSmrg# 14868f65982aSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 14878f65982aSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 14888f65982aSmrgm4_define([_defopt], m4_default([$2], [auto])) 14898f65982aSmrgAC_ARG_WITH(asciidoc, 14908f65982aSmrg AS_HELP_STRING([--with-asciidoc], 14918f65982aSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 14928f65982aSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 14938f65982aSmrgm4_undefine([_defopt]) 14948f65982aSmrg 14958f65982aSmrgif test "x$use_asciidoc" = x"auto"; then 14968f65982aSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 14978f65982aSmrg if test "x$ASCIIDOC" = "x"; then 14988f65982aSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 14998f65982aSmrg have_asciidoc=no 15008f65982aSmrg else 15018f65982aSmrg have_asciidoc=yes 15028f65982aSmrg fi 15038f65982aSmrgelif test "x$use_asciidoc" = x"yes" ; then 15048f65982aSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 15058f65982aSmrg if test "x$ASCIIDOC" = "x"; then 15068f65982aSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 15078f65982aSmrg fi 15088f65982aSmrg have_asciidoc=yes 15098f65982aSmrgelif test "x$use_asciidoc" = x"no" ; then 15108f65982aSmrg if test "x$ASCIIDOC" != "x"; then 15118f65982aSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 15128f65982aSmrg fi 15138f65982aSmrg have_asciidoc=no 15148f65982aSmrgelse 15158f65982aSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 15168f65982aSmrgfi 15178f65982aSmrgm4_ifval([$1], 15188f65982aSmrg[if test "$have_asciidoc" = yes; then 15198f65982aSmrg # scrape the asciidoc version 15208f65982aSmrg AC_MSG_CHECKING([the asciidoc version]) 15218f65982aSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 15228f65982aSmrg AC_MSG_RESULT([$asciidoc_version]) 15238f65982aSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 15248f65982aSmrg [if test "x$use_asciidoc" = xauto; then 15258f65982aSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 15268f65982aSmrg have_asciidoc=no 15278f65982aSmrg else 15288f65982aSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 15298f65982aSmrg fi]) 15308f65982aSmrgfi]) 15318f65982aSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 15328f65982aSmrg]) # XORG_WITH_ASCIIDOC 15338f65982aSmrg 15348f65982aSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 15358f65982aSmrg# -------------------------------- 15368f65982aSmrg# Minimum version: 1.5.0 15378f65982aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 15388f65982aSmrg# 15398f65982aSmrg# Documentation tools are not always available on all platforms and sometimes 15408f65982aSmrg# not at the appropriate level. This macro enables a module to test for the 15418f65982aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 15428f65982aSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 15438f65982aSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 15448f65982aSmrg# --with-doxygen assumes 'auto'. 15458f65982aSmrg# 15468f65982aSmrg# Interface to module: 15478f65982aSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 15488f65982aSmrg# DOXYGEN: returns the path of the doxygen program found 15498f65982aSmrg# returns the path set by the user in the environment 15508f65982aSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 15518f65982aSmrg# 'no' user instructs the module not to use doxygen 15528f65982aSmrg# 15538f65982aSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 15548f65982aSmrg# 15558f65982aSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 15568f65982aSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 15578f65982aSmrgm4_define([_defopt], m4_default([$2], [auto])) 15588f65982aSmrgAC_ARG_WITH(doxygen, 15598f65982aSmrg AS_HELP_STRING([--with-doxygen], 15608f65982aSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 15618f65982aSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 15628f65982aSmrgm4_undefine([_defopt]) 15638f65982aSmrg 15648f65982aSmrgif test "x$use_doxygen" = x"auto"; then 15658f65982aSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 15668f65982aSmrg if test "x$DOXYGEN" = "x"; then 15678f65982aSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 15688f65982aSmrg have_doxygen=no 15698f65982aSmrg else 15708f65982aSmrg have_doxygen=yes 15718f65982aSmrg fi 15728f65982aSmrgelif test "x$use_doxygen" = x"yes" ; then 15738f65982aSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 15748f65982aSmrg if test "x$DOXYGEN" = "x"; then 15758f65982aSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 15768f65982aSmrg fi 15778f65982aSmrg have_doxygen=yes 15788f65982aSmrgelif test "x$use_doxygen" = x"no" ; then 15798f65982aSmrg if test "x$DOXYGEN" != "x"; then 15808f65982aSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 15818f65982aSmrg fi 15828f65982aSmrg have_doxygen=no 15838f65982aSmrgelse 15848f65982aSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 15858f65982aSmrgfi 15868f65982aSmrgm4_ifval([$1], 15878f65982aSmrg[if test "$have_doxygen" = yes; then 15888f65982aSmrg # scrape the doxygen version 15898f65982aSmrg AC_MSG_CHECKING([the doxygen version]) 15908f65982aSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 15918f65982aSmrg AC_MSG_RESULT([$doxygen_version]) 15928f65982aSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 15938f65982aSmrg [if test "x$use_doxygen" = xauto; then 15948f65982aSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 15958f65982aSmrg have_doxygen=no 15968f65982aSmrg else 15978f65982aSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 15988f65982aSmrg fi]) 15998f65982aSmrgfi]) 16008f65982aSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 16018f65982aSmrg]) # XORG_WITH_DOXYGEN 16028f65982aSmrg 16038f65982aSmrg# XORG_WITH_GROFF([DEFAULT]) 16048f65982aSmrg# ---------------- 16058f65982aSmrg# Minimum version: 1.6.0 16068f65982aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 16078f65982aSmrg# 16088f65982aSmrg# Documentation tools are not always available on all platforms and sometimes 16098f65982aSmrg# not at the appropriate level. This macro enables a module to test for the 16108f65982aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 16118f65982aSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 16128f65982aSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 16138f65982aSmrg# --with-groff assumes 'auto'. 16148f65982aSmrg# 16158f65982aSmrg# Interface to module: 16168f65982aSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 16178f65982aSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 16188f65982aSmrg# HAVE_GROFF_MS: the -ms macros package 16198f65982aSmrg# GROFF: returns the path of the groff program found 16208f65982aSmrg# returns the path set by the user in the environment 16218f65982aSmrg# --with-groff: 'yes' user instructs the module to use groff 16228f65982aSmrg# 'no' user instructs the module not to use groff 16238f65982aSmrg# 16248f65982aSmrg# Added in version 1.9.0: 16258f65982aSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 16268f65982aSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 16278f65982aSmrg# psselect from the psutils package. 16288f65982aSmrg# the ghostcript package. Refer to the grohtml man pages 16298f65982aSmrg# 16308f65982aSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 16318f65982aSmrg# 16328f65982aSmrg# OS and distros often splits groff in a basic and full package, the former 16338f65982aSmrg# having the groff program and the later having devices, fonts and macros 16348f65982aSmrg# Checking for the groff executable is not enough. 16358f65982aSmrg# 16368f65982aSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 16378f65982aSmrg# unset HAVE_GROFF or GROFF env variables. 16388f65982aSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 16398f65982aSmrg# 16408f65982aSmrgAC_DEFUN([XORG_WITH_GROFF],[ 16418f65982aSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 16428f65982aSmrgm4_define([_defopt], m4_default([$1], [auto])) 16438f65982aSmrgAC_ARG_WITH(groff, 16448f65982aSmrg AS_HELP_STRING([--with-groff], 16458f65982aSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 16468f65982aSmrg [use_groff=$withval], [use_groff=]_defopt) 16478f65982aSmrgm4_undefine([_defopt]) 16488f65982aSmrg 16498f65982aSmrgif test "x$use_groff" = x"auto"; then 16508f65982aSmrg AC_PATH_PROG([GROFF], [groff]) 16518f65982aSmrg if test "x$GROFF" = "x"; then 16528f65982aSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 16538f65982aSmrg have_groff=no 16548f65982aSmrg else 16558f65982aSmrg have_groff=yes 16568f65982aSmrg fi 16578f65982aSmrgelif test "x$use_groff" = x"yes" ; then 16588f65982aSmrg AC_PATH_PROG([GROFF], [groff]) 16598f65982aSmrg if test "x$GROFF" = "x"; then 16608f65982aSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 16618f65982aSmrg fi 16628f65982aSmrg have_groff=yes 16638f65982aSmrgelif test "x$use_groff" = x"no" ; then 16648f65982aSmrg if test "x$GROFF" != "x"; then 16658f65982aSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 16668f65982aSmrg fi 16678f65982aSmrg have_groff=no 16688f65982aSmrgelse 16698f65982aSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 16708f65982aSmrgfi 16718f65982aSmrg 16728f65982aSmrg# We have groff, test for the presence of the macro packages 16738f65982aSmrgif test "x$have_groff" = x"yes"; then 16748f65982aSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 16758f65982aSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 16768f65982aSmrg groff_ms_works=yes 16778f65982aSmrg else 16788f65982aSmrg groff_ms_works=no 16798f65982aSmrg fi 16808f65982aSmrg AC_MSG_RESULT([$groff_ms_works]) 16818f65982aSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 16828f65982aSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 16838f65982aSmrg groff_mm_works=yes 16848f65982aSmrg else 16858f65982aSmrg groff_mm_works=no 16868f65982aSmrg fi 16878f65982aSmrg AC_MSG_RESULT([$groff_mm_works]) 16888f65982aSmrgfi 16898f65982aSmrg 16908f65982aSmrg# We have groff, test for HTML dependencies, one command per package 16918f65982aSmrgif test "x$have_groff" = x"yes"; then 16928f65982aSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 16938f65982aSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 16948f65982aSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 16958f65982aSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 16968f65982aSmrg have_groff_html=yes 16978f65982aSmrg else 16988f65982aSmrg have_groff_html=no 16998f65982aSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 17008f65982aSmrg fi 17018f65982aSmrgfi 17028f65982aSmrg 17038f65982aSmrg# Set Automake conditionals for Makefiles 17048f65982aSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 17058f65982aSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 17068f65982aSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 17078f65982aSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 17088f65982aSmrg]) # XORG_WITH_GROFF 17098f65982aSmrg 17108f65982aSmrg# XORG_WITH_FOP([DEFAULT]) 17118f65982aSmrg# ---------------- 17128f65982aSmrg# Minimum version: 1.6.0 17138f65982aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 17148f65982aSmrg# 17158f65982aSmrg# Documentation tools are not always available on all platforms and sometimes 17168f65982aSmrg# not at the appropriate level. This macro enables a module to test for the 17178f65982aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 17188f65982aSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 17198f65982aSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 17208f65982aSmrg# --with-fop assumes 'auto'. 17218f65982aSmrg# 17228f65982aSmrg# Interface to module: 17238f65982aSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 17248f65982aSmrg# FOP: returns the path of the fop program found 17258f65982aSmrg# returns the path set by the user in the environment 17268f65982aSmrg# --with-fop: 'yes' user instructs the module to use fop 17278f65982aSmrg# 'no' user instructs the module not to use fop 17288f65982aSmrg# 17298f65982aSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 17308f65982aSmrg# 17318f65982aSmrgAC_DEFUN([XORG_WITH_FOP],[ 17328f65982aSmrgAC_ARG_VAR([FOP], [Path to fop command]) 17338f65982aSmrgm4_define([_defopt], m4_default([$1], [auto])) 17348f65982aSmrgAC_ARG_WITH(fop, 17358f65982aSmrg AS_HELP_STRING([--with-fop], 17368f65982aSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 17378f65982aSmrg [use_fop=$withval], [use_fop=]_defopt) 17388f65982aSmrgm4_undefine([_defopt]) 17398f65982aSmrg 17408f65982aSmrgif test "x$use_fop" = x"auto"; then 17418f65982aSmrg AC_PATH_PROG([FOP], [fop]) 17428f65982aSmrg if test "x$FOP" = "x"; then 17438f65982aSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 17448f65982aSmrg have_fop=no 17458f65982aSmrg else 17468f65982aSmrg have_fop=yes 17478f65982aSmrg fi 17488f65982aSmrgelif test "x$use_fop" = x"yes" ; then 17498f65982aSmrg AC_PATH_PROG([FOP], [fop]) 17508f65982aSmrg if test "x$FOP" = "x"; then 17518f65982aSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 17528f65982aSmrg fi 17538f65982aSmrg have_fop=yes 17548f65982aSmrgelif test "x$use_fop" = x"no" ; then 17558f65982aSmrg if test "x$FOP" != "x"; then 17568f65982aSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 17578f65982aSmrg fi 17588f65982aSmrg have_fop=no 17598f65982aSmrgelse 17608f65982aSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 17618f65982aSmrgfi 17628f65982aSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 17638f65982aSmrg]) # XORG_WITH_FOP 17648f65982aSmrg 17658f65982aSmrg# XORG_WITH_PS2PDF([DEFAULT]) 17668f65982aSmrg# ---------------- 17678f65982aSmrg# Minimum version: 1.6.0 17688f65982aSmrg# Minimum version for optional DEFAULT argument: 1.11.0 17698f65982aSmrg# 17708f65982aSmrg# Documentation tools are not always available on all platforms and sometimes 17718f65982aSmrg# not at the appropriate level. This macro enables a module to test for the 17728f65982aSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 17738f65982aSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 17748f65982aSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 17758f65982aSmrg# --with-ps2pdf assumes 'auto'. 17768f65982aSmrg# 17778f65982aSmrg# Interface to module: 17788f65982aSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 17798f65982aSmrg# PS2PDF: returns the path of the ps2pdf program found 17808f65982aSmrg# returns the path set by the user in the environment 17818f65982aSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 17828f65982aSmrg# 'no' user instructs the module not to use ps2pdf 17838f65982aSmrg# 17848f65982aSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 17858f65982aSmrg# 17868f65982aSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 17878f65982aSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 17888f65982aSmrgm4_define([_defopt], m4_default([$1], [auto])) 17898f65982aSmrgAC_ARG_WITH(ps2pdf, 17908f65982aSmrg AS_HELP_STRING([--with-ps2pdf], 17918f65982aSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 17928f65982aSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 17938f65982aSmrgm4_undefine([_defopt]) 17948f65982aSmrg 17958f65982aSmrgif test "x$use_ps2pdf" = x"auto"; then 17968f65982aSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 17978f65982aSmrg if test "x$PS2PDF" = "x"; then 17988f65982aSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 17998f65982aSmrg have_ps2pdf=no 18008f65982aSmrg else 18018f65982aSmrg have_ps2pdf=yes 18028f65982aSmrg fi 18038f65982aSmrgelif test "x$use_ps2pdf" = x"yes" ; then 18048f65982aSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 18058f65982aSmrg if test "x$PS2PDF" = "x"; then 18068f65982aSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 18078f65982aSmrg fi 18088f65982aSmrg have_ps2pdf=yes 18098f65982aSmrgelif test "x$use_ps2pdf" = x"no" ; then 18108f65982aSmrg if test "x$PS2PDF" != "x"; then 18118f65982aSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 18128f65982aSmrg fi 18138f65982aSmrg have_ps2pdf=no 18148f65982aSmrgelse 18158f65982aSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 18168f65982aSmrgfi 18178f65982aSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 18188f65982aSmrg]) # XORG_WITH_PS2PDF 18198f65982aSmrg 18208f65982aSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 18218f65982aSmrg# ---------------- 18228f65982aSmrg# Minimum version: 1.6.0 18238f65982aSmrg# 18248f65982aSmrg# Documentation tools are not always available on all platforms and sometimes 18258f65982aSmrg# not at the appropriate level. This macro enables a builder to skip all 18268f65982aSmrg# documentation targets except traditional man pages. 18278f65982aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 18288f65982aSmrg# maximum flexibilty in controlling documentation building. 18298f65982aSmrg# Refer to: 18308f65982aSmrg# XORG_WITH_XMLTO --with-xmlto 18318f65982aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 18328f65982aSmrg# XORG_WITH_DOXYGEN --with-doxygen 18338f65982aSmrg# XORG_WITH_FOP --with-fop 18348f65982aSmrg# XORG_WITH_GROFF --with-groff 18358f65982aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 18368f65982aSmrg# 18378f65982aSmrg# Interface to module: 18388f65982aSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 18398f65982aSmrg# --enable-docs: 'yes' user instructs the module to generate docs 18408f65982aSmrg# 'no' user instructs the module not to generate docs 18418f65982aSmrg# parm1: specify the default value, yes or no. 18428f65982aSmrg# 18438f65982aSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 18448f65982aSmrgm4_define([default], m4_default([$1], [yes])) 18458f65982aSmrgAC_ARG_ENABLE(docs, 18468f65982aSmrg AS_HELP_STRING([--enable-docs], 18478f65982aSmrg [Enable building the documentation (default: ]default[)]), 18488f65982aSmrg [build_docs=$enableval], [build_docs=]default) 18498f65982aSmrgm4_undefine([default]) 18508f65982aSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 18518f65982aSmrgAC_MSG_CHECKING([whether to build documentation]) 18528f65982aSmrgAC_MSG_RESULT([$build_docs]) 18538f65982aSmrg]) # XORG_ENABLE_DOCS 18548f65982aSmrg 18558f65982aSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 18568f65982aSmrg# ---------------- 18578f65982aSmrg# Minimum version: 1.6.0 18588f65982aSmrg# 18598f65982aSmrg# This macro enables a builder to skip all developer documentation. 18608f65982aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 18618f65982aSmrg# maximum flexibilty in controlling documentation building. 18628f65982aSmrg# Refer to: 18638f65982aSmrg# XORG_WITH_XMLTO --with-xmlto 18648f65982aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 18658f65982aSmrg# XORG_WITH_DOXYGEN --with-doxygen 18668f65982aSmrg# XORG_WITH_FOP --with-fop 18678f65982aSmrg# XORG_WITH_GROFF --with-groff 18688f65982aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 18698f65982aSmrg# 18708f65982aSmrg# Interface to module: 18718f65982aSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 18728f65982aSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 18738f65982aSmrg# 'no' user instructs the module not to generate developer docs 18748f65982aSmrg# parm1: specify the default value, yes or no. 18758f65982aSmrg# 18768f65982aSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 18778f65982aSmrgm4_define([devel_default], m4_default([$1], [yes])) 18788f65982aSmrgAC_ARG_ENABLE(devel-docs, 18798f65982aSmrg AS_HELP_STRING([--enable-devel-docs], 18808f65982aSmrg [Enable building the developer documentation (default: ]devel_default[)]), 18818f65982aSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 18828f65982aSmrgm4_undefine([devel_default]) 18838f65982aSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 18848f65982aSmrgAC_MSG_CHECKING([whether to build developer documentation]) 18858f65982aSmrgAC_MSG_RESULT([$build_devel_docs]) 18868f65982aSmrg]) # XORG_ENABLE_DEVEL_DOCS 18878f65982aSmrg 18888f65982aSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 18898f65982aSmrg# ---------------- 18908f65982aSmrg# Minimum version: 1.6.0 18918f65982aSmrg# 18928f65982aSmrg# This macro enables a builder to skip all functional specification targets. 18938f65982aSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 18948f65982aSmrg# maximum flexibilty in controlling documentation building. 18958f65982aSmrg# Refer to: 18968f65982aSmrg# XORG_WITH_XMLTO --with-xmlto 18978f65982aSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 18988f65982aSmrg# XORG_WITH_DOXYGEN --with-doxygen 18998f65982aSmrg# XORG_WITH_FOP --with-fop 19008f65982aSmrg# XORG_WITH_GROFF --with-groff 19018f65982aSmrg# XORG_WITH_PS2PDF --with-ps2pdf 19028f65982aSmrg# 19038f65982aSmrg# Interface to module: 19048f65982aSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 19058f65982aSmrg# --enable-specs: 'yes' user instructs the module to generate specs 19068f65982aSmrg# 'no' user instructs the module not to generate specs 19078f65982aSmrg# parm1: specify the default value, yes or no. 19088f65982aSmrg# 19098f65982aSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 19108f65982aSmrgm4_define([spec_default], m4_default([$1], [yes])) 19118f65982aSmrgAC_ARG_ENABLE(specs, 19128f65982aSmrg AS_HELP_STRING([--enable-specs], 19138f65982aSmrg [Enable building the specs (default: ]spec_default[)]), 19148f65982aSmrg [build_specs=$enableval], [build_specs=]spec_default) 19158f65982aSmrgm4_undefine([spec_default]) 19168f65982aSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 19178f65982aSmrgAC_MSG_CHECKING([whether to build functional specifications]) 19188f65982aSmrgAC_MSG_RESULT([$build_specs]) 19198f65982aSmrg]) # XORG_ENABLE_SPECS 19208f65982aSmrg 19219aa228fdSmrg# XORG_CHECK_MALLOC_ZERO 19229aa228fdSmrg# ---------------------- 19239aa228fdSmrg# Minimum version: 1.0.0 19249aa228fdSmrg# 19259aa228fdSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 19269aa228fdSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 19279aa228fdSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 19289aa228fdSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 19299aa228fdSmrgAC_ARG_ENABLE(malloc0returnsnull, 19308f65982aSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 19319aa228fdSmrg [malloc(0) returns NULL (default: auto)]), 19329aa228fdSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 19339aa228fdSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 19349aa228fdSmrg 19359aa228fdSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 19369aa228fdSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 19379aa228fdSmrg AC_RUN_IFELSE([ 19389aa228fdSmrgchar *malloc(); 19399aa228fdSmrgchar *realloc(); 19409aa228fdSmrgchar *calloc(); 19419aa228fdSmrgmain() { 19429aa228fdSmrg char *m0, *r0, *c0, *p; 19439aa228fdSmrg m0 = malloc(0); 19449aa228fdSmrg p = malloc(10); 19459aa228fdSmrg r0 = realloc(p,0); 19469aa228fdSmrg c0 = calloc(0); 19479aa228fdSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 19489aa228fdSmrg}], 19499aa228fdSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 19508f65982aSmrg [MALLOC_ZERO_RETURNS_NULL=no], 19518f65982aSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 19529aa228fdSmrgfi 19539aa228fdSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 19549aa228fdSmrg 19559aa228fdSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 19569aa228fdSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 19579aa228fdSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 19589aa228fdSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 19599aa228fdSmrgelse 19609aa228fdSmrg MALLOC_ZERO_CFLAGS="" 19619aa228fdSmrg XMALLOC_ZERO_CFLAGS="" 19629aa228fdSmrg XTMALLOC_ZERO_CFLAGS="" 19639aa228fdSmrgfi 19649aa228fdSmrg 19659aa228fdSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 19669aa228fdSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 19679aa228fdSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 19689aa228fdSmrg]) # XORG_CHECK_MALLOC_ZERO 19699aa228fdSmrg 19709aa228fdSmrg# XORG_WITH_LINT() 19719aa228fdSmrg# ---------------- 19729aa228fdSmrg# Minimum version: 1.1.0 19739aa228fdSmrg# 19748f65982aSmrg# This macro enables the use of a tool that flags some suspicious and 19758f65982aSmrg# non-portable constructs (likely to be bugs) in C language source code. 19768f65982aSmrg# It will attempt to locate the tool and use appropriate options. 19778f65982aSmrg# There are various lint type tools on different platforms. 19788f65982aSmrg# 19798f65982aSmrg# Interface to module: 19808f65982aSmrg# LINT: returns the path to the tool found on the platform 19818f65982aSmrg# or the value set to LINT on the configure cmd line 19828f65982aSmrg# also an Automake conditional 19838f65982aSmrg# LINT_FLAGS: an Automake variable with appropriate flags 19848f65982aSmrg# 19858f65982aSmrg# --with-lint: 'yes' user instructs the module to use lint 19868f65982aSmrg# 'no' user instructs the module not to use lint (default) 19878f65982aSmrg# 19888f65982aSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 19898f65982aSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 19909aa228fdSmrg# 19919aa228fdSmrgAC_DEFUN([XORG_WITH_LINT],[ 19929aa228fdSmrg 19938f65982aSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 19948f65982aSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 19958f65982aSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 19969aa228fdSmrg [Use a lint-style source code checker (default: disabled)])], 19979aa228fdSmrg [use_lint=$withval], [use_lint=no]) 19988f65982aSmrg 19998f65982aSmrg# Obtain platform specific info like program name and options 20008f65982aSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 20018f65982aSmrgcase $host_os in 20028f65982aSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 20038f65982aSmrg lint_name=splint 20048f65982aSmrg lint_options="-badflag" 20058f65982aSmrg ;; 20068f65982aSmrg *freebsd* | *netbsd*) 20078f65982aSmrg lint_name=lint 20088f65982aSmrg lint_options="-u -b" 20098f65982aSmrg ;; 20108f65982aSmrg *solaris*) 20118f65982aSmrg lint_name=lint 20128f65982aSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 20138f65982aSmrg ;; 20148f65982aSmrgesac 20158f65982aSmrg 20168f65982aSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 20178f65982aSmrgif test "x$use_lint" = x"yes" ; then 20188f65982aSmrg AC_PATH_PROG([LINT], [$lint_name]) 20198f65982aSmrg if test "x$LINT" = "x"; then 20208f65982aSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 20218f65982aSmrg fi 20228f65982aSmrgelif test "x$use_lint" = x"no" ; then 20238f65982aSmrg if test "x$LINT" != "x"; then 20248f65982aSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 20258f65982aSmrg fi 20269aa228fdSmrgelse 20278f65982aSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 20289aa228fdSmrgfi 20298f65982aSmrg 20308f65982aSmrg# User supplied flags override default flags 20318f65982aSmrgif test "x$LINT_FLAGS" != "x"; then 20328f65982aSmrg lint_options=$LINT_FLAGS 20339aa228fdSmrgfi 20349aa228fdSmrg 20358f65982aSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 20368f65982aSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 20379aa228fdSmrg 20389aa228fdSmrg]) # XORG_WITH_LINT 20399aa228fdSmrg 20409aa228fdSmrg# XORG_LINT_LIBRARY(LIBNAME) 20419aa228fdSmrg# -------------------------- 20429aa228fdSmrg# Minimum version: 1.1.0 20439aa228fdSmrg# 20449aa228fdSmrg# Sets up flags for building lint libraries for checking programs that call 20459aa228fdSmrg# functions in the library. 20469aa228fdSmrg# 20478f65982aSmrg# Interface to module: 20488f65982aSmrg# LINTLIB - Automake variable with the name of lint library file to make 20498f65982aSmrg# MAKE_LINT_LIB - Automake conditional 20508f65982aSmrg# 20518f65982aSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 20528f65982aSmrg# - 'no' user instructs the module not to create a lint library (default) 20539aa228fdSmrg 20549aa228fdSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 20559aa228fdSmrgAC_REQUIRE([XORG_WITH_LINT]) 20568f65982aSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 20579aa228fdSmrg [Create lint library (default: disabled)])], 20589aa228fdSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 20598f65982aSmrg 20608f65982aSmrgif test "x$make_lint_lib" = x"yes" ; then 20618f65982aSmrg LINTLIB=llib-l$1.ln 20628f65982aSmrg if test "x$LINT" = "x"; then 20638f65982aSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 20648f65982aSmrg fi 20658f65982aSmrgelif test "x$make_lint_lib" != x"no" ; then 20668f65982aSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 20679aa228fdSmrgfi 20688f65982aSmrg 20699aa228fdSmrgAC_SUBST(LINTLIB) 20709aa228fdSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 20719aa228fdSmrg 20729aa228fdSmrg]) # XORG_LINT_LIBRARY 20739aa228fdSmrg 207483d7c197Smrg# XORG_CWARNFLAGS 207583d7c197Smrg# --------------- 207683d7c197Smrg# Minimum version: 1.2.0 207783d7c197Smrg# 207883d7c197Smrg# Defines CWARNFLAGS to enable C compiler warnings. 207983d7c197Smrg# 208083d7c197SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 20818f65982aSmrgAC_REQUIRE([AC_PROG_CC_C99]) 208283d7c197Smrgif test "x$GCC" = xyes ; then 208383d7c197Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 208483d7c197Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 20858f65982aSmrg-Wbad-function-cast -Wformat=2" 208683d7c197Smrg case `$CC -dumpversion` in 208783d7c197Smrg 3.4.* | 4.*) 208883d7c197Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 208983d7c197Smrg ;; 209083d7c197Smrg esac 209183d7c197Smrgelse 209283d7c197Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 209383d7c197Smrg if test "x$SUNCC" = "xyes"; then 209483d7c197Smrg CWARNFLAGS="-v" 209583d7c197Smrg fi 209683d7c197Smrgfi 209783d7c197SmrgAC_SUBST(CWARNFLAGS) 209883d7c197Smrg]) # XORG_CWARNFLAGS 20998f65982aSmrg 21008f65982aSmrg# XORG_STRICT_OPTION 21018f65982aSmrg# ----------------------- 21028f65982aSmrg# Minimum version: 1.3.0 21038f65982aSmrg# 21048f65982aSmrg# Add configure option to enable strict compilation 21058f65982aSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 21068f65982aSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 21078f65982aSmrgAC_REQUIRE([AC_PROG_CC_C99]) 21088f65982aSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 21098f65982aSmrg 21108f65982aSmrgAC_ARG_ENABLE(strict-compilation, 21118f65982aSmrg AS_HELP_STRING([--enable-strict-compilation], 21128f65982aSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 21138f65982aSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 21148f65982aSmrgif test "x$STRICT_COMPILE" = "xyes"; then 21158f65982aSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 21168f65982aSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 21178f65982aSmrg if test "x$GCC" = xyes ; then 21188f65982aSmrg STRICT_CFLAGS="-pedantic -Werror" 21198f65982aSmrg elif test "x$SUNCC" = "xyes"; then 21208f65982aSmrg STRICT_CFLAGS="-errwarn" 21218f65982aSmrg elif test "x$INTELCC" = "xyes"; then 21228f65982aSmrg STRICT_CFLAGS="-Werror" 21238f65982aSmrg fi 21248f65982aSmrgfi 21258f65982aSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 21268f65982aSmrgAC_SUBST([CWARNFLAGS]) 21278f65982aSmrg]) # XORG_STRICT_OPTION 21288f65982aSmrg 21298f65982aSmrg# XORG_DEFAULT_OPTIONS 21308f65982aSmrg# -------------------- 21318f65982aSmrg# Minimum version: 1.3.0 21328f65982aSmrg# 21338f65982aSmrg# Defines default options for X.Org modules. 21348f65982aSmrg# 21358f65982aSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 21368f65982aSmrgAC_REQUIRE([AC_PROG_INSTALL]) 21378f65982aSmrgXORG_CWARNFLAGS 21388f65982aSmrgXORG_STRICT_OPTION 21398f65982aSmrgXORG_RELEASE_VERSION 21408f65982aSmrgXORG_CHANGELOG 21418f65982aSmrgXORG_INSTALL 21428f65982aSmrgXORG_MANPAGE_SECTIONS 21438f65982aSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 21448f65982aSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 21458f65982aSmrg]) # XORG_DEFAULT_OPTIONS 21468f65982aSmrg 21478f65982aSmrg# XORG_INSTALL() 21488f65982aSmrg# ---------------- 21498f65982aSmrg# Minimum version: 1.4.0 21508f65982aSmrg# 21518f65982aSmrg# Defines the variable INSTALL_CMD as the command to copy 21528f65982aSmrg# INSTALL from $prefix/share/util-macros. 21538f65982aSmrg# 21548f65982aSmrgAC_DEFUN([XORG_INSTALL], [ 21558f65982aSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 21568f65982aSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 21578f65982aSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 21588f65982aSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 21598f65982aSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 21608f65982aSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 21618f65982aSmrgAC_SUBST([INSTALL_CMD]) 21628f65982aSmrg]) # XORG_INSTALL 21639aa228fdSmrgdnl Copyright 2005 Red Hat, Inc 21649aa228fdSmrgdnl 21659aa228fdSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 21669aa228fdSmrgdnl documentation for any purpose is hereby granted without fee, provided that 21679aa228fdSmrgdnl the above copyright notice appear in all copies and that both that 21689aa228fdSmrgdnl copyright notice and this permission notice appear in supporting 21699aa228fdSmrgdnl documentation. 21709aa228fdSmrgdnl 21719aa228fdSmrgdnl The above copyright notice and this permission notice shall be included 21729aa228fdSmrgdnl in all copies or substantial portions of the Software. 21739aa228fdSmrgdnl 21749aa228fdSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21759aa228fdSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21769aa228fdSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21779aa228fdSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 21789aa228fdSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21799aa228fdSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21809aa228fdSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 21819aa228fdSmrgdnl 21829aa228fdSmrgdnl Except as contained in this notice, the name of the copyright holders shall 21839aa228fdSmrgdnl not be used in advertising or otherwise to promote the sale, use or 21849aa228fdSmrgdnl other dealings in this Software without prior written authorization 21859aa228fdSmrgdnl from the copyright holders. 21869aa228fdSmrgdnl 21879aa228fdSmrg 21889aa228fdSmrg# XORG_RELEASE_VERSION 21899aa228fdSmrg# -------------------- 21908f65982aSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 21919aa228fdSmrg 21929aa228fdSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 21939aa228fdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 21949aa228fdSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 21959aa228fdSmrg [Major version of this package]) 219683d7c197Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 21979aa228fdSmrg if test "x$PVM" = "x"; then 21989aa228fdSmrg PVM="0" 21999aa228fdSmrg fi 22009aa228fdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 22019aa228fdSmrg [$PVM], 22029aa228fdSmrg [Minor version of this package]) 220383d7c197Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 22049aa228fdSmrg if test "x$PVP" = "x"; then 22059aa228fdSmrg PVP="0" 22069aa228fdSmrg fi 22079aa228fdSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 22089aa228fdSmrg [$PVP], 22099aa228fdSmrg [Patch version of this package]) 22109aa228fdSmrg]) 22119aa228fdSmrg 221283d7c197Smrg# XORG_CHANGELOG() 221383d7c197Smrg# ---------------- 221483d7c197Smrg# Minimum version: 1.2.0 221583d7c197Smrg# 221683d7c197Smrg# Defines the variable CHANGELOG_CMD as the command to generate 221783d7c197Smrg# ChangeLog from git. 221883d7c197Smrg# 221983d7c197Smrg# 222083d7c197SmrgAC_DEFUN([XORG_CHANGELOG], [ 22218f65982aSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 22228f65982aSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 22238f65982aSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 222483d7c197Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 222583d7c197SmrgAC_SUBST([CHANGELOG_CMD]) 222683d7c197Smrg]) # XORG_CHANGELOG 222783d7c197Smrg 22289aa228fdSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 22299aa228fdSmrg# 22309aa228fdSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 22319aa228fdSmrg# 22329aa228fdSmrg# This program is free software; you can redistribute it and/or modify 22339aa228fdSmrg# it under the terms of the GNU General Public License as published by 22349aa228fdSmrg# the Free Software Foundation; either version 2 of the License, or 22359aa228fdSmrg# (at your option) any later version. 22369aa228fdSmrg# 22379aa228fdSmrg# This program is distributed in the hope that it will be useful, but 22389aa228fdSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 22399aa228fdSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22409aa228fdSmrg# General Public License for more details. 22419aa228fdSmrg# 22429aa228fdSmrg# You should have received a copy of the GNU General Public License 22439aa228fdSmrg# along with this program; if not, write to the Free Software 22449aa228fdSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22459aa228fdSmrg# 22469aa228fdSmrg# As a special exception to the GNU General Public License, if you 22479aa228fdSmrg# distribute this file as part of a program that contains a 22489aa228fdSmrg# configuration script generated by Autoconf, you may include it under 22499aa228fdSmrg# the same distribution terms that you use for the rest of that program. 22509aa228fdSmrg 22519aa228fdSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 22529aa228fdSmrg# ---------------------------------- 22539aa228fdSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 22549aa228fdSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 22559aa228fdSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 22569aa228fdSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 22579aa228fdSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 22589aa228fdSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 22599aa228fdSmrgfi 22609aa228fdSmrgif test -n "$PKG_CONFIG"; then 22618f65982aSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 22629aa228fdSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 22639aa228fdSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 22649aa228fdSmrg AC_MSG_RESULT([yes]) 22659aa228fdSmrg else 22669aa228fdSmrg AC_MSG_RESULT([no]) 22679aa228fdSmrg PKG_CONFIG="" 22689aa228fdSmrg fi 22699aa228fdSmrg 22709aa228fdSmrgfi[]dnl 22719aa228fdSmrg])# PKG_PROG_PKG_CONFIG 22729aa228fdSmrg 22739aa228fdSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 22749aa228fdSmrg# 22759aa228fdSmrg# Check to see whether a particular set of modules exists. Similar 22769aa228fdSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 22779aa228fdSmrg# 22789aa228fdSmrg# 22799aa228fdSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 22809aa228fdSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 22819aa228fdSmrg# PKG_CHECK_EXISTS manually 22829aa228fdSmrg# -------------------------------------------------------------- 22839aa228fdSmrgAC_DEFUN([PKG_CHECK_EXISTS], 22849aa228fdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 22859aa228fdSmrgif test -n "$PKG_CONFIG" && \ 22869aa228fdSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 22879aa228fdSmrg m4_ifval([$2], [$2], [:]) 22889aa228fdSmrgm4_ifvaln([$3], [else 22899aa228fdSmrg $3])dnl 22909aa228fdSmrgfi]) 22919aa228fdSmrg 22929aa228fdSmrg 22939aa228fdSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 22949aa228fdSmrg# --------------------------------------------- 22959aa228fdSmrgm4_define([_PKG_CONFIG], 22968f65982aSmrg[if test -n "$$1"; then 22978f65982aSmrg pkg_cv_[]$1="$$1" 22988f65982aSmrg elif test -n "$PKG_CONFIG"; then 22998f65982aSmrg PKG_CHECK_EXISTS([$3], 23008f65982aSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 23018f65982aSmrg [pkg_failed=yes]) 23028f65982aSmrg else 23038f65982aSmrg pkg_failed=untried 23049aa228fdSmrgfi[]dnl 23059aa228fdSmrg])# _PKG_CONFIG 23069aa228fdSmrg 23078f65982aSmrg# _PKG_SHORT_ERRORS_SUPPORTED 23088f65982aSmrg# ----------------------------- 23098f65982aSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 23108f65982aSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 23118f65982aSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 23128f65982aSmrg _pkg_short_errors_supported=yes 23138f65982aSmrgelse 23148f65982aSmrg _pkg_short_errors_supported=no 23158f65982aSmrgfi[]dnl 23168f65982aSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 23178f65982aSmrg 23188f65982aSmrg 23199aa228fdSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 23209aa228fdSmrg# [ACTION-IF-NOT-FOUND]) 23219aa228fdSmrg# 23229aa228fdSmrg# 23239aa228fdSmrg# Note that if there is a possibility the first call to 23249aa228fdSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 23259aa228fdSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 23269aa228fdSmrg# 23279aa228fdSmrg# 23289aa228fdSmrg# -------------------------------------------------------------- 23299aa228fdSmrgAC_DEFUN([PKG_CHECK_MODULES], 23309aa228fdSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 23319aa228fdSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 23329aa228fdSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 23339aa228fdSmrg 23349aa228fdSmrgpkg_failed=no 23359aa228fdSmrgAC_MSG_CHECKING([for $1]) 23369aa228fdSmrg 23379aa228fdSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 23389aa228fdSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 23399aa228fdSmrg 23408f65982aSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 23418f65982aSmrgand $1[]_LIBS to avoid the need to call pkg-config. 23428f65982aSmrgSee the pkg-config man page for more details.]) 23438f65982aSmrg 23449aa228fdSmrgif test $pkg_failed = yes; then 23458f65982aSmrg _PKG_SHORT_ERRORS_SUPPORTED 23468f65982aSmrg if test $_pkg_short_errors_supported = yes; then 23478f65982aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 23488f65982aSmrg else 23498f65982aSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 23508f65982aSmrg fi 23519aa228fdSmrg # Put the nasty error message in config.log where it belongs 23528f65982aSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 23539aa228fdSmrg 23549aa228fdSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 23558f65982aSmrg[Package requirements ($2) were not met: 23568f65982aSmrg 23578f65982aSmrg$$1_PKG_ERRORS 23588f65982aSmrg 23599aa228fdSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 23609aa228fdSmrginstalled software in a non-standard prefix. 23619aa228fdSmrg 23628f65982aSmrg_PKG_TEXT 23638f65982aSmrg])], 23648f65982aSmrg [AC_MSG_RESULT([no]) 23658f65982aSmrg $4]) 23669aa228fdSmrgelif test $pkg_failed = untried; then 23679aa228fdSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 23689aa228fdSmrg[The pkg-config script could not be found or is too old. Make sure it 23699aa228fdSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 23709aa228fdSmrgpath to pkg-config. 23719aa228fdSmrg 23728f65982aSmrg_PKG_TEXT 23739aa228fdSmrg 23748f65982aSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 23759aa228fdSmrg [$4]) 23769aa228fdSmrgelse 23779aa228fdSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 23789aa228fdSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 23799aa228fdSmrg AC_MSG_RESULT([yes]) 23809aa228fdSmrg ifelse([$3], , :, [$3]) 23819aa228fdSmrgfi[]dnl 23829aa228fdSmrg])# PKG_CHECK_MODULES 23839aa228fdSmrg 2384