10103645bSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 295cf0c00Smrg 30103645bSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4100ae103Smrg 5100ae103Smrg# This file is free software; the Free Software Foundation 6100ae103Smrg# gives unlimited permission to copy and/or distribute it, 7100ae103Smrg# with or without modifications, as long as this notice is preserved. 8100ae103Smrg 9100ae103Smrg# This program is distributed in the hope that it will be useful, 10100ae103Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11100ae103Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12100ae103Smrg# PARTICULAR PURPOSE. 13100ae103Smrg 1495cf0c00Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15165cb819Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16165cb819Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1714a67432Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, 1814a67432Smrg[m4_warning([this file was generated for autoconf 2.72. 19165cb819SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20165cb819SmrgIf you have problems, you may need to regenerate the build system entirely. 2195cf0c00SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22100ae103Smrg 230103645bSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 240103645bSmrg# 250103645bSmrg# This file is free software; the Free Software Foundation 260103645bSmrg# gives unlimited permission to copy and/or distribute it, 270103645bSmrg# with or without modifications, as long as this notice is preserved. 2895cf0c00Smrg 290103645bSmrg# AM_AUTOMAKE_VERSION(VERSION) 300103645bSmrg# ---------------------------- 310103645bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 320103645bSmrg# generated from the m4 files accompanying Automake X.Y. 330103645bSmrg# (This private macro should not be called outside this file.) 340103645bSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 350103645bSmrg[am__api_version='1.16' 360103645bSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 370103645bSmrgdnl require some minimum version. Point them to the right macro. 380103645bSmrgm4_if([$1], [1.16.5], [], 390103645bSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 400103645bSmrg]) 4195cf0c00Smrg 420103645bSmrg# _AM_AUTOCONF_VERSION(VERSION) 430103645bSmrg# ----------------------------- 440103645bSmrg# aclocal traces this macro to find the Autoconf version. 450103645bSmrg# This is a private macro too. Using m4_define simplifies 460103645bSmrg# the logic in aclocal, which can simply ignore this definition. 470103645bSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48100ae103Smrg 490103645bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 500103645bSmrg# ------------------------------- 510103645bSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 520103645bSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 530103645bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 540103645bSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 550103645bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 560103645bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 570103645bSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 588831d3fbSmrg 590103645bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60165cb819Smrg 610103645bSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 620103645bSmrg# 630103645bSmrg# This file is free software; the Free Software Foundation 640103645bSmrg# gives unlimited permission to copy and/or distribute it, 650103645bSmrg# with or without modifications, as long as this notice is preserved. 66100ae103Smrg 670103645bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 680103645bSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 690103645bSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 700103645bSmrg# 710103645bSmrg# Of course, Automake must honor this variable whenever it calls a 720103645bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 730103645bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 740103645bSmrg# depending on how configure is run. This is pretty annoying, since 750103645bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 760103645bSmrg# source directory, any form will work fine, but in subdirectories a 770103645bSmrg# relative path needs to be adjusted first. 780103645bSmrg# 790103645bSmrg# $ac_aux_dir/missing 800103645bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 810103645bSmrg# $top_srcdir/$ac_aux_dir/missing 820103645bSmrg# fails if $ac_aux_dir is absolute, 830103645bSmrg# fails when called from a subdirectory in a VPATH build with 840103645bSmrg# a relative $ac_aux_dir 850103645bSmrg# 860103645bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 870103645bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 880103645bSmrg# harmless because $srcdir is '.', but things will broke when you 890103645bSmrg# start a VPATH build or use an absolute $srcdir. 900103645bSmrg# 910103645bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 920103645bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 930103645bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 940103645bSmrg# and then we would define $MISSING as 950103645bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 960103645bSmrg# This will work as long as MISSING is not called from configure, because 970103645bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 980103645bSmrg# However there are other variables, like CC, which are often used in 990103645bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1000103645bSmrg# 1010103645bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1020103645bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1030103645bSmrg# configured tree to be moved without reconfiguration. 104100ae103Smrg 1050103645bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1060103645bSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1070103645bSmrg# Expand $ac_aux_dir to an absolute path. 1080103645bSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1090103645bSmrg]) 110100ae103Smrg 1110103645bSmrg# AM_CONDITIONAL -*- Autoconf -*- 112100ae103Smrg 1130103645bSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 1140103645bSmrg# 1150103645bSmrg# This file is free software; the Free Software Foundation 1160103645bSmrg# gives unlimited permission to copy and/or distribute it, 1170103645bSmrg# with or without modifications, as long as this notice is preserved. 1188831d3fbSmrg 1190103645bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1200103645bSmrg# ------------------------------------- 1210103645bSmrg# Define a conditional. 1220103645bSmrgAC_DEFUN([AM_CONDITIONAL], 1230103645bSmrg[AC_PREREQ([2.52])dnl 1240103645bSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1250103645bSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1260103645bSmrgAC_SUBST([$1_TRUE])dnl 1270103645bSmrgAC_SUBST([$1_FALSE])dnl 1280103645bSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1290103645bSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1300103645bSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1310103645bSmrgif $2; then 1320103645bSmrg $1_TRUE= 1330103645bSmrg $1_FALSE='#' 1340103645bSmrgelse 1350103645bSmrg $1_TRUE='#' 1360103645bSmrg $1_FALSE= 1370103645bSmrgfi 1380103645bSmrgAC_CONFIG_COMMANDS_PRE( 1390103645bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1400103645bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1410103645bSmrgUsually this means the macro was only invoked conditionally.]]) 1420103645bSmrgfi])]) 143100ae103Smrg 1440103645bSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 1450103645bSmrg# 1460103645bSmrg# This file is free software; the Free Software Foundation 1470103645bSmrg# gives unlimited permission to copy and/or distribute it, 1480103645bSmrg# with or without modifications, as long as this notice is preserved. 149100ae103Smrg 150100ae103Smrg 1510103645bSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1520103645bSmrg# written in clear, in which case automake, when reading aclocal.m4, 1530103645bSmrg# will think it sees a *use*, and therefore will trigger all it's 1540103645bSmrg# C support machinery. Also note that it means that autoscan, seeing 1550103645bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156100ae103Smrg 157100ae103Smrg 1580103645bSmrg# _AM_DEPENDENCIES(NAME) 1590103645bSmrg# ---------------------- 1600103645bSmrg# See how the compiler implements dependency checking. 1610103645bSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1620103645bSmrg# We try a few techniques and use that to set a single cache variable. 1630103645bSmrg# 1640103645bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1650103645bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1660103645bSmrg# dependency, and given that the user is not expected to run this macro, 1670103645bSmrg# just rely on AC_PROG_CC. 1680103645bSmrgAC_DEFUN([_AM_DEPENDENCIES], 1690103645bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1700103645bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1710103645bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1720103645bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173100ae103Smrg 1740103645bSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1750103645bSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1760103645bSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1770103645bSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1780103645bSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1790103645bSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1800103645bSmrg [depcc="$$1" am_compiler_list=]) 181100ae103Smrg 1820103645bSmrgAC_CACHE_CHECK([dependency style of $depcc], 1830103645bSmrg [am_cv_$1_dependencies_compiler_type], 1840103645bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1850103645bSmrg # We make a subdir and do the tests there. Otherwise we can end up 1860103645bSmrg # making bogus files that we don't know about and never remove. For 1870103645bSmrg # instance it was reported that on HP-UX the gcc test will end up 1880103645bSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1890103645bSmrg # in D". 1900103645bSmrg rm -rf conftest.dir 1910103645bSmrg mkdir conftest.dir 1920103645bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1930103645bSmrg # using a relative directory. 1940103645bSmrg cp "$am_depcomp" conftest.dir 1950103645bSmrg cd conftest.dir 1960103645bSmrg # We will build objects and dependencies in a subdirectory because 1970103645bSmrg # it helps to detect inapplicable dependency modes. For instance 1980103645bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 1990103645bSmrg # side effect of compilation, but ICC will put the dependencies in 2000103645bSmrg # the current directory while Tru64 will put them in the object 2010103645bSmrg # directory. 2020103645bSmrg mkdir sub 203100ae103Smrg 2040103645bSmrg am_cv_$1_dependencies_compiler_type=none 2050103645bSmrg if test "$am_compiler_list" = ""; then 2060103645bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2070103645bSmrg fi 2080103645bSmrg am__universal=false 2090103645bSmrg m4_case([$1], [CC], 2100103645bSmrg [case " $depcc " in #( 2110103645bSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2120103645bSmrg esac], 2130103645bSmrg [CXX], 2140103645bSmrg [case " $depcc " in #( 2150103645bSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2160103645bSmrg esac]) 217100ae103Smrg 2180103645bSmrg for depmode in $am_compiler_list; do 2190103645bSmrg # Setup a source with many dependencies, because some compilers 2200103645bSmrg # like to wrap large dependency lists on column 80 (with \), and 2210103645bSmrg # we should not choose a depcomp mode which is confused by this. 2220103645bSmrg # 2230103645bSmrg # We need to recreate these files for each test, as the compiler may 2240103645bSmrg # overwrite some of them when testing with obscure command lines. 2250103645bSmrg # This happens at least with the AIX C compiler. 2260103645bSmrg : > sub/conftest.c 2270103645bSmrg for i in 1 2 3 4 5 6; do 2280103645bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2290103645bSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2300103645bSmrg # Solaris 10 /bin/sh. 2310103645bSmrg echo '/* dummy */' > sub/conftst$i.h 2320103645bSmrg done 2330103645bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234100ae103Smrg 2350103645bSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2360103645bSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2370103645bSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2380103645bSmrg # versions had trouble with output in subdirs. 2390103645bSmrg am__obj=sub/conftest.${OBJEXT-o} 2400103645bSmrg am__minus_obj="-o $am__obj" 2410103645bSmrg case $depmode in 2420103645bSmrg gcc) 2430103645bSmrg # This depmode causes a compiler race in universal mode. 2440103645bSmrg test "$am__universal" = false || continue 2450103645bSmrg ;; 2460103645bSmrg nosideeffect) 2470103645bSmrg # After this tag, mechanisms are not by side-effect, so they'll 2480103645bSmrg # only be used when explicitly requested. 2490103645bSmrg if test "x$enable_dependency_tracking" = xyes; then 2500103645bSmrg continue 2510103645bSmrg else 2520103645bSmrg break 2530103645bSmrg fi 2540103645bSmrg ;; 2550103645bSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2560103645bSmrg # This compiler won't grok '-c -o', but also, the minuso test has 2570103645bSmrg # not run yet. These depmodes are late enough in the game, and 2580103645bSmrg # so weak that their functioning should not be impacted. 2590103645bSmrg am__obj=conftest.${OBJEXT-o} 2600103645bSmrg am__minus_obj= 2610103645bSmrg ;; 2620103645bSmrg none) break ;; 2630103645bSmrg esac 2640103645bSmrg if depmode=$depmode \ 2650103645bSmrg source=sub/conftest.c object=$am__obj \ 2660103645bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2670103645bSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2680103645bSmrg >/dev/null 2>conftest.err && 2690103645bSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2700103645bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2710103645bSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2720103645bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2730103645bSmrg # icc doesn't choke on unknown options, it will just issue warnings 2740103645bSmrg # or remarks (even with -Werror). So we grep stderr for any message 2750103645bSmrg # that says an option was ignored or not supported. 2760103645bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2770103645bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2780103645bSmrg # The diagnosis changed in icc 8.0: 2790103645bSmrg # icc: Command line remark: option '-MP' not supported 2800103645bSmrg if (grep 'ignoring option' conftest.err || 2810103645bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2820103645bSmrg am_cv_$1_dependencies_compiler_type=$depmode 2830103645bSmrg break 2840103645bSmrg fi 2850103645bSmrg fi 2860103645bSmrg done 287100ae103Smrg 2880103645bSmrg cd .. 2890103645bSmrg rm -rf conftest.dir 2900103645bSmrgelse 2910103645bSmrg am_cv_$1_dependencies_compiler_type=none 2920103645bSmrgfi 2930103645bSmrg]) 2940103645bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2950103645bSmrgAM_CONDITIONAL([am__fastdep$1], [ 2960103645bSmrg test "x$enable_dependency_tracking" != xno \ 2970103645bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2980103645bSmrg]) 299100ae103Smrg 30095cf0c00Smrg 3010103645bSmrg# AM_SET_DEPDIR 3020103645bSmrg# ------------- 3030103645bSmrg# Choose a directory name for dependency files. 3040103645bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3050103645bSmrgAC_DEFUN([AM_SET_DEPDIR], 3060103645bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3070103645bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3080103645bSmrg]) 30995cf0c00Smrg 31095cf0c00Smrg 3110103645bSmrg# AM_DEP_TRACK 3120103645bSmrg# ------------ 3130103645bSmrgAC_DEFUN([AM_DEP_TRACK], 3140103645bSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3150103645bSmrgAS_HELP_STRING( 3160103645bSmrg [--enable-dependency-tracking], 3170103645bSmrg [do not reject slow dependency extractors]) 3180103645bSmrgAS_HELP_STRING( 3190103645bSmrg [--disable-dependency-tracking], 3200103645bSmrg [speeds up one-time build])]) 3210103645bSmrgif test "x$enable_dependency_tracking" != xno; then 3220103645bSmrg am_depcomp="$ac_aux_dir/depcomp" 3230103645bSmrg AMDEPBACKSLASH='\' 3240103645bSmrg am__nodep='_no' 3250103645bSmrgfi 3260103645bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3270103645bSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3280103645bSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3290103645bSmrgAC_SUBST([am__nodep])dnl 3300103645bSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3310103645bSmrg]) 33295cf0c00Smrg 3330103645bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 33495cf0c00Smrg 3350103645bSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 33695cf0c00Smrg# 3370103645bSmrg# This file is free software; the Free Software Foundation 3380103645bSmrg# gives unlimited permission to copy and/or distribute it, 3390103645bSmrg# with or without modifications, as long as this notice is preserved. 34095cf0c00Smrg 3410103645bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3420103645bSmrg# ------------------------------ 3430103645bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3440103645bSmrg[{ 3450103645bSmrg # Older Autoconf quotes --file arguments for eval, but not when files 3460103645bSmrg # are listed without --file. Let's play safe and only enable the eval 3470103645bSmrg # if we detect the quoting. 3480103645bSmrg # TODO: see whether this extra hack can be removed once we start 3490103645bSmrg # requiring Autoconf 2.70 or later. 3500103645bSmrg AS_CASE([$CONFIG_FILES], 3510103645bSmrg [*\'*], [eval set x "$CONFIG_FILES"], 3520103645bSmrg [*], [set x $CONFIG_FILES]) 3530103645bSmrg shift 3540103645bSmrg # Used to flag and report bootstrapping failures. 3550103645bSmrg am_rc=0 3560103645bSmrg for am_mf 3570103645bSmrg do 3580103645bSmrg # Strip MF so we end up with the name of the file. 3590103645bSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 3600103645bSmrg # Check whether this is an Automake generated Makefile which includes 3610103645bSmrg # dependency-tracking related rules and includes. 3620103645bSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 3630103645bSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3640103645bSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 3650103645bSmrg || continue 3660103645bSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 3670103645bSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 3680103645bSmrg AM_RUN_LOG([cd "$am_dirpart" \ 3690103645bSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 3700103645bSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 3710103645bSmrg done 3720103645bSmrg if test $am_rc -ne 0; then 3730103645bSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 3740103645bSmrg for automatic dependency tracking. If GNU make was not used, consider 3750103645bSmrg re-running the configure script with MAKE="gmake" (or whatever is 3760103645bSmrg necessary). You can also try re-running configure with the 3770103645bSmrg '--disable-dependency-tracking' option to at least be able to build 3780103645bSmrg the package (albeit without support for automatic dependency tracking).]) 3790103645bSmrg fi 3800103645bSmrg AS_UNSET([am_dirpart]) 3810103645bSmrg AS_UNSET([am_filepart]) 3820103645bSmrg AS_UNSET([am_mf]) 3830103645bSmrg AS_UNSET([am_rc]) 3840103645bSmrg rm -f conftest-deps.mk 3850103645bSmrg} 3860103645bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387100ae103Smrg 388100ae103Smrg 3890103645bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3900103645bSmrg# ----------------------------- 3910103645bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 39295cf0c00Smrg# 3930103645bSmrg# This code is only required when automatic dependency tracking is enabled. 3940103645bSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 3950103645bSmrg# order to bootstrap the dependency handling code. 3960103645bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 3970103645bSmrg[AC_CONFIG_COMMANDS([depfiles], 3980103645bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 3990103645bSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400100ae103Smrg 4010103645bSmrg# Do all the work for Automake. -*- Autoconf -*- 402100ae103Smrg 4030103645bSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4040103645bSmrg# 4050103645bSmrg# This file is free software; the Free Software Foundation 4060103645bSmrg# gives unlimited permission to copy and/or distribute it, 4070103645bSmrg# with or without modifications, as long as this notice is preserved. 408100ae103Smrg 4090103645bSmrg# This macro actually does too much. Some checks are only needed if 4100103645bSmrg# your package does certain things. But this isn't really a big deal. 411100ae103Smrg 4120103645bSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4130103645bSmrgm4_define([AC_PROG_CC], 4140103645bSmrgm4_defn([AC_PROG_CC]) 4150103645bSmrg[_AM_PROG_CC_C_O 4160103645bSmrg]) 417100ae103Smrg 4180103645bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4190103645bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4200103645bSmrg# ----------------------------------------------- 4210103645bSmrg# The call with PACKAGE and VERSION arguments is the old style 4220103645bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4230103645bSmrg# and VERSION should now be passed to AC_INIT and removed from 4240103645bSmrg# the call to AM_INIT_AUTOMAKE. 4250103645bSmrg# We support both call styles for the transition. After 4260103645bSmrg# the next Automake release, Autoconf can make the AC_INIT 4270103645bSmrg# arguments mandatory, and then we can depend on a new Autoconf 4280103645bSmrg# release and drop the old call support. 4290103645bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4300103645bSmrg[AC_PREREQ([2.65])dnl 4310103645bSmrgm4_ifdef([_$0_ALREADY_INIT], 4320103645bSmrg [m4_fatal([$0 expanded multiple times 4330103645bSmrg]m4_defn([_$0_ALREADY_INIT]))], 4340103645bSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 4350103645bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4360103645bSmrgdnl the ones we care about. 4370103645bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4380103645bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4390103645bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4400103645bSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4410103645bSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4420103645bSmrg # is not polluted with repeated "-I." 4430103645bSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4440103645bSmrg # test to see if srcdir already configured 4450103645bSmrg if test -f $srcdir/config.status; then 4460103645bSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4470103645bSmrg fi 44895cf0c00Smrgfi 449100ae103Smrg 4500103645bSmrg# test whether we have cygpath 4510103645bSmrgif test -z "$CYGPATH_W"; then 4520103645bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4530103645bSmrg CYGPATH_W='cygpath -w' 4540103645bSmrg else 4550103645bSmrg CYGPATH_W=echo 4560103645bSmrg fi 457100ae103Smrgfi 4580103645bSmrgAC_SUBST([CYGPATH_W]) 459100ae103Smrg 4600103645bSmrg# Define the identity of the package. 4610103645bSmrgdnl Distinguish between old-style and new-style calls. 4620103645bSmrgm4_ifval([$2], 4630103645bSmrg[AC_DIAGNOSE([obsolete], 4640103645bSmrg [$0: two- and three-arguments forms are deprecated.]) 4650103645bSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4660103645bSmrg AC_SUBST([PACKAGE], [$1])dnl 4670103645bSmrg AC_SUBST([VERSION], [$2])], 4680103645bSmrg[_AM_SET_OPTIONS([$1])dnl 4690103645bSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4700103645bSmrgm4_if( 4710103645bSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 4720103645bSmrg [ok:ok],, 4730103645bSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4740103645bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4750103645bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 476100ae103Smrg 4770103645bSmrg_AM_IF_OPTION([no-define],, 4780103645bSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4790103645bSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 480100ae103Smrg 4810103645bSmrg# Some tools Automake needs. 4820103645bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4830103645bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4840103645bSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4850103645bSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4860103645bSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4870103645bSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4880103645bSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4890103645bSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4900103645bSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4910103645bSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4920103645bSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4930103645bSmrg# dies out for good. For more background, see: 4940103645bSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4950103645bSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4960103645bSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 4970103645bSmrg# We need awk for the "check" target (and possibly the TAP driver). The 4980103645bSmrg# system "awk" is bad on some platforms. 4990103645bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5000103645bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5010103645bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5020103645bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5030103645bSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5040103645bSmrg [_AM_PROG_TAR([v7])])]) 5050103645bSmrg_AM_IF_OPTION([no-dependencies],, 5060103645bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5070103645bSmrg [_AM_DEPENDENCIES([CC])], 5080103645bSmrg [m4_define([AC_PROG_CC], 5090103645bSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5100103645bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5110103645bSmrg [_AM_DEPENDENCIES([CXX])], 5120103645bSmrg [m4_define([AC_PROG_CXX], 5130103645bSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5140103645bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5150103645bSmrg [_AM_DEPENDENCIES([OBJC])], 5160103645bSmrg [m4_define([AC_PROG_OBJC], 5170103645bSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5180103645bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5190103645bSmrg [_AM_DEPENDENCIES([OBJCXX])], 5200103645bSmrg [m4_define([AC_PROG_OBJCXX], 5210103645bSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5220103645bSmrg]) 5230103645bSmrg# Variables for tags utilities; see am/tags.am 5240103645bSmrgif test -z "$CTAGS"; then 5250103645bSmrg CTAGS=ctags 5260103645bSmrgfi 5270103645bSmrgAC_SUBST([CTAGS]) 5280103645bSmrgif test -z "$ETAGS"; then 5290103645bSmrg ETAGS=etags 5300103645bSmrgfi 5310103645bSmrgAC_SUBST([ETAGS]) 5320103645bSmrgif test -z "$CSCOPE"; then 5330103645bSmrg CSCOPE=cscope 5340103645bSmrgfi 5350103645bSmrgAC_SUBST([CSCOPE]) 536100ae103Smrg 5370103645bSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5380103645bSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 5390103645bSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5400103645bSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5410103645bSmrgAC_CONFIG_COMMANDS_PRE(dnl 5420103645bSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5430103645bSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544165cb819Smrg 5450103645bSmrg# POSIX will say in a future version that running "rm -f" with no argument 5460103645bSmrg# is OK; and we want to be able to make that assumption in our Makefile 5470103645bSmrg# recipes. So use an aggressive probe to check that the usage we want is 5480103645bSmrg# actually supported "in the wild" to an acceptable degree. 5490103645bSmrg# See automake bug#10828. 5500103645bSmrg# To make any issue more visible, cause the running configure to be aborted 5510103645bSmrg# by default if the 'rm' program in use doesn't match our expectations; the 5520103645bSmrg# user can still override this though. 5530103645bSmrgif rm -f && rm -fr && rm -rf; then : OK; else 5540103645bSmrg cat >&2 <<'END' 5550103645bSmrgOops! 556100ae103Smrg 5570103645bSmrgYour 'rm' program seems unable to run without file operands specified 5580103645bSmrgon the command line, even when the '-f' option is present. This is contrary 5590103645bSmrgto the behaviour of most rm programs out there, and not conforming with 5600103645bSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561100ae103Smrg 5620103645bSmrgPlease tell bug-automake@gnu.org about your system, including the value 5630103645bSmrgof your $PATH and any error possibly output before this message. This 5640103645bSmrgcan help us improve future automake versions. 565100ae103Smrg 5660103645bSmrgEND 5670103645bSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5680103645bSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 5690103645bSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5700103645bSmrg echo >&2 5710103645bSmrg else 5720103645bSmrg cat >&2 <<'END' 5730103645bSmrgAborting the configuration process, to ensure you take notice of the issue. 574100ae103Smrg 5750103645bSmrgYou can download and install GNU coreutils to get an 'rm' implementation 5760103645bSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 5778831d3fbSmrg 5780103645bSmrgIf you want to complete the configuration process using your problematic 5790103645bSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5800103645bSmrgto "yes", and re-run configure. 58195cf0c00Smrg 5820103645bSmrgEND 5830103645bSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5840103645bSmrg fi 585165cb819Smrgfi 5860103645bSmrgdnl The trailing newline in this macro's definition is deliberate, for 5870103645bSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 5880103645bSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5890103645bSmrg]) 590100ae103Smrg 5910103645bSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5920103645bSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5930103645bSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5940103645bSmrgm4_define([_AC_COMPILER_EXEEXT], 5950103645bSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596100ae103Smrg 5970103645bSmrg# When config.status generates a header, we must update the stamp-h file. 5980103645bSmrg# This file resides in the same directory as the config header 5990103645bSmrg# that is generated. The stamp files are numbered to have different names. 600100ae103Smrg 6010103645bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 6020103645bSmrg# loop where config.status creates the headers, so we can generate 6030103645bSmrg# our stamp files there. 6040103645bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 6050103645bSmrg[# Compute $1's index in $config_headers. 6060103645bSmrg_am_arg=$1 6070103645bSmrg_am_stamp_count=1 6080103645bSmrgfor _am_header in $config_headers :; do 6090103645bSmrg case $_am_header in 6100103645bSmrg $_am_arg | $_am_arg:* ) 6110103645bSmrg break ;; 6120103645bSmrg * ) 6130103645bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6140103645bSmrg esac 6150103645bSmrgdone 6160103645bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 61795cf0c00Smrg 6180103645bSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6190103645bSmrg# 6200103645bSmrg# This file is free software; the Free Software Foundation 6210103645bSmrg# gives unlimited permission to copy and/or distribute it, 6220103645bSmrg# with or without modifications, as long as this notice is preserved. 6230103645bSmrg 6240103645bSmrg# AM_PROG_INSTALL_SH 6250103645bSmrg# ------------------ 6260103645bSmrg# Define $install_sh. 6270103645bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6280103645bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6290103645bSmrgif test x"${install_sh+set}" != xset; then 6300103645bSmrg case $am_aux_dir in 6310103645bSmrg *\ * | *\ *) 6320103645bSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6330103645bSmrg *) 6340103645bSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6350103645bSmrg esac 6360103645bSmrgfi 6370103645bSmrgAC_SUBST([install_sh])]) 6380103645bSmrg 6390103645bSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 6400103645bSmrg# 6410103645bSmrg# This file is free software; the Free Software Foundation 6420103645bSmrg# gives unlimited permission to copy and/or distribute it, 6430103645bSmrg# with or without modifications, as long as this notice is preserved. 6440103645bSmrg 6450103645bSmrg# Check whether the underlying file-system supports filenames 6460103645bSmrg# with a leading dot. For instance MS-DOS doesn't. 6470103645bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 6480103645bSmrg[rm -rf .tst 2>/dev/null 6490103645bSmrgmkdir .tst 2>/dev/null 6500103645bSmrgif test -d .tst; then 6510103645bSmrg am__leading_dot=. 652100ae103Smrgelse 6530103645bSmrg am__leading_dot=_ 654100ae103Smrgfi 6550103645bSmrgrmdir .tst 2>/dev/null 6560103645bSmrgAC_SUBST([am__leading_dot])]) 657100ae103Smrg 6580103645bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659100ae103Smrg 6600103645bSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6610103645bSmrg# 6620103645bSmrg# This file is free software; the Free Software Foundation 6630103645bSmrg# gives unlimited permission to copy and/or distribute it, 6640103645bSmrg# with or without modifications, as long as this notice is preserved. 665100ae103Smrg 6660103645bSmrg# AM_MAKE_INCLUDE() 6670103645bSmrg# ----------------- 6680103645bSmrg# Check whether make has an 'include' directive that can support all 6690103645bSmrg# the idioms we need for our automatic dependency tracking code. 6700103645bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6710103645bSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 6720103645bSmrgcat > confinc.mk << 'END' 6730103645bSmrgam__doit: 6740103645bSmrg @echo this is the am__doit target >confinc.out 6750103645bSmrg.PHONY: am__doit 6760103645bSmrgEND 6770103645bSmrgam__include="#" 6780103645bSmrgam__quote= 6790103645bSmrg# BSD make does it like this. 6800103645bSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 6810103645bSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 6820103645bSmrgecho 'include confinc.mk # ignored' > confmf.GNU 6830103645bSmrg_am_result=no 6840103645bSmrgfor s in GNU BSD; do 6850103645bSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 6860103645bSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 6870103645bSmrg ['0:this is the am__doit target'], 6880103645bSmrg [AS_CASE([$s], 6890103645bSmrg [BSD], [am__include='.include' am__quote='"'], 6900103645bSmrg [am__include='include' am__quote=''])]) 6910103645bSmrg if test "$am__include" != "#"; then 6920103645bSmrg _am_result="yes ($s style)" 6930103645bSmrg break 6940103645bSmrg fi 6950103645bSmrgdone 6960103645bSmrgrm -f confinc.* confmf.* 6970103645bSmrgAC_MSG_RESULT([${_am_result}]) 6980103645bSmrgAC_SUBST([am__include])]) 6990103645bSmrgAC_SUBST([am__quote])]) 700100ae103Smrg 7010103645bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702100ae103Smrg 7030103645bSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 704100ae103Smrg# 7050103645bSmrg# This file is free software; the Free Software Foundation 7060103645bSmrg# gives unlimited permission to copy and/or distribute it, 7070103645bSmrg# with or without modifications, as long as this notice is preserved. 708100ae103Smrg 7090103645bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7100103645bSmrg# ------------------------------ 7110103645bSmrgAC_DEFUN([AM_MISSING_PROG], 7120103645bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7130103645bSmrg$1=${$1-"${am_missing_run}$2"} 7140103645bSmrgAC_SUBST($1)]) 715100ae103Smrg 7160103645bSmrg# AM_MISSING_HAS_RUN 7170103645bSmrg# ------------------ 7180103645bSmrg# Define MISSING if not defined so far and test if it is modern enough. 7190103645bSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7200103645bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7210103645bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7220103645bSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7230103645bSmrgif test x"${MISSING+set}" != xset; then 7240103645bSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 725165cb819Smrgfi 7260103645bSmrg# Use eval to expand $SHELL 7270103645bSmrgif eval "$MISSING --is-lightweight"; then 7280103645bSmrg am_missing_run="$MISSING " 7290103645bSmrgelse 7300103645bSmrg am_missing_run= 7310103645bSmrg AC_MSG_WARN(['missing' script is too old or missing]) 732100ae103Smrgfi 7330103645bSmrg]) 734100ae103Smrg 7350103645bSmrg# Helper functions for option handling. -*- Autoconf -*- 736100ae103Smrg 7370103645bSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 7380103645bSmrg# 7390103645bSmrg# This file is free software; the Free Software Foundation 7400103645bSmrg# gives unlimited permission to copy and/or distribute it, 7410103645bSmrg# with or without modifications, as long as this notice is preserved. 7428831d3fbSmrg 7430103645bSmrg# _AM_MANGLE_OPTION(NAME) 7440103645bSmrg# ----------------------- 7450103645bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7460103645bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747100ae103Smrg 7480103645bSmrg# _AM_SET_OPTION(NAME) 7490103645bSmrg# -------------------- 7500103645bSmrg# Set option NAME. Presently that only means defining a flag for this option. 7510103645bSmrgAC_DEFUN([_AM_SET_OPTION], 7520103645bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753100ae103Smrg 7540103645bSmrg# _AM_SET_OPTIONS(OPTIONS) 7550103645bSmrg# ------------------------ 7560103645bSmrg# OPTIONS is a space-separated list of Automake options. 7570103645bSmrgAC_DEFUN([_AM_SET_OPTIONS], 7580103645bSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7590103645bSmrg 7600103645bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7610103645bSmrg# ------------------------------------------- 7620103645bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7630103645bSmrgAC_DEFUN([_AM_IF_OPTION], 7640103645bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7650103645bSmrg 7660103645bSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 76795cf0c00Smrg# 7680103645bSmrg# This file is free software; the Free Software Foundation 7690103645bSmrg# gives unlimited permission to copy and/or distribute it, 7700103645bSmrg# with or without modifications, as long as this notice is preserved. 771165cb819Smrg 7720103645bSmrg# _AM_PROG_CC_C_O 7730103645bSmrg# --------------- 7740103645bSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7750103645bSmrg# to automatically call this. 7760103645bSmrgAC_DEFUN([_AM_PROG_CC_C_O], 7770103645bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7780103645bSmrgAC_REQUIRE_AUX_FILE([compile])dnl 7790103645bSmrgAC_LANG_PUSH([C])dnl 7800103645bSmrgAC_CACHE_CHECK( 7810103645bSmrg [whether $CC understands -c and -o together], 7820103645bSmrg [am_cv_prog_cc_c_o], 7830103645bSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7840103645bSmrg # Make sure it works both with $CC and with simple cc. 7850103645bSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 7860103645bSmrg # compilers refuse to overwrite an existing .o file with -o, 7870103645bSmrg # though they will create one. 7880103645bSmrg am_cv_prog_cc_c_o=yes 7890103645bSmrg for am_i in 1 2; do 7900103645bSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7910103645bSmrg && test -f conftest2.$ac_objext; then 7920103645bSmrg : OK 7930103645bSmrg else 7940103645bSmrg am_cv_prog_cc_c_o=no 7950103645bSmrg break 7960103645bSmrg fi 7970103645bSmrg done 7980103645bSmrg rm -f core conftest* 7990103645bSmrg unset am_i]) 8000103645bSmrgif test "$am_cv_prog_cc_c_o" != yes; then 8010103645bSmrg # Losing compiler, so override with the script. 8020103645bSmrg # FIXME: It is wrong to rewrite CC. 8030103645bSmrg # But if we don't then we get into trouble of one sort or another. 8040103645bSmrg # A longer-term fix would be to have automake use am__CC in this case, 8050103645bSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8060103645bSmrg CC="$am_aux_dir/compile $CC" 807100ae103Smrgfi 8080103645bSmrgAC_LANG_POP([C])]) 809165cb819Smrg 8100103645bSmrg# For backward compatibility. 8110103645bSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812165cb819Smrg 8130103645bSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814100ae103Smrg# 8150103645bSmrg# This file is free software; the Free Software Foundation 8160103645bSmrg# gives unlimited permission to copy and/or distribute it, 8170103645bSmrg# with or without modifications, as long as this notice is preserved. 818100ae103Smrg 8190103645bSmrg# AM_RUN_LOG(COMMAND) 8200103645bSmrg# ------------------- 8210103645bSmrg# Run COMMAND, save the exit status in ac_status, and log it. 8220103645bSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8230103645bSmrgAC_DEFUN([AM_RUN_LOG], 8240103645bSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8250103645bSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8260103645bSmrg ac_status=$? 8270103645bSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8280103645bSmrg (exit $ac_status); }]) 8290103645bSmrg 8300103645bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8310103645bSmrg 8320103645bSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833100ae103Smrg# 8340103645bSmrg# This file is free software; the Free Software Foundation 8350103645bSmrg# gives unlimited permission to copy and/or distribute it, 8360103645bSmrg# with or without modifications, as long as this notice is preserved. 837100ae103Smrg 8380103645bSmrg# AM_SANITY_CHECK 8390103645bSmrg# --------------- 8400103645bSmrgAC_DEFUN([AM_SANITY_CHECK], 8410103645bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8420103645bSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8430103645bSmrg# name. Accept space and tab only in the latter. 8440103645bSmrgam_lf=' 8450103645bSmrg' 8460103645bSmrgcase `pwd` in 8470103645bSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8480103645bSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8490103645bSmrgesac 8500103645bSmrgcase $srcdir in 8510103645bSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8520103645bSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8530103645bSmrgesac 8540103645bSmrg 8550103645bSmrg# Do 'set' in a subshell so we don't clobber the current shell's 8560103645bSmrg# arguments. Must try -L first in case configure is actually a 8570103645bSmrg# symlink; some systems play weird games with the mod time of symlinks 8580103645bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8590103645bSmrg# directory). 8600103645bSmrgif ( 8610103645bSmrg am_has_slept=no 8620103645bSmrg for am_try in 1 2; do 8630103645bSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 8640103645bSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8650103645bSmrg if test "$[*]" = "X"; then 8660103645bSmrg # -L didn't work. 8670103645bSmrg set X `ls -t "$srcdir/configure" conftest.file` 8680103645bSmrg fi 8690103645bSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8700103645bSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8710103645bSmrg 8720103645bSmrg # If neither matched, then we have a broken ls. This can happen 8730103645bSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8740103645bSmrg # broken ls alias from the environment. This has actually 8750103645bSmrg # happened. Such a system could not be considered "sane". 8760103645bSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8770103645bSmrg alias in your environment]) 8780103645bSmrg fi 8790103645bSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8800103645bSmrg break 8810103645bSmrg fi 8820103645bSmrg # Just in case. 8830103645bSmrg sleep 1 8840103645bSmrg am_has_slept=yes 8850103645bSmrg done 8860103645bSmrg test "$[2]" = conftest.file 8870103645bSmrg ) 8880103645bSmrgthen 8890103645bSmrg # Ok. 8900103645bSmrg : 89195cf0c00Smrgelse 8920103645bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8930103645bSmrgCheck your system clock]) 89495cf0c00Smrgfi 8950103645bSmrgAC_MSG_RESULT([yes]) 8960103645bSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8970103645bSmrg# generated files are strictly newer. 8980103645bSmrgam_sleep_pid= 8990103645bSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9000103645bSmrg ( sleep 1 ) & 9010103645bSmrg am_sleep_pid=$! 9020103645bSmrgfi 9030103645bSmrgAC_CONFIG_COMMANDS_PRE( 9040103645bSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9050103645bSmrg if test -n "$am_sleep_pid"; then 9060103645bSmrg # Hide warnings about reused PIDs. 9070103645bSmrg wait $am_sleep_pid 2>/dev/null 9080103645bSmrg fi 9090103645bSmrg AC_MSG_RESULT([done])]) 9100103645bSmrgrm -f conftest.file 9110103645bSmrg]) 912100ae103Smrg 9130103645bSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 9148831d3fbSmrg# 9150103645bSmrg# This file is free software; the Free Software Foundation 9160103645bSmrg# gives unlimited permission to copy and/or distribute it, 9170103645bSmrg# with or without modifications, as long as this notice is preserved. 9188831d3fbSmrg 9190103645bSmrg# AM_SILENT_RULES([DEFAULT]) 9200103645bSmrg# -------------------------- 9210103645bSmrg# Enable less verbose build rules; with the default set to DEFAULT 9220103645bSmrg# ("yes" being less verbose, "no" or empty being verbose). 9230103645bSmrgAC_DEFUN([AM_SILENT_RULES], 9240103645bSmrg[AC_ARG_ENABLE([silent-rules], [dnl 9250103645bSmrgAS_HELP_STRING( 9260103645bSmrg [--enable-silent-rules], 9270103645bSmrg [less verbose build output (undo: "make V=1")]) 9280103645bSmrgAS_HELP_STRING( 9290103645bSmrg [--disable-silent-rules], 9300103645bSmrg [verbose build output (undo: "make V=0")])dnl 9310103645bSmrg]) 9320103645bSmrgcase $enable_silent_rules in @%:@ ((( 9330103645bSmrg yes) AM_DEFAULT_VERBOSITY=0;; 9340103645bSmrg no) AM_DEFAULT_VERBOSITY=1;; 9350103645bSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9360103645bSmrgesac 9370103645bSmrgdnl 9380103645bSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9390103645bSmrgdnl do not support nested variable expansions. 9400103645bSmrgdnl See automake bug#9928 and bug#10237. 9410103645bSmrgam_make=${MAKE-make} 9420103645bSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9430103645bSmrg [am_cv_make_support_nested_variables], 9440103645bSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9450103645bSmrgBAR0=false 9460103645bSmrgBAR1=true 9470103645bSmrgV=1 9480103645bSmrgam__doit: 9490103645bSmrg @$(TRUE) 9500103645bSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9510103645bSmrg am_cv_make_support_nested_variables=yes 9528831d3fbSmrgelse 9530103645bSmrg am_cv_make_support_nested_variables=no 9540103645bSmrgfi]) 9550103645bSmrgif test $am_cv_make_support_nested_variables = yes; then 9560103645bSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9570103645bSmrg AM_V='$(V)' 9580103645bSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9590103645bSmrgelse 9600103645bSmrg AM_V=$AM_DEFAULT_VERBOSITY 9610103645bSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 96295cf0c00Smrgfi 9630103645bSmrgAC_SUBST([AM_V])dnl 9640103645bSmrgAM_SUBST_NOTMAKE([AM_V])dnl 9650103645bSmrgAC_SUBST([AM_DEFAULT_V])dnl 9660103645bSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9670103645bSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9680103645bSmrgAM_BACKSLASH='\' 9690103645bSmrgAC_SUBST([AM_BACKSLASH])dnl 9700103645bSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9710103645bSmrg]) 9728831d3fbSmrg 9730103645bSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9748831d3fbSmrg# 9750103645bSmrg# This file is free software; the Free Software Foundation 9760103645bSmrg# gives unlimited permission to copy and/or distribute it, 9770103645bSmrg# with or without modifications, as long as this notice is preserved. 9788831d3fbSmrg 9790103645bSmrg# AM_PROG_INSTALL_STRIP 9800103645bSmrg# --------------------- 9810103645bSmrg# One issue with vendor 'install' (even GNU) is that you can't 9820103645bSmrg# specify the program used to strip binaries. This is especially 9830103645bSmrg# annoying in cross-compiling environments, where the build's strip 9840103645bSmrg# is unlikely to handle the host's binaries. 9850103645bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9860103645bSmrg# always use install-sh in "make install-strip", and initialize 9870103645bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9880103645bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9890103645bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9900103645bSmrg# Installed binaries are usually stripped using 'strip' when the user 9910103645bSmrg# run "make install-strip". However 'strip' might not be the right 9920103645bSmrg# tool to use in cross-compilation environments, therefore Automake 9930103645bSmrg# will honor the 'STRIP' environment variable to overrule this program. 9940103645bSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9950103645bSmrgif test "$cross_compiling" != no; then 9960103645bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 99795cf0c00Smrgfi 9980103645bSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9990103645bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000100ae103Smrg 10010103645bSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 1002100ae103Smrg# 10030103645bSmrg# This file is free software; the Free Software Foundation 10040103645bSmrg# gives unlimited permission to copy and/or distribute it, 10050103645bSmrg# with or without modifications, as long as this notice is preserved. 1006100ae103Smrg 10070103645bSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 10080103645bSmrg# --------------------------- 10090103645bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10100103645bSmrg# This macro is traced by Automake. 10110103645bSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012100ae103Smrg 10130103645bSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10140103645bSmrg# -------------------------- 10150103645bSmrg# Public sister of _AM_SUBST_NOTMAKE. 10160103645bSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017100ae103Smrg 10180103645bSmrg# Check how to create a tarball. -*- Autoconf -*- 1019100ae103Smrg 10200103645bSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 102195cf0c00Smrg# 10220103645bSmrg# This file is free software; the Free Software Foundation 10230103645bSmrg# gives unlimited permission to copy and/or distribute it, 10240103645bSmrg# with or without modifications, as long as this notice is preserved. 10250103645bSmrg 10260103645bSmrg# _AM_PROG_TAR(FORMAT) 10270103645bSmrg# -------------------- 10280103645bSmrg# Check how to create a tarball in format FORMAT. 10290103645bSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 103095cf0c00Smrg# 10310103645bSmrg# Substitute a variable $(am__tar) that is a command 10320103645bSmrg# writing to stdout a FORMAT-tarball containing the directory 10330103645bSmrg# $tardir. 10340103645bSmrg# tardir=directory && $(am__tar) > result.tar 103595cf0c00Smrg# 10360103645bSmrg# Substitute a variable $(am__untar) that extract such 10370103645bSmrg# a tarball read from stdin. 10380103645bSmrg# $(am__untar) < result.tar 103995cf0c00Smrg# 10400103645bSmrgAC_DEFUN([_AM_PROG_TAR], 10410103645bSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10420103645bSmrg# in the wild :-( We should find a proper way to deprecate it ... 10430103645bSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044100ae103Smrg 10450103645bSmrg# We'll loop over all known methods to create a tar archive until one works. 10460103645bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047100ae103Smrg 10480103645bSmrgm4_if([$1], [v7], 10490103645bSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050100ae103Smrg 10510103645bSmrg [m4_case([$1], 10520103645bSmrg [ustar], 10530103645bSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10540103645bSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10550103645bSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10560103645bSmrg # and bug#13588). 10570103645bSmrg am_max_uid=2097151 # 2^21 - 1 10580103645bSmrg am_max_gid=$am_max_uid 10590103645bSmrg # The $UID and $GID variables are not portable, so we need to resort 10600103645bSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10610103645bSmrg # below are definitely unexpected, so allow the users to see them 10620103645bSmrg # (that is, avoid stderr redirection). 10630103645bSmrg am_uid=`id -u || echo unknown` 10640103645bSmrg am_gid=`id -g || echo unknown` 10650103645bSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10660103645bSmrg if test $am_uid -le $am_max_uid; then 10670103645bSmrg AC_MSG_RESULT([yes]) 10680103645bSmrg else 10690103645bSmrg AC_MSG_RESULT([no]) 10700103645bSmrg _am_tools=none 10710103645bSmrg fi 10720103645bSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10730103645bSmrg if test $am_gid -le $am_max_gid; then 10740103645bSmrg AC_MSG_RESULT([yes]) 10750103645bSmrg else 10760103645bSmrg AC_MSG_RESULT([no]) 10770103645bSmrg _am_tools=none 10780103645bSmrg fi], 1079165cb819Smrg 10800103645bSmrg [pax], 10810103645bSmrg [], 10828831d3fbSmrg 10830103645bSmrg [m4_fatal([Unknown tar format])]) 10848831d3fbSmrg 10850103645bSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10868831d3fbSmrg 10870103645bSmrg # Go ahead even if we have the value already cached. We do so because we 10880103645bSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10890103645bSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10908831d3fbSmrg 10910103645bSmrg for _am_tool in $_am_tools; do 10920103645bSmrg case $_am_tool in 10930103645bSmrg gnutar) 10940103645bSmrg for _am_tar in tar gnutar gtar; do 10950103645bSmrg AM_RUN_LOG([$_am_tar --version]) && break 10960103645bSmrg done 10970103645bSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10980103645bSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10990103645bSmrg am__untar="$_am_tar -xf -" 11000103645bSmrg ;; 11010103645bSmrg plaintar) 11020103645bSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11030103645bSmrg # ustar tarball either. 11040103645bSmrg (tar --version) >/dev/null 2>&1 && continue 11050103645bSmrg am__tar='tar chf - "$$tardir"' 11060103645bSmrg am__tar_='tar chf - "$tardir"' 11070103645bSmrg am__untar='tar xf -' 11080103645bSmrg ;; 11090103645bSmrg pax) 11100103645bSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11110103645bSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11120103645bSmrg am__untar='pax -r' 11130103645bSmrg ;; 11140103645bSmrg cpio) 11150103645bSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11160103645bSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11170103645bSmrg am__untar='cpio -i -H $1 -d' 11180103645bSmrg ;; 11190103645bSmrg none) 11200103645bSmrg am__tar=false 11210103645bSmrg am__tar_=false 11220103645bSmrg am__untar=false 11230103645bSmrg ;; 11240103645bSmrg esac 11258831d3fbSmrg 11260103645bSmrg # If the value was cached, stop now. We just wanted to have am__tar 11270103645bSmrg # and am__untar set. 11280103645bSmrg test -n "${am_cv_prog_tar_$1}" && break 112995cf0c00Smrg 11300103645bSmrg # tar/untar a dummy directory, and stop if the command works. 11310103645bSmrg rm -rf conftest.dir 11320103645bSmrg mkdir conftest.dir 11330103645bSmrg echo GrepMe > conftest.dir/file 11340103645bSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11350103645bSmrg rm -rf conftest.dir 11360103645bSmrg if test -s conftest.tar; then 11370103645bSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11380103645bSmrg AM_RUN_LOG([cat conftest.dir/file]) 11390103645bSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11400103645bSmrg fi 11410103645bSmrg done 11420103645bSmrg rm -rf conftest.dir 1143165cb819Smrg 11440103645bSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11450103645bSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146165cb819Smrg 11470103645bSmrgAC_SUBST([am__tar]) 11480103645bSmrgAC_SUBST([am__untar]) 11490103645bSmrg]) # _AM_PROG_TAR 115095cf0c00Smrg 11510103645bSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 11520103645bSmrgdnl serial 11 (pkg-config-0.29) 11530103645bSmrgdnl 11540103645bSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 11550103645bSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 11560103645bSmrgdnl 11570103645bSmrgdnl This program is free software; you can redistribute it and/or modify 11580103645bSmrgdnl it under the terms of the GNU General Public License as published by 11590103645bSmrgdnl the Free Software Foundation; either version 2 of the License, or 11600103645bSmrgdnl (at your option) any later version. 11610103645bSmrgdnl 11620103645bSmrgdnl This program is distributed in the hope that it will be useful, but 11630103645bSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 11640103645bSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11650103645bSmrgdnl General Public License for more details. 11660103645bSmrgdnl 11670103645bSmrgdnl You should have received a copy of the GNU General Public License 11680103645bSmrgdnl along with this program; if not, write to the Free Software 11690103645bSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 11700103645bSmrgdnl 02111-1307, USA. 11710103645bSmrgdnl 11720103645bSmrgdnl As a special exception to the GNU General Public License, if you 11730103645bSmrgdnl distribute this file as part of a program that contains a 11740103645bSmrgdnl configuration script generated by Autoconf, you may include it under 11750103645bSmrgdnl the same distribution terms that you use for the rest of that 11760103645bSmrgdnl program. 117795cf0c00Smrg 11780103645bSmrgdnl PKG_PREREQ(MIN-VERSION) 11790103645bSmrgdnl ----------------------- 11800103645bSmrgdnl Since: 0.29 11810103645bSmrgdnl 11820103645bSmrgdnl Verify that the version of the pkg-config macros are at least 11830103645bSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 11840103645bSmrgdnl installed version of pkg-config, this checks the developer's version 11850103645bSmrgdnl of pkg.m4 when generating configure. 11860103645bSmrgdnl 11870103645bSmrgdnl To ensure that this macro is defined, also add: 11880103645bSmrgdnl m4_ifndef([PKG_PREREQ], 11890103645bSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 11900103645bSmrgdnl 11910103645bSmrgdnl See the "Since" comment for each macro you use to see what version 11920103645bSmrgdnl of the macros you require. 11930103645bSmrgm4_defun([PKG_PREREQ], 11940103645bSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 11950103645bSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 11960103645bSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 11970103645bSmrg])dnl PKG_PREREQ 119895cf0c00Smrg 11990103645bSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 12000103645bSmrgdnl ---------------------------------- 12010103645bSmrgdnl Since: 0.16 12020103645bSmrgdnl 12030103645bSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 12040103645bSmrgdnl first found in the path. Checks that the version of pkg-config found 12050103645bSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 12060103645bSmrgdnl used since that's the first version where most current features of 12070103645bSmrgdnl pkg-config existed. 12080103645bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 12090103645bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 12100103645bSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 12110103645bSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 12120103645bSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 12130103645bSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 12140103645bSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 121595cf0c00Smrg 12160103645bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 12170103645bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1218165cb819Smrgfi 12190103645bSmrgif test -n "$PKG_CONFIG"; then 12200103645bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 12210103645bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 12220103645bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 12230103645bSmrg AC_MSG_RESULT([yes]) 12240103645bSmrg else 12250103645bSmrg AC_MSG_RESULT([no]) 12260103645bSmrg PKG_CONFIG="" 12270103645bSmrg fi 12280103645bSmrgfi[]dnl 12290103645bSmrg])dnl PKG_PROG_PKG_CONFIG 1230165cb819Smrg 12310103645bSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 12320103645bSmrgdnl ------------------------------------------------------------------- 12330103645bSmrgdnl Since: 0.18 12340103645bSmrgdnl 12350103645bSmrgdnl Check to see whether a particular set of modules exists. Similar to 12360103645bSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 12370103645bSmrgdnl 12380103645bSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12390103645bSmrgdnl only at the first occurence in configure.ac, so if the first place 12400103645bSmrgdnl it's called might be skipped (such as if it is within an "if", you 12410103645bSmrgdnl have to call PKG_CHECK_EXISTS manually 12420103645bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 12430103645bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 12440103645bSmrgif test -n "$PKG_CONFIG" && \ 12450103645bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 12460103645bSmrg m4_default([$2], [:]) 12470103645bSmrgm4_ifvaln([$3], [else 12480103645bSmrg $3])dnl 12490103645bSmrgfi]) 12500103645bSmrg 12510103645bSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 12520103645bSmrgdnl --------------------------------------------- 12530103645bSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 12540103645bSmrgdnl pkg_failed based on the result. 12550103645bSmrgm4_define([_PKG_CONFIG], 12560103645bSmrg[if test -n "$$1"; then 12570103645bSmrg pkg_cv_[]$1="$$1" 12580103645bSmrg elif test -n "$PKG_CONFIG"; then 12590103645bSmrg PKG_CHECK_EXISTS([$3], 12600103645bSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 12610103645bSmrg test "x$?" != "x0" && pkg_failed=yes ], 12620103645bSmrg [pkg_failed=yes]) 12630103645bSmrg else 12640103645bSmrg pkg_failed=untried 12650103645bSmrgfi[]dnl 12660103645bSmrg])dnl _PKG_CONFIG 12670103645bSmrg 12680103645bSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 12690103645bSmrgdnl --------------------------- 12700103645bSmrgdnl Internal check to see if pkg-config supports short errors. 12710103645bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 12720103645bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12730103645bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12740103645bSmrg _pkg_short_errors_supported=yes 127595cf0c00Smrgelse 12760103645bSmrg _pkg_short_errors_supported=no 12770103645bSmrgfi[]dnl 12780103645bSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 12798831d3fbSmrg 12808831d3fbSmrg 12810103645bSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 12820103645bSmrgdnl [ACTION-IF-NOT-FOUND]) 12830103645bSmrgdnl -------------------------------------------------------------- 12840103645bSmrgdnl Since: 0.4.0 12850103645bSmrgdnl 12860103645bSmrgdnl Note that if there is a possibility the first call to 12870103645bSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 12880103645bSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 12890103645bSmrgAC_DEFUN([PKG_CHECK_MODULES], 12900103645bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 12910103645bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 12920103645bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 129395cf0c00Smrg 12940103645bSmrgpkg_failed=no 12950103645bSmrgAC_MSG_CHECKING([for $1]) 129695cf0c00Smrg 12970103645bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 12980103645bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 129995cf0c00Smrg 13000103645bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 13010103645bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 13020103645bSmrgSee the pkg-config man page for more details.]) 130395cf0c00Smrg 13040103645bSmrgif test $pkg_failed = yes; then 13050103645bSmrg AC_MSG_RESULT([no]) 13060103645bSmrg _PKG_SHORT_ERRORS_SUPPORTED 13070103645bSmrg if test $_pkg_short_errors_supported = yes; then 13080103645bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 13090103645bSmrg else 13100103645bSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 13110103645bSmrg fi 13120103645bSmrg # Put the nasty error message in config.log where it belongs 13130103645bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 131495cf0c00Smrg 13150103645bSmrg m4_default([$4], [AC_MSG_ERROR( 13160103645bSmrg[Package requirements ($2) were not met: 131795cf0c00Smrg 13180103645bSmrg$$1_PKG_ERRORS 13190103645bSmrg 13200103645bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 13210103645bSmrginstalled software in a non-standard prefix. 13220103645bSmrg 13230103645bSmrg_PKG_TEXT])[]dnl 13240103645bSmrg ]) 13250103645bSmrgelif test $pkg_failed = untried; then 13260103645bSmrg AC_MSG_RESULT([no]) 13270103645bSmrg m4_default([$4], [AC_MSG_FAILURE( 13280103645bSmrg[The pkg-config script could not be found or is too old. Make sure it 13290103645bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 13300103645bSmrgpath to pkg-config. 13310103645bSmrg 13320103645bSmrg_PKG_TEXT 13330103645bSmrg 13340103645bSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 13350103645bSmrg ]) 13368831d3fbSmrgelse 13370103645bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 13380103645bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 13390103645bSmrg AC_MSG_RESULT([yes]) 13400103645bSmrg $3 13410103645bSmrgfi[]dnl 13420103645bSmrg])dnl PKG_CHECK_MODULES 13438831d3fbSmrg 13448831d3fbSmrg 13450103645bSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 13460103645bSmrgdnl [ACTION-IF-NOT-FOUND]) 13470103645bSmrgdnl --------------------------------------------------------------------- 13480103645bSmrgdnl Since: 0.29 13490103645bSmrgdnl 13500103645bSmrgdnl Checks for existence of MODULES and gathers its build flags with 13510103645bSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 13520103645bSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 13530103645bSmrgdnl 13540103645bSmrgdnl Note that if there is a possibility the first call to 13550103645bSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 13560103645bSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 13570103645bSmrgdnl configure.ac. 13580103645bSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 13590103645bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 13600103645bSmrg_save_PKG_CONFIG=$PKG_CONFIG 13610103645bSmrgPKG_CONFIG="$PKG_CONFIG --static" 13620103645bSmrgPKG_CHECK_MODULES($@) 13630103645bSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 13640103645bSmrg])dnl PKG_CHECK_MODULES_STATIC 13658831d3fbSmrg 136695cf0c00Smrg 13670103645bSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 13680103645bSmrgdnl ------------------------- 13690103645bSmrgdnl Since: 0.27 13700103645bSmrgdnl 13710103645bSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 13720103645bSmrgdnl should install pkg-config .pc files. By default the directory is 13730103645bSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 13740103645bSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 13750103645bSmrgdnl parameter. 13760103645bSmrgAC_DEFUN([PKG_INSTALLDIR], 13770103645bSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 13780103645bSmrgm4_pushdef([pkg_description], 13790103645bSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 13800103645bSmrgAC_ARG_WITH([pkgconfigdir], 13810103645bSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 13820103645bSmrg [with_pkgconfigdir=]pkg_default) 13830103645bSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 13840103645bSmrgm4_popdef([pkg_default]) 13850103645bSmrgm4_popdef([pkg_description]) 13860103645bSmrg])dnl PKG_INSTALLDIR 13870103645bSmrg 13880103645bSmrg 13890103645bSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 13900103645bSmrgdnl -------------------------------- 13910103645bSmrgdnl Since: 0.27 13920103645bSmrgdnl 13930103645bSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 13940103645bSmrgdnl module should install arch-independent pkg-config .pc files. By 13950103645bSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 13960103645bSmrgdnl changed by passing DIRECTORY. The user can override through the 13970103645bSmrgdnl --with-noarch-pkgconfigdir parameter. 13980103645bSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 13990103645bSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 14000103645bSmrgm4_pushdef([pkg_description], 14010103645bSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 14020103645bSmrgAC_ARG_WITH([noarch-pkgconfigdir], 14030103645bSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 14040103645bSmrg [with_noarch_pkgconfigdir=]pkg_default) 14050103645bSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 14060103645bSmrgm4_popdef([pkg_default]) 14070103645bSmrgm4_popdef([pkg_description]) 14080103645bSmrg])dnl PKG_NOARCH_INSTALLDIR 14090103645bSmrg 141095cf0c00Smrg 14110103645bSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 14120103645bSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 14130103645bSmrgdnl ------------------------------------------- 14140103645bSmrgdnl Since: 0.28 14150103645bSmrgdnl 14160103645bSmrgdnl Retrieves the value of the pkg-config variable for the given module. 14170103645bSmrgAC_DEFUN([PKG_CHECK_VAR], 14180103645bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 14190103645bSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 14208831d3fbSmrg 14210103645bSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 14220103645bSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 142395cf0c00Smrg 14240103645bSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 14250103645bSmrg])dnl PKG_CHECK_VAR 142695cf0c00Smrg 14270103645bSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 14280103645bSmrgdnl 142914a67432Smrgdnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. 14300103645bSmrgdnl 14310103645bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 14320103645bSmrgdnl copy of this software and associated documentation files (the "Software"), 14330103645bSmrgdnl to deal in the Software without restriction, including without limitation 14340103645bSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 14350103645bSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 14360103645bSmrgdnl Software is furnished to do so, subject to the following conditions: 14370103645bSmrgdnl 14380103645bSmrgdnl The above copyright notice and this permission notice (including the next 14390103645bSmrgdnl paragraph) shall be included in all copies or substantial portions of the 14400103645bSmrgdnl Software. 14410103645bSmrgdnl 14420103645bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14430103645bSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14440103645bSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 14450103645bSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14460103645bSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 14470103645bSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 14480103645bSmrgdnl DEALINGS IN THE SOFTWARE. 144995cf0c00Smrg 14500103645bSmrg# XORG_MACROS_VERSION(required-version) 14510103645bSmrg# ------------------------------------- 145295cf0c00Smrg# Minimum version: 1.1.0 14538831d3fbSmrg# 14540103645bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 14550103645bSmrg# your configure.ac with the minimum required version, such as: 14560103645bSmrg# XORG_MACROS_VERSION(1.1) 14578831d3fbSmrg# 14580103645bSmrg# To ensure that this macro is defined, also add: 14590103645bSmrg# m4_ifndef([XORG_MACROS_VERSION], 14600103645bSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 14618831d3fbSmrg# 14620103645bSmrg# 14630103645bSmrg# See the "minimum version" comment for each macro you use to see what 14640103645bSmrg# version you require. 14650103645bSmrgm4_defun([XORG_MACROS_VERSION],[ 146614a67432Smrgm4_define([vers_have], [1.20.0]) 14670103645bSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 14680103645bSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 14690103645bSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 14700103645bSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 14710103645bSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 14720103645bSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 14730103645bSmrgm4_undefine([vers_have]) 14740103645bSmrgm4_undefine([maj_have]) 14750103645bSmrgm4_undefine([maj_needed]) 14760103645bSmrg]) # XORG_MACROS_VERSION 14778831d3fbSmrg 14780103645bSmrg# XORG_PROG_RAWCPP() 14790103645bSmrg# ------------------ 14800103645bSmrg# Minimum version: 1.0.0 14810103645bSmrg# 14820103645bSmrg# Find cpp program and necessary flags for use in pre-processing text files 14830103645bSmrg# such as man pages and config files 14840103645bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 14850103645bSmrgAC_REQUIRE([AC_PROG_CPP]) 14860103645bSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 14870103645bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 148895cf0c00Smrg 14890103645bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 14900103645bSmrg# which is not the best choice for supporting other OS'es, but covers most 14910103645bSmrg# of the ones we need for now. 14920103645bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 14930103645bSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 14940103645bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 14950103645bSmrg AC_MSG_RESULT([no]) 14960103645bSmrgelse 14970103645bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 14980103645bSmrg RAWCPPFLAGS=-undef 14990103645bSmrg AC_MSG_RESULT([yes]) 15000103645bSmrg # under Cygwin unix is still defined even with -undef 15010103645bSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15020103645bSmrg RAWCPPFLAGS="-undef -ansi" 15030103645bSmrg AC_MSG_RESULT([yes, with -ansi]) 15040103645bSmrg else 15050103645bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 15060103645bSmrg fi 150795cf0c00Smrgfi 15080103645bSmrgrm -f conftest.$ac_ext 150995cf0c00Smrg 15100103645bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 15110103645bSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 151214a67432Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 15130103645bSmrg AC_MSG_RESULT([no]) 15140103645bSmrgelse 151514a67432Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 15160103645bSmrg TRADITIONALCPPFLAGS="-traditional" 15170103645bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 15180103645bSmrg AC_MSG_RESULT([yes]) 15190103645bSmrg else 15200103645bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 15210103645bSmrg fi 15220103645bSmrgfi 15230103645bSmrgrm -f conftest.$ac_ext 15240103645bSmrgAC_SUBST(RAWCPPFLAGS) 15250103645bSmrgAC_SUBST(TRADITIONALCPPFLAGS) 15260103645bSmrg]) # XORG_PROG_RAWCPP 152795cf0c00Smrg 15280103645bSmrg# XORG_MANPAGE_SECTIONS() 15290103645bSmrg# ----------------------- 15300103645bSmrg# Minimum version: 1.0.0 15318831d3fbSmrg# 15320103645bSmrg# Determine which sections man pages go in for the different man page types 15330103645bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 15340103645bSmrg# Not sure if there's any better way than just hardcoding by OS name. 15350103645bSmrg# Override default settings by setting environment variables 15360103645bSmrg# Added MAN_SUBSTS in version 1.8 15370103645bSmrg# Added AC_PROG_SED in version 1.8 15388831d3fbSmrg 15390103645bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 15400103645bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 15410103645bSmrgAC_REQUIRE([AC_PROG_SED]) 15428831d3fbSmrg 15430103645bSmrgcase $host_os in 15440103645bSmrg solaris*) 15450103645bSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 15460103645bSmrg # check for a man page file found in later versions that use 15470103645bSmrg # traditional section numbers instead 15480103645bSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 15490103645bSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 15500103645bSmrg ;; 15510103645bSmrg *) SYSV_MAN_SECTIONS=false ;; 15520103645bSmrgesac 155395cf0c00Smrg 15540103645bSmrgif test x$APP_MAN_SUFFIX = x ; then 15550103645bSmrg APP_MAN_SUFFIX=1 15560103645bSmrgfi 15570103645bSmrgif test x$APP_MAN_DIR = x ; then 15580103645bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 15590103645bSmrgfi 156095cf0c00Smrg 15610103645bSmrgif test x$LIB_MAN_SUFFIX = x ; then 15620103645bSmrg LIB_MAN_SUFFIX=3 15630103645bSmrgfi 15640103645bSmrgif test x$LIB_MAN_DIR = x ; then 15650103645bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 15660103645bSmrgfi 156795cf0c00Smrg 15680103645bSmrgif test x$FILE_MAN_SUFFIX = x ; then 15690103645bSmrg case $SYSV_MAN_SECTIONS in 15700103645bSmrg true) FILE_MAN_SUFFIX=4 ;; 15710103645bSmrg *) FILE_MAN_SUFFIX=5 ;; 15720103645bSmrg esac 15730103645bSmrgfi 15740103645bSmrgif test x$FILE_MAN_DIR = x ; then 15750103645bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 157695cf0c00Smrgfi 157795cf0c00Smrg 15780103645bSmrgif test x$MISC_MAN_SUFFIX = x ; then 15790103645bSmrg case $SYSV_MAN_SECTIONS in 15800103645bSmrg true) MISC_MAN_SUFFIX=5 ;; 15810103645bSmrg *) MISC_MAN_SUFFIX=7 ;; 15820103645bSmrg esac 15830103645bSmrgfi 15840103645bSmrgif test x$MISC_MAN_DIR = x ; then 15850103645bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 158695cf0c00Smrgfi 158795cf0c00Smrg 15880103645bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 15890103645bSmrg case $SYSV_MAN_SECTIONS in 15900103645bSmrg true) DRIVER_MAN_SUFFIX=7 ;; 15910103645bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 15920103645bSmrg esac 15930103645bSmrgfi 15940103645bSmrgif test x$DRIVER_MAN_DIR = x ; then 15950103645bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 15960103645bSmrgfi 159795cf0c00Smrg 15980103645bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 15990103645bSmrg case $SYSV_MAN_SECTIONS in 16000103645bSmrg true) ADMIN_MAN_SUFFIX=1m ;; 16010103645bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 16020103645bSmrg esac 16030103645bSmrgfi 16040103645bSmrgif test x$ADMIN_MAN_DIR = x ; then 16050103645bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 16060103645bSmrgfi 160795cf0c00Smrg 160895cf0c00Smrg 16090103645bSmrgAC_SUBST([APP_MAN_SUFFIX]) 16100103645bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 16110103645bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 16120103645bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 16130103645bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 16140103645bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 16150103645bSmrgAC_SUBST([APP_MAN_DIR]) 16160103645bSmrgAC_SUBST([LIB_MAN_DIR]) 16170103645bSmrgAC_SUBST([FILE_MAN_DIR]) 16180103645bSmrgAC_SUBST([MISC_MAN_DIR]) 16190103645bSmrgAC_SUBST([DRIVER_MAN_DIR]) 16200103645bSmrgAC_SUBST([ADMIN_MAN_DIR]) 162195cf0c00Smrg 16220103645bSmrgXORG_MAN_PAGE="X Version 11" 16230103645bSmrgAC_SUBST([XORG_MAN_PAGE]) 16240103645bSmrgMAN_SUBSTS="\ 16250103645bSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16260103645bSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16270103645bSmrg -e 's|__xservername__|Xorg|g' \ 16280103645bSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 16290103645bSmrg -e 's|__projectroot__|\$(prefix)|g' \ 16300103645bSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 16310103645bSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 16320103645bSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 16330103645bSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 16340103645bSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 16350103645bSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 16360103645bSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 16370103645bSmrgAC_SUBST([MAN_SUBSTS]) 163895cf0c00Smrg 16390103645bSmrg]) # XORG_MANPAGE_SECTIONS 164095cf0c00Smrg 16410103645bSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 16420103645bSmrg# ------------------------ 16430103645bSmrg# Minimum version: 1.7.0 16448831d3fbSmrg# 16450103645bSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 16460103645bSmrg# provided by xorg-sgml-doctools, if installed. 16470103645bSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 16480103645bSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 16490103645bSmrgXORG_SGML_PATH= 16500103645bSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 16510103645bSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 16520103645bSmrg [m4_ifval([$1],[:], 16530103645bSmrg [if test x"$cross_compiling" != x"yes" ; then 16540103645bSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 16550103645bSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 16560103645bSmrg fi]) 16570103645bSmrg ]) 16580103645bSmrg 16590103645bSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 16600103645bSmrg# the path and the name of the doc stylesheet 16610103645bSmrgif test "x$XORG_SGML_PATH" != "x" ; then 16620103645bSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 16630103645bSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 16640103645bSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 16650103645bSmrgelse 16660103645bSmrg AC_MSG_RESULT([no]) 16670103645bSmrgfi 16680103645bSmrg 16690103645bSmrgAC_SUBST(XORG_SGML_PATH) 16700103645bSmrgAC_SUBST(STYLESHEET_SRCDIR) 16710103645bSmrgAC_SUBST(XSL_STYLESHEET) 16720103645bSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 16730103645bSmrg]) # XORG_CHECK_SGML_DOCTOOLS 16740103645bSmrg 16750103645bSmrg# XORG_CHECK_LINUXDOC 16760103645bSmrg# ------------------- 16770103645bSmrg# Minimum version: 1.0.0 16788831d3fbSmrg# 16790103645bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 16800103645bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 16810103645bSmrg# Whether or not the necessary tools and files are found can be checked 16820103645bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 16830103645bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 16840103645bSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 16850103645bSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 168695cf0c00Smrg 16870103645bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 168895cf0c00Smrg 16890103645bSmrgAC_MSG_CHECKING([whether to build documentation]) 16900103645bSmrg 16910103645bSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 16920103645bSmrg BUILDDOC=yes 169395cf0c00Smrgelse 16940103645bSmrg BUILDDOC=no 169595cf0c00Smrgfi 169695cf0c00Smrg 16970103645bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 169895cf0c00Smrg 16990103645bSmrgAC_MSG_RESULT([$BUILDDOC]) 170095cf0c00Smrg 17010103645bSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 17020103645bSmrg 17030103645bSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 17040103645bSmrg BUILDPDFDOC=yes 17050103645bSmrgelse 17060103645bSmrg BUILDPDFDOC=no 17070103645bSmrgfi 17080103645bSmrg 17090103645bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17100103645bSmrg 17110103645bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17120103645bSmrg 17130103645bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 17140103645bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 17150103645bSmrgMAKE_PDF="$PS2PDF" 17160103645bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17170103645bSmrg 17180103645bSmrgAC_SUBST(MAKE_TEXT) 17190103645bSmrgAC_SUBST(MAKE_PS) 17200103645bSmrgAC_SUBST(MAKE_PDF) 17210103645bSmrgAC_SUBST(MAKE_HTML) 17220103645bSmrg]) # XORG_CHECK_LINUXDOC 17230103645bSmrg 17240103645bSmrg# XORG_CHECK_DOCBOOK 17250103645bSmrg# ------------------- 17260103645bSmrg# Minimum version: 1.0.0 17270103645bSmrg# 17280103645bSmrg# Checks for the ability to build output formats from SGML DocBook source. 17290103645bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 17300103645bSmrg# indicates whether the necessary tools and files are found and, if set, 17310103645bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 17320103645bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 17330103645bSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 17340103645bSmrg 17350103645bSmrgBUILDTXTDOC=no 17360103645bSmrgBUILDPDFDOC=no 17370103645bSmrgBUILDPSDOC=no 17380103645bSmrgBUILDHTMLDOC=no 17390103645bSmrg 17400103645bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 17410103645bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 17420103645bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 17430103645bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 174495cf0c00Smrg 17450103645bSmrgAC_MSG_CHECKING([whether to build text documentation]) 17460103645bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 17470103645bSmrg test x$BUILD_TXTDOC != xno; then 17480103645bSmrg BUILDTXTDOC=yes 17490103645bSmrgfi 17500103645bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 17510103645bSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 175295cf0c00Smrg 17530103645bSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 17540103645bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 17550103645bSmrg test x$BUILD_PDFDOC != xno; then 17560103645bSmrg BUILDPDFDOC=yes 17570103645bSmrgfi 17580103645bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17590103645bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 176095cf0c00Smrg 17610103645bSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 17620103645bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 17630103645bSmrg test x$BUILD_PSDOC != xno; then 17640103645bSmrg BUILDPSDOC=yes 176595cf0c00Smrgfi 17660103645bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 17670103645bSmrgAC_MSG_RESULT([$BUILDPSDOC]) 17688831d3fbSmrg 17690103645bSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 17700103645bSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 17710103645bSmrg test x$BUILD_HTMLDOC != xno; then 17720103645bSmrg BUILDHTMLDOC=yes 17730103645bSmrgfi 17740103645bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 17750103645bSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 17768831d3fbSmrg 17770103645bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 17780103645bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 17790103645bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 17800103645bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 17810103645bSmrg 17820103645bSmrgAC_SUBST(MAKE_TEXT) 17830103645bSmrgAC_SUBST(MAKE_PS) 17840103645bSmrgAC_SUBST(MAKE_PDF) 17850103645bSmrgAC_SUBST(MAKE_HTML) 17860103645bSmrg]) # XORG_CHECK_DOCBOOK 17870103645bSmrg 17880103645bSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 17890103645bSmrg# ---------------- 17900103645bSmrg# Minimum version: 1.5.0 17910103645bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 17928831d3fbSmrg# 17930103645bSmrg# Documentation tools are not always available on all platforms and sometimes 17940103645bSmrg# not at the appropriate level. This macro enables a module to test for the 17950103645bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 179614a67432Smrg# the --with-xmlto option, it allows maximum flexibility in making decisions 17970103645bSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 17980103645bSmrg# --with-xmlto assumes 'auto'. 17998831d3fbSmrg# 18000103645bSmrg# Interface to module: 18010103645bSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 18020103645bSmrg# XMLTO: returns the path of the xmlto program found 18030103645bSmrg# returns the path set by the user in the environment 18040103645bSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 18050103645bSmrg# 'no' user instructs the module not to use xmlto 18068831d3fbSmrg# 18070103645bSmrg# Added in version 1.10.0 18080103645bSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 18090103645bSmrg# xmlto for text output requires either lynx, links, or w3m browsers 18108831d3fbSmrg# 18110103645bSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 18128831d3fbSmrg# 18130103645bSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 18140103645bSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 18150103645bSmrgm4_define([_defopt], m4_default([$2], [auto])) 18160103645bSmrgAC_ARG_WITH(xmlto, 18170103645bSmrg AS_HELP_STRING([--with-xmlto], 18180103645bSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 18190103645bSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 18200103645bSmrgm4_undefine([_defopt]) 18218831d3fbSmrg 18220103645bSmrgif test "x$use_xmlto" = x"auto"; then 18230103645bSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18240103645bSmrg if test "x$XMLTO" = "x"; then 18250103645bSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 18260103645bSmrg have_xmlto=no 18270103645bSmrg else 18280103645bSmrg have_xmlto=yes 18290103645bSmrg fi 18300103645bSmrgelif test "x$use_xmlto" = x"yes" ; then 18310103645bSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18320103645bSmrg if test "x$XMLTO" = "x"; then 18330103645bSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 18340103645bSmrg fi 18350103645bSmrg have_xmlto=yes 18360103645bSmrgelif test "x$use_xmlto" = x"no" ; then 18370103645bSmrg if test "x$XMLTO" != "x"; then 18380103645bSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 18390103645bSmrg fi 18400103645bSmrg have_xmlto=no 18410103645bSmrgelse 18420103645bSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 18430103645bSmrgfi 18448831d3fbSmrg 18450103645bSmrg# Test for a minimum version of xmlto, if provided. 18460103645bSmrgm4_ifval([$1], 18470103645bSmrg[if test "$have_xmlto" = yes; then 18480103645bSmrg # scrape the xmlto version 18490103645bSmrg AC_MSG_CHECKING([the xmlto version]) 18500103645bSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 18510103645bSmrg AC_MSG_RESULT([$xmlto_version]) 18520103645bSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 18530103645bSmrg [if test "x$use_xmlto" = xauto; then 18540103645bSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 18550103645bSmrg have_xmlto=no 18560103645bSmrg else 18570103645bSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 18580103645bSmrg fi]) 18590103645bSmrgfi]) 18608831d3fbSmrg 18610103645bSmrg# Test for the ability of xmlto to generate a text target 18620103645bSmrg# 18630103645bSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 18640103645bSmrg# following test for empty XML docbook files. 18650103645bSmrg# For compatibility reasons use the following empty XML docbook file and if 18660103645bSmrg# it fails try it again with a non-empty XML file. 18670103645bSmrghave_xmlto_text=no 18680103645bSmrgcat > conftest.xml << "EOF" 18690103645bSmrgEOF 18700103645bSmrgAS_IF([test "$have_xmlto" = yes], 18710103645bSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 18720103645bSmrg [have_xmlto_text=yes], 18730103645bSmrg [# Try it again with a non-empty XML file. 18740103645bSmrg cat > conftest.xml << "EOF" 18750103645bSmrg<x></x> 18760103645bSmrgEOF 18770103645bSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 18780103645bSmrg [have_xmlto_text=yes], 18790103645bSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 18800103645bSmrgrm -f conftest.xml 18810103645bSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 18820103645bSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 18830103645bSmrg]) # XORG_WITH_XMLTO 18848831d3fbSmrg 18850103645bSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 18860103645bSmrg# -------------------------------------------- 18870103645bSmrg# Minimum version: 1.12.0 18880103645bSmrg# Minimum version for optional DEFAULT argument: 1.12.0 18890103645bSmrg# 18900103645bSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 18910103645bSmrg# XML-based language used for the transformation of XML documents. 18920103645bSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 18930103645bSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 18940103645bSmrg# The XSLT processor is often used as a standalone tool for transformations. 18950103645bSmrg# It should not be assumed that this tool is used only to work with documnetation. 18960103645bSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 18970103645bSmrg# 18980103645bSmrg# Interface to module: 18990103645bSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 19000103645bSmrg# XSLTPROC: returns the path of the xsltproc program found 19010103645bSmrg# returns the path set by the user in the environment 19020103645bSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 19030103645bSmrg# 'no' user instructs the module not to use xsltproc 19040103645bSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 19050103645bSmrg# 19060103645bSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 19070103645bSmrg# 19080103645bSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 19090103645bSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 19100103645bSmrg# Preserves the interface, should it be implemented later 19110103645bSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 19120103645bSmrgm4_define([_defopt], m4_default([$2], [auto])) 19130103645bSmrgAC_ARG_WITH(xsltproc, 19140103645bSmrg AS_HELP_STRING([--with-xsltproc], 19150103645bSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 19160103645bSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 19170103645bSmrgm4_undefine([_defopt]) 19188831d3fbSmrg 19190103645bSmrgif test "x$use_xsltproc" = x"auto"; then 19200103645bSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19210103645bSmrg if test "x$XSLTPROC" = "x"; then 19220103645bSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 19230103645bSmrg have_xsltproc=no 19240103645bSmrg else 19250103645bSmrg have_xsltproc=yes 19260103645bSmrg fi 19270103645bSmrgelif test "x$use_xsltproc" = x"yes" ; then 19280103645bSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19290103645bSmrg if test "x$XSLTPROC" = "x"; then 19300103645bSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 19310103645bSmrg fi 19320103645bSmrg have_xsltproc=yes 19330103645bSmrgelif test "x$use_xsltproc" = x"no" ; then 19340103645bSmrg if test "x$XSLTPROC" != "x"; then 19350103645bSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 19360103645bSmrg fi 19370103645bSmrg have_xsltproc=no 19380103645bSmrgelse 19390103645bSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 194095cf0c00Smrgfi 19418831d3fbSmrg 19420103645bSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 19430103645bSmrg]) # XORG_WITH_XSLTPROC 19440103645bSmrg 19450103645bSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 19460103645bSmrg# ---------------------------------------- 19470103645bSmrg# Minimum version: 1.15.0 19488831d3fbSmrg# 19490103645bSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 19500103645bSmrg# scanning arbitrary text files, extracting information from those text files, 19510103645bSmrg# and printing reports based on that information. 19528831d3fbSmrg# 19530103645bSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 19548831d3fbSmrg# 19550103645bSmrg# Interface to module: 19560103645bSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 19570103645bSmrg# PERL: returns the path of the perl program found 19580103645bSmrg# returns the path set by the user in the environment 19590103645bSmrg# --with-perl: 'yes' user instructs the module to use perl 19600103645bSmrg# 'no' user instructs the module not to use perl 19610103645bSmrg# have_perl: returns yes if perl found in PATH or no 19628831d3fbSmrg# 19630103645bSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 19640103645bSmrg# 19650103645bSmrgAC_DEFUN([XORG_WITH_PERL],[ 19660103645bSmrgAC_ARG_VAR([PERL], [Path to perl command]) 19670103645bSmrg# Preserves the interface, should it be implemented later 19680103645bSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 19690103645bSmrgm4_define([_defopt], m4_default([$2], [auto])) 19700103645bSmrgAC_ARG_WITH(perl, 19710103645bSmrg AS_HELP_STRING([--with-perl], 19720103645bSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 19730103645bSmrg [use_perl=$withval], [use_perl=]_defopt) 19740103645bSmrgm4_undefine([_defopt]) 197595cf0c00Smrg 19760103645bSmrgif test "x$use_perl" = x"auto"; then 19770103645bSmrg AC_PATH_PROG([PERL], [perl]) 19780103645bSmrg if test "x$PERL" = "x"; then 19790103645bSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 19800103645bSmrg have_perl=no 19810103645bSmrg else 19820103645bSmrg have_perl=yes 19830103645bSmrg fi 19840103645bSmrgelif test "x$use_perl" = x"yes" ; then 19850103645bSmrg AC_PATH_PROG([PERL], [perl]) 19860103645bSmrg if test "x$PERL" = "x"; then 19870103645bSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 19880103645bSmrg fi 19890103645bSmrg have_perl=yes 19900103645bSmrgelif test "x$use_perl" = x"no" ; then 19910103645bSmrg if test "x$PERL" != "x"; then 19920103645bSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 19930103645bSmrg fi 19940103645bSmrg have_perl=no 19950103645bSmrgelse 19960103645bSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 19970103645bSmrgfi 199895cf0c00Smrg 19990103645bSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 20000103645bSmrg]) # XORG_WITH_PERL 20018831d3fbSmrg 20020103645bSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 200395cf0c00Smrg# ---------------- 20040103645bSmrg# Minimum version: 1.5.0 20050103645bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 20068831d3fbSmrg# 20070103645bSmrg# Documentation tools are not always available on all platforms and sometimes 20080103645bSmrg# not at the appropriate level. This macro enables a module to test for the 20090103645bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 201014a67432Smrg# the --with-asciidoc option, it allows maximum flexibility in making decisions 20110103645bSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 20120103645bSmrg# --with-asciidoc assumes 'auto'. 20138831d3fbSmrg# 20140103645bSmrg# Interface to module: 20150103645bSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 20160103645bSmrg# ASCIIDOC: returns the path of the asciidoc program found 20170103645bSmrg# returns the path set by the user in the environment 20180103645bSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 20190103645bSmrg# 'no' user instructs the module not to use asciidoc 20208831d3fbSmrg# 20210103645bSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 20228831d3fbSmrg# 20230103645bSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 20240103645bSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 20250103645bSmrgm4_define([_defopt], m4_default([$2], [auto])) 20260103645bSmrgAC_ARG_WITH(asciidoc, 20270103645bSmrg AS_HELP_STRING([--with-asciidoc], 20280103645bSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 20290103645bSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 20300103645bSmrgm4_undefine([_defopt]) 203195cf0c00Smrg 20320103645bSmrgif test "x$use_asciidoc" = x"auto"; then 20330103645bSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20340103645bSmrg if test "x$ASCIIDOC" = "x"; then 20350103645bSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 20360103645bSmrg have_asciidoc=no 20370103645bSmrg else 20380103645bSmrg have_asciidoc=yes 20390103645bSmrg fi 20400103645bSmrgelif test "x$use_asciidoc" = x"yes" ; then 20410103645bSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20420103645bSmrg if test "x$ASCIIDOC" = "x"; then 20430103645bSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 20440103645bSmrg fi 20450103645bSmrg have_asciidoc=yes 20460103645bSmrgelif test "x$use_asciidoc" = x"no" ; then 20470103645bSmrg if test "x$ASCIIDOC" != "x"; then 20480103645bSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 20490103645bSmrg fi 20500103645bSmrg have_asciidoc=no 20510103645bSmrgelse 20520103645bSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 20530103645bSmrgfi 20540103645bSmrgm4_ifval([$1], 20550103645bSmrg[if test "$have_asciidoc" = yes; then 20560103645bSmrg # scrape the asciidoc version 20570103645bSmrg AC_MSG_CHECKING([the asciidoc version]) 20580103645bSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 20590103645bSmrg AC_MSG_RESULT([$asciidoc_version]) 20600103645bSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 20610103645bSmrg [if test "x$use_asciidoc" = xauto; then 20620103645bSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 20630103645bSmrg have_asciidoc=no 20640103645bSmrg else 20650103645bSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 20660103645bSmrg fi]) 20670103645bSmrgfi]) 20680103645bSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 20690103645bSmrg]) # XORG_WITH_ASCIIDOC 207095cf0c00Smrg 20710103645bSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 20720103645bSmrg# ------------------------------------------- 20730103645bSmrg# Minimum version: 1.5.0 20740103645bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 20750103645bSmrg# Minimum version for optional DOT checking: 1.18.0 20768831d3fbSmrg# 20770103645bSmrg# Documentation tools are not always available on all platforms and sometimes 20780103645bSmrg# not at the appropriate level. This macro enables a module to test for the 20790103645bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 208014a67432Smrg# the --with-doxygen option, it allows maximum flexibility in making decisions 20810103645bSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 20820103645bSmrg# --with-doxygen assumes 'auto'. 20838831d3fbSmrg# 20840103645bSmrg# Interface to module: 20850103645bSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 20860103645bSmrg# DOXYGEN: returns the path of the doxygen program found 20870103645bSmrg# returns the path set by the user in the environment 20880103645bSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 20890103645bSmrg# 'no' user instructs the module not to use doxygen 20908831d3fbSmrg# 20910103645bSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 20928831d3fbSmrg# 20930103645bSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 20940103645bSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 20950103645bSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 20960103645bSmrgm4_define([_defopt], m4_default([$2], [auto])) 20970103645bSmrgAC_ARG_WITH(doxygen, 20980103645bSmrg AS_HELP_STRING([--with-doxygen], 20990103645bSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 21000103645bSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 21010103645bSmrgm4_undefine([_defopt]) 210295cf0c00Smrg 21030103645bSmrgif test "x$use_doxygen" = x"auto"; then 21040103645bSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21050103645bSmrg if test "x$DOXYGEN" = "x"; then 21060103645bSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 21070103645bSmrg have_doxygen=no 21080103645bSmrg else 21090103645bSmrg have_doxygen=yes 21100103645bSmrg fi 21110103645bSmrgelif test "x$use_doxygen" = x"yes" ; then 21120103645bSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21130103645bSmrg if test "x$DOXYGEN" = "x"; then 21140103645bSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 21150103645bSmrg fi 21160103645bSmrg have_doxygen=yes 21170103645bSmrgelif test "x$use_doxygen" = x"no" ; then 21180103645bSmrg if test "x$DOXYGEN" != "x"; then 21190103645bSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 21200103645bSmrg fi 21210103645bSmrg have_doxygen=no 21228831d3fbSmrgelse 21230103645bSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 21248831d3fbSmrgfi 21250103645bSmrgm4_ifval([$1], 21260103645bSmrg[if test "$have_doxygen" = yes; then 21270103645bSmrg # scrape the doxygen version 21280103645bSmrg AC_MSG_CHECKING([the doxygen version]) 21290103645bSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 21300103645bSmrg AC_MSG_RESULT([$doxygen_version]) 21310103645bSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 21320103645bSmrg [if test "x$use_doxygen" = xauto; then 21330103645bSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 21340103645bSmrg have_doxygen=no 21350103645bSmrg else 21360103645bSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 21370103645bSmrg fi]) 21380103645bSmrgfi]) 213995cf0c00Smrg 21400103645bSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 21410103645bSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 21420103645bSmrgdnl HAVE_DOT = @HAVE_DOT@ 21430103645bSmrgHAVE_DOT=no 21440103645bSmrgif test "x$have_doxygen" = "xyes"; then 21450103645bSmrg AC_PATH_PROG([DOT], [dot]) 21460103645bSmrg if test "x$DOT" != "x"; then 21470103645bSmrg HAVE_DOT=yes 21480103645bSmrg fi 21490103645bSmrgfi 215095cf0c00Smrg 21510103645bSmrgAC_SUBST([HAVE_DOT]) 21520103645bSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 21530103645bSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 21540103645bSmrg]) # XORG_WITH_DOXYGEN 215595cf0c00Smrg 21560103645bSmrg# XORG_WITH_GROFF([DEFAULT]) 21570103645bSmrg# ---------------- 21580103645bSmrg# Minimum version: 1.6.0 21590103645bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 21608831d3fbSmrg# 21610103645bSmrg# Documentation tools are not always available on all platforms and sometimes 21620103645bSmrg# not at the appropriate level. This macro enables a module to test for the 21630103645bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 216414a67432Smrg# the --with-groff option, it allows maximum flexibility in making decisions 21650103645bSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 21660103645bSmrg# --with-groff assumes 'auto'. 21670103645bSmrg# 21680103645bSmrg# Interface to module: 21690103645bSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 21700103645bSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 21710103645bSmrg# HAVE_GROFF_MS: the -ms macros package 21720103645bSmrg# GROFF: returns the path of the groff program found 21730103645bSmrg# returns the path set by the user in the environment 21740103645bSmrg# --with-groff: 'yes' user instructs the module to use groff 21750103645bSmrg# 'no' user instructs the module not to use groff 21760103645bSmrg# 21770103645bSmrg# Added in version 1.9.0: 21780103645bSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 21790103645bSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 21800103645bSmrg# psselect from the psutils package. 21810103645bSmrg# the ghostcript package. Refer to the grohtml man pages 21820103645bSmrg# 21830103645bSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 21840103645bSmrg# 21850103645bSmrg# OS and distros often splits groff in a basic and full package, the former 21860103645bSmrg# having the groff program and the later having devices, fonts and macros 21870103645bSmrg# Checking for the groff executable is not enough. 21880103645bSmrg# 21890103645bSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 21900103645bSmrg# unset HAVE_GROFF or GROFF env variables. 21910103645bSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 21920103645bSmrg# 21930103645bSmrgAC_DEFUN([XORG_WITH_GROFF],[ 21940103645bSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 21950103645bSmrgm4_define([_defopt], m4_default([$1], [auto])) 21960103645bSmrgAC_ARG_WITH(groff, 21970103645bSmrg AS_HELP_STRING([--with-groff], 21980103645bSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 21990103645bSmrg [use_groff=$withval], [use_groff=]_defopt) 22000103645bSmrgm4_undefine([_defopt]) 22018831d3fbSmrg 22020103645bSmrgif test "x$use_groff" = x"auto"; then 22030103645bSmrg AC_PATH_PROG([GROFF], [groff]) 22040103645bSmrg if test "x$GROFF" = "x"; then 22050103645bSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 22060103645bSmrg have_groff=no 22070103645bSmrg else 22080103645bSmrg have_groff=yes 22090103645bSmrg fi 22100103645bSmrgelif test "x$use_groff" = x"yes" ; then 22110103645bSmrg AC_PATH_PROG([GROFF], [groff]) 22120103645bSmrg if test "x$GROFF" = "x"; then 22130103645bSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 22140103645bSmrg fi 22150103645bSmrg have_groff=yes 22160103645bSmrgelif test "x$use_groff" = x"no" ; then 22170103645bSmrg if test "x$GROFF" != "x"; then 22180103645bSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 22190103645bSmrg fi 22200103645bSmrg have_groff=no 22210103645bSmrgelse 22220103645bSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 22230103645bSmrgfi 22248831d3fbSmrg 22250103645bSmrg# We have groff, test for the presence of the macro packages 22260103645bSmrgif test "x$have_groff" = x"yes"; then 22270103645bSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 22280103645bSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 22290103645bSmrg groff_ms_works=yes 22300103645bSmrg else 22310103645bSmrg groff_ms_works=no 223295cf0c00Smrg fi 22330103645bSmrg AC_MSG_RESULT([$groff_ms_works]) 22340103645bSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 22350103645bSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 22360103645bSmrg groff_mm_works=yes 22370103645bSmrg else 22380103645bSmrg groff_mm_works=no 22390103645bSmrg fi 22400103645bSmrg AC_MSG_RESULT([$groff_mm_works]) 22410103645bSmrgfi 22428831d3fbSmrg 22430103645bSmrg# We have groff, test for HTML dependencies, one command per package 22440103645bSmrgif test "x$have_groff" = x"yes"; then 22450103645bSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 22460103645bSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 22470103645bSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 22480103645bSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 22490103645bSmrg have_groff_html=yes 22500103645bSmrg else 22510103645bSmrg have_groff_html=no 22520103645bSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 22530103645bSmrg fi 22540103645bSmrgfi 22550103645bSmrg 22560103645bSmrg# Set Automake conditionals for Makefiles 22570103645bSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 22580103645bSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 22590103645bSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 22600103645bSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 22610103645bSmrg]) # XORG_WITH_GROFF 22620103645bSmrg 22630103645bSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 22640103645bSmrg# --------------------------------------- 22650103645bSmrg# Minimum version: 1.6.0 22660103645bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 22670103645bSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 22680103645bSmrg# 22690103645bSmrg# Documentation tools are not always available on all platforms and sometimes 22700103645bSmrg# not at the appropriate level. This macro enables a module to test for the 22710103645bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 227214a67432Smrg# the --with-fop option, it allows maximum flexibility in making decisions 22730103645bSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 22740103645bSmrg# --with-fop assumes 'auto'. 22750103645bSmrg# 22760103645bSmrg# Interface to module: 22770103645bSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 22780103645bSmrg# FOP: returns the path of the fop program found 22790103645bSmrg# returns the path set by the user in the environment 22800103645bSmrg# --with-fop: 'yes' user instructs the module to use fop 22810103645bSmrg# 'no' user instructs the module not to use fop 22820103645bSmrg# 22830103645bSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 22840103645bSmrg# 22850103645bSmrgAC_DEFUN([XORG_WITH_FOP],[ 22860103645bSmrgAC_ARG_VAR([FOP], [Path to fop command]) 22870103645bSmrgm4_define([_defopt], m4_default([$2], [auto])) 22880103645bSmrgAC_ARG_WITH(fop, 22890103645bSmrg AS_HELP_STRING([--with-fop], 22900103645bSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 22910103645bSmrg [use_fop=$withval], [use_fop=]_defopt) 22920103645bSmrgm4_undefine([_defopt]) 22930103645bSmrg 22940103645bSmrgif test "x$use_fop" = x"auto"; then 22950103645bSmrg AC_PATH_PROG([FOP], [fop]) 22960103645bSmrg if test "x$FOP" = "x"; then 22970103645bSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 22980103645bSmrg have_fop=no 22990103645bSmrg else 23000103645bSmrg have_fop=yes 23010103645bSmrg fi 23020103645bSmrgelif test "x$use_fop" = x"yes" ; then 23030103645bSmrg AC_PATH_PROG([FOP], [fop]) 23040103645bSmrg if test "x$FOP" = "x"; then 23050103645bSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 23060103645bSmrg fi 23070103645bSmrg have_fop=yes 23080103645bSmrgelif test "x$use_fop" = x"no" ; then 23090103645bSmrg if test "x$FOP" != "x"; then 23100103645bSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 23110103645bSmrg fi 23120103645bSmrg have_fop=no 231395cf0c00Smrgelse 23140103645bSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 23158831d3fbSmrgfi 23168831d3fbSmrg 23170103645bSmrg# Test for a minimum version of fop, if provided. 23180103645bSmrgm4_ifval([$1], 23190103645bSmrg[if test "$have_fop" = yes; then 23200103645bSmrg # scrape the fop version 23210103645bSmrg AC_MSG_CHECKING([for fop minimum version]) 23220103645bSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 23230103645bSmrg AC_MSG_RESULT([$fop_version]) 23240103645bSmrg AS_VERSION_COMPARE([$fop_version], [$1], 23250103645bSmrg [if test "x$use_fop" = xauto; then 23260103645bSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 23270103645bSmrg have_fop=no 23280103645bSmrg else 23290103645bSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 23300103645bSmrg fi]) 23310103645bSmrgfi]) 23320103645bSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 23330103645bSmrg]) # XORG_WITH_FOP 23340103645bSmrg 23350103645bSmrg# XORG_WITH_M4([MIN-VERSION]) 23360103645bSmrg# --------------------------- 23370103645bSmrg# Minimum version: 1.19.0 23380103645bSmrg# 23390103645bSmrg# This macro attempts to locate an m4 macro processor which supports 23400103645bSmrg# -I option and is only useful for modules relying on M4 in order to 23410103645bSmrg# expand macros in source code files. 23420103645bSmrg# 23430103645bSmrg# Interface to module: 23440103645bSmrg# M4: returns the path of the m4 program found 23450103645bSmrg# returns the path set by the user in the environment 23460103645bSmrg# 23470103645bSmrgAC_DEFUN([XORG_WITH_M4], [ 23480103645bSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 23490103645bSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 23500103645bSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 23510103645bSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 23520103645bSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 23530103645bSmrg [$PATH:/usr/gnu/bin])]) 23548831d3fbSmrg 23550103645bSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 23560103645bSmrg]) # XORG_WITH_M4 23578831d3fbSmrg 23580103645bSmrg# XORG_WITH_PS2PDF([DEFAULT]) 23590103645bSmrg# ---------------- 23600103645bSmrg# Minimum version: 1.6.0 23610103645bSmrg# Minimum version for optional DEFAULT argument: 1.11.0 23620103645bSmrg# 23630103645bSmrg# Documentation tools are not always available on all platforms and sometimes 23640103645bSmrg# not at the appropriate level. This macro enables a module to test for the 23650103645bSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 236614a67432Smrg# the --with-ps2pdf option, it allows maximum flexibility in making decisions 23670103645bSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 23680103645bSmrg# --with-ps2pdf assumes 'auto'. 23690103645bSmrg# 23700103645bSmrg# Interface to module: 23710103645bSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 23720103645bSmrg# PS2PDF: returns the path of the ps2pdf program found 23730103645bSmrg# returns the path set by the user in the environment 23740103645bSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 23750103645bSmrg# 'no' user instructs the module not to use ps2pdf 23760103645bSmrg# 23770103645bSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 23780103645bSmrg# 23790103645bSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 23800103645bSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 23810103645bSmrgm4_define([_defopt], m4_default([$1], [auto])) 23820103645bSmrgAC_ARG_WITH(ps2pdf, 23830103645bSmrg AS_HELP_STRING([--with-ps2pdf], 23840103645bSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 23850103645bSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 23860103645bSmrgm4_undefine([_defopt]) 2387100ae103Smrg 23880103645bSmrgif test "x$use_ps2pdf" = x"auto"; then 23890103645bSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 23900103645bSmrg if test "x$PS2PDF" = "x"; then 23910103645bSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 23920103645bSmrg have_ps2pdf=no 23930103645bSmrg else 23940103645bSmrg have_ps2pdf=yes 23950103645bSmrg fi 23960103645bSmrgelif test "x$use_ps2pdf" = x"yes" ; then 23970103645bSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 23980103645bSmrg if test "x$PS2PDF" = "x"; then 23990103645bSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 24000103645bSmrg fi 24010103645bSmrg have_ps2pdf=yes 24020103645bSmrgelif test "x$use_ps2pdf" = x"no" ; then 24030103645bSmrg if test "x$PS2PDF" != "x"; then 24040103645bSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 24050103645bSmrg fi 24060103645bSmrg have_ps2pdf=no 24070103645bSmrgelse 24080103645bSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2409100ae103Smrgfi 24100103645bSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 24110103645bSmrg]) # XORG_WITH_PS2PDF 2412100ae103Smrg 24130103645bSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 24140103645bSmrg# ---------------- 24150103645bSmrg# Minimum version: 1.6.0 2416100ae103Smrg# 24170103645bSmrg# Documentation tools are not always available on all platforms and sometimes 24180103645bSmrg# not at the appropriate level. This macro enables a builder to skip all 24190103645bSmrg# documentation targets except traditional man pages. 24200103645bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 242114a67432Smrg# maximum flexibility in controlling documentation building. 24220103645bSmrg# Refer to: 24230103645bSmrg# XORG_WITH_XMLTO --with-xmlto 24240103645bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24250103645bSmrg# XORG_WITH_DOXYGEN --with-doxygen 24260103645bSmrg# XORG_WITH_FOP --with-fop 24270103645bSmrg# XORG_WITH_GROFF --with-groff 24280103645bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24290103645bSmrg# 24300103645bSmrg# Interface to module: 24310103645bSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 24320103645bSmrg# --enable-docs: 'yes' user instructs the module to generate docs 24330103645bSmrg# 'no' user instructs the module not to generate docs 24340103645bSmrg# parm1: specify the default value, yes or no. 24350103645bSmrg# 24360103645bSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 24370103645bSmrgm4_define([docs_default], m4_default([$1], [yes])) 24380103645bSmrgAC_ARG_ENABLE(docs, 24390103645bSmrg AS_HELP_STRING([--enable-docs], 24400103645bSmrg [Enable building the documentation (default: ]docs_default[)]), 24410103645bSmrg [build_docs=$enableval], [build_docs=]docs_default) 24420103645bSmrgm4_undefine([docs_default]) 24430103645bSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 24440103645bSmrgAC_MSG_CHECKING([whether to build documentation]) 24450103645bSmrgAC_MSG_RESULT([$build_docs]) 24460103645bSmrg]) # XORG_ENABLE_DOCS 24478831d3fbSmrg 24480103645bSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 24490103645bSmrg# ---------------- 24500103645bSmrg# Minimum version: 1.6.0 24510103645bSmrg# 24520103645bSmrg# This macro enables a builder to skip all developer documentation. 24530103645bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 245414a67432Smrg# maximum flexibility in controlling documentation building. 24550103645bSmrg# Refer to: 24560103645bSmrg# XORG_WITH_XMLTO --with-xmlto 24570103645bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24580103645bSmrg# XORG_WITH_DOXYGEN --with-doxygen 24590103645bSmrg# XORG_WITH_FOP --with-fop 24600103645bSmrg# XORG_WITH_GROFF --with-groff 24610103645bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24620103645bSmrg# 24630103645bSmrg# Interface to module: 24640103645bSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 24650103645bSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 24660103645bSmrg# 'no' user instructs the module not to generate developer docs 24670103645bSmrg# parm1: specify the default value, yes or no. 24680103645bSmrg# 24690103645bSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 24700103645bSmrgm4_define([devel_default], m4_default([$1], [yes])) 24710103645bSmrgAC_ARG_ENABLE(devel-docs, 24720103645bSmrg AS_HELP_STRING([--enable-devel-docs], 24730103645bSmrg [Enable building the developer documentation (default: ]devel_default[)]), 24740103645bSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 24750103645bSmrgm4_undefine([devel_default]) 24760103645bSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 24770103645bSmrgAC_MSG_CHECKING([whether to build developer documentation]) 24780103645bSmrgAC_MSG_RESULT([$build_devel_docs]) 24790103645bSmrg]) # XORG_ENABLE_DEVEL_DOCS 24808831d3fbSmrg 24810103645bSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 24820103645bSmrg# ---------------- 24830103645bSmrg# Minimum version: 1.6.0 24840103645bSmrg# 24850103645bSmrg# This macro enables a builder to skip all functional specification targets. 24860103645bSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 248714a67432Smrg# maximum flexibility in controlling documentation building. 24880103645bSmrg# Refer to: 24890103645bSmrg# XORG_WITH_XMLTO --with-xmlto 24900103645bSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24910103645bSmrg# XORG_WITH_DOXYGEN --with-doxygen 24920103645bSmrg# XORG_WITH_FOP --with-fop 24930103645bSmrg# XORG_WITH_GROFF --with-groff 24940103645bSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24950103645bSmrg# 24960103645bSmrg# Interface to module: 24970103645bSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 24980103645bSmrg# --enable-specs: 'yes' user instructs the module to generate specs 24990103645bSmrg# 'no' user instructs the module not to generate specs 25000103645bSmrg# parm1: specify the default value, yes or no. 25010103645bSmrg# 25020103645bSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 25030103645bSmrgm4_define([spec_default], m4_default([$1], [yes])) 25040103645bSmrgAC_ARG_ENABLE(specs, 25050103645bSmrg AS_HELP_STRING([--enable-specs], 25060103645bSmrg [Enable building the specs (default: ]spec_default[)]), 25070103645bSmrg [build_specs=$enableval], [build_specs=]spec_default) 25080103645bSmrgm4_undefine([spec_default]) 25090103645bSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 25100103645bSmrgAC_MSG_CHECKING([whether to build functional specifications]) 25110103645bSmrgAC_MSG_RESULT([$build_specs]) 25120103645bSmrg]) # XORG_ENABLE_SPECS 2513100ae103Smrg 25140103645bSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 25150103645bSmrg# ---------------------------------------------- 25160103645bSmrg# Minimum version: 1.13.0 251795cf0c00Smrg# 25180103645bSmrg# This macro enables a builder to enable/disable unit testing 25190103645bSmrg# It makes no assumption about the test cases implementation 25200103645bSmrg# Test cases may or may not use Automake "Support for test suites" 25210103645bSmrg# They may or may not use the software utility library GLib 25220103645bSmrg# 25230103645bSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 25240103645bSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 25250103645bSmrg# The variable enable_unit_tests is used by other macros in this file. 25260103645bSmrg# 25270103645bSmrg# Interface to module: 25280103645bSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 25290103645bSmrg# enable_unit_tests: used in configure.ac for additional configuration 25300103645bSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 25310103645bSmrg# 'no' user instructs the module not to build tests 25320103645bSmrg# parm1: specify the default value, yes or no. 25330103645bSmrg# 25340103645bSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 25350103645bSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 25360103645bSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 25370103645bSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 25380103645bSmrgm4_define([_defopt], m4_default([$1], [auto])) 25390103645bSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 25400103645bSmrg [Enable building unit test cases (default: ]_defopt[)]), 25410103645bSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 25420103645bSmrgm4_undefine([_defopt]) 25430103645bSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 25440103645bSmrgAC_MSG_CHECKING([whether to build unit test cases]) 25450103645bSmrgAC_MSG_RESULT([$enable_unit_tests]) 25460103645bSmrg]) # XORG_ENABLE_UNIT_TESTS 2547100ae103Smrg 25480103645bSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 25490103645bSmrg# ------------------------------------------------------ 25500103645bSmrg# Minimum version: 1.17.0 25510103645bSmrg# 25520103645bSmrg# This macro enables a builder to enable/disable integration testing 25530103645bSmrg# It makes no assumption about the test cases' implementation 25540103645bSmrg# Test cases may or may not use Automake "Support for test suites" 25550103645bSmrg# 25560103645bSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 25570103645bSmrg# usually requires less dependencies and may be built and run under less 25580103645bSmrg# stringent environments than integration tests. 25590103645bSmrg# 25600103645bSmrg# Interface to module: 25610103645bSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 25620103645bSmrg# enable_integration_tests: used in configure.ac for additional configuration 25630103645bSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 25640103645bSmrg# 'no' user instructs the module not to build tests 25650103645bSmrg# parm1: specify the default value, yes or no. 25660103645bSmrg# 25670103645bSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 25680103645bSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 25690103645bSmrgm4_define([_defopt], m4_default([$1], [auto])) 25700103645bSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 25710103645bSmrg [Enable building integration test cases (default: ]_defopt[)]), 25720103645bSmrg [enable_integration_tests=$enableval], 25730103645bSmrg [enable_integration_tests=]_defopt) 25740103645bSmrgm4_undefine([_defopt]) 25750103645bSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 25760103645bSmrg [test "x$enable_integration_tests" != xno]) 25770103645bSmrgAC_MSG_CHECKING([whether to build unit test cases]) 25780103645bSmrgAC_MSG_RESULT([$enable_integration_tests]) 25790103645bSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 2580100ae103Smrg 25810103645bSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 25820103645bSmrg# ---------------------------------------- 25830103645bSmrg# Minimum version: 1.13.0 25840103645bSmrg# 25850103645bSmrg# GLib is a library which provides advanced data structures and functions. 25860103645bSmrg# This macro enables a module to test for the presence of Glib. 25870103645bSmrg# 25880103645bSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 25890103645bSmrg# Otherwise the value of $enable_unit_tests is blank. 25900103645bSmrg# 25910103645bSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 25920103645bSmrg# test support usually requires less dependencies and may be built and run under 25930103645bSmrg# less stringent environments than integration tests. 2594100ae103Smrg# 25950103645bSmrg# Interface to module: 25960103645bSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 25970103645bSmrg# with_glib: used in configure.ac to know if GLib has been found 25980103645bSmrg# --with-glib: 'yes' user instructs the module to use glib 25990103645bSmrg# 'no' user instructs the module not to use glib 26000103645bSmrg# 26010103645bSmrgAC_DEFUN([XORG_WITH_GLIB],[ 26020103645bSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 26030103645bSmrgm4_define([_defopt], m4_default([$2], [auto])) 26040103645bSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 26050103645bSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 26060103645bSmrg [with_glib=$withval], [with_glib=]_defopt) 26070103645bSmrgm4_undefine([_defopt]) 260895cf0c00Smrg 26090103645bSmrghave_glib=no 26100103645bSmrg# Do not probe GLib if user explicitly disabled unit testing 26110103645bSmrgif test "x$enable_unit_tests" != x"no"; then 26120103645bSmrg # Do not probe GLib if user explicitly disabled it 26130103645bSmrg if test "x$with_glib" != x"no"; then 26140103645bSmrg m4_ifval( 26150103645bSmrg [$1], 26160103645bSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 26170103645bSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 26180103645bSmrg ) 261995cf0c00Smrg fi 2620100ae103Smrgfi 26218831d3fbSmrg 26220103645bSmrg# Not having GLib when unit testing has been explicitly requested is an error 26230103645bSmrgif test "x$enable_unit_tests" = x"yes"; then 26240103645bSmrg if test "x$have_glib" = x"no"; then 26250103645bSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 262695cf0c00Smrg fi 262795cf0c00Smrgfi 2628100ae103Smrg 26290103645bSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 26300103645bSmrgif test "x$enable_unit_tests" = x"no"; then 26310103645bSmrg if test "x$with_glib" = x"yes"; then 26320103645bSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26330103645bSmrg fi 26340103645bSmrgfi 26358831d3fbSmrg 26360103645bSmrg# Not having GLib when it has been explicitly requested is an error 26370103645bSmrgif test "x$with_glib" = x"yes"; then 26380103645bSmrg if test "x$have_glib" = x"no"; then 26390103645bSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 26400103645bSmrg fi 26410103645bSmrgfi 26428831d3fbSmrg 26430103645bSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 26440103645bSmrg]) # XORG_WITH_GLIB 264595cf0c00Smrg 26460103645bSmrg# XORG_LD_WRAP([required|optional]) 26470103645bSmrg# --------------------------------- 26480103645bSmrg# Minimum version: 1.13.0 26490103645bSmrg# 26500103645bSmrg# Check if linker supports -wrap, passed via compiler flags 26510103645bSmrg# 26520103645bSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 26530103645bSmrg# Otherwise the value of $enable_unit_tests is blank. 26540103645bSmrg# 26550103645bSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 26560103645bSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 26570103645bSmrg# available, an argument of "optional" allows use when some unit tests require 26580103645bSmrg# ld -wrap and others do not. 26590103645bSmrg# 26600103645bSmrgAC_DEFUN([XORG_LD_WRAP],[ 26610103645bSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 26620103645bSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 26630103645bSmrg void __wrap_exit(int status) { return; }], 26640103645bSmrg [exit(0);])]) 26650103645bSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 26660103645bSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 26670103645bSmrg if test "x$have_ld_wrap" = x"no"; then 26680103645bSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 26690103645bSmrg fi 26700103645bSmrgfi 26710103645bSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 26720103645bSmrg# 26730103645bSmrg]) # XORG_LD_WRAP 267495cf0c00Smrg 26750103645bSmrg# XORG_CHECK_LINKER_FLAGS 26760103645bSmrg# ----------------------- 26770103645bSmrg# SYNOPSIS 26780103645bSmrg# 26790103645bSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 26800103645bSmrg# 26810103645bSmrg# DESCRIPTION 26820103645bSmrg# 26830103645bSmrg# Check whether the given linker FLAGS work with the current language's 26840103645bSmrg# linker, or whether they give an error. 26850103645bSmrg# 26860103645bSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 26870103645bSmrg# success/failure. 26880103645bSmrg# 26890103645bSmrg# PROGRAM-SOURCE is the program source to link with, if needed 26900103645bSmrg# 26910103645bSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 26920103645bSmrg# 26930103645bSmrg# LICENSE 26940103645bSmrg# 26950103645bSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 26960103645bSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 26970103645bSmrg# Copyright (c) 2009 Matteo Frigo 26980103645bSmrg# 26990103645bSmrg# This program is free software: you can redistribute it and/or modify it 27000103645bSmrg# under the terms of the GNU General Public License as published by the 27010103645bSmrg# Free Software Foundation, either version 3 of the License, or (at your 27020103645bSmrg# option) any later version. 27030103645bSmrg# 27040103645bSmrg# This program is distributed in the hope that it will be useful, but 27050103645bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 27060103645bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 27070103645bSmrg# Public License for more details. 27080103645bSmrg# 27090103645bSmrg# You should have received a copy of the GNU General Public License along 27100103645bSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 27110103645bSmrg# 27120103645bSmrg# As a special exception, the respective Autoconf Macro's copyright owner 27130103645bSmrg# gives unlimited permission to copy, distribute and modify the configure 27140103645bSmrg# scripts that are the output of Autoconf when processing the Macro. You 27150103645bSmrg# need not follow the terms of the GNU General Public License when using 27160103645bSmrg# or distributing such scripts, even though portions of the text of the 27170103645bSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 27180103645bSmrg# all other use of the material that constitutes the Autoconf Macro. 27190103645bSmrg# 27200103645bSmrg# This special exception to the GPL applies to versions of the Autoconf 27210103645bSmrg# Macro released by the Autoconf Archive. When you make and distribute a 27220103645bSmrg# modified version of the Autoconf Macro, you may extend this special 27230103645bSmrg# exception to the GPL to apply to your modified version as well.# 27240103645bSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 27250103645bSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 27260103645bSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 27270103645bSmrgAS_LITERAL_IF([$1], 27280103645bSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 27290103645bSmrg ax_save_FLAGS=$LDFLAGS 27300103645bSmrg LDFLAGS="$1" 27310103645bSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 27320103645bSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27330103645bSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27340103645bSmrg LDFLAGS=$ax_save_FLAGS])], 27350103645bSmrg [ax_save_FLAGS=$LDFLAGS 27360103645bSmrg LDFLAGS="$1" 27370103645bSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 27380103645bSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27390103645bSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27400103645bSmrg LDFLAGS=$ax_save_FLAGS]) 27410103645bSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 27420103645bSmrgAC_MSG_RESULT($xorg_check_linker_flags) 27430103645bSmrgif test "x$xorg_check_linker_flags" = xyes; then 27440103645bSmrg m4_default([$2], :) 27450103645bSmrgelse 27460103645bSmrg m4_default([$3], :) 27470103645bSmrgfi 27480103645bSmrg]) # XORG_CHECK_LINKER_FLAGS 27498831d3fbSmrg 27500103645bSmrg# XORG_MEMORY_CHECK_FLAGS 27510103645bSmrg# ----------------------- 27520103645bSmrg# Minimum version: 1.16.0 27530103645bSmrg# 27540103645bSmrg# This macro attempts to find appropriate memory checking functionality 27550103645bSmrg# for various platforms which unit testing code may use to catch various 27560103645bSmrg# forms of memory allocation and access errors in testing. 27570103645bSmrg# 27580103645bSmrg# Interface to module: 27590103645bSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 27600103645bSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 27610103645bSmrg# 27620103645bSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 27630103645bSmrg# 27640103645bSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 27658831d3fbSmrg 27660103645bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 27670103645bSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 27680103645bSmrg [Environment variables to enable memory checking in tests]) 27698831d3fbSmrg 27700103645bSmrg# Check for different types of support on different platforms 27710103645bSmrgcase $host_os in 27720103645bSmrg solaris*) 27730103645bSmrg AC_CHECK_LIB([umem], [umem_alloc], 27740103645bSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 27750103645bSmrg ;; 27760103645bSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 27770103645bSmrg # both directly and inverted, so should not be 0 or 255. 27780103645bSmrg malloc_debug_env='MALLOC_PERTURB_=15' 27790103645bSmrg ;; 27800103645bSmrg darwin*) 27810103645bSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 27820103645bSmrg ;; 27830103645bSmrg *bsd*) 27840103645bSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 27850103645bSmrg ;; 27860103645bSmrgesac 27878831d3fbSmrg 27880103645bSmrg# User supplied flags override default flags 27890103645bSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 27900103645bSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 27918831d3fbSmrgfi 27928831d3fbSmrg 27930103645bSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 27940103645bSmrg]) # XORG_WITH_LINT 27958831d3fbSmrg 27960103645bSmrg# XORG_CHECK_MALLOC_ZERO 27970103645bSmrg# ---------------------- 27980103645bSmrg# Minimum version: 1.0.0 27998831d3fbSmrg# 28000103645bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 28010103645bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 28020103645bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 28030103645bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 28040103645bSmrgAC_ARG_ENABLE(malloc0returnsnull, 28050103645bSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 28060103645bSmrg [malloc(0) returns NULL (default: auto)]), 28070103645bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 28080103645bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 28098831d3fbSmrg 28100103645bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 28110103645bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 28120103645bSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 28130103645bSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 28140103645bSmrg#include <stdlib.h> 28150103645bSmrg],[ 28160103645bSmrg char *m0, *r0, *c0, *p; 28170103645bSmrg m0 = malloc(0); 28180103645bSmrg p = malloc(10); 28190103645bSmrg r0 = realloc(p,0); 28200103645bSmrg c0 = calloc(0,10); 28210103645bSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 28220103645bSmrg])], 28230103645bSmrg [xorg_cv_malloc0_returns_null=yes], 28240103645bSmrg [xorg_cv_malloc0_returns_null=no])]) 28250103645bSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 282695cf0c00Smrgfi 28270103645bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 282895cf0c00Smrg 28290103645bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 28300103645bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 28310103645bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 28320103645bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 28338831d3fbSmrgelse 28340103645bSmrg MALLOC_ZERO_CFLAGS="" 28350103645bSmrg XMALLOC_ZERO_CFLAGS="" 28360103645bSmrg XTMALLOC_ZERO_CFLAGS="" 28378831d3fbSmrgfi 28388831d3fbSmrg 28390103645bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 28400103645bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 28410103645bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 28420103645bSmrg]) # XORG_CHECK_MALLOC_ZERO 28438831d3fbSmrg 28440103645bSmrg# XORG_WITH_LINT() 28450103645bSmrg# ---------------- 28460103645bSmrg# Minimum version: 1.1.0 284795cf0c00Smrg# 28480103645bSmrg# This macro enables the use of a tool that flags some suspicious and 28490103645bSmrg# non-portable constructs (likely to be bugs) in C language source code. 28500103645bSmrg# It will attempt to locate the tool and use appropriate options. 28510103645bSmrg# There are various lint type tools on different platforms. 285295cf0c00Smrg# 28530103645bSmrg# Interface to module: 28540103645bSmrg# LINT: returns the path to the tool found on the platform 28550103645bSmrg# or the value set to LINT on the configure cmd line 28560103645bSmrg# also an Automake conditional 28570103645bSmrg# LINT_FLAGS: an Automake variable with appropriate flags 28580103645bSmrg# 28590103645bSmrg# --with-lint: 'yes' user instructs the module to use lint 28600103645bSmrg# 'no' user instructs the module not to use lint (default) 28610103645bSmrg# 28620103645bSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 28630103645bSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 28640103645bSmrg# 28650103645bSmrgAC_DEFUN([XORG_WITH_LINT],[ 28668831d3fbSmrg 28670103645bSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 28680103645bSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 28690103645bSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 28700103645bSmrg [Use a lint-style source code checker (default: disabled)])], 28710103645bSmrg [use_lint=$withval], [use_lint=no]) 287295cf0c00Smrg 28730103645bSmrg# Obtain platform specific info like program name and options 28740103645bSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 28750103645bSmrgcase $host_os in 28760103645bSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 28770103645bSmrg lint_name=splint 28780103645bSmrg lint_options="-badflag" 28790103645bSmrg ;; 28800103645bSmrg *freebsd* | *netbsd*) 28810103645bSmrg lint_name=lint 28820103645bSmrg lint_options="-u -b" 28830103645bSmrg ;; 28840103645bSmrg *solaris*) 28850103645bSmrg lint_name=lint 28860103645bSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 28870103645bSmrg ;; 28880103645bSmrgesac 28890103645bSmrg 28900103645bSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 28910103645bSmrgif test "x$use_lint" = x"yes" ; then 28920103645bSmrg AC_PATH_PROG([LINT], [$lint_name]) 28930103645bSmrg if test "x$LINT" = "x"; then 28940103645bSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 28950103645bSmrg fi 28960103645bSmrgelif test "x$use_lint" = x"no" ; then 28970103645bSmrg if test "x$LINT" != "x"; then 28980103645bSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 28990103645bSmrg fi 29008831d3fbSmrgelse 29010103645bSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 29028831d3fbSmrgfi 290395cf0c00Smrg 29040103645bSmrg# User supplied flags override default flags 29050103645bSmrgif test "x$LINT_FLAGS" != "x"; then 29060103645bSmrg lint_options=$LINT_FLAGS 29070103645bSmrgfi 290895cf0c00Smrg 29090103645bSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 29100103645bSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 291195cf0c00Smrg 29120103645bSmrg]) # XORG_WITH_LINT 291395cf0c00Smrg 29140103645bSmrg# XORG_LINT_LIBRARY(LIBNAME) 29150103645bSmrg# -------------------------- 29160103645bSmrg# Minimum version: 1.1.0 2917165cb819Smrg# 29180103645bSmrg# Sets up flags for building lint libraries for checking programs that call 29190103645bSmrg# functions in the library. 29200103645bSmrg# 29210103645bSmrg# Interface to module: 29220103645bSmrg# LINTLIB - Automake variable with the name of lint library file to make 29230103645bSmrg# MAKE_LINT_LIB - Automake conditional 29240103645bSmrg# 29250103645bSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 29260103645bSmrg# - 'no' user instructs the module not to create a lint library (default) 292795cf0c00Smrg 29280103645bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 29290103645bSmrgAC_REQUIRE([XORG_WITH_LINT]) 29300103645bSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 29310103645bSmrg [Create lint library (default: disabled)])], 29320103645bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 29330103645bSmrg 29340103645bSmrgif test "x$make_lint_lib" = x"yes" ; then 29350103645bSmrg LINTLIB=llib-l$1.ln 29360103645bSmrg if test "x$LINT" = "x"; then 29370103645bSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 29380103645bSmrg fi 29390103645bSmrgelif test "x$make_lint_lib" != x"no" ; then 29400103645bSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 294195cf0c00Smrgfi 294295cf0c00Smrg 29430103645bSmrgAC_SUBST(LINTLIB) 29440103645bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 294595cf0c00Smrg 29460103645bSmrg]) # XORG_LINT_LIBRARY 2947165cb819Smrg 29480103645bSmrg# XORG_COMPILER_BRAND 294995cf0c00Smrg# ------------------- 29500103645bSmrg# Minimum version: 1.14.0 295195cf0c00Smrg# 29520103645bSmrg# Checks for various brands of compilers and sets flags as appropriate: 29530103645bSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 29540103645bSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 29550103645bSmrg# clang compiler - sets CLANGCC to "yes" 29560103645bSmrg# Intel compiler - sets INTELCC to "yes" 29570103645bSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 29580103645bSmrg# 29590103645bSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 29600103645bSmrgAC_LANG_CASE( 29610103645bSmrg [C], [ 296214a67432Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 296314a67432Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 296414a67432Smrg m4_version_prereq([2.70], 296514a67432Smrg [AC_REQUIRE([AC_PROG_CC])], 296614a67432Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 29670103645bSmrg ], 29680103645bSmrg [C++], [ 29690103645bSmrg AC_REQUIRE([AC_PROG_CXX]) 29700103645bSmrg ] 29710103645bSmrg) 29720103645bSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 29730103645bSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 29740103645bSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 29750103645bSmrg]) # XORG_COMPILER_BRAND 29768831d3fbSmrg 29770103645bSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 297895cf0c00Smrg# --------------- 29790103645bSmrg# Minimum version: 1.16.0 29800103645bSmrg# 29810103645bSmrg# Test if the compiler works when passed the given flag as a command line argument. 298214a67432Smrg# If it succeeds, the flag is appended to the given variable. If not, it tries the 29830103645bSmrg# next flag in the list until there are no more options. 29840103645bSmrg# 29850103645bSmrg# Note that this does not guarantee that the compiler supports the flag as some 29860103645bSmrg# compilers will simply ignore arguments that they do not understand, but we do 29870103645bSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 29880103645bSmrg# -Werror=unused-command-line-argument 29890103645bSmrg# 29900103645bSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 29910103645bSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 29920103645bSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 29938831d3fbSmrg 29940103645bSmrgAC_LANG_COMPILER_REQUIRE 299595cf0c00Smrg 29960103645bSmrgAC_LANG_CASE( 29970103645bSmrg [C], [ 299814a67432Smrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 299914a67432Smrg dnl and complains that AC_PROG_CC_C99 is obsolete 300014a67432Smrg m4_version_prereq([2.70], 300114a67432Smrg [AC_REQUIRE([AC_PROG_CC])], 300214a67432Smrg [AC_REQUIRE([AC_PROG_CC_C99])]) 30030103645bSmrg define([PREFIX], [C]) 30040103645bSmrg define([CACHE_PREFIX], [cc]) 30050103645bSmrg define([COMPILER], [$CC]) 30060103645bSmrg ], 30070103645bSmrg [C++], [ 30080103645bSmrg define([PREFIX], [CXX]) 30090103645bSmrg define([CACHE_PREFIX], [cxx]) 30100103645bSmrg define([COMPILER], [$CXX]) 30110103645bSmrg ] 30120103645bSmrg) 30130103645bSmrg 30140103645bSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 30150103645bSmrg 30160103645bSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 30170103645bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30180103645bSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 30190103645bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 30200103645bSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30210103645bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 30220103645bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 30230103645bSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 30240103645bSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 302595cf0c00Smrgfi 30260103645bSmrg 30270103645bSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 30280103645bSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 30290103645bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30300103645bSmrg fi 30310103645bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30320103645bSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 30330103645bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 30340103645bSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30350103645bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 30360103645bSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 30370103645bSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 30380103645bSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30390103645bSmrgfi 30400103645bSmrg 30410103645bSmrgfound="no" 30420103645bSmrgm4_foreach([flag], m4_cdr($@), [ 30430103645bSmrg if test $found = "no" ; then 30440103645bSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 30450103645bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30460103645bSmrg fi 30470103645bSmrg 30480103645bSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 30490103645bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30500103645bSmrg fi 30510103645bSmrg 30520103645bSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 30530103645bSmrg 30540103645bSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 30550103645bSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 30560103645bSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 30570103645bSmrg AC_CACHE_VAL($cacheid, 30580103645bSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 30590103645bSmrg [eval $cacheid=yes], 30600103645bSmrg [eval $cacheid=no])]) 30610103645bSmrg 30620103645bSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30630103645bSmrg 30640103645bSmrg eval supported=\$$cacheid 30650103645bSmrg AC_MSG_RESULT([$supported]) 30660103645bSmrg if test "$supported" = "yes" ; then 30670103645bSmrg $1="$$1 ]flag[" 30680103645bSmrg found="yes" 30690103645bSmrg fi 30700103645bSmrg fi 307195cf0c00Smrg]) 30720103645bSmrg]) # XORG_TESTSET_CFLAG 3073165cb819Smrg 30740103645bSmrg# XORG_COMPILER_FLAGS 30750103645bSmrg# --------------- 30760103645bSmrg# Minimum version: 1.16.0 3077165cb819Smrg# 30780103645bSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 30790103645bSmrg# arguments supported by the selected compiler which do NOT alter the generated 30800103645bSmrg# code. These arguments will cause the compiler to print various warnings 30810103645bSmrg# during compilation AND turn a conservative set of warnings into errors. 30820103645bSmrg# 30830103645bSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 30840103645bSmrg# future versions of util-macros as options are added to new compilers. 30850103645bSmrg# 30860103645bSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 30870103645bSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 308895cf0c00Smrg 30890103645bSmrgAC_ARG_ENABLE(selective-werror, 30900103645bSmrg AS_HELP_STRING([--disable-selective-werror], 30910103645bSmrg [Turn off selective compiler errors. (default: enabled)]), 30920103645bSmrg [SELECTIVE_WERROR=$enableval], 30930103645bSmrg [SELECTIVE_WERROR=yes]) 30940103645bSmrg 30950103645bSmrgAC_LANG_CASE( 30960103645bSmrg [C], [ 30970103645bSmrg define([PREFIX], [C]) 30980103645bSmrg ], 30990103645bSmrg [C++], [ 31000103645bSmrg define([PREFIX], [CXX]) 31010103645bSmrg ] 31020103645bSmrg) 31030103645bSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 31040103645bSmrgif test "x$SUNCC" = "xyes"; then 31050103645bSmrg [BASE_]PREFIX[FLAGS]="-v" 310695cf0c00Smrgelse 31070103645bSmrg [BASE_]PREFIX[FLAGS]="" 310895cf0c00Smrgfi 310995cf0c00Smrg 31100103645bSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 31110103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 31120103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 31130103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 31140103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3115165cb819Smrg 31160103645bSmrgAC_LANG_CASE( 31170103645bSmrg [C], [ 31180103645bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 31190103645bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 31200103645bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 31210103645bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 31220103645bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 31230103645bSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 31240103645bSmrg ] 31250103645bSmrg) 312695cf0c00Smrg 31270103645bSmrg# This chunk adds additional warnings that could catch undesired effects. 31280103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 31290103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 31300103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 31310103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 31320103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 31330103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 31340103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 313595cf0c00Smrg 31360103645bSmrg# These are currently disabled because they are noisy. They will be enabled 31370103645bSmrg# in the future once the codebase is sufficiently modernized to silence 31380103645bSmrg# them. For now, I don't want them to drown out the other warnings. 31390103645bSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 31400103645bSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 31410103645bSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 314295cf0c00Smrg 314314a67432Smrg# Turn some warnings into errors, so we don't accidentally get successful builds 31440103645bSmrg# when there are problems that should be fixed. 314595cf0c00Smrg 31460103645bSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 31470103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 31480103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 31490103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 31500103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 31510103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 31520103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 31530103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 31540103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 31550103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 31560103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 31570103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 31580103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 31590103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 31600103645bSmrgelse 31610103645bSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 31620103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 31630103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 31640103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 31650103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 31660103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 31670103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 31680103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 31690103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 31700103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 31710103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 31720103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 31730103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 31740103645bSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 31750103645bSmrgfi 317695cf0c00Smrg 31770103645bSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 31780103645bSmrg]) # XORG_COMPILER_FLAGS 3179100ae103Smrg 31800103645bSmrg# XORG_CWARNFLAGS 31810103645bSmrg# --------------- 31820103645bSmrg# Minimum version: 1.2.0 31830103645bSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 3184165cb819Smrg# 31850103645bSmrg# Defines CWARNFLAGS to enable C compiler warnings. 3186165cb819Smrg# 31870103645bSmrg# This function is deprecated because it defines -fno-strict-aliasing 31880103645bSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 31890103645bSmrg# is needed, then it should be added explicitly in the module when 31900103645bSmrg# it is updated to use BASE_CFLAGS. 3191165cb819Smrg# 31920103645bSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 31930103645bSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 31940103645bSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 31950103645bSmrgAC_LANG_CASE( 31960103645bSmrg [C], [ 31970103645bSmrg CWARNFLAGS="$BASE_CFLAGS" 31980103645bSmrg if test "x$GCC" = xyes ; then 31990103645bSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 32000103645bSmrg fi 32010103645bSmrg AC_SUBST(CWARNFLAGS) 32020103645bSmrg ] 32030103645bSmrg) 32040103645bSmrg]) # XORG_CWARNFLAGS 320595cf0c00Smrg 32060103645bSmrg# XORG_STRICT_OPTION 32070103645bSmrg# ----------------------- 32080103645bSmrg# Minimum version: 1.3.0 32090103645bSmrg# 32100103645bSmrg# Add configure option to enable strict compilation flags, such as treating 32110103645bSmrg# warnings as fatal errors. 32120103645bSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 32130103645bSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 32140103645bSmrg# 32150103645bSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 32160103645bSmrg# when strict compilation is unconditionally desired. 32170103645bSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 32180103645bSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 32190103645bSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 322095cf0c00Smrg 32210103645bSmrgAC_ARG_ENABLE(strict-compilation, 32220103645bSmrg AS_HELP_STRING([--enable-strict-compilation], 32230103645bSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 32240103645bSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 322595cf0c00Smrg 32260103645bSmrgAC_LANG_CASE( 32270103645bSmrg [C], [ 32280103645bSmrg define([PREFIX], [C]) 32290103645bSmrg ], 32300103645bSmrg [C++], [ 32310103645bSmrg define([PREFIX], [CXX]) 32320103645bSmrg ] 32330103645bSmrg) 323495cf0c00Smrg 32350103645bSmrg[STRICT_]PREFIX[FLAGS]="" 32360103645bSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 32370103645bSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 323895cf0c00Smrg 32390103645bSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 32400103645bSmrg# activate it with -Werror, so we add it here explicitly. 32410103645bSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 324295cf0c00Smrg 32430103645bSmrgif test "x$STRICT_COMPILE" = "xyes"; then 32440103645bSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 32450103645bSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 32460103645bSmrgfi 32470103645bSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 32480103645bSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 32490103645bSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 32500103645bSmrg]) # XORG_STRICT_OPTION 325195cf0c00Smrg 325214a67432Smrg# XORG_DEFAULT_NOCODE_OPTIONS 325314a67432Smrg# --------------------------- 325414a67432Smrg# Minimum version: 1.20.0 325514a67432Smrg# 325614a67432Smrg# Defines default options for X.Org modules which don't compile code, 325714a67432Smrg# such as fonts, bitmaps, cursors, and docs. 325814a67432Smrg# 325914a67432SmrgAC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 326014a67432SmrgAC_REQUIRE([AC_PROG_INSTALL]) 326114a67432SmrgXORG_RELEASE_VERSION 326214a67432SmrgXORG_CHANGELOG 326314a67432SmrgXORG_INSTALL 326414a67432SmrgXORG_MANPAGE_SECTIONS 326514a67432Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 326614a67432Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 326714a67432Smrg]) # XORG_DEFAULT_NOCODE_OPTIONS 326814a67432Smrg 32690103645bSmrg# XORG_DEFAULT_OPTIONS 32700103645bSmrg# -------------------- 32710103645bSmrg# Minimum version: 1.3.0 32720103645bSmrg# 327314a67432Smrg# Defines default options for X.Org modules which compile code. 32740103645bSmrg# 32750103645bSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 32760103645bSmrgAC_REQUIRE([AC_PROG_INSTALL]) 32770103645bSmrgXORG_COMPILER_FLAGS 32780103645bSmrgXORG_CWARNFLAGS 32790103645bSmrgXORG_STRICT_OPTION 328014a67432SmrgXORG_DEFAULT_NOCODE_OPTIONS 32810103645bSmrg]) # XORG_DEFAULT_OPTIONS 328295cf0c00Smrg 32830103645bSmrg# XORG_INSTALL() 32840103645bSmrg# ---------------- 32850103645bSmrg# Minimum version: 1.4.0 32860103645bSmrg# 32870103645bSmrg# Defines the variable INSTALL_CMD as the command to copy 32880103645bSmrg# INSTALL from $prefix/share/util-macros. 32890103645bSmrg# 32900103645bSmrgAC_DEFUN([XORG_INSTALL], [ 32910103645bSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 32920103645bSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 32930103645bSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 32940103645bSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 32950103645bSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 32960103645bSmrgtouch \$(top_srcdir)/INSTALL; \ 32970103645bSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 32980103645bSmrgAC_SUBST([INSTALL_CMD]) 32990103645bSmrg]) # XORG_INSTALL 33000103645bSmrgdnl Copyright 2005 Red Hat, Inc 33010103645bSmrgdnl 33020103645bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 33030103645bSmrgdnl documentation for any purpose is hereby granted without fee, provided that 33040103645bSmrgdnl the above copyright notice appear in all copies and that both that 33050103645bSmrgdnl copyright notice and this permission notice appear in supporting 33060103645bSmrgdnl documentation. 33070103645bSmrgdnl 33080103645bSmrgdnl The above copyright notice and this permission notice shall be included 33090103645bSmrgdnl in all copies or substantial portions of the Software. 33100103645bSmrgdnl 33110103645bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 33120103645bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 33130103645bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 33140103645bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 33150103645bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 33160103645bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 33170103645bSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 33180103645bSmrgdnl 33190103645bSmrgdnl Except as contained in this notice, the name of the copyright holders shall 33200103645bSmrgdnl not be used in advertising or otherwise to promote the sale, use or 33210103645bSmrgdnl other dealings in this Software without prior written authorization 33220103645bSmrgdnl from the copyright holders. 33230103645bSmrgdnl 332495cf0c00Smrg 33250103645bSmrg# XORG_RELEASE_VERSION 33260103645bSmrg# -------------------- 33270103645bSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 332895cf0c00Smrg 33290103645bSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 33300103645bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 33310103645bSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 33320103645bSmrg [Major version of this package]) 33330103645bSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 33340103645bSmrg if test "x$PVM" = "x"; then 33350103645bSmrg PVM="0" 33360103645bSmrg fi 33370103645bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 33380103645bSmrg [$PVM], 33390103645bSmrg [Minor version of this package]) 33400103645bSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 33410103645bSmrg if test "x$PVP" = "x"; then 33420103645bSmrg PVP="0" 33430103645bSmrg fi 33440103645bSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 33450103645bSmrg [$PVP], 33460103645bSmrg [Patch version of this package]) 33470103645bSmrg]) 334895cf0c00Smrg 33490103645bSmrg# XORG_CHANGELOG() 33500103645bSmrg# ---------------- 33510103645bSmrg# Minimum version: 1.2.0 33520103645bSmrg# 33530103645bSmrg# Defines the variable CHANGELOG_CMD as the command to generate 33540103645bSmrg# ChangeLog from git. 33550103645bSmrg# 33560103645bSmrg# 33570103645bSmrgAC_DEFUN([XORG_CHANGELOG], [ 33580103645bSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 33590103645bSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 33600103645bSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 33610103645bSmrgtouch \$(top_srcdir)/ChangeLog; \ 33620103645bSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 33630103645bSmrgAC_SUBST([CHANGELOG_CMD]) 33640103645bSmrg]) # XORG_CHANGELOG 3365165cb819Smrg 3366