aclocal.m4 revision ce62200c
1ce62200cSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 21a30de1fSmrg 31a30de1fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4b7fb5eacSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 51a30de1fSmrg# This file is free software; the Free Software Foundation 61a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 71a30de1fSmrg# with or without modifications, as long as this notice is preserved. 81a30de1fSmrg 91a30de1fSmrg# This program is distributed in the hope that it will be useful, 101a30de1fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 111a30de1fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 121a30de1fSmrg# PARTICULAR PURPOSE. 131a30de1fSmrg 14b7fb5eacSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15b7fb5eacSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16ce62200cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17ce62200cSmrg[m4_warning([this file was generated for autoconf 2.68. 18b7fb5eacSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19b7fb5eacSmrgIf you have problems, you may need to regenerate the build system entirely. 20b7fb5eacSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 211a30de1fSmrg 22b7fb5eacSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 231a30de1fSmrg# 241a30de1fSmrg# This file is free software; the Free Software Foundation 251a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 261a30de1fSmrg# with or without modifications, as long as this notice is preserved. 271a30de1fSmrg 281a30de1fSmrg# AM_AUTOMAKE_VERSION(VERSION) 291a30de1fSmrg# ---------------------------- 301a30de1fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 311a30de1fSmrg# generated from the m4 files accompanying Automake X.Y. 321a30de1fSmrg# (This private macro should not be called outside this file.) 331a30de1fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 34b7fb5eacSmrg[am__api_version='1.11' 351a30de1fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 361a30de1fSmrgdnl require some minimum version. Point them to the right macro. 37ce62200cSmrgm4_if([$1], [1.11.1], [], 381a30de1fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 391a30de1fSmrg]) 401a30de1fSmrg 411a30de1fSmrg# _AM_AUTOCONF_VERSION(VERSION) 421a30de1fSmrg# ----------------------------- 431a30de1fSmrg# aclocal traces this macro to find the Autoconf version. 441a30de1fSmrg# This is a private macro too. Using m4_define simplifies 451a30de1fSmrg# the logic in aclocal, which can simply ignore this definition. 461a30de1fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 471a30de1fSmrg 481a30de1fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 491a30de1fSmrg# ------------------------------- 501a30de1fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51b7fb5eacSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 521a30de1fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53ce62200cSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 54b7fb5eacSmrgm4_ifndef([AC_AUTOCONF_VERSION], 55b7fb5eacSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56b7fb5eacSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 571a30de1fSmrg 581a30de1fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 591a30de1fSmrg 601a30de1fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 611a30de1fSmrg# 621a30de1fSmrg# This file is free software; the Free Software Foundation 631a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 641a30de1fSmrg# with or without modifications, as long as this notice is preserved. 651a30de1fSmrg 661a30de1fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 671a30de1fSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 681a30de1fSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 691a30de1fSmrg# 701a30de1fSmrg# Of course, Automake must honor this variable whenever it calls a 711a30de1fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 721a30de1fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 731a30de1fSmrg# depending on how configure is run. This is pretty annoying, since 741a30de1fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 751a30de1fSmrg# source directory, any form will work fine, but in subdirectories a 761a30de1fSmrg# relative path needs to be adjusted first. 771a30de1fSmrg# 781a30de1fSmrg# $ac_aux_dir/missing 791a30de1fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 801a30de1fSmrg# $top_srcdir/$ac_aux_dir/missing 811a30de1fSmrg# fails if $ac_aux_dir is absolute, 821a30de1fSmrg# fails when called from a subdirectory in a VPATH build with 831a30de1fSmrg# a relative $ac_aux_dir 841a30de1fSmrg# 851a30de1fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 861a30de1fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 871a30de1fSmrg# harmless because $srcdir is `.', but things will broke when you 881a30de1fSmrg# start a VPATH build or use an absolute $srcdir. 891a30de1fSmrg# 901a30de1fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 911a30de1fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 921a30de1fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 931a30de1fSmrg# and then we would define $MISSING as 941a30de1fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 951a30de1fSmrg# This will work as long as MISSING is not called from configure, because 961a30de1fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 971a30de1fSmrg# However there are other variables, like CC, which are often used in 981a30de1fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 991a30de1fSmrg# 1001a30de1fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1011a30de1fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1021a30de1fSmrg# configured tree to be moved without reconfiguration. 1031a30de1fSmrg 1041a30de1fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1051a30de1fSmrg[dnl Rely on autoconf to set up CDPATH properly. 1061a30de1fSmrgAC_PREREQ([2.50])dnl 1071a30de1fSmrg# expand $ac_aux_dir to an absolute path 1081a30de1fSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 1091a30de1fSmrg]) 1101a30de1fSmrg 1111a30de1fSmrg# AM_CONDITIONAL -*- Autoconf -*- 1121a30de1fSmrg 113b7fb5eacSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1141a30de1fSmrg# Free Software Foundation, Inc. 1151a30de1fSmrg# 1161a30de1fSmrg# This file is free software; the Free Software Foundation 1171a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 1181a30de1fSmrg# with or without modifications, as long as this notice is preserved. 1191a30de1fSmrg 120b7fb5eacSmrg# serial 9 1211a30de1fSmrg 1221a30de1fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1231a30de1fSmrg# ------------------------------------- 1241a30de1fSmrg# Define a conditional. 1251a30de1fSmrgAC_DEFUN([AM_CONDITIONAL], 1261a30de1fSmrg[AC_PREREQ(2.52)dnl 1271a30de1fSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1281a30de1fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1291a30de1fSmrgAC_SUBST([$1_TRUE])dnl 1301a30de1fSmrgAC_SUBST([$1_FALSE])dnl 1311a30de1fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1321a30de1fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133b7fb5eacSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1341a30de1fSmrgif $2; then 1351a30de1fSmrg $1_TRUE= 1361a30de1fSmrg $1_FALSE='#' 1371a30de1fSmrgelse 1381a30de1fSmrg $1_TRUE='#' 1391a30de1fSmrg $1_FALSE= 1401a30de1fSmrgfi 1411a30de1fSmrgAC_CONFIG_COMMANDS_PRE( 1421a30de1fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1431a30de1fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1441a30de1fSmrgUsually this means the macro was only invoked conditionally.]]) 1451a30de1fSmrgfi])]) 1461a30de1fSmrg 147b7fb5eacSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1481a30de1fSmrg# Free Software Foundation, Inc. 1491a30de1fSmrg# 1501a30de1fSmrg# This file is free software; the Free Software Foundation 1511a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 1521a30de1fSmrg# with or without modifications, as long as this notice is preserved. 1531a30de1fSmrg 154b7fb5eacSmrg# serial 10 1551a30de1fSmrg 1561a30de1fSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1571a30de1fSmrg# written in clear, in which case automake, when reading aclocal.m4, 1581a30de1fSmrg# will think it sees a *use*, and therefore will trigger all it's 1591a30de1fSmrg# C support machinery. Also note that it means that autoscan, seeing 1601a30de1fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1611a30de1fSmrg 1621a30de1fSmrg 1631a30de1fSmrg# _AM_DEPENDENCIES(NAME) 1641a30de1fSmrg# ---------------------- 1651a30de1fSmrg# See how the compiler implements dependency checking. 1661a30de1fSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1671a30de1fSmrg# We try a few techniques and use that to set a single cache variable. 1681a30de1fSmrg# 1691a30de1fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1701a30de1fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1711a30de1fSmrg# dependency, and given that the user is not expected to run this macro, 1721a30de1fSmrg# just rely on AC_PROG_CC. 1731a30de1fSmrgAC_DEFUN([_AM_DEPENDENCIES], 1741a30de1fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1751a30de1fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1761a30de1fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1771a30de1fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1781a30de1fSmrg 1791a30de1fSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1801a30de1fSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1811a30de1fSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1821a30de1fSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1831a30de1fSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1841a30de1fSmrg [depcc="$$1" am_compiler_list=]) 1851a30de1fSmrg 1861a30de1fSmrgAC_CACHE_CHECK([dependency style of $depcc], 1871a30de1fSmrg [am_cv_$1_dependencies_compiler_type], 1881a30de1fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1891a30de1fSmrg # We make a subdir and do the tests there. Otherwise we can end up 1901a30de1fSmrg # making bogus files that we don't know about and never remove. For 1911a30de1fSmrg # instance it was reported that on HP-UX the gcc test will end up 1921a30de1fSmrg # making a dummy file named `D' -- because `-MD' means `put the output 1931a30de1fSmrg # in D'. 1941a30de1fSmrg mkdir conftest.dir 1951a30de1fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1961a30de1fSmrg # using a relative directory. 1971a30de1fSmrg cp "$am_depcomp" conftest.dir 1981a30de1fSmrg cd conftest.dir 1991a30de1fSmrg # We will build objects and dependencies in a subdirectory because 2001a30de1fSmrg # it helps to detect inapplicable dependency modes. For instance 2011a30de1fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 2021a30de1fSmrg # side effect of compilation, but ICC will put the dependencies in 2031a30de1fSmrg # the current directory while Tru64 will put them in the object 2041a30de1fSmrg # directory. 2051a30de1fSmrg mkdir sub 2061a30de1fSmrg 2071a30de1fSmrg am_cv_$1_dependencies_compiler_type=none 2081a30de1fSmrg if test "$am_compiler_list" = ""; then 2091a30de1fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2101a30de1fSmrg fi 211b7fb5eacSmrg am__universal=false 212b7fb5eacSmrg m4_case([$1], [CC], 213b7fb5eacSmrg [case " $depcc " in #( 214b7fb5eacSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 215b7fb5eacSmrg esac], 216b7fb5eacSmrg [CXX], 217b7fb5eacSmrg [case " $depcc " in #( 218b7fb5eacSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 219b7fb5eacSmrg esac]) 220b7fb5eacSmrg 2211a30de1fSmrg for depmode in $am_compiler_list; do 2221a30de1fSmrg # Setup a source with many dependencies, because some compilers 2231a30de1fSmrg # like to wrap large dependency lists on column 80 (with \), and 2241a30de1fSmrg # we should not choose a depcomp mode which is confused by this. 2251a30de1fSmrg # 2261a30de1fSmrg # We need to recreate these files for each test, as the compiler may 2271a30de1fSmrg # overwrite some of them when testing with obscure command lines. 2281a30de1fSmrg # This happens at least with the AIX C compiler. 2291a30de1fSmrg : > sub/conftest.c 2301a30de1fSmrg for i in 1 2 3 4 5 6; do 2311a30de1fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2321a30de1fSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2331a30de1fSmrg # Solaris 8's {/usr,}/bin/sh. 2341a30de1fSmrg touch sub/conftst$i.h 2351a30de1fSmrg done 2361a30de1fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2371a30de1fSmrg 238b7fb5eacSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 239b7fb5eacSmrg # mode. It turns out that the SunPro C++ compiler does not properly 240b7fb5eacSmrg # handle `-M -o', and we need to detect this. Also, some Intel 241b7fb5eacSmrg # versions had trouble with output in subdirs 242b7fb5eacSmrg am__obj=sub/conftest.${OBJEXT-o} 243b7fb5eacSmrg am__minus_obj="-o $am__obj" 2441a30de1fSmrg case $depmode in 245b7fb5eacSmrg gcc) 246b7fb5eacSmrg # This depmode causes a compiler race in universal mode. 247b7fb5eacSmrg test "$am__universal" = false || continue 248b7fb5eacSmrg ;; 2491a30de1fSmrg nosideeffect) 2501a30de1fSmrg # after this tag, mechanisms are not by side-effect, so they'll 2511a30de1fSmrg # only be used when explicitly requested 2521a30de1fSmrg if test "x$enable_dependency_tracking" = xyes; then 2531a30de1fSmrg continue 2541a30de1fSmrg else 2551a30de1fSmrg break 2561a30de1fSmrg fi 2571a30de1fSmrg ;; 258b7fb5eacSmrg msvisualcpp | msvcmsys) 259b7fb5eacSmrg # This compiler won't grok `-c -o', but also, the minuso test has 260b7fb5eacSmrg # not run yet. These depmodes are late enough in the game, and 261b7fb5eacSmrg # so weak that their functioning should not be impacted. 262b7fb5eacSmrg am__obj=conftest.${OBJEXT-o} 263b7fb5eacSmrg am__minus_obj= 264b7fb5eacSmrg ;; 2651a30de1fSmrg none) break ;; 2661a30de1fSmrg esac 2671a30de1fSmrg if depmode=$depmode \ 268b7fb5eacSmrg source=sub/conftest.c object=$am__obj \ 2691a30de1fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 270b7fb5eacSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2711a30de1fSmrg >/dev/null 2>conftest.err && 2721a30de1fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2731a30de1fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 274b7fb5eacSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2751a30de1fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2761a30de1fSmrg # icc doesn't choke on unknown options, it will just issue warnings 2771a30de1fSmrg # or remarks (even with -Werror). So we grep stderr for any message 2781a30de1fSmrg # that says an option was ignored or not supported. 2791a30de1fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2801a30de1fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2811a30de1fSmrg # The diagnosis changed in icc 8.0: 2821a30de1fSmrg # icc: Command line remark: option '-MP' not supported 2831a30de1fSmrg if (grep 'ignoring option' conftest.err || 2841a30de1fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2851a30de1fSmrg am_cv_$1_dependencies_compiler_type=$depmode 2861a30de1fSmrg break 2871a30de1fSmrg fi 2881a30de1fSmrg fi 2891a30de1fSmrg done 2901a30de1fSmrg 2911a30de1fSmrg cd .. 2921a30de1fSmrg rm -rf conftest.dir 2931a30de1fSmrgelse 2941a30de1fSmrg am_cv_$1_dependencies_compiler_type=none 2951a30de1fSmrgfi 2961a30de1fSmrg]) 2971a30de1fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2981a30de1fSmrgAM_CONDITIONAL([am__fastdep$1], [ 2991a30de1fSmrg test "x$enable_dependency_tracking" != xno \ 3001a30de1fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 3011a30de1fSmrg]) 3021a30de1fSmrg 3031a30de1fSmrg 3041a30de1fSmrg# AM_SET_DEPDIR 3051a30de1fSmrg# ------------- 3061a30de1fSmrg# Choose a directory name for dependency files. 3071a30de1fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 3081a30de1fSmrgAC_DEFUN([AM_SET_DEPDIR], 3091a30de1fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3101a30de1fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3111a30de1fSmrg]) 3121a30de1fSmrg 3131a30de1fSmrg 3141a30de1fSmrg# AM_DEP_TRACK 3151a30de1fSmrg# ------------ 3161a30de1fSmrgAC_DEFUN([AM_DEP_TRACK], 3171a30de1fSmrg[AC_ARG_ENABLE(dependency-tracking, 3181a30de1fSmrg[ --disable-dependency-tracking speeds up one-time build 3191a30de1fSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 3201a30de1fSmrgif test "x$enable_dependency_tracking" != xno; then 3211a30de1fSmrg am_depcomp="$ac_aux_dir/depcomp" 3221a30de1fSmrg AMDEPBACKSLASH='\' 3231a30de1fSmrgfi 3241a30de1fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3251a30de1fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3261a30de1fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3271a30de1fSmrg]) 3281a30de1fSmrg 3291a30de1fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3301a30de1fSmrg 331b7fb5eacSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 3321a30de1fSmrg# Free Software Foundation, Inc. 3331a30de1fSmrg# 3341a30de1fSmrg# This file is free software; the Free Software Foundation 3351a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 3361a30de1fSmrg# with or without modifications, as long as this notice is preserved. 3371a30de1fSmrg 338b7fb5eacSmrg#serial 5 3391a30de1fSmrg 3401a30de1fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3411a30de1fSmrg# ------------------------------ 3421a30de1fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 343b7fb5eacSmrg[{ 344b7fb5eacSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 345b7fb5eacSmrg # are listed without --file. Let's play safe and only enable the eval 346b7fb5eacSmrg # if we detect the quoting. 347b7fb5eacSmrg case $CONFIG_FILES in 348b7fb5eacSmrg *\'*) eval set x "$CONFIG_FILES" ;; 349b7fb5eacSmrg *) set x $CONFIG_FILES ;; 350b7fb5eacSmrg esac 351b7fb5eacSmrg shift 352b7fb5eacSmrg for mf 353b7fb5eacSmrg do 354b7fb5eacSmrg # Strip MF so we end up with the name of the file. 355b7fb5eacSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 356b7fb5eacSmrg # Check whether this is an Automake generated Makefile or not. 357b7fb5eacSmrg # We used to match only the files named `Makefile.in', but 358b7fb5eacSmrg # some people rename them; so instead we look at the file content. 359b7fb5eacSmrg # Grep'ing the first line is not enough: some people post-process 360b7fb5eacSmrg # each Makefile.in and add a new line on top of each file to say so. 361b7fb5eacSmrg # Grep'ing the whole file is not good either: AIX grep has a line 362b7fb5eacSmrg # limit of 2048, but all sed's we know have understand at least 4000. 363b7fb5eacSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 364b7fb5eacSmrg dirpart=`AS_DIRNAME("$mf")` 365b7fb5eacSmrg else 366b7fb5eacSmrg continue 367b7fb5eacSmrg fi 368b7fb5eacSmrg # Extract the definition of DEPDIR, am__include, and am__quote 369b7fb5eacSmrg # from the Makefile without running `make'. 370b7fb5eacSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 371b7fb5eacSmrg test -z "$DEPDIR" && continue 372b7fb5eacSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 373b7fb5eacSmrg test -z "am__include" && continue 374b7fb5eacSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 375b7fb5eacSmrg # When using ansi2knr, U may be empty or an underscore; expand it 376b7fb5eacSmrg U=`sed -n 's/^U = //p' < "$mf"` 377b7fb5eacSmrg # Find all dependency output files, they are included files with 378b7fb5eacSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 379b7fb5eacSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 380b7fb5eacSmrg # expansion. 381b7fb5eacSmrg for file in `sed -n " 382b7fb5eacSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 383b7fb5eacSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 384b7fb5eacSmrg # Make sure the directory exists. 385b7fb5eacSmrg test -f "$dirpart/$file" && continue 386b7fb5eacSmrg fdir=`AS_DIRNAME(["$file"])` 387b7fb5eacSmrg AS_MKDIR_P([$dirpart/$fdir]) 388b7fb5eacSmrg # echo "creating $dirpart/$file" 389b7fb5eacSmrg echo '# dummy' > "$dirpart/$file" 390b7fb5eacSmrg done 3911a30de1fSmrg done 392b7fb5eacSmrg} 3931a30de1fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3941a30de1fSmrg 3951a30de1fSmrg 3961a30de1fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3971a30de1fSmrg# ----------------------------- 3981a30de1fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 3991a30de1fSmrg# 4001a30de1fSmrg# This code is only required when automatic dependency tracking 4011a30de1fSmrg# is enabled. FIXME. This creates each `.P' file that we will 4021a30de1fSmrg# need in order to bootstrap the dependency handling code. 4031a30de1fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4041a30de1fSmrg[AC_CONFIG_COMMANDS([depfiles], 4051a30de1fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4061a30de1fSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4071a30de1fSmrg]) 4081a30de1fSmrg 4091a30de1fSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 4101a30de1fSmrg# Free Software Foundation, Inc. 4111a30de1fSmrg# 4121a30de1fSmrg# This file is free software; the Free Software Foundation 4131a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 4141a30de1fSmrg# with or without modifications, as long as this notice is preserved. 4151a30de1fSmrg 4161a30de1fSmrg# serial 8 4171a30de1fSmrg 4181a30de1fSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 4191a30de1fSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 4201a30de1fSmrg 4211a30de1fSmrg# Do all the work for Automake. -*- Autoconf -*- 4221a30de1fSmrg 4231a30de1fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 424b7fb5eacSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 4251a30de1fSmrg# 4261a30de1fSmrg# This file is free software; the Free Software Foundation 4271a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 4281a30de1fSmrg# with or without modifications, as long as this notice is preserved. 4291a30de1fSmrg 430b7fb5eacSmrg# serial 16 4311a30de1fSmrg 4321a30de1fSmrg# This macro actually does too much. Some checks are only needed if 4331a30de1fSmrg# your package does certain things. But this isn't really a big deal. 4341a30de1fSmrg 4351a30de1fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4361a30de1fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4371a30de1fSmrg# ----------------------------------------------- 4381a30de1fSmrg# The call with PACKAGE and VERSION arguments is the old style 4391a30de1fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4401a30de1fSmrg# and VERSION should now be passed to AC_INIT and removed from 4411a30de1fSmrg# the call to AM_INIT_AUTOMAKE. 4421a30de1fSmrg# We support both call styles for the transition. After 4431a30de1fSmrg# the next Automake release, Autoconf can make the AC_INIT 4441a30de1fSmrg# arguments mandatory, and then we can depend on a new Autoconf 4451a30de1fSmrg# release and drop the old call support. 4461a30de1fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 447b7fb5eacSmrg[AC_PREREQ([2.62])dnl 4481a30de1fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4491a30de1fSmrgdnl the ones we care about. 4501a30de1fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4511a30de1fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4521a30de1fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4531a30de1fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4541a30de1fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4551a30de1fSmrg # is not polluted with repeated "-I." 4561a30de1fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4571a30de1fSmrg # test to see if srcdir already configured 4581a30de1fSmrg if test -f $srcdir/config.status; then 4591a30de1fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4601a30de1fSmrg fi 4611a30de1fSmrgfi 4621a30de1fSmrg 4631a30de1fSmrg# test whether we have cygpath 4641a30de1fSmrgif test -z "$CYGPATH_W"; then 4651a30de1fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4661a30de1fSmrg CYGPATH_W='cygpath -w' 4671a30de1fSmrg else 4681a30de1fSmrg CYGPATH_W=echo 4691a30de1fSmrg fi 4701a30de1fSmrgfi 4711a30de1fSmrgAC_SUBST([CYGPATH_W]) 4721a30de1fSmrg 4731a30de1fSmrg# Define the identity of the package. 4741a30de1fSmrgdnl Distinguish between old-style and new-style calls. 4751a30de1fSmrgm4_ifval([$2], 4761a30de1fSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4771a30de1fSmrg AC_SUBST([PACKAGE], [$1])dnl 4781a30de1fSmrg AC_SUBST([VERSION], [$2])], 4791a30de1fSmrg[_AM_SET_OPTIONS([$1])dnl 4801a30de1fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4811a30de1fSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4821a30de1fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4831a30de1fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4841a30de1fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4851a30de1fSmrg 4861a30de1fSmrg_AM_IF_OPTION([no-define],, 4871a30de1fSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4881a30de1fSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4891a30de1fSmrg 4901a30de1fSmrg# Some tools Automake needs. 4911a30de1fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4921a30de1fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4931a30de1fSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4941a30de1fSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4951a30de1fSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4961a30de1fSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4971a30de1fSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 498b7fb5eacSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 499b7fb5eacSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 5001a30de1fSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 5011a30de1fSmrg# We need awk for the "check" target. The system "awk" is bad on 5021a30de1fSmrg# some platforms. 5031a30de1fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5041a30de1fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5051a30de1fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5061a30de1fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 507b7fb5eacSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 508b7fb5eacSmrg [_AM_PROG_TAR([v7])])]) 5091a30de1fSmrg_AM_IF_OPTION([no-dependencies],, 5101a30de1fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 511b7fb5eacSmrg [_AM_DEPENDENCIES(CC)], 512b7fb5eacSmrg [define([AC_PROG_CC], 513b7fb5eacSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5141a30de1fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 515b7fb5eacSmrg [_AM_DEPENDENCIES(CXX)], 516b7fb5eacSmrg [define([AC_PROG_CXX], 517b7fb5eacSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5181a30de1fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 519b7fb5eacSmrg [_AM_DEPENDENCIES(OBJC)], 520b7fb5eacSmrg [define([AC_PROG_OBJC], 521b7fb5eacSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5221a30de1fSmrg]) 523b7fb5eacSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 524b7fb5eacSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 525b7fb5eacSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 526b7fb5eacSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 527b7fb5eacSmrgAC_CONFIG_COMMANDS_PRE(dnl 528b7fb5eacSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 529b7fb5eacSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5301a30de1fSmrg]) 5311a30de1fSmrg 532b7fb5eacSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 533b7fb5eacSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 534b7fb5eacSmrgdnl mangled by Autoconf and run in a shell conditional statement. 535b7fb5eacSmrgm4_define([_AC_COMPILER_EXEEXT], 536b7fb5eacSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 537b7fb5eacSmrg 5381a30de1fSmrg 5391a30de1fSmrg# When config.status generates a header, we must update the stamp-h file. 5401a30de1fSmrg# This file resides in the same directory as the config header 5411a30de1fSmrg# that is generated. The stamp files are numbered to have different names. 5421a30de1fSmrg 5431a30de1fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5441a30de1fSmrg# loop where config.status creates the headers, so we can generate 5451a30de1fSmrg# our stamp files there. 5461a30de1fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5471a30de1fSmrg[# Compute $1's index in $config_headers. 548b7fb5eacSmrg_am_arg=$1 5491a30de1fSmrg_am_stamp_count=1 5501a30de1fSmrgfor _am_header in $config_headers :; do 5511a30de1fSmrg case $_am_header in 552b7fb5eacSmrg $_am_arg | $_am_arg:* ) 5531a30de1fSmrg break ;; 5541a30de1fSmrg * ) 5551a30de1fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5561a30de1fSmrg esac 5571a30de1fSmrgdone 558b7fb5eacSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5591a30de1fSmrg 560b7fb5eacSmrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 5611a30de1fSmrg# 5621a30de1fSmrg# This file is free software; the Free Software Foundation 5631a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 5641a30de1fSmrg# with or without modifications, as long as this notice is preserved. 5651a30de1fSmrg 5661a30de1fSmrg# AM_PROG_INSTALL_SH 5671a30de1fSmrg# ------------------ 5681a30de1fSmrg# Define $install_sh. 5691a30de1fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5701a30de1fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 571b7fb5eacSmrgif test x"${install_sh}" != xset; then 572b7fb5eacSmrg case $am_aux_dir in 573b7fb5eacSmrg *\ * | *\ *) 574b7fb5eacSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 575b7fb5eacSmrg *) 576b7fb5eacSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 577b7fb5eacSmrg esac 578b7fb5eacSmrgfi 5791a30de1fSmrgAC_SUBST(install_sh)]) 5801a30de1fSmrg 5811a30de1fSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5821a30de1fSmrg# 5831a30de1fSmrg# This file is free software; the Free Software Foundation 5841a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 5851a30de1fSmrg# with or without modifications, as long as this notice is preserved. 5861a30de1fSmrg 5871a30de1fSmrg# serial 2 5881a30de1fSmrg 5891a30de1fSmrg# Check whether the underlying file-system supports filenames 5901a30de1fSmrg# with a leading dot. For instance MS-DOS doesn't. 5911a30de1fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 5921a30de1fSmrg[rm -rf .tst 2>/dev/null 5931a30de1fSmrgmkdir .tst 2>/dev/null 5941a30de1fSmrgif test -d .tst; then 5951a30de1fSmrg am__leading_dot=. 5961a30de1fSmrgelse 5971a30de1fSmrg am__leading_dot=_ 5981a30de1fSmrgfi 5991a30de1fSmrgrmdir .tst 2>/dev/null 6001a30de1fSmrgAC_SUBST([am__leading_dot])]) 6011a30de1fSmrg 6021a30de1fSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6031a30de1fSmrg# From Jim Meyering 6041a30de1fSmrg 605b7fb5eacSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 6061a30de1fSmrg# Free Software Foundation, Inc. 6071a30de1fSmrg# 6081a30de1fSmrg# This file is free software; the Free Software Foundation 6091a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 6101a30de1fSmrg# with or without modifications, as long as this notice is preserved. 6111a30de1fSmrg 612b7fb5eacSmrg# serial 5 6131a30de1fSmrg 614b7fb5eacSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 615b7fb5eacSmrg# ---------------------------------- 616b7fb5eacSmrg# Control maintainer-specific portions of Makefiles. 617b7fb5eacSmrg# Default is to disable them, unless `enable' is passed literally. 618b7fb5eacSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 619b7fb5eacSmrg# can override the default with the --enable/--disable switch. 6201a30de1fSmrgAC_DEFUN([AM_MAINTAINER_MODE], 621b7fb5eacSmrg[m4_case(m4_default([$1], [disable]), 622b7fb5eacSmrg [enable], [m4_define([am_maintainer_other], [disable])], 623b7fb5eacSmrg [disable], [m4_define([am_maintainer_other], [enable])], 624b7fb5eacSmrg [m4_define([am_maintainer_other], [enable]) 625b7fb5eacSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 626b7fb5eacSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 627b7fb5eacSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 628b7fb5eacSmrg AC_ARG_ENABLE([maintainer-mode], 629b7fb5eacSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 6301a30de1fSmrg (and sometimes confusing) to the casual installer], 631b7fb5eacSmrg [USE_MAINTAINER_MODE=$enableval], 632b7fb5eacSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 6331a30de1fSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 634b7fb5eacSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 6351a30de1fSmrg MAINT=$MAINTAINER_MODE_TRUE 636b7fb5eacSmrg AC_SUBST([MAINT])dnl 6371a30de1fSmrg] 6381a30de1fSmrg) 6391a30de1fSmrg 6401a30de1fSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6411a30de1fSmrg 6421a30de1fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6431a30de1fSmrg 644b7fb5eacSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 6451a30de1fSmrg# 6461a30de1fSmrg# This file is free software; the Free Software Foundation 6471a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 6481a30de1fSmrg# with or without modifications, as long as this notice is preserved. 6491a30de1fSmrg 650b7fb5eacSmrg# serial 4 6511a30de1fSmrg 6521a30de1fSmrg# AM_MAKE_INCLUDE() 6531a30de1fSmrg# ----------------- 6541a30de1fSmrg# Check to see how make treats includes. 6551a30de1fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6561a30de1fSmrg[am_make=${MAKE-make} 6571a30de1fSmrgcat > confinc << 'END' 6581a30de1fSmrgam__doit: 659b7fb5eacSmrg @echo this is the am__doit target 6601a30de1fSmrg.PHONY: am__doit 6611a30de1fSmrgEND 6621a30de1fSmrg# If we don't find an include directive, just comment out the code. 6631a30de1fSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6641a30de1fSmrgam__include="#" 6651a30de1fSmrgam__quote= 6661a30de1fSmrg_am_result=none 6671a30de1fSmrg# First try GNU make style include. 6681a30de1fSmrgecho "include confinc" > confmf 669b7fb5eacSmrg# Ignore all kinds of additional output from `make'. 670b7fb5eacSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 671b7fb5eacSmrg*the\ am__doit\ target*) 672b7fb5eacSmrg am__include=include 673b7fb5eacSmrg am__quote= 674b7fb5eacSmrg _am_result=GNU 675b7fb5eacSmrg ;; 676b7fb5eacSmrgesac 6771a30de1fSmrg# Now try BSD make style include. 6781a30de1fSmrgif test "$am__include" = "#"; then 6791a30de1fSmrg echo '.include "confinc"' > confmf 680b7fb5eacSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 681b7fb5eacSmrg *the\ am__doit\ target*) 682b7fb5eacSmrg am__include=.include 683b7fb5eacSmrg am__quote="\"" 684b7fb5eacSmrg _am_result=BSD 685b7fb5eacSmrg ;; 686b7fb5eacSmrg esac 6871a30de1fSmrgfi 6881a30de1fSmrgAC_SUBST([am__include]) 6891a30de1fSmrgAC_SUBST([am__quote]) 6901a30de1fSmrgAC_MSG_RESULT([$_am_result]) 6911a30de1fSmrgrm -f confinc confmf 6921a30de1fSmrg]) 6931a30de1fSmrg 6941a30de1fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6951a30de1fSmrg 696b7fb5eacSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 6971a30de1fSmrg# Free Software Foundation, Inc. 6981a30de1fSmrg# 6991a30de1fSmrg# This file is free software; the Free Software Foundation 7001a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 7011a30de1fSmrg# with or without modifications, as long as this notice is preserved. 7021a30de1fSmrg 703b7fb5eacSmrg# serial 6 7041a30de1fSmrg 7051a30de1fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7061a30de1fSmrg# ------------------------------ 7071a30de1fSmrgAC_DEFUN([AM_MISSING_PROG], 7081a30de1fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7091a30de1fSmrg$1=${$1-"${am_missing_run}$2"} 7101a30de1fSmrgAC_SUBST($1)]) 7111a30de1fSmrg 7121a30de1fSmrg 7131a30de1fSmrg# AM_MISSING_HAS_RUN 7141a30de1fSmrg# ------------------ 7151a30de1fSmrg# Define MISSING if not defined so far and test if it supports --run. 7161a30de1fSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7171a30de1fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7181a30de1fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7191a30de1fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 720b7fb5eacSmrgif test x"${MISSING+set}" != xset; then 721b7fb5eacSmrg case $am_aux_dir in 722b7fb5eacSmrg *\ * | *\ *) 723b7fb5eacSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 724b7fb5eacSmrg *) 725b7fb5eacSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 726b7fb5eacSmrg esac 727b7fb5eacSmrgfi 7281a30de1fSmrg# Use eval to expand $SHELL 7291a30de1fSmrgif eval "$MISSING --run true"; then 7301a30de1fSmrg am_missing_run="$MISSING --run " 7311a30de1fSmrgelse 7321a30de1fSmrg am_missing_run= 7331a30de1fSmrg AC_MSG_WARN([`missing' script is too old or missing]) 7341a30de1fSmrgfi 7351a30de1fSmrg]) 7361a30de1fSmrg 7371a30de1fSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7381a30de1fSmrg# 7391a30de1fSmrg# This file is free software; the Free Software Foundation 7401a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 7411a30de1fSmrg# with or without modifications, as long as this notice is preserved. 7421a30de1fSmrg 7431a30de1fSmrg# AM_PROG_MKDIR_P 7441a30de1fSmrg# --------------- 7451a30de1fSmrg# Check for `mkdir -p'. 7461a30de1fSmrgAC_DEFUN([AM_PROG_MKDIR_P], 7471a30de1fSmrg[AC_PREREQ([2.60])dnl 7481a30de1fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7491a30de1fSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7501a30de1fSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 7511a30de1fSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7521a30de1fSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7531a30de1fSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7541a30de1fSmrgdnl adjustment using top_builddir (which is defined more often than 7551a30de1fSmrgdnl MKDIR_P). 7561a30de1fSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7571a30de1fSmrgcase $mkdir_p in 7581a30de1fSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 7591a30de1fSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7601a30de1fSmrgesac 7611a30de1fSmrg]) 7621a30de1fSmrg 7631a30de1fSmrg# Helper functions for option handling. -*- Autoconf -*- 7641a30de1fSmrg 765b7fb5eacSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 7661a30de1fSmrg# 7671a30de1fSmrg# This file is free software; the Free Software Foundation 7681a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 7691a30de1fSmrg# with or without modifications, as long as this notice is preserved. 7701a30de1fSmrg 771b7fb5eacSmrg# serial 4 7721a30de1fSmrg 7731a30de1fSmrg# _AM_MANGLE_OPTION(NAME) 7741a30de1fSmrg# ----------------------- 7751a30de1fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7761a30de1fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7771a30de1fSmrg 7781a30de1fSmrg# _AM_SET_OPTION(NAME) 7791a30de1fSmrg# ------------------------------ 7801a30de1fSmrg# Set option NAME. Presently that only means defining a flag for this option. 7811a30de1fSmrgAC_DEFUN([_AM_SET_OPTION], 7821a30de1fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7831a30de1fSmrg 7841a30de1fSmrg# _AM_SET_OPTIONS(OPTIONS) 7851a30de1fSmrg# ---------------------------------- 7861a30de1fSmrg# OPTIONS is a space-separated list of Automake options. 7871a30de1fSmrgAC_DEFUN([_AM_SET_OPTIONS], 788b7fb5eacSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7891a30de1fSmrg 7901a30de1fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7911a30de1fSmrg# ------------------------------------------- 7921a30de1fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7931a30de1fSmrgAC_DEFUN([_AM_IF_OPTION], 7941a30de1fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7951a30de1fSmrg 7961a30de1fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7971a30de1fSmrg 798b7fb5eacSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 7991a30de1fSmrg# Free Software Foundation, Inc. 8001a30de1fSmrg# 8011a30de1fSmrg# This file is free software; the Free Software Foundation 8021a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 8031a30de1fSmrg# with or without modifications, as long as this notice is preserved. 8041a30de1fSmrg 805b7fb5eacSmrg# serial 5 8061a30de1fSmrg 8071a30de1fSmrg# AM_SANITY_CHECK 8081a30de1fSmrg# --------------- 8091a30de1fSmrgAC_DEFUN([AM_SANITY_CHECK], 8101a30de1fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8111a30de1fSmrg# Just in case 8121a30de1fSmrgsleep 1 8131a30de1fSmrgecho timestamp > conftest.file 814b7fb5eacSmrg# Reject unsafe characters in $srcdir or the absolute working directory 815b7fb5eacSmrg# name. Accept space and tab only in the latter. 816b7fb5eacSmrgam_lf=' 817b7fb5eacSmrg' 818b7fb5eacSmrgcase `pwd` in 819b7fb5eacSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 820b7fb5eacSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 821b7fb5eacSmrgesac 822b7fb5eacSmrgcase $srcdir in 823b7fb5eacSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 824b7fb5eacSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 825b7fb5eacSmrgesac 826b7fb5eacSmrg 8271a30de1fSmrg# Do `set' in a subshell so we don't clobber the current shell's 8281a30de1fSmrg# arguments. Must try -L first in case configure is actually a 8291a30de1fSmrg# symlink; some systems play weird games with the mod time of symlinks 8301a30de1fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8311a30de1fSmrg# directory). 8321a30de1fSmrgif ( 833b7fb5eacSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8341a30de1fSmrg if test "$[*]" = "X"; then 8351a30de1fSmrg # -L didn't work. 836b7fb5eacSmrg set X `ls -t "$srcdir/configure" conftest.file` 8371a30de1fSmrg fi 8381a30de1fSmrg rm -f conftest.file 8391a30de1fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8401a30de1fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8411a30de1fSmrg 8421a30de1fSmrg # If neither matched, then we have a broken ls. This can happen 8431a30de1fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8441a30de1fSmrg # broken ls alias from the environment. This has actually 8451a30de1fSmrg # happened. Such a system could not be considered "sane". 8461a30de1fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8471a30de1fSmrgalias in your environment]) 8481a30de1fSmrg fi 8491a30de1fSmrg 8501a30de1fSmrg test "$[2]" = conftest.file 8511a30de1fSmrg ) 8521a30de1fSmrgthen 8531a30de1fSmrg # Ok. 8541a30de1fSmrg : 8551a30de1fSmrgelse 8561a30de1fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8571a30de1fSmrgCheck your system clock]) 8581a30de1fSmrgfi 8591a30de1fSmrgAC_MSG_RESULT(yes)]) 8601a30de1fSmrg 861b7fb5eacSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 862b7fb5eacSmrg# 863b7fb5eacSmrg# This file is free software; the Free Software Foundation 864b7fb5eacSmrg# gives unlimited permission to copy and/or distribute it, 865b7fb5eacSmrg# with or without modifications, as long as this notice is preserved. 866b7fb5eacSmrg 867b7fb5eacSmrg# serial 1 868b7fb5eacSmrg 869b7fb5eacSmrg# AM_SILENT_RULES([DEFAULT]) 870b7fb5eacSmrg# -------------------------- 871b7fb5eacSmrg# Enable less verbose build rules; with the default set to DEFAULT 872b7fb5eacSmrg# (`yes' being less verbose, `no' or empty being verbose). 873b7fb5eacSmrgAC_DEFUN([AM_SILENT_RULES], 874b7fb5eacSmrg[AC_ARG_ENABLE([silent-rules], 875b7fb5eacSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 876b7fb5eacSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 877b7fb5eacSmrgcase $enable_silent_rules in 878b7fb5eacSmrgyes) AM_DEFAULT_VERBOSITY=0;; 879b7fb5eacSmrgno) AM_DEFAULT_VERBOSITY=1;; 880b7fb5eacSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 881b7fb5eacSmrgesac 882b7fb5eacSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 883b7fb5eacSmrgAM_BACKSLASH='\' 884b7fb5eacSmrgAC_SUBST([AM_BACKSLASH])dnl 885b7fb5eacSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 886b7fb5eacSmrg]) 887b7fb5eacSmrg 8881a30de1fSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8891a30de1fSmrg# 8901a30de1fSmrg# This file is free software; the Free Software Foundation 8911a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 8921a30de1fSmrg# with or without modifications, as long as this notice is preserved. 8931a30de1fSmrg 8941a30de1fSmrg# AM_PROG_INSTALL_STRIP 8951a30de1fSmrg# --------------------- 8961a30de1fSmrg# One issue with vendor `install' (even GNU) is that you can't 8971a30de1fSmrg# specify the program used to strip binaries. This is especially 8981a30de1fSmrg# annoying in cross-compiling environments, where the build's strip 8991a30de1fSmrg# is unlikely to handle the host's binaries. 9001a30de1fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9011a30de1fSmrg# always use install-sh in `make install-strip', and initialize 9021a30de1fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9031a30de1fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9041a30de1fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9051a30de1fSmrg# Installed binaries are usually stripped using `strip' when the user 9061a30de1fSmrg# run `make install-strip'. However `strip' might not be the right 9071a30de1fSmrg# tool to use in cross-compilation environments, therefore Automake 9081a30de1fSmrg# will honor the `STRIP' environment variable to overrule this program. 9091a30de1fSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9101a30de1fSmrgif test "$cross_compiling" != no; then 9111a30de1fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9121a30de1fSmrgfi 9131a30de1fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9141a30de1fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9151a30de1fSmrg 916b7fb5eacSmrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9171a30de1fSmrg# 9181a30de1fSmrg# This file is free software; the Free Software Foundation 9191a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 9201a30de1fSmrg# with or without modifications, as long as this notice is preserved. 9211a30de1fSmrg 922b7fb5eacSmrg# serial 2 923b7fb5eacSmrg 9241a30de1fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9251a30de1fSmrg# --------------------------- 926b7fb5eacSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9271a30de1fSmrg# This macro is traced by Automake. 9281a30de1fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9291a30de1fSmrg 930b7fb5eacSmrg# AM_SUBST_NOTMAKE(VARIABLE) 931b7fb5eacSmrg# --------------------------- 932b7fb5eacSmrg# Public sister of _AM_SUBST_NOTMAKE. 933b7fb5eacSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 934b7fb5eacSmrg 9351a30de1fSmrg# Check how to create a tarball. -*- Autoconf -*- 9361a30de1fSmrg 9371a30de1fSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9381a30de1fSmrg# 9391a30de1fSmrg# This file is free software; the Free Software Foundation 9401a30de1fSmrg# gives unlimited permission to copy and/or distribute it, 9411a30de1fSmrg# with or without modifications, as long as this notice is preserved. 9421a30de1fSmrg 9431a30de1fSmrg# serial 2 9441a30de1fSmrg 9451a30de1fSmrg# _AM_PROG_TAR(FORMAT) 9461a30de1fSmrg# -------------------- 9471a30de1fSmrg# Check how to create a tarball in format FORMAT. 9481a30de1fSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9491a30de1fSmrg# 9501a30de1fSmrg# Substitute a variable $(am__tar) that is a command 9511a30de1fSmrg# writing to stdout a FORMAT-tarball containing the directory 9521a30de1fSmrg# $tardir. 9531a30de1fSmrg# tardir=directory && $(am__tar) > result.tar 9541a30de1fSmrg# 9551a30de1fSmrg# Substitute a variable $(am__untar) that extract such 9561a30de1fSmrg# a tarball read from stdin. 9571a30de1fSmrg# $(am__untar) < result.tar 9581a30de1fSmrgAC_DEFUN([_AM_PROG_TAR], 9591a30de1fSmrg[# Always define AMTAR for backward compatibility. 9601a30de1fSmrgAM_MISSING_PROG([AMTAR], [tar]) 9611a30de1fSmrgm4_if([$1], [v7], 9621a30de1fSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9631a30de1fSmrg [m4_case([$1], [ustar],, [pax],, 9641a30de1fSmrg [m4_fatal([Unknown tar format])]) 9651a30de1fSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9661a30de1fSmrg# Loop over all known methods to create a tar archive until one works. 9671a30de1fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9681a30de1fSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9691a30de1fSmrg# Do not fold the above two line into one, because Tru64 sh and 9701a30de1fSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9711a30de1fSmrgfor _am_tool in $_am_tools 9721a30de1fSmrgdo 9731a30de1fSmrg case $_am_tool in 9741a30de1fSmrg gnutar) 9751a30de1fSmrg for _am_tar in tar gnutar gtar; 9761a30de1fSmrg do 9771a30de1fSmrg AM_RUN_LOG([$_am_tar --version]) && break 9781a30de1fSmrg done 9791a30de1fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9801a30de1fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9811a30de1fSmrg am__untar="$_am_tar -xf -" 9821a30de1fSmrg ;; 9831a30de1fSmrg plaintar) 9841a30de1fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9851a30de1fSmrg # ustar tarball either. 9861a30de1fSmrg (tar --version) >/dev/null 2>&1 && continue 9871a30de1fSmrg am__tar='tar chf - "$$tardir"' 9881a30de1fSmrg am__tar_='tar chf - "$tardir"' 9891a30de1fSmrg am__untar='tar xf -' 9901a30de1fSmrg ;; 9911a30de1fSmrg pax) 9921a30de1fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9931a30de1fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9941a30de1fSmrg am__untar='pax -r' 9951a30de1fSmrg ;; 9961a30de1fSmrg cpio) 9971a30de1fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9981a30de1fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9991a30de1fSmrg am__untar='cpio -i -H $1 -d' 10001a30de1fSmrg ;; 10011a30de1fSmrg none) 10021a30de1fSmrg am__tar=false 10031a30de1fSmrg am__tar_=false 10041a30de1fSmrg am__untar=false 10051a30de1fSmrg ;; 10061a30de1fSmrg esac 10071a30de1fSmrg 10081a30de1fSmrg # If the value was cached, stop now. We just wanted to have am__tar 10091a30de1fSmrg # and am__untar set. 10101a30de1fSmrg test -n "${am_cv_prog_tar_$1}" && break 10111a30de1fSmrg 10121a30de1fSmrg # tar/untar a dummy directory, and stop if the command works 10131a30de1fSmrg rm -rf conftest.dir 10141a30de1fSmrg mkdir conftest.dir 10151a30de1fSmrg echo GrepMe > conftest.dir/file 10161a30de1fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10171a30de1fSmrg rm -rf conftest.dir 10181a30de1fSmrg if test -s conftest.tar; then 10191a30de1fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10201a30de1fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10211a30de1fSmrg fi 10221a30de1fSmrgdone 10231a30de1fSmrgrm -rf conftest.dir 10241a30de1fSmrg 10251a30de1fSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10261a30de1fSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10271a30de1fSmrgAC_SUBST([am__tar]) 10281a30de1fSmrgAC_SUBST([am__untar]) 10291a30de1fSmrg]) # _AM_PROG_TAR 10301a30de1fSmrg 1031b7fb5eacSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 10321a30de1fSmrgdnl 1033ce62200cSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 10341a30de1fSmrgdnl 10351a30de1fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036ce62200cSmrgdnl copy of this software and associated documentation files (the "Software"), 1037ce62200cSmrgdnl to deal in the Software without restriction, including without limitation 1038ce62200cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039ce62200cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040ce62200cSmrgdnl Software is furnished to do so, subject to the following conditions: 10411a30de1fSmrgdnl 1042ce62200cSmrgdnl The above copyright notice and this permission notice (including the next 1043ce62200cSmrgdnl paragraph) shall be included in all copies or substantial portions of the 1044ce62200cSmrgdnl Software. 10451a30de1fSmrgdnl 1046ce62200cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047ce62200cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048ce62200cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049ce62200cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050ce62200cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051ce62200cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052ce62200cSmrgdnl DEALINGS IN THE SOFTWARE. 10531a30de1fSmrg 10541a30de1fSmrg# XORG_MACROS_VERSION(required-version) 10551a30de1fSmrg# ------------------------------------- 10561a30de1fSmrg# Minimum version: 1.1.0 10571a30de1fSmrg# 10581a30de1fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 10591a30de1fSmrg# your configure.ac with the minimum required version, such as: 10601a30de1fSmrg# XORG_MACROS_VERSION(1.1) 10611a30de1fSmrg# 1062b7fb5eacSmrg# To ensure that this macro is defined, also add: 1063b7fb5eacSmrg# m4_ifndef([XORG_MACROS_VERSION], 1064b7fb5eacSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10651a30de1fSmrg# 10661a30de1fSmrg# 10671a30de1fSmrg# See the "minimum version" comment for each macro you use to see what 10681a30de1fSmrg# version you require. 1069b7fb5eacSmrgm4_defun([XORG_MACROS_VERSION],[ 1070ce62200cSmrgm4_define([vers_have], [1.10.1]) 1071b7fb5eacSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1072b7fb5eacSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1073b7fb5eacSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1074b7fb5eacSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1075b7fb5eacSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1076b7fb5eacSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1077b7fb5eacSmrgm4_undefine([vers_have]) 1078b7fb5eacSmrgm4_undefine([maj_have]) 1079b7fb5eacSmrgm4_undefine([maj_needed]) 10801a30de1fSmrg]) # XORG_MACROS_VERSION 10811a30de1fSmrg 10821a30de1fSmrg# XORG_PROG_RAWCPP() 10831a30de1fSmrg# ------------------ 10841a30de1fSmrg# Minimum version: 1.0.0 10851a30de1fSmrg# 10861a30de1fSmrg# Find cpp program and necessary flags for use in pre-processing text files 10871a30de1fSmrg# such as man pages and config files 10881a30de1fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10891a30de1fSmrgAC_REQUIRE([AC_PROG_CPP]) 10901a30de1fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10911a30de1fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10921a30de1fSmrg 10931a30de1fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 10941a30de1fSmrg# which is not the best choice for supporting other OS'es, but covers most 10951a30de1fSmrg# of the ones we need for now. 10961a30de1fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 10971a30de1fSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 10981a30de1fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10991a30de1fSmrg AC_MSG_RESULT([no]) 11001a30de1fSmrgelse 11011a30de1fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11021a30de1fSmrg RAWCPPFLAGS=-undef 11031a30de1fSmrg AC_MSG_RESULT([yes]) 1104b7fb5eacSmrg # under Cygwin unix is still defined even with -undef 1105b7fb5eacSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1106b7fb5eacSmrg RAWCPPFLAGS="-undef -ansi" 1107b7fb5eacSmrg AC_MSG_RESULT([yes, with -ansi]) 11081a30de1fSmrg else 11091a30de1fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11101a30de1fSmrg fi 11111a30de1fSmrgfi 11121a30de1fSmrgrm -f conftest.$ac_ext 11131a30de1fSmrg 11141a30de1fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11151a30de1fSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11161a30de1fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11171a30de1fSmrg AC_MSG_RESULT([no]) 11181a30de1fSmrgelse 11191a30de1fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11201a30de1fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11211a30de1fSmrg AC_MSG_RESULT([yes]) 11221a30de1fSmrg else 11231a30de1fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11241a30de1fSmrg fi 11251a30de1fSmrgfi 11261a30de1fSmrgrm -f conftest.$ac_ext 11271a30de1fSmrgAC_SUBST(RAWCPPFLAGS) 11281a30de1fSmrg]) # XORG_PROG_RAWCPP 11291a30de1fSmrg 11301a30de1fSmrg# XORG_MANPAGE_SECTIONS() 11311a30de1fSmrg# ----------------------- 11321a30de1fSmrg# Minimum version: 1.0.0 11331a30de1fSmrg# 11341a30de1fSmrg# Determine which sections man pages go in for the different man page types 11351a30de1fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11361a30de1fSmrg# Not sure if there's any better way than just hardcoding by OS name. 11371a30de1fSmrg# Override default settings by setting environment variables 1138ce62200cSmrg# Added MAN_SUBSTS in version 1.8 1139ce62200cSmrg# Added AC_PROG_SED in version 1.8 11401a30de1fSmrg 11411a30de1fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11421a30de1fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1143ce62200cSmrgAC_REQUIRE([AC_PROG_SED]) 11441a30de1fSmrg 11451a30de1fSmrgif test x$APP_MAN_SUFFIX = x ; then 11461a30de1fSmrg APP_MAN_SUFFIX=1 11471a30de1fSmrgfi 11481a30de1fSmrgif test x$APP_MAN_DIR = x ; then 11491a30de1fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 11501a30de1fSmrgfi 11511a30de1fSmrg 11521a30de1fSmrgif test x$LIB_MAN_SUFFIX = x ; then 11531a30de1fSmrg LIB_MAN_SUFFIX=3 11541a30de1fSmrgfi 11551a30de1fSmrgif test x$LIB_MAN_DIR = x ; then 11561a30de1fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 11571a30de1fSmrgfi 11581a30de1fSmrg 11591a30de1fSmrgif test x$FILE_MAN_SUFFIX = x ; then 11601a30de1fSmrg case $host_os in 11611a30de1fSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 11621a30de1fSmrg *) FILE_MAN_SUFFIX=5 ;; 11631a30de1fSmrg esac 11641a30de1fSmrgfi 11651a30de1fSmrgif test x$FILE_MAN_DIR = x ; then 11661a30de1fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 11671a30de1fSmrgfi 11681a30de1fSmrg 11691a30de1fSmrgif test x$MISC_MAN_SUFFIX = x ; then 11701a30de1fSmrg case $host_os in 11711a30de1fSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 11721a30de1fSmrg *) MISC_MAN_SUFFIX=7 ;; 11731a30de1fSmrg esac 11741a30de1fSmrgfi 11751a30de1fSmrgif test x$MISC_MAN_DIR = x ; then 11761a30de1fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 11771a30de1fSmrgfi 11781a30de1fSmrg 11791a30de1fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 11801a30de1fSmrg case $host_os in 11811a30de1fSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 11821a30de1fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 11831a30de1fSmrg esac 11841a30de1fSmrgfi 11851a30de1fSmrgif test x$DRIVER_MAN_DIR = x ; then 11861a30de1fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 11871a30de1fSmrgfi 11881a30de1fSmrg 11891a30de1fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 11901a30de1fSmrg case $host_os in 11911a30de1fSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 11921a30de1fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 11931a30de1fSmrg esac 11941a30de1fSmrgfi 11951a30de1fSmrgif test x$ADMIN_MAN_DIR = x ; then 11961a30de1fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 11971a30de1fSmrgfi 11981a30de1fSmrg 11991a30de1fSmrg 12001a30de1fSmrgAC_SUBST([APP_MAN_SUFFIX]) 12011a30de1fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 12021a30de1fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 12031a30de1fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 12041a30de1fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12051a30de1fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12061a30de1fSmrgAC_SUBST([APP_MAN_DIR]) 12071a30de1fSmrgAC_SUBST([LIB_MAN_DIR]) 12081a30de1fSmrgAC_SUBST([FILE_MAN_DIR]) 12091a30de1fSmrgAC_SUBST([MISC_MAN_DIR]) 12101a30de1fSmrgAC_SUBST([DRIVER_MAN_DIR]) 12111a30de1fSmrgAC_SUBST([ADMIN_MAN_DIR]) 1212ce62200cSmrg 1213ce62200cSmrgXORG_MAN_PAGE="X Version 11" 1214ce62200cSmrgAC_SUBST([XORG_MAN_PAGE]) 1215ce62200cSmrgMAN_SUBSTS="\ 1216ce62200cSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1217ce62200cSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1218ce62200cSmrg -e 's|__xservername__|Xorg|g' \ 1219ce62200cSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 1220ce62200cSmrg -e 's|__projectroot__|\$(prefix)|g' \ 1221ce62200cSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1222ce62200cSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1223ce62200cSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1224ce62200cSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1225ce62200cSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1226ce62200cSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1227ce62200cSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1228ce62200cSmrgAC_SUBST([MAN_SUBSTS]) 1229ce62200cSmrg 12301a30de1fSmrg]) # XORG_MANPAGE_SECTIONS 12311a30de1fSmrg 1232ce62200cSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1233ce62200cSmrg# ------------------------ 1234ce62200cSmrg# Minimum version: 1.7.0 1235ce62200cSmrg# 1236ce62200cSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1237ce62200cSmrg# provided by xorg-sgml-doctools, if installed. 1238ce62200cSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1239ce62200cSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1240ce62200cSmrgXORG_SGML_PATH= 1241ce62200cSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1242ce62200cSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1243ce62200cSmrg [m4_ifval([$1],[:], 1244ce62200cSmrg [if test x"$cross_compiling" != x"yes" ; then 1245ce62200cSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1246ce62200cSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 1247ce62200cSmrg fi]) 1248ce62200cSmrg ]) 1249ce62200cSmrg 1250ce62200cSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1251ce62200cSmrg# the path and the name of the doc stylesheet 1252ce62200cSmrgif test "x$XORG_SGML_PATH" != "x" ; then 1253ce62200cSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1254ce62200cSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1255ce62200cSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1256ce62200cSmrgelse 1257ce62200cSmrg AC_MSG_RESULT([no]) 1258ce62200cSmrgfi 1259ce62200cSmrg 1260ce62200cSmrgAC_SUBST(XORG_SGML_PATH) 1261ce62200cSmrgAC_SUBST(STYLESHEET_SRCDIR) 1262ce62200cSmrgAC_SUBST(XSL_STYLESHEET) 1263ce62200cSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1264ce62200cSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1265ce62200cSmrg 12661a30de1fSmrg# XORG_CHECK_LINUXDOC 12671a30de1fSmrg# ------------------- 12681a30de1fSmrg# Minimum version: 1.0.0 12691a30de1fSmrg# 12701a30de1fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 12711a30de1fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12721a30de1fSmrg# Whether or not the necessary tools and files are found can be checked 12731a30de1fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12741a30de1fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1275ce62200cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1276ce62200cSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 12771a30de1fSmrg 12781a30de1fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12791a30de1fSmrg 1280ce62200cSmrgAC_MSG_CHECKING([whether to build documentation]) 12811a30de1fSmrg 1282ce62200cSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 12831a30de1fSmrg BUILDDOC=yes 12841a30de1fSmrgelse 12851a30de1fSmrg BUILDDOC=no 12861a30de1fSmrgfi 12871a30de1fSmrg 12881a30de1fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12891a30de1fSmrg 12901a30de1fSmrgAC_MSG_RESULT([$BUILDDOC]) 12911a30de1fSmrg 1292ce62200cSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 12931a30de1fSmrg 1294ce62200cSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 12951a30de1fSmrg BUILDPDFDOC=yes 12961a30de1fSmrgelse 12971a30de1fSmrg BUILDPDFDOC=no 12981a30de1fSmrgfi 12991a30de1fSmrg 13001a30de1fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13011a30de1fSmrg 13021a30de1fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13031a30de1fSmrg 1304ce62200cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 13051a30de1fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 13061a30de1fSmrgMAKE_PDF="$PS2PDF" 13071a30de1fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 13081a30de1fSmrg 13091a30de1fSmrgAC_SUBST(MAKE_TEXT) 13101a30de1fSmrgAC_SUBST(MAKE_PS) 13111a30de1fSmrgAC_SUBST(MAKE_PDF) 13121a30de1fSmrgAC_SUBST(MAKE_HTML) 13131a30de1fSmrg]) # XORG_CHECK_LINUXDOC 13141a30de1fSmrg 13151a30de1fSmrg# XORG_CHECK_DOCBOOK 13161a30de1fSmrg# ------------------- 13171a30de1fSmrg# Minimum version: 1.0.0 13181a30de1fSmrg# 13191a30de1fSmrg# Checks for the ability to build output formats from SGML DocBook source. 13201a30de1fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 13211a30de1fSmrg# indicates whether the necessary tools and files are found and, if set, 13221a30de1fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 13231a30de1fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1324ce62200cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1325ce62200cSmrg 13261a30de1fSmrgBUILDTXTDOC=no 13271a30de1fSmrgBUILDPDFDOC=no 13281a30de1fSmrgBUILDPSDOC=no 13291a30de1fSmrgBUILDHTMLDOC=no 13301a30de1fSmrg 13311a30de1fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 13321a30de1fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 13331a30de1fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 13341a30de1fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 13351a30de1fSmrg 1336ce62200cSmrgAC_MSG_CHECKING([whether to build text documentation]) 1337ce62200cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 13381a30de1fSmrg test x$BUILD_TXTDOC != xno; then 13391a30de1fSmrg BUILDTXTDOC=yes 13401a30de1fSmrgfi 13411a30de1fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13421a30de1fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13431a30de1fSmrg 1344ce62200cSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1345ce62200cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 13461a30de1fSmrg test x$BUILD_PDFDOC != xno; then 13471a30de1fSmrg BUILDPDFDOC=yes 13481a30de1fSmrgfi 13491a30de1fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13501a30de1fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13511a30de1fSmrg 1352ce62200cSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1353ce62200cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 13541a30de1fSmrg test x$BUILD_PSDOC != xno; then 13551a30de1fSmrg BUILDPSDOC=yes 13561a30de1fSmrgfi 13571a30de1fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13581a30de1fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 13591a30de1fSmrg 1360ce62200cSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1361ce62200cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 13621a30de1fSmrg test x$BUILD_HTMLDOC != xno; then 13631a30de1fSmrg BUILDHTMLDOC=yes 13641a30de1fSmrgfi 13651a30de1fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13661a30de1fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13671a30de1fSmrg 13681a30de1fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13691a30de1fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13701a30de1fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13711a30de1fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13721a30de1fSmrg 13731a30de1fSmrgAC_SUBST(MAKE_TEXT) 13741a30de1fSmrgAC_SUBST(MAKE_PS) 13751a30de1fSmrgAC_SUBST(MAKE_PDF) 13761a30de1fSmrgAC_SUBST(MAKE_HTML) 13771a30de1fSmrg]) # XORG_CHECK_DOCBOOK 13781a30de1fSmrg 1379ce62200cSmrg# XORG_WITH_XMLTO([MIN-VERSION]) 1380ce62200cSmrg# ---------------- 1381ce62200cSmrg# Minimum version: 1.5.0 1382ce62200cSmrg# 1383ce62200cSmrg# Documentation tools are not always available on all platforms and sometimes 1384ce62200cSmrg# not at the appropriate level. This macro enables a module to test for the 1385ce62200cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1386ce62200cSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1387ce62200cSmrg# as whether or not to use the xmlto package. 1388ce62200cSmrg# 1389ce62200cSmrg# Interface to module: 1390ce62200cSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1391ce62200cSmrg# XMLTO: returns the path of the xmlto program found 1392ce62200cSmrg# returns the path set by the user in the environment 1393ce62200cSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1394ce62200cSmrg# 'no' user instructs the module not to use xmlto 1395ce62200cSmrg# 1396ce62200cSmrg# Added in version 1.10.0 1397ce62200cSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1398ce62200cSmrg# xmlto for text output requires either lynx, links, or w3m browsers 1399ce62200cSmrg# 1400ce62200cSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1401ce62200cSmrg# 1402ce62200cSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1403ce62200cSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1404ce62200cSmrgAC_ARG_WITH(xmlto, 1405ce62200cSmrg AS_HELP_STRING([--with-xmlto], 1406ce62200cSmrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 1407ce62200cSmrg [use_xmlto=$withval], [use_xmlto=auto]) 1408ce62200cSmrg 1409ce62200cSmrgif test "x$use_xmlto" = x"auto"; then 1410ce62200cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1411ce62200cSmrg if test "x$XMLTO" = "x"; then 1412ce62200cSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1413ce62200cSmrg have_xmlto=no 1414ce62200cSmrg else 1415ce62200cSmrg have_xmlto=yes 1416ce62200cSmrg fi 1417ce62200cSmrgelif test "x$use_xmlto" = x"yes" ; then 1418ce62200cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 1419ce62200cSmrg if test "x$XMLTO" = "x"; then 1420ce62200cSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1421ce62200cSmrg fi 1422ce62200cSmrg have_xmlto=yes 1423ce62200cSmrgelif test "x$use_xmlto" = x"no" ; then 1424ce62200cSmrg if test "x$XMLTO" != "x"; then 1425ce62200cSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1426ce62200cSmrg fi 1427ce62200cSmrg have_xmlto=no 1428ce62200cSmrgelse 1429ce62200cSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1430ce62200cSmrgfi 1431ce62200cSmrg 1432ce62200cSmrg# Test for a minimum version of xmlto, if provided. 1433ce62200cSmrgm4_ifval([$1], 1434ce62200cSmrg[if test "$have_xmlto" = yes; then 1435ce62200cSmrg # scrape the xmlto version 1436ce62200cSmrg AC_MSG_CHECKING([the xmlto version]) 1437ce62200cSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1438ce62200cSmrg AC_MSG_RESULT([$xmlto_version]) 1439ce62200cSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1440ce62200cSmrg [if test "x$use_xmlto" = xauto; then 1441ce62200cSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1442ce62200cSmrg have_xmlto=no 1443ce62200cSmrg else 1444ce62200cSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1445ce62200cSmrg fi]) 1446ce62200cSmrgfi]) 1447ce62200cSmrg 1448ce62200cSmrg# Test for the ability of xmlto to generate a text target 1449ce62200cSmrghave_xmlto_text=no 1450ce62200cSmrgcat > conftest.xml << "EOF" 1451ce62200cSmrgEOF 1452ce62200cSmrgAS_IF([test "$have_xmlto" = yes], 1453ce62200cSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1454ce62200cSmrg [have_xmlto_text=yes], 1455ce62200cSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1456ce62200cSmrgrm -f conftest.xml 1457ce62200cSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1458ce62200cSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1459ce62200cSmrg]) # XORG_WITH_XMLTO 1460ce62200cSmrg 1461ce62200cSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 1462ce62200cSmrg# ---------------- 1463ce62200cSmrg# Minimum version: 1.5.0 1464ce62200cSmrg# 1465ce62200cSmrg# Documentation tools are not always available on all platforms and sometimes 1466ce62200cSmrg# not at the appropriate level. This macro enables a module to test for the 1467ce62200cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1468ce62200cSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1469ce62200cSmrg# as whether or not to use the asciidoc package. 1470ce62200cSmrg# 1471ce62200cSmrg# Interface to module: 1472ce62200cSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1473ce62200cSmrg# ASCIIDOC: returns the path of the asciidoc program found 1474ce62200cSmrg# returns the path set by the user in the environment 1475ce62200cSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1476ce62200cSmrg# 'no' user instructs the module not to use asciidoc 1477ce62200cSmrg# 1478ce62200cSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1479ce62200cSmrg# 1480ce62200cSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1481ce62200cSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1482ce62200cSmrgAC_ARG_WITH(asciidoc, 1483ce62200cSmrg AS_HELP_STRING([--with-asciidoc], 1484ce62200cSmrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 1485ce62200cSmrg [use_asciidoc=$withval], [use_asciidoc=auto]) 1486ce62200cSmrg 1487ce62200cSmrgif test "x$use_asciidoc" = x"auto"; then 1488ce62200cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1489ce62200cSmrg if test "x$ASCIIDOC" = "x"; then 1490ce62200cSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1491ce62200cSmrg have_asciidoc=no 1492ce62200cSmrg else 1493ce62200cSmrg have_asciidoc=yes 1494ce62200cSmrg fi 1495ce62200cSmrgelif test "x$use_asciidoc" = x"yes" ; then 1496ce62200cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1497ce62200cSmrg if test "x$ASCIIDOC" = "x"; then 1498ce62200cSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1499ce62200cSmrg fi 1500ce62200cSmrg have_asciidoc=yes 1501ce62200cSmrgelif test "x$use_asciidoc" = x"no" ; then 1502ce62200cSmrg if test "x$ASCIIDOC" != "x"; then 1503ce62200cSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1504ce62200cSmrg fi 1505ce62200cSmrg have_asciidoc=no 1506ce62200cSmrgelse 1507ce62200cSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1508ce62200cSmrgfi 1509ce62200cSmrgm4_ifval([$1], 1510ce62200cSmrg[if test "$have_asciidoc" = yes; then 1511ce62200cSmrg # scrape the asciidoc version 1512ce62200cSmrg AC_MSG_CHECKING([the asciidoc version]) 1513ce62200cSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1514ce62200cSmrg AC_MSG_RESULT([$asciidoc_version]) 1515ce62200cSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1516ce62200cSmrg [if test "x$use_asciidoc" = xauto; then 1517ce62200cSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1518ce62200cSmrg have_asciidoc=no 1519ce62200cSmrg else 1520ce62200cSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1521ce62200cSmrg fi]) 1522ce62200cSmrgfi]) 1523ce62200cSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1524ce62200cSmrg]) # XORG_WITH_ASCIIDOC 1525ce62200cSmrg 1526ce62200cSmrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 1527ce62200cSmrg# -------------------------------- 1528ce62200cSmrg# Minimum version: 1.5.0 1529ce62200cSmrg# 1530ce62200cSmrg# Documentation tools are not always available on all platforms and sometimes 1531ce62200cSmrg# not at the appropriate level. This macro enables a module to test for the 1532ce62200cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1533ce62200cSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1534ce62200cSmrg# as whether or not to use the doxygen package. 1535ce62200cSmrg# 1536ce62200cSmrg# Interface to module: 1537ce62200cSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1538ce62200cSmrg# DOXYGEN: returns the path of the doxygen program found 1539ce62200cSmrg# returns the path set by the user in the environment 1540ce62200cSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1541ce62200cSmrg# 'no' user instructs the module not to use doxygen 1542ce62200cSmrg# 1543ce62200cSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1544ce62200cSmrg# 1545ce62200cSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1546ce62200cSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1547ce62200cSmrgAC_ARG_WITH(doxygen, 1548ce62200cSmrg AS_HELP_STRING([--with-doxygen], 1549ce62200cSmrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 1550ce62200cSmrg [use_doxygen=$withval], [use_doxygen=auto]) 1551ce62200cSmrg 1552ce62200cSmrgif test "x$use_doxygen" = x"auto"; then 1553ce62200cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1554ce62200cSmrg if test "x$DOXYGEN" = "x"; then 1555ce62200cSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1556ce62200cSmrg have_doxygen=no 1557ce62200cSmrg else 1558ce62200cSmrg have_doxygen=yes 1559ce62200cSmrg fi 1560ce62200cSmrgelif test "x$use_doxygen" = x"yes" ; then 1561ce62200cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1562ce62200cSmrg if test "x$DOXYGEN" = "x"; then 1563ce62200cSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1564ce62200cSmrg fi 1565ce62200cSmrg have_doxygen=yes 1566ce62200cSmrgelif test "x$use_doxygen" = x"no" ; then 1567ce62200cSmrg if test "x$DOXYGEN" != "x"; then 1568ce62200cSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1569ce62200cSmrg fi 1570ce62200cSmrg have_doxygen=no 1571ce62200cSmrgelse 1572ce62200cSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1573ce62200cSmrgfi 1574ce62200cSmrgm4_ifval([$1], 1575ce62200cSmrg[if test "$have_doxygen" = yes; then 1576ce62200cSmrg # scrape the doxygen version 1577ce62200cSmrg AC_MSG_CHECKING([the doxygen version]) 1578ce62200cSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1579ce62200cSmrg AC_MSG_RESULT([$doxygen_version]) 1580ce62200cSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1581ce62200cSmrg [if test "x$use_doxygen" = xauto; then 1582ce62200cSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1583ce62200cSmrg have_doxygen=no 1584ce62200cSmrg else 1585ce62200cSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1586ce62200cSmrg fi]) 1587ce62200cSmrgfi]) 1588ce62200cSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1589ce62200cSmrg]) # XORG_WITH_DOXYGEN 1590ce62200cSmrg 1591ce62200cSmrg# XORG_WITH_GROFF 1592ce62200cSmrg# ---------------- 1593ce62200cSmrg# Minimum version: 1.6.0 1594ce62200cSmrg# 1595ce62200cSmrg# Documentation tools are not always available on all platforms and sometimes 1596ce62200cSmrg# not at the appropriate level. This macro enables a module to test for the 1597ce62200cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1598ce62200cSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 1599ce62200cSmrg# as whether or not to use the groff package. 1600ce62200cSmrg# 1601ce62200cSmrg# Interface to module: 1602ce62200cSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1603ce62200cSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1604ce62200cSmrg# HAVE_GROFF_MS: the -ms macros package 1605ce62200cSmrg# GROFF: returns the path of the groff program found 1606ce62200cSmrg# returns the path set by the user in the environment 1607ce62200cSmrg# --with-groff: 'yes' user instructs the module to use groff 1608ce62200cSmrg# 'no' user instructs the module not to use groff 1609ce62200cSmrg# 1610ce62200cSmrg# Added in version 1.9.0: 1611ce62200cSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1612ce62200cSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1613ce62200cSmrg# psselect from the psutils package. 1614ce62200cSmrg# the ghostcript package. Refer to the grohtml man pages 1615ce62200cSmrg# 1616ce62200cSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1617ce62200cSmrg# 1618ce62200cSmrg# OS and distros often splits groff in a basic and full package, the former 1619ce62200cSmrg# having the groff program and the later having devices, fonts and macros 1620ce62200cSmrg# Checking for the groff executable is not enough. 1621ce62200cSmrg# 1622ce62200cSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 1623ce62200cSmrg# unset HAVE_GROFF or GROFF env variables. 1624ce62200cSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1625ce62200cSmrg# 1626ce62200cSmrgAC_DEFUN([XORG_WITH_GROFF],[ 1627ce62200cSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1628ce62200cSmrgAC_ARG_WITH(groff, 1629ce62200cSmrg AS_HELP_STRING([--with-groff], 1630ce62200cSmrg [Use groff to regenerate documentation (default: yes, if installed)]), 1631ce62200cSmrg [use_groff=$withval], [use_groff=auto]) 1632ce62200cSmrg 1633ce62200cSmrgif test "x$use_groff" = x"auto"; then 1634ce62200cSmrg AC_PATH_PROG([GROFF], [groff]) 1635ce62200cSmrg if test "x$GROFF" = "x"; then 1636ce62200cSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1637ce62200cSmrg have_groff=no 1638ce62200cSmrg else 1639ce62200cSmrg have_groff=yes 1640ce62200cSmrg fi 1641ce62200cSmrgelif test "x$use_groff" = x"yes" ; then 1642ce62200cSmrg AC_PATH_PROG([GROFF], [groff]) 1643ce62200cSmrg if test "x$GROFF" = "x"; then 1644ce62200cSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1645ce62200cSmrg fi 1646ce62200cSmrg have_groff=yes 1647ce62200cSmrgelif test "x$use_groff" = x"no" ; then 1648ce62200cSmrg if test "x$GROFF" != "x"; then 1649ce62200cSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1650ce62200cSmrg fi 1651ce62200cSmrg have_groff=no 1652ce62200cSmrgelse 1653ce62200cSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1654ce62200cSmrgfi 1655ce62200cSmrg 1656ce62200cSmrg# We have groff, test for the presence of the macro packages 1657ce62200cSmrgif test "x$have_groff" = x"yes"; then 1658ce62200cSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1659ce62200cSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1660ce62200cSmrg groff_ms_works=yes 1661ce62200cSmrg else 1662ce62200cSmrg groff_ms_works=no 1663ce62200cSmrg fi 1664ce62200cSmrg AC_MSG_RESULT([$groff_ms_works]) 1665ce62200cSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1666ce62200cSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1667ce62200cSmrg groff_mm_works=yes 1668ce62200cSmrg else 1669ce62200cSmrg groff_mm_works=no 1670ce62200cSmrg fi 1671ce62200cSmrg AC_MSG_RESULT([$groff_mm_works]) 1672ce62200cSmrgfi 1673ce62200cSmrg 1674ce62200cSmrg# We have groff, test for HTML dependencies, one command per package 1675ce62200cSmrgif test "x$have_groff" = x"yes"; then 1676ce62200cSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1677ce62200cSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1678ce62200cSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1679ce62200cSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1680ce62200cSmrg have_groff_html=yes 1681ce62200cSmrg else 1682ce62200cSmrg have_groff_html=no 1683ce62200cSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1684ce62200cSmrg fi 1685ce62200cSmrgfi 1686ce62200cSmrg 1687ce62200cSmrg# Set Automake conditionals for Makefiles 1688ce62200cSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1689ce62200cSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1690ce62200cSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1691ce62200cSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1692ce62200cSmrg]) # XORG_WITH_GROFF 1693ce62200cSmrg 1694ce62200cSmrg# XORG_WITH_FOP 1695ce62200cSmrg# ---------------- 1696ce62200cSmrg# Minimum version: 1.6.0 1697ce62200cSmrg# 1698ce62200cSmrg# Documentation tools are not always available on all platforms and sometimes 1699ce62200cSmrg# not at the appropriate level. This macro enables a module to test for the 1700ce62200cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1701ce62200cSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 1702ce62200cSmrg# as whether or not to use the fop package. 1703ce62200cSmrg# 1704ce62200cSmrg# Interface to module: 1705ce62200cSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1706ce62200cSmrg# FOP: returns the path of the fop program found 1707ce62200cSmrg# returns the path set by the user in the environment 1708ce62200cSmrg# --with-fop: 'yes' user instructs the module to use fop 1709ce62200cSmrg# 'no' user instructs the module not to use fop 1710ce62200cSmrg# 1711ce62200cSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1712ce62200cSmrg# 1713ce62200cSmrgAC_DEFUN([XORG_WITH_FOP],[ 1714ce62200cSmrgAC_ARG_VAR([FOP], [Path to fop command]) 1715ce62200cSmrgAC_ARG_WITH(fop, 1716ce62200cSmrg AS_HELP_STRING([--with-fop], 1717ce62200cSmrg [Use fop to regenerate documentation (default: yes, if installed)]), 1718ce62200cSmrg [use_fop=$withval], [use_fop=auto]) 1719ce62200cSmrg 1720ce62200cSmrgif test "x$use_fop" = x"auto"; then 1721ce62200cSmrg AC_PATH_PROG([FOP], [fop]) 1722ce62200cSmrg if test "x$FOP" = "x"; then 1723ce62200cSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1724ce62200cSmrg have_fop=no 1725ce62200cSmrg else 1726ce62200cSmrg have_fop=yes 1727ce62200cSmrg fi 1728ce62200cSmrgelif test "x$use_fop" = x"yes" ; then 1729ce62200cSmrg AC_PATH_PROG([FOP], [fop]) 1730ce62200cSmrg if test "x$FOP" = "x"; then 1731ce62200cSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1732ce62200cSmrg fi 1733ce62200cSmrg have_fop=yes 1734ce62200cSmrgelif test "x$use_fop" = x"no" ; then 1735ce62200cSmrg if test "x$FOP" != "x"; then 1736ce62200cSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1737ce62200cSmrg fi 1738ce62200cSmrg have_fop=no 1739ce62200cSmrgelse 1740ce62200cSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1741ce62200cSmrgfi 1742ce62200cSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1743ce62200cSmrg]) # XORG_WITH_FOP 1744ce62200cSmrg 1745ce62200cSmrg# XORG_WITH_PS2PDF 1746ce62200cSmrg# ---------------- 1747ce62200cSmrg# Minimum version: 1.6.0 1748ce62200cSmrg# 1749ce62200cSmrg# Documentation tools are not always available on all platforms and sometimes 1750ce62200cSmrg# not at the appropriate level. This macro enables a module to test for the 1751ce62200cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 1752ce62200cSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1753ce62200cSmrg# as whether or not to use the ps2pdf package. 1754ce62200cSmrg# 1755ce62200cSmrg# Interface to module: 1756ce62200cSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1757ce62200cSmrg# PS2PDF: returns the path of the ps2pdf program found 1758ce62200cSmrg# returns the path set by the user in the environment 1759ce62200cSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1760ce62200cSmrg# 'no' user instructs the module not to use ps2pdf 1761ce62200cSmrg# 1762ce62200cSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1763ce62200cSmrg# 1764ce62200cSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1765ce62200cSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1766ce62200cSmrgAC_ARG_WITH(ps2pdf, 1767ce62200cSmrg AS_HELP_STRING([--with-ps2pdf], 1768ce62200cSmrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 1769ce62200cSmrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 1770ce62200cSmrg 1771ce62200cSmrgif test "x$use_ps2pdf" = x"auto"; then 1772ce62200cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1773ce62200cSmrg if test "x$PS2PDF" = "x"; then 1774ce62200cSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1775ce62200cSmrg have_ps2pdf=no 1776ce62200cSmrg else 1777ce62200cSmrg have_ps2pdf=yes 1778ce62200cSmrg fi 1779ce62200cSmrgelif test "x$use_ps2pdf" = x"yes" ; then 1780ce62200cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1781ce62200cSmrg if test "x$PS2PDF" = "x"; then 1782ce62200cSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1783ce62200cSmrg fi 1784ce62200cSmrg have_ps2pdf=yes 1785ce62200cSmrgelif test "x$use_ps2pdf" = x"no" ; then 1786ce62200cSmrg if test "x$PS2PDF" != "x"; then 1787ce62200cSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1788ce62200cSmrg fi 1789ce62200cSmrg have_ps2pdf=no 1790ce62200cSmrgelse 1791ce62200cSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1792ce62200cSmrgfi 1793ce62200cSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1794ce62200cSmrg]) # XORG_WITH_PS2PDF 1795ce62200cSmrg 1796ce62200cSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 1797ce62200cSmrg# ---------------- 1798ce62200cSmrg# Minimum version: 1.6.0 1799ce62200cSmrg# 1800ce62200cSmrg# Documentation tools are not always available on all platforms and sometimes 1801ce62200cSmrg# not at the appropriate level. This macro enables a builder to skip all 1802ce62200cSmrg# documentation targets except traditional man pages. 1803ce62200cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1804ce62200cSmrg# maximum flexibilty in controlling documentation building. 1805ce62200cSmrg# Refer to: 1806ce62200cSmrg# XORG_WITH_XMLTO --with-xmlto 1807ce62200cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1808ce62200cSmrg# XORG_WITH_DOXYGEN --with-doxygen 1809ce62200cSmrg# XORG_WITH_FOP --with-fop 1810ce62200cSmrg# XORG_WITH_GROFF --with-groff 1811ce62200cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1812ce62200cSmrg# 1813ce62200cSmrg# Interface to module: 1814ce62200cSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1815ce62200cSmrg# --enable-docs: 'yes' user instructs the module to generate docs 1816ce62200cSmrg# 'no' user instructs the module not to generate docs 1817ce62200cSmrg# parm1: specify the default value, yes or no. 1818ce62200cSmrg# 1819ce62200cSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1820ce62200cSmrgdefault=$1 1821ce62200cSmrgif test "x$default" = x ; then 1822ce62200cSmrg default="yes" 1823ce62200cSmrgfi 1824ce62200cSmrgAC_ARG_ENABLE(docs, 1825ce62200cSmrg AS_HELP_STRING([--enable-docs], 1826ce62200cSmrg [Enable building the documentation (default: yes)]), 1827ce62200cSmrg [build_docs=$enableval], [build_docs=$default]) 1828ce62200cSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1829ce62200cSmrgAC_MSG_CHECKING([whether to build documentation]) 1830ce62200cSmrgAC_MSG_RESULT([$build_docs]) 1831ce62200cSmrg]) # XORG_ENABLE_DOCS 1832ce62200cSmrg 1833ce62200cSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1834ce62200cSmrg# ---------------- 1835ce62200cSmrg# Minimum version: 1.6.0 1836ce62200cSmrg# 1837ce62200cSmrg# This macro enables a builder to skip all developer documentation. 1838ce62200cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1839ce62200cSmrg# maximum flexibilty in controlling documentation building. 1840ce62200cSmrg# Refer to: 1841ce62200cSmrg# XORG_WITH_XMLTO --with-xmlto 1842ce62200cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1843ce62200cSmrg# XORG_WITH_DOXYGEN --with-doxygen 1844ce62200cSmrg# XORG_WITH_FOP --with-fop 1845ce62200cSmrg# XORG_WITH_GROFF --with-groff 1846ce62200cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1847ce62200cSmrg# 1848ce62200cSmrg# Interface to module: 1849ce62200cSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1850ce62200cSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1851ce62200cSmrg# 'no' user instructs the module not to generate developer docs 1852ce62200cSmrg# parm1: specify the default value, yes or no. 1853ce62200cSmrg# 1854ce62200cSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1855ce62200cSmrgdevel_default=$1 1856ce62200cSmrgif test "x$devel_default" = x ; then 1857ce62200cSmrg devel_default="yes" 1858ce62200cSmrgfi 1859ce62200cSmrgAC_ARG_ENABLE(devel-docs, 1860ce62200cSmrg AS_HELP_STRING([--enable-devel-docs], 1861ce62200cSmrg [Enable building the developer documentation (default: yes)]), 1862ce62200cSmrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 1863ce62200cSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1864ce62200cSmrgAC_MSG_CHECKING([whether to build developer documentation]) 1865ce62200cSmrgAC_MSG_RESULT([$build_devel_docs]) 1866ce62200cSmrg]) # XORG_ENABLE_DEVEL_DOCS 1867ce62200cSmrg 1868ce62200cSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 1869ce62200cSmrg# ---------------- 1870ce62200cSmrg# Minimum version: 1.6.0 1871ce62200cSmrg# 1872ce62200cSmrg# This macro enables a builder to skip all functional specification targets. 1873ce62200cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1874ce62200cSmrg# maximum flexibilty in controlling documentation building. 1875ce62200cSmrg# Refer to: 1876ce62200cSmrg# XORG_WITH_XMLTO --with-xmlto 1877ce62200cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 1878ce62200cSmrg# XORG_WITH_DOXYGEN --with-doxygen 1879ce62200cSmrg# XORG_WITH_FOP --with-fop 1880ce62200cSmrg# XORG_WITH_GROFF --with-groff 1881ce62200cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 1882ce62200cSmrg# 1883ce62200cSmrg# Interface to module: 1884ce62200cSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1885ce62200cSmrg# --enable-specs: 'yes' user instructs the module to generate specs 1886ce62200cSmrg# 'no' user instructs the module not to generate specs 1887ce62200cSmrg# parm1: specify the default value, yes or no. 1888ce62200cSmrg# 1889ce62200cSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1890ce62200cSmrgspec_default=$1 1891ce62200cSmrgif test "x$spec_default" = x ; then 1892ce62200cSmrg spec_default="yes" 1893ce62200cSmrgfi 1894ce62200cSmrgAC_ARG_ENABLE(specs, 1895ce62200cSmrg AS_HELP_STRING([--enable-specs], 1896ce62200cSmrg [Enable building the specs (default: yes)]), 1897ce62200cSmrg [build_specs=$enableval], [build_specs=$spec_default]) 1898ce62200cSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1899ce62200cSmrgAC_MSG_CHECKING([whether to build functional specifications]) 1900ce62200cSmrgAC_MSG_RESULT([$build_specs]) 1901ce62200cSmrg]) # XORG_ENABLE_SPECS 1902ce62200cSmrg 19031a30de1fSmrg# XORG_CHECK_MALLOC_ZERO 19041a30de1fSmrg# ---------------------- 19051a30de1fSmrg# Minimum version: 1.0.0 19061a30de1fSmrg# 19071a30de1fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 19081a30de1fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 19091a30de1fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 19101a30de1fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 19111a30de1fSmrgAC_ARG_ENABLE(malloc0returnsnull, 1912b7fb5eacSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 19131a30de1fSmrg [malloc(0) returns NULL (default: auto)]), 19141a30de1fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 19151a30de1fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 19161a30de1fSmrg 19171a30de1fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 19181a30de1fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 19191a30de1fSmrg AC_RUN_IFELSE([ 19201a30de1fSmrgchar *malloc(); 19211a30de1fSmrgchar *realloc(); 19221a30de1fSmrgchar *calloc(); 19231a30de1fSmrgmain() { 19241a30de1fSmrg char *m0, *r0, *c0, *p; 19251a30de1fSmrg m0 = malloc(0); 19261a30de1fSmrg p = malloc(10); 19271a30de1fSmrg r0 = realloc(p,0); 19281a30de1fSmrg c0 = calloc(0); 19291a30de1fSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 19301a30de1fSmrg}], 19311a30de1fSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 1932ce62200cSmrg [MALLOC_ZERO_RETURNS_NULL=no], 1933ce62200cSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 19341a30de1fSmrgfi 19351a30de1fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 19361a30de1fSmrg 19371a30de1fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 19381a30de1fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 19391a30de1fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 19401a30de1fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 19411a30de1fSmrgelse 19421a30de1fSmrg MALLOC_ZERO_CFLAGS="" 19431a30de1fSmrg XMALLOC_ZERO_CFLAGS="" 19441a30de1fSmrg XTMALLOC_ZERO_CFLAGS="" 19451a30de1fSmrgfi 19461a30de1fSmrg 19471a30de1fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 19481a30de1fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 19491a30de1fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 19501a30de1fSmrg]) # XORG_CHECK_MALLOC_ZERO 19511a30de1fSmrg 19521a30de1fSmrg# XORG_WITH_LINT() 19531a30de1fSmrg# ---------------- 19541a30de1fSmrg# Minimum version: 1.1.0 19551a30de1fSmrg# 1956ce62200cSmrg# This macro enables the use of a tool that flags some suspicious and 1957ce62200cSmrg# non-portable constructs (likely to be bugs) in C language source code. 1958ce62200cSmrg# It will attempt to locate the tool and use appropriate options. 1959ce62200cSmrg# There are various lint type tools on different platforms. 1960ce62200cSmrg# 1961ce62200cSmrg# Interface to module: 1962ce62200cSmrg# LINT: returns the path to the tool found on the platform 1963ce62200cSmrg# or the value set to LINT on the configure cmd line 1964ce62200cSmrg# also an Automake conditional 1965ce62200cSmrg# LINT_FLAGS: an Automake variable with appropriate flags 1966ce62200cSmrg# 1967ce62200cSmrg# --with-lint: 'yes' user instructs the module to use lint 1968ce62200cSmrg# 'no' user instructs the module not to use lint (default) 1969ce62200cSmrg# 1970ce62200cSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1971ce62200cSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 19721a30de1fSmrg# 19731a30de1fSmrgAC_DEFUN([XORG_WITH_LINT],[ 19741a30de1fSmrg 1975ce62200cSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1976ce62200cSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1977b7fb5eacSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 19781a30de1fSmrg [Use a lint-style source code checker (default: disabled)])], 19791a30de1fSmrg [use_lint=$withval], [use_lint=no]) 1980ce62200cSmrg 1981ce62200cSmrg# Obtain platform specific info like program name and options 1982ce62200cSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1983ce62200cSmrgcase $host_os in 1984ce62200cSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1985ce62200cSmrg lint_name=splint 1986ce62200cSmrg lint_options="-badflag" 1987ce62200cSmrg ;; 1988ce62200cSmrg *freebsd* | *netbsd*) 1989ce62200cSmrg lint_name=lint 1990ce62200cSmrg lint_options="-u -b" 1991ce62200cSmrg ;; 1992ce62200cSmrg *solaris*) 1993ce62200cSmrg lint_name=lint 1994ce62200cSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1995ce62200cSmrg ;; 1996ce62200cSmrgesac 1997ce62200cSmrg 1998ce62200cSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1999ce62200cSmrgif test "x$use_lint" = x"yes" ; then 2000ce62200cSmrg AC_PATH_PROG([LINT], [$lint_name]) 2001ce62200cSmrg if test "x$LINT" = "x"; then 2002ce62200cSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2003ce62200cSmrg fi 2004ce62200cSmrgelif test "x$use_lint" = x"no" ; then 2005ce62200cSmrg if test "x$LINT" != "x"; then 2006ce62200cSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2007ce62200cSmrg fi 20081a30de1fSmrgelse 2009ce62200cSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 20101a30de1fSmrgfi 2011ce62200cSmrg 2012ce62200cSmrg# User supplied flags override default flags 2013ce62200cSmrgif test "x$LINT_FLAGS" != "x"; then 2014ce62200cSmrg lint_options=$LINT_FLAGS 20151a30de1fSmrgfi 20161a30de1fSmrg 2017ce62200cSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2018ce62200cSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 20191a30de1fSmrg 20201a30de1fSmrg]) # XORG_WITH_LINT 20211a30de1fSmrg 20221a30de1fSmrg# XORG_LINT_LIBRARY(LIBNAME) 20231a30de1fSmrg# -------------------------- 20241a30de1fSmrg# Minimum version: 1.1.0 20251a30de1fSmrg# 20261a30de1fSmrg# Sets up flags for building lint libraries for checking programs that call 20271a30de1fSmrg# functions in the library. 20281a30de1fSmrg# 2029ce62200cSmrg# Interface to module: 2030ce62200cSmrg# LINTLIB - Automake variable with the name of lint library file to make 2031ce62200cSmrg# MAKE_LINT_LIB - Automake conditional 2032ce62200cSmrg# 2033ce62200cSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2034ce62200cSmrg# - 'no' user instructs the module not to create a lint library (default) 20351a30de1fSmrg 20361a30de1fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 20371a30de1fSmrgAC_REQUIRE([XORG_WITH_LINT]) 2038b7fb5eacSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 20391a30de1fSmrg [Create lint library (default: disabled)])], 20401a30de1fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2041ce62200cSmrg 2042ce62200cSmrgif test "x$make_lint_lib" = x"yes" ; then 2043ce62200cSmrg LINTLIB=llib-l$1.ln 2044ce62200cSmrg if test "x$LINT" = "x"; then 2045ce62200cSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2046ce62200cSmrg fi 2047ce62200cSmrgelif test "x$make_lint_lib" != x"no" ; then 2048ce62200cSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 20491a30de1fSmrgfi 2050ce62200cSmrg 20511a30de1fSmrgAC_SUBST(LINTLIB) 20521a30de1fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 20531a30de1fSmrg 20541a30de1fSmrg]) # XORG_LINT_LIBRARY 20551a30de1fSmrg 2056b7fb5eacSmrg# XORG_CWARNFLAGS 2057b7fb5eacSmrg# --------------- 2058b7fb5eacSmrg# Minimum version: 1.2.0 2059b7fb5eacSmrg# 2060b7fb5eacSmrg# Defines CWARNFLAGS to enable C compiler warnings. 2061b7fb5eacSmrg# 2062b7fb5eacSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2063ce62200cSmrgAC_REQUIRE([AC_PROG_CC_C99]) 2064b7fb5eacSmrgif test "x$GCC" = xyes ; then 2065b7fb5eacSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 2066b7fb5eacSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 2067ce62200cSmrg-Wbad-function-cast -Wformat=2" 2068b7fb5eacSmrg case `$CC -dumpversion` in 2069b7fb5eacSmrg 3.4.* | 4.*) 2070b7fb5eacSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 2071b7fb5eacSmrg ;; 2072b7fb5eacSmrg esac 2073b7fb5eacSmrgelse 2074b7fb5eacSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2075b7fb5eacSmrg if test "x$SUNCC" = "xyes"; then 2076b7fb5eacSmrg CWARNFLAGS="-v" 2077b7fb5eacSmrg fi 2078b7fb5eacSmrgfi 2079b7fb5eacSmrgAC_SUBST(CWARNFLAGS) 2080b7fb5eacSmrg]) # XORG_CWARNFLAGS 2081b7fb5eacSmrg 2082b7fb5eacSmrg# XORG_STRICT_OPTION 2083b7fb5eacSmrg# ----------------------- 2084b7fb5eacSmrg# Minimum version: 1.3.0 2085b7fb5eacSmrg# 2086b7fb5eacSmrg# Add configure option to enable strict compilation 2087b7fb5eacSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2088ce62200cSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 2089b7fb5eacSmrgAC_REQUIRE([AC_PROG_CC_C99]) 2090b7fb5eacSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 2091b7fb5eacSmrg 2092b7fb5eacSmrgAC_ARG_ENABLE(strict-compilation, 2093b7fb5eacSmrg AS_HELP_STRING([--enable-strict-compilation], 2094b7fb5eacSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 2095b7fb5eacSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2096b7fb5eacSmrgif test "x$STRICT_COMPILE" = "xyes"; then 2097b7fb5eacSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2098b7fb5eacSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2099b7fb5eacSmrg if test "x$GCC" = xyes ; then 2100b7fb5eacSmrg STRICT_CFLAGS="-pedantic -Werror" 2101b7fb5eacSmrg elif test "x$SUNCC" = "xyes"; then 2102b7fb5eacSmrg STRICT_CFLAGS="-errwarn" 2103b7fb5eacSmrg elif test "x$INTELCC" = "xyes"; then 2104b7fb5eacSmrg STRICT_CFLAGS="-Werror" 2105b7fb5eacSmrg fi 2106b7fb5eacSmrgfi 2107b7fb5eacSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 2108b7fb5eacSmrgAC_SUBST([CWARNFLAGS]) 2109b7fb5eacSmrg]) # XORG_STRICT_OPTION 2110b7fb5eacSmrg 2111b7fb5eacSmrg# XORG_DEFAULT_OPTIONS 2112b7fb5eacSmrg# -------------------- 2113b7fb5eacSmrg# Minimum version: 1.3.0 2114b7fb5eacSmrg# 2115b7fb5eacSmrg# Defines default options for X.Org modules. 2116b7fb5eacSmrg# 2117b7fb5eacSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2118ce62200cSmrgAC_REQUIRE([AC_PROG_INSTALL]) 2119b7fb5eacSmrgXORG_CWARNFLAGS 2120b7fb5eacSmrgXORG_STRICT_OPTION 2121b7fb5eacSmrgXORG_RELEASE_VERSION 2122b7fb5eacSmrgXORG_CHANGELOG 2123ce62200cSmrgXORG_INSTALL 2124b7fb5eacSmrgXORG_MANPAGE_SECTIONS 2125ce62200cSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2126ce62200cSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2127b7fb5eacSmrg]) # XORG_DEFAULT_OPTIONS 2128ce62200cSmrg 2129ce62200cSmrg# XORG_INSTALL() 2130ce62200cSmrg# ---------------- 2131ce62200cSmrg# Minimum version: 1.4.0 2132ce62200cSmrg# 2133ce62200cSmrg# Defines the variable INSTALL_CMD as the command to copy 2134ce62200cSmrg# INSTALL from $prefix/share/util-macros. 2135ce62200cSmrg# 2136ce62200cSmrgAC_DEFUN([XORG_INSTALL], [ 2137ce62200cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2138ce62200cSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2139ce62200cSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2140ce62200cSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2141ce62200cSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2142ce62200cSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2143ce62200cSmrgAC_SUBST([INSTALL_CMD]) 2144ce62200cSmrg]) # XORG_INSTALL 21451a30de1fSmrgdnl Copyright 2005 Red Hat, Inc 21461a30de1fSmrgdnl 21471a30de1fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 21481a30de1fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 21491a30de1fSmrgdnl the above copyright notice appear in all copies and that both that 21501a30de1fSmrgdnl copyright notice and this permission notice appear in supporting 21511a30de1fSmrgdnl documentation. 21521a30de1fSmrgdnl 21531a30de1fSmrgdnl The above copyright notice and this permission notice shall be included 21541a30de1fSmrgdnl in all copies or substantial portions of the Software. 21551a30de1fSmrgdnl 21561a30de1fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21571a30de1fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21581a30de1fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21591a30de1fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 21601a30de1fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21611a30de1fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21621a30de1fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 21631a30de1fSmrgdnl 21641a30de1fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 21651a30de1fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 21661a30de1fSmrgdnl other dealings in this Software without prior written authorization 21671a30de1fSmrgdnl from the copyright holders. 21681a30de1fSmrgdnl 21691a30de1fSmrg 21701a30de1fSmrg# XORG_RELEASE_VERSION 21711a30de1fSmrg# -------------------- 2172ce62200cSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 21731a30de1fSmrg 21741a30de1fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 21751a30de1fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 21761a30de1fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 21771a30de1fSmrg [Major version of this package]) 2178b7fb5eacSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 21791a30de1fSmrg if test "x$PVM" = "x"; then 21801a30de1fSmrg PVM="0" 21811a30de1fSmrg fi 21821a30de1fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 21831a30de1fSmrg [$PVM], 21841a30de1fSmrg [Minor version of this package]) 2185b7fb5eacSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 21861a30de1fSmrg if test "x$PVP" = "x"; then 21871a30de1fSmrg PVP="0" 21881a30de1fSmrg fi 21891a30de1fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 21901a30de1fSmrg [$PVP], 21911a30de1fSmrg [Patch version of this package]) 21921a30de1fSmrg]) 21931a30de1fSmrg 2194b7fb5eacSmrg# XORG_CHANGELOG() 2195b7fb5eacSmrg# ---------------- 2196b7fb5eacSmrg# Minimum version: 1.2.0 2197b7fb5eacSmrg# 2198b7fb5eacSmrg# Defines the variable CHANGELOG_CMD as the command to generate 2199b7fb5eacSmrg# ChangeLog from git. 2200b7fb5eacSmrg# 2201b7fb5eacSmrg# 2202b7fb5eacSmrgAC_DEFUN([XORG_CHANGELOG], [ 2203ce62200cSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2204ce62200cSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2205ce62200cSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 2206b7fb5eacSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 2207b7fb5eacSmrgAC_SUBST([CHANGELOG_CMD]) 2208b7fb5eacSmrg]) # XORG_CHANGELOG 2209b7fb5eacSmrg 22101a30de1fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 22111a30de1fSmrg# 22121a30de1fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 22131a30de1fSmrg# 22141a30de1fSmrg# This program is free software; you can redistribute it and/or modify 22151a30de1fSmrg# it under the terms of the GNU General Public License as published by 22161a30de1fSmrg# the Free Software Foundation; either version 2 of the License, or 22171a30de1fSmrg# (at your option) any later version. 22181a30de1fSmrg# 22191a30de1fSmrg# This program is distributed in the hope that it will be useful, but 22201a30de1fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 22211a30de1fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22221a30de1fSmrg# General Public License for more details. 22231a30de1fSmrg# 22241a30de1fSmrg# You should have received a copy of the GNU General Public License 22251a30de1fSmrg# along with this program; if not, write to the Free Software 22261a30de1fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22271a30de1fSmrg# 22281a30de1fSmrg# As a special exception to the GNU General Public License, if you 22291a30de1fSmrg# distribute this file as part of a program that contains a 22301a30de1fSmrg# configuration script generated by Autoconf, you may include it under 22311a30de1fSmrg# the same distribution terms that you use for the rest of that program. 22321a30de1fSmrg 22331a30de1fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 22341a30de1fSmrg# ---------------------------------- 22351a30de1fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 22361a30de1fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 22371a30de1fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 22381a30de1fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 22391a30de1fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 22401a30de1fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 22411a30de1fSmrgfi 22421a30de1fSmrgif test -n "$PKG_CONFIG"; then 2243b7fb5eacSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 22441a30de1fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 22451a30de1fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 22461a30de1fSmrg AC_MSG_RESULT([yes]) 22471a30de1fSmrg else 22481a30de1fSmrg AC_MSG_RESULT([no]) 22491a30de1fSmrg PKG_CONFIG="" 22501a30de1fSmrg fi 22511a30de1fSmrg 22521a30de1fSmrgfi[]dnl 22531a30de1fSmrg])# PKG_PROG_PKG_CONFIG 22541a30de1fSmrg 22551a30de1fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 22561a30de1fSmrg# 22571a30de1fSmrg# Check to see whether a particular set of modules exists. Similar 22581a30de1fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 22591a30de1fSmrg# 22601a30de1fSmrg# 22611a30de1fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 22621a30de1fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 22631a30de1fSmrg# PKG_CHECK_EXISTS manually 22641a30de1fSmrg# -------------------------------------------------------------- 22651a30de1fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 22661a30de1fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 22671a30de1fSmrgif test -n "$PKG_CONFIG" && \ 22681a30de1fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 22691a30de1fSmrg m4_ifval([$2], [$2], [:]) 22701a30de1fSmrgm4_ifvaln([$3], [else 22711a30de1fSmrg $3])dnl 22721a30de1fSmrgfi]) 22731a30de1fSmrg 22741a30de1fSmrg 22751a30de1fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 22761a30de1fSmrg# --------------------------------------------- 22771a30de1fSmrgm4_define([_PKG_CONFIG], 2278b7fb5eacSmrg[if test -n "$$1"; then 2279b7fb5eacSmrg pkg_cv_[]$1="$$1" 2280b7fb5eacSmrg elif test -n "$PKG_CONFIG"; then 2281b7fb5eacSmrg PKG_CHECK_EXISTS([$3], 2282b7fb5eacSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2283b7fb5eacSmrg [pkg_failed=yes]) 2284b7fb5eacSmrg else 2285b7fb5eacSmrg pkg_failed=untried 22861a30de1fSmrgfi[]dnl 22871a30de1fSmrg])# _PKG_CONFIG 22881a30de1fSmrg 2289b7fb5eacSmrg# _PKG_SHORT_ERRORS_SUPPORTED 2290b7fb5eacSmrg# ----------------------------- 2291b7fb5eacSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2292b7fb5eacSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2293b7fb5eacSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2294b7fb5eacSmrg _pkg_short_errors_supported=yes 2295b7fb5eacSmrgelse 2296b7fb5eacSmrg _pkg_short_errors_supported=no 2297b7fb5eacSmrgfi[]dnl 2298b7fb5eacSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 2299b7fb5eacSmrg 2300b7fb5eacSmrg 23011a30de1fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 23021a30de1fSmrg# [ACTION-IF-NOT-FOUND]) 23031a30de1fSmrg# 23041a30de1fSmrg# 23051a30de1fSmrg# Note that if there is a possibility the first call to 23061a30de1fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 23071a30de1fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 23081a30de1fSmrg# 23091a30de1fSmrg# 23101a30de1fSmrg# -------------------------------------------------------------- 23111a30de1fSmrgAC_DEFUN([PKG_CHECK_MODULES], 23121a30de1fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 23131a30de1fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 23141a30de1fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 23151a30de1fSmrg 23161a30de1fSmrgpkg_failed=no 23171a30de1fSmrgAC_MSG_CHECKING([for $1]) 23181a30de1fSmrg 23191a30de1fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 23201a30de1fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 23211a30de1fSmrg 2322b7fb5eacSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2323b7fb5eacSmrgand $1[]_LIBS to avoid the need to call pkg-config. 2324b7fb5eacSmrgSee the pkg-config man page for more details.]) 2325b7fb5eacSmrg 23261a30de1fSmrgif test $pkg_failed = yes; then 2327b7fb5eacSmrg _PKG_SHORT_ERRORS_SUPPORTED 2328b7fb5eacSmrg if test $_pkg_short_errors_supported = yes; then 2329b7fb5eacSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2330b7fb5eacSmrg else 2331b7fb5eacSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2332b7fb5eacSmrg fi 23331a30de1fSmrg # Put the nasty error message in config.log where it belongs 2334b7fb5eacSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 23351a30de1fSmrg 23361a30de1fSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 2337b7fb5eacSmrg[Package requirements ($2) were not met: 2338b7fb5eacSmrg 2339b7fb5eacSmrg$$1_PKG_ERRORS 2340b7fb5eacSmrg 23411a30de1fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 23421a30de1fSmrginstalled software in a non-standard prefix. 23431a30de1fSmrg 2344b7fb5eacSmrg_PKG_TEXT 2345b7fb5eacSmrg])], 2346b7fb5eacSmrg [AC_MSG_RESULT([no]) 2347b7fb5eacSmrg $4]) 23481a30de1fSmrgelif test $pkg_failed = untried; then 23491a30de1fSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 23501a30de1fSmrg[The pkg-config script could not be found or is too old. Make sure it 23511a30de1fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 23521a30de1fSmrgpath to pkg-config. 23531a30de1fSmrg 2354b7fb5eacSmrg_PKG_TEXT 23551a30de1fSmrg 2356b7fb5eacSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 23571a30de1fSmrg [$4]) 23581a30de1fSmrgelse 23591a30de1fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 23601a30de1fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 23611a30de1fSmrg AC_MSG_RESULT([yes]) 23621a30de1fSmrg ifelse([$3], , :, [$3]) 23631a30de1fSmrgfi[]dnl 23641a30de1fSmrg])# PKG_CHECK_MODULES 23651a30de1fSmrg 2366