aclocal.m4 revision 21ecb1ef
121ecb1efSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
21e00de39Smrg
31e00de39Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
421ecb1efSmrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
51e00de39Smrg# This file is free software; the Free Software Foundation
61e00de39Smrg# gives unlimited permission to copy and/or distribute it,
71e00de39Smrg# with or without modifications, as long as this notice is preserved.
81e00de39Smrg
91e00de39Smrg# This program is distributed in the hope that it will be useful,
101e00de39Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
111e00de39Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
121e00de39Smrg# PARTICULAR PURPOSE.
131e00de39Smrg
141e00de39Smrgm4_ifndef([AC_AUTOCONF_VERSION],
151e00de39Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1621ecb1efSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
1721ecb1efSmrg[m4_warning([this file was generated for autoconf 2.63.
181e00de39SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
191e00de39SmrgIf you have problems, you may need to regenerate the build system entirely.
201e00de39SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
211e00de39Smrg
2221ecb1efSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
231e00de39Smrg#
2421ecb1efSmrg# This file is free software; the Free Software Foundation
2521ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
2621ecb1efSmrg# with or without modifications, as long as this notice is preserved.
271e00de39Smrg
2821ecb1efSmrg# AM_AUTOMAKE_VERSION(VERSION)
2921ecb1efSmrg# ----------------------------
3021ecb1efSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
3121ecb1efSmrg# generated from the m4 files accompanying Automake X.Y.
3221ecb1efSmrg# (This private macro should not be called outside this file.)
3321ecb1efSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
3421ecb1efSmrg[am__api_version='1.11'
3521ecb1efSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3621ecb1efSmrgdnl require some minimum version.  Point them to the right macro.
3721ecb1efSmrgm4_if([$1], [1.11], [],
3821ecb1efSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3921ecb1efSmrg])
401e00de39Smrg
4121ecb1efSmrg# _AM_AUTOCONF_VERSION(VERSION)
4221ecb1efSmrg# -----------------------------
4321ecb1efSmrg# aclocal traces this macro to find the Autoconf version.
4421ecb1efSmrg# This is a private macro too.  Using m4_define simplifies
4521ecb1efSmrg# the logic in aclocal, which can simply ignore this definition.
4621ecb1efSmrgm4_define([_AM_AUTOCONF_VERSION], [])
471e00de39Smrg
4821ecb1efSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
4921ecb1efSmrg# -------------------------------
5021ecb1efSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5121ecb1efSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5221ecb1efSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5321ecb1efSmrg[AM_AUTOMAKE_VERSION([1.11])dnl
5421ecb1efSmrgm4_ifndef([AC_AUTOCONF_VERSION],
5521ecb1efSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5621ecb1efSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
571e00de39Smrg
5821ecb1efSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
591e00de39Smrg
6021ecb1efSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6121ecb1efSmrg#
6221ecb1efSmrg# This file is free software; the Free Software Foundation
6321ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
6421ecb1efSmrg# with or without modifications, as long as this notice is preserved.
651e00de39Smrg
6621ecb1efSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6721ecb1efSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6821ecb1efSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
691e00de39Smrg#
7021ecb1efSmrg# Of course, Automake must honor this variable whenever it calls a
7121ecb1efSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7221ecb1efSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7321ecb1efSmrg# depending on how configure is run.  This is pretty annoying, since
7421ecb1efSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7521ecb1efSmrg# source directory, any form will work fine, but in subdirectories a
7621ecb1efSmrg# relative path needs to be adjusted first.
771e00de39Smrg#
7821ecb1efSmrg# $ac_aux_dir/missing
7921ecb1efSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8021ecb1efSmrg# $top_srcdir/$ac_aux_dir/missing
8121ecb1efSmrg#    fails if $ac_aux_dir is absolute,
8221ecb1efSmrg#    fails when called from a subdirectory in a VPATH build with
8321ecb1efSmrg#          a relative $ac_aux_dir
841e00de39Smrg#
8521ecb1efSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8621ecb1efSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
8721ecb1efSmrg# harmless because $srcdir is `.', but things will broke when you
8821ecb1efSmrg# start a VPATH build or use an absolute $srcdir.
891e00de39Smrg#
9021ecb1efSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9121ecb1efSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9221ecb1efSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9321ecb1efSmrg# and then we would define $MISSING as
9421ecb1efSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
9521ecb1efSmrg# This will work as long as MISSING is not called from configure, because
9621ecb1efSmrg# unfortunately $(top_srcdir) has no meaning in configure.
9721ecb1efSmrg# However there are other variables, like CC, which are often used in
9821ecb1efSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
9921ecb1efSmrg#
10021ecb1efSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
10121ecb1efSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
10221ecb1efSmrg# configured tree to be moved without reconfiguration.
1031e00de39Smrg
10421ecb1efSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
10521ecb1efSmrg[dnl Rely on autoconf to set up CDPATH properly.
10621ecb1efSmrgAC_PREREQ([2.50])dnl
10721ecb1efSmrg# expand $ac_aux_dir to an absolute path
10821ecb1efSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
10921ecb1efSmrg])
1101e00de39Smrg
11121ecb1efSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1121e00de39Smrg
11321ecb1efSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
11421ecb1efSmrg# Free Software Foundation, Inc.
11521ecb1efSmrg#
11621ecb1efSmrg# This file is free software; the Free Software Foundation
11721ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
11821ecb1efSmrg# with or without modifications, as long as this notice is preserved.
1191e00de39Smrg
12021ecb1efSmrg# serial 9
1211e00de39Smrg
12221ecb1efSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
12321ecb1efSmrg# -------------------------------------
12421ecb1efSmrg# Define a conditional.
12521ecb1efSmrgAC_DEFUN([AM_CONDITIONAL],
12621ecb1efSmrg[AC_PREREQ(2.52)dnl
12721ecb1efSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
12821ecb1efSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
12921ecb1efSmrgAC_SUBST([$1_TRUE])dnl
13021ecb1efSmrgAC_SUBST([$1_FALSE])dnl
13121ecb1efSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
13221ecb1efSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
13321ecb1efSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
13421ecb1efSmrgif $2; then
13521ecb1efSmrg  $1_TRUE=
13621ecb1efSmrg  $1_FALSE='#'
13721ecb1efSmrgelse
13821ecb1efSmrg  $1_TRUE='#'
13921ecb1efSmrg  $1_FALSE=
14021ecb1efSmrgfi
14121ecb1efSmrgAC_CONFIG_COMMANDS_PRE(
14221ecb1efSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
14321ecb1efSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
14421ecb1efSmrgUsually this means the macro was only invoked conditionally.]])
14521ecb1efSmrgfi])])
1461e00de39Smrg
14721ecb1efSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
14821ecb1efSmrg# Free Software Foundation, Inc.
14921ecb1efSmrg#
15021ecb1efSmrg# This file is free software; the Free Software Foundation
15121ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
15221ecb1efSmrg# with or without modifications, as long as this notice is preserved.
1531e00de39Smrg
15421ecb1efSmrg# serial 10
1551e00de39Smrg
15621ecb1efSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
15721ecb1efSmrg# written in clear, in which case automake, when reading aclocal.m4,
15821ecb1efSmrg# will think it sees a *use*, and therefore will trigger all it's
15921ecb1efSmrg# C support machinery.  Also note that it means that autoscan, seeing
16021ecb1efSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1611e00de39Smrg
1621e00de39Smrg
16321ecb1efSmrg# _AM_DEPENDENCIES(NAME)
16421ecb1efSmrg# ----------------------
16521ecb1efSmrg# See how the compiler implements dependency checking.
16621ecb1efSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
16721ecb1efSmrg# We try a few techniques and use that to set a single cache variable.
1681e00de39Smrg#
16921ecb1efSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
17021ecb1efSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
17121ecb1efSmrg# dependency, and given that the user is not expected to run this macro,
17221ecb1efSmrg# just rely on AC_PROG_CC.
17321ecb1efSmrgAC_DEFUN([_AM_DEPENDENCIES],
17421ecb1efSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
17521ecb1efSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
17621ecb1efSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
17721ecb1efSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1781e00de39Smrg
17921ecb1efSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
18021ecb1efSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
18121ecb1efSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
18221ecb1efSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
18321ecb1efSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
18421ecb1efSmrg                   [depcc="$$1"   am_compiler_list=])
1851e00de39Smrg
18621ecb1efSmrgAC_CACHE_CHECK([dependency style of $depcc],
18721ecb1efSmrg               [am_cv_$1_dependencies_compiler_type],
18821ecb1efSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18921ecb1efSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
19021ecb1efSmrg  # making bogus files that we don't know about and never remove.  For
19121ecb1efSmrg  # instance it was reported that on HP-UX the gcc test will end up
19221ecb1efSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
19321ecb1efSmrg  # in D'.
19421ecb1efSmrg  mkdir conftest.dir
19521ecb1efSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
19621ecb1efSmrg  # using a relative directory.
19721ecb1efSmrg  cp "$am_depcomp" conftest.dir
19821ecb1efSmrg  cd conftest.dir
19921ecb1efSmrg  # We will build objects and dependencies in a subdirectory because
20021ecb1efSmrg  # it helps to detect inapplicable dependency modes.  For instance
20121ecb1efSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
20221ecb1efSmrg  # side effect of compilation, but ICC will put the dependencies in
20321ecb1efSmrg  # the current directory while Tru64 will put them in the object
20421ecb1efSmrg  # directory.
20521ecb1efSmrg  mkdir sub
20621ecb1efSmrg
20721ecb1efSmrg  am_cv_$1_dependencies_compiler_type=none
20821ecb1efSmrg  if test "$am_compiler_list" = ""; then
20921ecb1efSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
21021ecb1efSmrg  fi
21121ecb1efSmrg  am__universal=false
21221ecb1efSmrg  m4_case([$1], [CC],
21321ecb1efSmrg    [case " $depcc " in #(
21421ecb1efSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21521ecb1efSmrg     esac],
21621ecb1efSmrg    [CXX],
21721ecb1efSmrg    [case " $depcc " in #(
21821ecb1efSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21921ecb1efSmrg     esac])
22021ecb1efSmrg
22121ecb1efSmrg  for depmode in $am_compiler_list; do
22221ecb1efSmrg    # Setup a source with many dependencies, because some compilers
22321ecb1efSmrg    # like to wrap large dependency lists on column 80 (with \), and
22421ecb1efSmrg    # we should not choose a depcomp mode which is confused by this.
22521ecb1efSmrg    #
22621ecb1efSmrg    # We need to recreate these files for each test, as the compiler may
22721ecb1efSmrg    # overwrite some of them when testing with obscure command lines.
22821ecb1efSmrg    # This happens at least with the AIX C compiler.
22921ecb1efSmrg    : > sub/conftest.c
23021ecb1efSmrg    for i in 1 2 3 4 5 6; do
23121ecb1efSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
23221ecb1efSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23321ecb1efSmrg      # Solaris 8's {/usr,}/bin/sh.
23421ecb1efSmrg      touch sub/conftst$i.h
23521ecb1efSmrg    done
23621ecb1efSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23721ecb1efSmrg
23821ecb1efSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
23921ecb1efSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
24021ecb1efSmrg    # handle `-M -o', and we need to detect this.  Also, some Intel
24121ecb1efSmrg    # versions had trouble with output in subdirs
24221ecb1efSmrg    am__obj=sub/conftest.${OBJEXT-o}
24321ecb1efSmrg    am__minus_obj="-o $am__obj"
24421ecb1efSmrg    case $depmode in
24521ecb1efSmrg    gcc)
24621ecb1efSmrg      # This depmode causes a compiler race in universal mode.
24721ecb1efSmrg      test "$am__universal" = false || continue
24821ecb1efSmrg      ;;
24921ecb1efSmrg    nosideeffect)
25021ecb1efSmrg      # after this tag, mechanisms are not by side-effect, so they'll
25121ecb1efSmrg      # only be used when explicitly requested
25221ecb1efSmrg      if test "x$enable_dependency_tracking" = xyes; then
25321ecb1efSmrg	continue
25421ecb1efSmrg      else
25521ecb1efSmrg	break
25621ecb1efSmrg      fi
25721ecb1efSmrg      ;;
25821ecb1efSmrg    msvisualcpp | msvcmsys)
25921ecb1efSmrg      # This compiler won't grok `-c -o', but also, the minuso test has
26021ecb1efSmrg      # not run yet.  These depmodes are late enough in the game, and
26121ecb1efSmrg      # so weak that their functioning should not be impacted.
26221ecb1efSmrg      am__obj=conftest.${OBJEXT-o}
26321ecb1efSmrg      am__minus_obj=
26421ecb1efSmrg      ;;
26521ecb1efSmrg    none) break ;;
26621ecb1efSmrg    esac
26721ecb1efSmrg    if depmode=$depmode \
26821ecb1efSmrg       source=sub/conftest.c object=$am__obj \
26921ecb1efSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27021ecb1efSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27121ecb1efSmrg         >/dev/null 2>conftest.err &&
27221ecb1efSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27321ecb1efSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27421ecb1efSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27521ecb1efSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27621ecb1efSmrg      # icc doesn't choke on unknown options, it will just issue warnings
27721ecb1efSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
27821ecb1efSmrg      # that says an option was ignored or not supported.
27921ecb1efSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
28021ecb1efSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
28121ecb1efSmrg      # The diagnosis changed in icc 8.0:
28221ecb1efSmrg      #   icc: Command line remark: option '-MP' not supported
28321ecb1efSmrg      if (grep 'ignoring option' conftest.err ||
28421ecb1efSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28521ecb1efSmrg        am_cv_$1_dependencies_compiler_type=$depmode
28621ecb1efSmrg        break
28721ecb1efSmrg      fi
28821ecb1efSmrg    fi
28921ecb1efSmrg  done
29021ecb1efSmrg
29121ecb1efSmrg  cd ..
29221ecb1efSmrg  rm -rf conftest.dir
2931e00de39Smrgelse
29421ecb1efSmrg  am_cv_$1_dependencies_compiler_type=none
2951e00de39Smrgfi
29621ecb1efSmrg])
29721ecb1efSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
29821ecb1efSmrgAM_CONDITIONAL([am__fastdep$1], [
29921ecb1efSmrg  test "x$enable_dependency_tracking" != xno \
30021ecb1efSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
30121ecb1efSmrg])
3021e00de39Smrg
30321ecb1efSmrg
30421ecb1efSmrg# AM_SET_DEPDIR
30521ecb1efSmrg# -------------
30621ecb1efSmrg# Choose a directory name for dependency files.
30721ecb1efSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
30821ecb1efSmrgAC_DEFUN([AM_SET_DEPDIR],
30921ecb1efSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
31021ecb1efSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
31121ecb1efSmrg])
31221ecb1efSmrg
31321ecb1efSmrg
31421ecb1efSmrg# AM_DEP_TRACK
31521ecb1efSmrg# ------------
31621ecb1efSmrgAC_DEFUN([AM_DEP_TRACK],
31721ecb1efSmrg[AC_ARG_ENABLE(dependency-tracking,
31821ecb1efSmrg[  --disable-dependency-tracking  speeds up one-time build
31921ecb1efSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
32021ecb1efSmrgif test "x$enable_dependency_tracking" != xno; then
32121ecb1efSmrg  am_depcomp="$ac_aux_dir/depcomp"
32221ecb1efSmrg  AMDEPBACKSLASH='\'
3231e00de39Smrgfi
32421ecb1efSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
32521ecb1efSmrgAC_SUBST([AMDEPBACKSLASH])dnl
32621ecb1efSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
32721ecb1efSmrg])
3281e00de39Smrg
32921ecb1efSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
33021ecb1efSmrg
33121ecb1efSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
33221ecb1efSmrg# Free Software Foundation, Inc.
3331e00de39Smrg#
33421ecb1efSmrg# This file is free software; the Free Software Foundation
33521ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
33621ecb1efSmrg# with or without modifications, as long as this notice is preserved.
3371e00de39Smrg
33821ecb1efSmrg#serial 5
3391e00de39Smrg
34021ecb1efSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
34121ecb1efSmrg# ------------------------------
34221ecb1efSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
34321ecb1efSmrg[{
34421ecb1efSmrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
34521ecb1efSmrg  # are listed without --file.  Let's play safe and only enable the eval
34621ecb1efSmrg  # if we detect the quoting.
34721ecb1efSmrg  case $CONFIG_FILES in
34821ecb1efSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
34921ecb1efSmrg  *)   set x $CONFIG_FILES ;;
35021ecb1efSmrg  esac
35121ecb1efSmrg  shift
35221ecb1efSmrg  for mf
35321ecb1efSmrg  do
35421ecb1efSmrg    # Strip MF so we end up with the name of the file.
35521ecb1efSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
35621ecb1efSmrg    # Check whether this is an Automake generated Makefile or not.
35721ecb1efSmrg    # We used to match only the files named `Makefile.in', but
35821ecb1efSmrg    # some people rename them; so instead we look at the file content.
35921ecb1efSmrg    # Grep'ing the first line is not enough: some people post-process
36021ecb1efSmrg    # each Makefile.in and add a new line on top of each file to say so.
36121ecb1efSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
36221ecb1efSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
36321ecb1efSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
36421ecb1efSmrg      dirpart=`AS_DIRNAME("$mf")`
36521ecb1efSmrg    else
36621ecb1efSmrg      continue
36721ecb1efSmrg    fi
36821ecb1efSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
36921ecb1efSmrg    # from the Makefile without running `make'.
37021ecb1efSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37121ecb1efSmrg    test -z "$DEPDIR" && continue
37221ecb1efSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
37321ecb1efSmrg    test -z "am__include" && continue
37421ecb1efSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37521ecb1efSmrg    # When using ansi2knr, U may be empty or an underscore; expand it
37621ecb1efSmrg    U=`sed -n 's/^U = //p' < "$mf"`
37721ecb1efSmrg    # Find all dependency output files, they are included files with
37821ecb1efSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
37921ecb1efSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
38021ecb1efSmrg    # expansion.
38121ecb1efSmrg    for file in `sed -n "
38221ecb1efSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
38321ecb1efSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
38421ecb1efSmrg      # Make sure the directory exists.
38521ecb1efSmrg      test -f "$dirpart/$file" && continue
38621ecb1efSmrg      fdir=`AS_DIRNAME(["$file"])`
38721ecb1efSmrg      AS_MKDIR_P([$dirpart/$fdir])
38821ecb1efSmrg      # echo "creating $dirpart/$file"
38921ecb1efSmrg      echo '# dummy' > "$dirpart/$file"
39021ecb1efSmrg    done
39121ecb1efSmrg  done
39221ecb1efSmrg}
39321ecb1efSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3941e00de39Smrg
3951e00de39Smrg
39621ecb1efSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
39721ecb1efSmrg# -----------------------------
39821ecb1efSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
39921ecb1efSmrg#
40021ecb1efSmrg# This code is only required when automatic dependency tracking
40121ecb1efSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
40221ecb1efSmrg# need in order to bootstrap the dependency handling code.
40321ecb1efSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
40421ecb1efSmrg[AC_CONFIG_COMMANDS([depfiles],
40521ecb1efSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
40621ecb1efSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
40721ecb1efSmrg])
4081e00de39Smrg
40921ecb1efSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
41021ecb1efSmrg# Free Software Foundation, Inc.
41121ecb1efSmrg#
41221ecb1efSmrg# This file is free software; the Free Software Foundation
41321ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
41421ecb1efSmrg# with or without modifications, as long as this notice is preserved.
4151e00de39Smrg
41621ecb1efSmrg# serial 8
4171e00de39Smrg
41821ecb1efSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
41921ecb1efSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
42021ecb1efSmrg
42121ecb1efSmrg# Do all the work for Automake.                             -*- Autoconf -*-
42221ecb1efSmrg
42321ecb1efSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
42421ecb1efSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
42521ecb1efSmrg#
42621ecb1efSmrg# This file is free software; the Free Software Foundation
42721ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
42821ecb1efSmrg# with or without modifications, as long as this notice is preserved.
42921ecb1efSmrg
43021ecb1efSmrg# serial 16
43121ecb1efSmrg
43221ecb1efSmrg# This macro actually does too much.  Some checks are only needed if
43321ecb1efSmrg# your package does certain things.  But this isn't really a big deal.
43421ecb1efSmrg
43521ecb1efSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
43621ecb1efSmrg# AM_INIT_AUTOMAKE([OPTIONS])
43721ecb1efSmrg# -----------------------------------------------
43821ecb1efSmrg# The call with PACKAGE and VERSION arguments is the old style
43921ecb1efSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
44021ecb1efSmrg# and VERSION should now be passed to AC_INIT and removed from
44121ecb1efSmrg# the call to AM_INIT_AUTOMAKE.
44221ecb1efSmrg# We support both call styles for the transition.  After
44321ecb1efSmrg# the next Automake release, Autoconf can make the AC_INIT
44421ecb1efSmrg# arguments mandatory, and then we can depend on a new Autoconf
44521ecb1efSmrg# release and drop the old call support.
44621ecb1efSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
44721ecb1efSmrg[AC_PREREQ([2.62])dnl
44821ecb1efSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
44921ecb1efSmrgdnl the ones we care about.
45021ecb1efSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45121ecb1efSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
45221ecb1efSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
45321ecb1efSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
45421ecb1efSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
45521ecb1efSmrg  # is not polluted with repeated "-I."
45621ecb1efSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
45721ecb1efSmrg  # test to see if srcdir already configured
45821ecb1efSmrg  if test -f $srcdir/config.status; then
45921ecb1efSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
46021ecb1efSmrg  fi
4611e00de39Smrgfi
46221ecb1efSmrg
46321ecb1efSmrg# test whether we have cygpath
46421ecb1efSmrgif test -z "$CYGPATH_W"; then
46521ecb1efSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
46621ecb1efSmrg    CYGPATH_W='cygpath -w'
46721ecb1efSmrg  else
46821ecb1efSmrg    CYGPATH_W=echo
46921ecb1efSmrg  fi
4701e00de39Smrgfi
47121ecb1efSmrgAC_SUBST([CYGPATH_W])
4721e00de39Smrg
47321ecb1efSmrg# Define the identity of the package.
47421ecb1efSmrgdnl Distinguish between old-style and new-style calls.
47521ecb1efSmrgm4_ifval([$2],
47621ecb1efSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
47721ecb1efSmrg AC_SUBST([PACKAGE], [$1])dnl
47821ecb1efSmrg AC_SUBST([VERSION], [$2])],
47921ecb1efSmrg[_AM_SET_OPTIONS([$1])dnl
48021ecb1efSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
48121ecb1efSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
48221ecb1efSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
48321ecb1efSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
48421ecb1efSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4851e00de39Smrg
48621ecb1efSmrg_AM_IF_OPTION([no-define],,
48721ecb1efSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
48821ecb1efSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4891e00de39Smrg
49021ecb1efSmrg# Some tools Automake needs.
49121ecb1efSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
49221ecb1efSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
49321ecb1efSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
49421ecb1efSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
49521ecb1efSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
49621ecb1efSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
49721ecb1efSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
49821ecb1efSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
49921ecb1efSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
50021ecb1efSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
50121ecb1efSmrg# We need awk for the "check" target.  The system "awk" is bad on
50221ecb1efSmrg# some platforms.
50321ecb1efSmrgAC_REQUIRE([AC_PROG_AWK])dnl
50421ecb1efSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
50521ecb1efSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
50621ecb1efSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
50721ecb1efSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
50821ecb1efSmrg			     [_AM_PROG_TAR([v7])])])
50921ecb1efSmrg_AM_IF_OPTION([no-dependencies],,
51021ecb1efSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
51121ecb1efSmrg		  [_AM_DEPENDENCIES(CC)],
51221ecb1efSmrg		  [define([AC_PROG_CC],
51321ecb1efSmrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
51421ecb1efSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
51521ecb1efSmrg		  [_AM_DEPENDENCIES(CXX)],
51621ecb1efSmrg		  [define([AC_PROG_CXX],
51721ecb1efSmrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
51821ecb1efSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
51921ecb1efSmrg		  [_AM_DEPENDENCIES(OBJC)],
52021ecb1efSmrg		  [define([AC_PROG_OBJC],
52121ecb1efSmrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
52221ecb1efSmrg])
52321ecb1efSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
52421ecb1efSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
52521ecb1efSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
52621ecb1efSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
52721ecb1efSmrgAC_CONFIG_COMMANDS_PRE(dnl
52821ecb1efSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
52921ecb1efSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
53021ecb1efSmrg])
5311e00de39Smrg
53221ecb1efSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
53321ecb1efSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
53421ecb1efSmrgdnl mangled by Autoconf and run in a shell conditional statement.
53521ecb1efSmrgm4_define([_AC_COMPILER_EXEEXT],
53621ecb1efSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5371e00de39Smrg
5381e00de39Smrg
53921ecb1efSmrg# When config.status generates a header, we must update the stamp-h file.
54021ecb1efSmrg# This file resides in the same directory as the config header
54121ecb1efSmrg# that is generated.  The stamp files are numbered to have different names.
54221ecb1efSmrg
54321ecb1efSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
54421ecb1efSmrg# loop where config.status creates the headers, so we can generate
54521ecb1efSmrg# our stamp files there.
54621ecb1efSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
54721ecb1efSmrg[# Compute $1's index in $config_headers.
54821ecb1efSmrg_am_arg=$1
54921ecb1efSmrg_am_stamp_count=1
55021ecb1efSmrgfor _am_header in $config_headers :; do
55121ecb1efSmrg  case $_am_header in
55221ecb1efSmrg    $_am_arg | $_am_arg:* )
55321ecb1efSmrg      break ;;
55421ecb1efSmrg    * )
55521ecb1efSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
55621ecb1efSmrg  esac
55721ecb1efSmrgdone
55821ecb1efSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
55921ecb1efSmrg
56021ecb1efSmrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
56121ecb1efSmrg#
56221ecb1efSmrg# This file is free software; the Free Software Foundation
56321ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
56421ecb1efSmrg# with or without modifications, as long as this notice is preserved.
5651e00de39Smrg
56621ecb1efSmrg# AM_PROG_INSTALL_SH
56721ecb1efSmrg# ------------------
56821ecb1efSmrg# Define $install_sh.
56921ecb1efSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
57021ecb1efSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
57121ecb1efSmrgif test x"${install_sh}" != xset; then
57221ecb1efSmrg  case $am_aux_dir in
57321ecb1efSmrg  *\ * | *\	*)
57421ecb1efSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
57521ecb1efSmrg  *)
57621ecb1efSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
57721ecb1efSmrg  esac
5781e00de39Smrgfi
57921ecb1efSmrgAC_SUBST(install_sh)])
5801e00de39Smrg
58121ecb1efSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
58221ecb1efSmrg#
58321ecb1efSmrg# This file is free software; the Free Software Foundation
58421ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
58521ecb1efSmrg# with or without modifications, as long as this notice is preserved.
5861e00de39Smrg
58721ecb1efSmrg# serial 2
5881e00de39Smrg
58921ecb1efSmrg# Check whether the underlying file-system supports filenames
59021ecb1efSmrg# with a leading dot.  For instance MS-DOS doesn't.
59121ecb1efSmrgAC_DEFUN([AM_SET_LEADING_DOT],
59221ecb1efSmrg[rm -rf .tst 2>/dev/null
59321ecb1efSmrgmkdir .tst 2>/dev/null
59421ecb1efSmrgif test -d .tst; then
59521ecb1efSmrg  am__leading_dot=.
5961e00de39Smrgelse
59721ecb1efSmrg  am__leading_dot=_
5981e00de39Smrgfi
59921ecb1efSmrgrmdir .tst 2>/dev/null
60021ecb1efSmrgAC_SUBST([am__leading_dot])])
6011e00de39Smrg
60221ecb1efSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
60321ecb1efSmrg# From Jim Meyering
6041e00de39Smrg
60521ecb1efSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
60621ecb1efSmrg# Free Software Foundation, Inc.
60721ecb1efSmrg#
60821ecb1efSmrg# This file is free software; the Free Software Foundation
60921ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
61021ecb1efSmrg# with or without modifications, as long as this notice is preserved.
6111e00de39Smrg
61221ecb1efSmrg# serial 5
6131e00de39Smrg
61421ecb1efSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
61521ecb1efSmrg# ----------------------------------
61621ecb1efSmrg# Control maintainer-specific portions of Makefiles.
61721ecb1efSmrg# Default is to disable them, unless `enable' is passed literally.
61821ecb1efSmrg# For symmetry, `disable' may be passed as well.  Anyway, the user
61921ecb1efSmrg# can override the default with the --enable/--disable switch.
62021ecb1efSmrgAC_DEFUN([AM_MAINTAINER_MODE],
62121ecb1efSmrg[m4_case(m4_default([$1], [disable]),
62221ecb1efSmrg       [enable], [m4_define([am_maintainer_other], [disable])],
62321ecb1efSmrg       [disable], [m4_define([am_maintainer_other], [enable])],
62421ecb1efSmrg       [m4_define([am_maintainer_other], [enable])
62521ecb1efSmrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
62621ecb1efSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
62721ecb1efSmrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
62821ecb1efSmrg  AC_ARG_ENABLE([maintainer-mode],
62921ecb1efSmrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
63021ecb1efSmrg			  (and sometimes confusing) to the casual installer],
63121ecb1efSmrg      [USE_MAINTAINER_MODE=$enableval],
63221ecb1efSmrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
63321ecb1efSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
63421ecb1efSmrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
63521ecb1efSmrg  MAINT=$MAINTAINER_MODE_TRUE
63621ecb1efSmrg  AC_SUBST([MAINT])dnl
63721ecb1efSmrg]
63821ecb1efSmrg)
6391e00de39Smrg
64021ecb1efSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6411e00de39Smrg
64221ecb1efSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6431e00de39Smrg
64421ecb1efSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
64521ecb1efSmrg#
64621ecb1efSmrg# This file is free software; the Free Software Foundation
64721ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
64821ecb1efSmrg# with or without modifications, as long as this notice is preserved.
6491e00de39Smrg
65021ecb1efSmrg# serial 4
6511e00de39Smrg
65221ecb1efSmrg# AM_MAKE_INCLUDE()
65321ecb1efSmrg# -----------------
65421ecb1efSmrg# Check to see how make treats includes.
65521ecb1efSmrgAC_DEFUN([AM_MAKE_INCLUDE],
65621ecb1efSmrg[am_make=${MAKE-make}
65721ecb1efSmrgcat > confinc << 'END'
65821ecb1efSmrgam__doit:
65921ecb1efSmrg	@echo this is the am__doit target
66021ecb1efSmrg.PHONY: am__doit
66121ecb1efSmrgEND
66221ecb1efSmrg# If we don't find an include directive, just comment out the code.
66321ecb1efSmrgAC_MSG_CHECKING([for style of include used by $am_make])
66421ecb1efSmrgam__include="#"
66521ecb1efSmrgam__quote=
66621ecb1efSmrg_am_result=none
66721ecb1efSmrg# First try GNU make style include.
66821ecb1efSmrgecho "include confinc" > confmf
66921ecb1efSmrg# Ignore all kinds of additional output from `make'.
67021ecb1efSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
67121ecb1efSmrg*the\ am__doit\ target*)
67221ecb1efSmrg  am__include=include
67321ecb1efSmrg  am__quote=
67421ecb1efSmrg  _am_result=GNU
67521ecb1efSmrg  ;;
67621ecb1efSmrgesac
67721ecb1efSmrg# Now try BSD make style include.
67821ecb1efSmrgif test "$am__include" = "#"; then
67921ecb1efSmrg   echo '.include "confinc"' > confmf
68021ecb1efSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
68121ecb1efSmrg   *the\ am__doit\ target*)
68221ecb1efSmrg     am__include=.include
68321ecb1efSmrg     am__quote="\""
68421ecb1efSmrg     _am_result=BSD
68521ecb1efSmrg     ;;
68621ecb1efSmrg   esac
6871e00de39Smrgfi
68821ecb1efSmrgAC_SUBST([am__include])
68921ecb1efSmrgAC_SUBST([am__quote])
69021ecb1efSmrgAC_MSG_RESULT([$_am_result])
69121ecb1efSmrgrm -f confinc confmf
69221ecb1efSmrg])
6931e00de39Smrg
69421ecb1efSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6951e00de39Smrg
69621ecb1efSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
69721ecb1efSmrg# Free Software Foundation, Inc.
69821ecb1efSmrg#
69921ecb1efSmrg# This file is free software; the Free Software Foundation
70021ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
70121ecb1efSmrg# with or without modifications, as long as this notice is preserved.
7021e00de39Smrg
70321ecb1efSmrg# serial 6
7041e00de39Smrg
70521ecb1efSmrg# AM_MISSING_PROG(NAME, PROGRAM)
70621ecb1efSmrg# ------------------------------
70721ecb1efSmrgAC_DEFUN([AM_MISSING_PROG],
70821ecb1efSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
70921ecb1efSmrg$1=${$1-"${am_missing_run}$2"}
71021ecb1efSmrgAC_SUBST($1)])
7111e00de39Smrg
7121e00de39Smrg
71321ecb1efSmrg# AM_MISSING_HAS_RUN
71421ecb1efSmrg# ------------------
71521ecb1efSmrg# Define MISSING if not defined so far and test if it supports --run.
71621ecb1efSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
71721ecb1efSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
71821ecb1efSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
71921ecb1efSmrgAC_REQUIRE_AUX_FILE([missing])dnl
72021ecb1efSmrgif test x"${MISSING+set}" != xset; then
72121ecb1efSmrg  case $am_aux_dir in
72221ecb1efSmrg  *\ * | *\	*)
72321ecb1efSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
72421ecb1efSmrg  *)
72521ecb1efSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
72621ecb1efSmrg  esac
7271e00de39Smrgfi
72821ecb1efSmrg# Use eval to expand $SHELL
72921ecb1efSmrgif eval "$MISSING --run true"; then
73021ecb1efSmrg  am_missing_run="$MISSING --run "
7311e00de39Smrgelse
73221ecb1efSmrg  am_missing_run=
73321ecb1efSmrg  AC_MSG_WARN([`missing' script is too old or missing])
7341e00de39Smrgfi
73521ecb1efSmrg])
7361e00de39Smrg
73721ecb1efSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7381e00de39Smrg#
73921ecb1efSmrg# This file is free software; the Free Software Foundation
74021ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
74121ecb1efSmrg# with or without modifications, as long as this notice is preserved.
7421e00de39Smrg
74321ecb1efSmrg# AM_PROG_MKDIR_P
74421ecb1efSmrg# ---------------
74521ecb1efSmrg# Check for `mkdir -p'.
74621ecb1efSmrgAC_DEFUN([AM_PROG_MKDIR_P],
74721ecb1efSmrg[AC_PREREQ([2.60])dnl
74821ecb1efSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
74921ecb1efSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
75021ecb1efSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
75121ecb1efSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
75221ecb1efSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
75321ecb1efSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
75421ecb1efSmrgdnl adjustment using top_builddir (which is defined more often than
75521ecb1efSmrgdnl MKDIR_P).
75621ecb1efSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
75721ecb1efSmrgcase $mkdir_p in
75821ecb1efSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
75921ecb1efSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
76021ecb1efSmrgesac
76121ecb1efSmrg])
7621e00de39Smrg
76321ecb1efSmrg# Helper functions for option handling.                     -*- Autoconf -*-
7641e00de39Smrg
76521ecb1efSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
7661e00de39Smrg#
76721ecb1efSmrg# This file is free software; the Free Software Foundation
76821ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
76921ecb1efSmrg# with or without modifications, as long as this notice is preserved.
7701e00de39Smrg
77121ecb1efSmrg# serial 4
7721e00de39Smrg
77321ecb1efSmrg# _AM_MANGLE_OPTION(NAME)
77421ecb1efSmrg# -----------------------
77521ecb1efSmrgAC_DEFUN([_AM_MANGLE_OPTION],
77621ecb1efSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7771e00de39Smrg
77821ecb1efSmrg# _AM_SET_OPTION(NAME)
77921ecb1efSmrg# ------------------------------
78021ecb1efSmrg# Set option NAME.  Presently that only means defining a flag for this option.
78121ecb1efSmrgAC_DEFUN([_AM_SET_OPTION],
78221ecb1efSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7831e00de39Smrg
78421ecb1efSmrg# _AM_SET_OPTIONS(OPTIONS)
78521ecb1efSmrg# ----------------------------------
78621ecb1efSmrg# OPTIONS is a space-separated list of Automake options.
78721ecb1efSmrgAC_DEFUN([_AM_SET_OPTIONS],
78821ecb1efSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
78921ecb1efSmrg
79021ecb1efSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
79121ecb1efSmrg# -------------------------------------------
79221ecb1efSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
79321ecb1efSmrgAC_DEFUN([_AM_IF_OPTION],
79421ecb1efSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
79521ecb1efSmrg
79621ecb1efSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7971e00de39Smrg
79821ecb1efSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
79921ecb1efSmrg# Free Software Foundation, Inc.
8001e00de39Smrg#
8011e00de39Smrg# This file is free software; the Free Software Foundation
8021e00de39Smrg# gives unlimited permission to copy and/or distribute it,
8031e00de39Smrg# with or without modifications, as long as this notice is preserved.
8041e00de39Smrg
80521ecb1efSmrg# serial 5
8061e00de39Smrg
80721ecb1efSmrg# AM_SANITY_CHECK
80821ecb1efSmrg# ---------------
80921ecb1efSmrgAC_DEFUN([AM_SANITY_CHECK],
81021ecb1efSmrg[AC_MSG_CHECKING([whether build environment is sane])
81121ecb1efSmrg# Just in case
81221ecb1efSmrgsleep 1
81321ecb1efSmrgecho timestamp > conftest.file
81421ecb1efSmrg# Reject unsafe characters in $srcdir or the absolute working directory
81521ecb1efSmrg# name.  Accept space and tab only in the latter.
81621ecb1efSmrgam_lf='
81721ecb1efSmrg'
81821ecb1efSmrgcase `pwd` in
81921ecb1efSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
82021ecb1efSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
82121ecb1efSmrgesac
82221ecb1efSmrgcase $srcdir in
82321ecb1efSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
82421ecb1efSmrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
82521ecb1efSmrgesac
8261e00de39Smrg
82721ecb1efSmrg# Do `set' in a subshell so we don't clobber the current shell's
82821ecb1efSmrg# arguments.  Must try -L first in case configure is actually a
82921ecb1efSmrg# symlink; some systems play weird games with the mod time of symlinks
83021ecb1efSmrg# (eg FreeBSD returns the mod time of the symlink's containing
83121ecb1efSmrg# directory).
83221ecb1efSmrgif (
83321ecb1efSmrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
83421ecb1efSmrg   if test "$[*]" = "X"; then
83521ecb1efSmrg      # -L didn't work.
83621ecb1efSmrg      set X `ls -t "$srcdir/configure" conftest.file`
83721ecb1efSmrg   fi
83821ecb1efSmrg   rm -f conftest.file
83921ecb1efSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
84021ecb1efSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8411e00de39Smrg
84221ecb1efSmrg      # If neither matched, then we have a broken ls.  This can happen
84321ecb1efSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
84421ecb1efSmrg      # broken ls alias from the environment.  This has actually
84521ecb1efSmrg      # happened.  Such a system could not be considered "sane".
84621ecb1efSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
84721ecb1efSmrgalias in your environment])
84821ecb1efSmrg   fi
8491e00de39Smrg
85021ecb1efSmrg   test "$[2]" = conftest.file
85121ecb1efSmrg   )
85221ecb1efSmrgthen
85321ecb1efSmrg   # Ok.
85421ecb1efSmrg   :
85521ecb1efSmrgelse
85621ecb1efSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
85721ecb1efSmrgCheck your system clock])
85821ecb1efSmrgfi
85921ecb1efSmrgAC_MSG_RESULT(yes)])
86021ecb1efSmrg
86121ecb1efSmrg# Copyright (C) 2009  Free Software Foundation, Inc.
8621e00de39Smrg#
8631e00de39Smrg# This file is free software; the Free Software Foundation
8641e00de39Smrg# gives unlimited permission to copy and/or distribute it,
8651e00de39Smrg# with or without modifications, as long as this notice is preserved.
8661e00de39Smrg
86721ecb1efSmrg# serial 1
8681e00de39Smrg
86921ecb1efSmrg# AM_SILENT_RULES([DEFAULT])
87021ecb1efSmrg# --------------------------
87121ecb1efSmrg# Enable less verbose build rules; with the default set to DEFAULT
87221ecb1efSmrg# (`yes' being less verbose, `no' or empty being verbose).
87321ecb1efSmrgAC_DEFUN([AM_SILENT_RULES],
87421ecb1efSmrg[AC_ARG_ENABLE([silent-rules],
87521ecb1efSmrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
87621ecb1efSmrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
87721ecb1efSmrgcase $enable_silent_rules in
87821ecb1efSmrgyes) AM_DEFAULT_VERBOSITY=0;;
87921ecb1efSmrgno)  AM_DEFAULT_VERBOSITY=1;;
88021ecb1efSmrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
88121ecb1efSmrgesac
88221ecb1efSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
88321ecb1efSmrgAM_BACKSLASH='\'
88421ecb1efSmrgAC_SUBST([AM_BACKSLASH])dnl
88521ecb1efSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8861e00de39Smrg])
8871e00de39Smrg
88821ecb1efSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
88921ecb1efSmrg#
89021ecb1efSmrg# This file is free software; the Free Software Foundation
89121ecb1efSmrg# gives unlimited permission to copy and/or distribute it,
89221ecb1efSmrg# with or without modifications, as long as this notice is preserved.
89321ecb1efSmrg
89421ecb1efSmrg# AM_PROG_INSTALL_STRIP
89521ecb1efSmrg# ---------------------
89621ecb1efSmrg# One issue with vendor `install' (even GNU) is that you can't
89721ecb1efSmrg# specify the program used to strip binaries.  This is especially
89821ecb1efSmrg# annoying in cross-compiling environments, where the build's strip
89921ecb1efSmrg# is unlikely to handle the host's binaries.
90021ecb1efSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
90121ecb1efSmrg# always use install-sh in `make install-strip', and initialize
90221ecb1efSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
90321ecb1efSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
90421ecb1efSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
90521ecb1efSmrg# Installed binaries are usually stripped using `strip' when the user
90621ecb1efSmrg# run `make install-strip'.  However `strip' might not be the right
90721ecb1efSmrg# tool to use in cross-compilation environments, therefore Automake
90821ecb1efSmrg# will honor the `STRIP' environment variable to overrule this program.
90921ecb1efSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
91021ecb1efSmrgif test "$cross_compiling" != no; then
91121ecb1efSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
91221ecb1efSmrgfi
91321ecb1efSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
91421ecb1efSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9151e00de39Smrg
91621ecb1efSmrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9171e00de39Smrg#
9181e00de39Smrg# This file is free software; the Free Software Foundation
9191e00de39Smrg# gives unlimited permission to copy and/or distribute it,
9201e00de39Smrg# with or without modifications, as long as this notice is preserved.
9211e00de39Smrg
92221ecb1efSmrg# serial 2
9231e00de39Smrg
92421ecb1efSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
92521ecb1efSmrg# ---------------------------
92621ecb1efSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
92721ecb1efSmrg# This macro is traced by Automake.
92821ecb1efSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9291e00de39Smrg
93021ecb1efSmrg# AM_SUBST_NOTMAKE(VARIABLE)
93121ecb1efSmrg# ---------------------------
93221ecb1efSmrg# Public sister of _AM_SUBST_NOTMAKE.
93321ecb1efSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
93421ecb1efSmrg
93521ecb1efSmrg# Check how to create a tarball.                            -*- Autoconf -*-
93621ecb1efSmrg
93721ecb1efSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9381e00de39Smrg#
9391e00de39Smrg# This file is free software; the Free Software Foundation
9401e00de39Smrg# gives unlimited permission to copy and/or distribute it,
9411e00de39Smrg# with or without modifications, as long as this notice is preserved.
9421e00de39Smrg
94321ecb1efSmrg# serial 2
9441e00de39Smrg
94521ecb1efSmrg# _AM_PROG_TAR(FORMAT)
94621ecb1efSmrg# --------------------
94721ecb1efSmrg# Check how to create a tarball in format FORMAT.
94821ecb1efSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
9491e00de39Smrg#
95021ecb1efSmrg# Substitute a variable $(am__tar) that is a command
95121ecb1efSmrg# writing to stdout a FORMAT-tarball containing the directory
95221ecb1efSmrg# $tardir.
95321ecb1efSmrg#     tardir=directory && $(am__tar) > result.tar
95421ecb1efSmrg#
95521ecb1efSmrg# Substitute a variable $(am__untar) that extract such
95621ecb1efSmrg# a tarball read from stdin.
95721ecb1efSmrg#     $(am__untar) < result.tar
95821ecb1efSmrgAC_DEFUN([_AM_PROG_TAR],
95921ecb1efSmrg[# Always define AMTAR for backward compatibility.
96021ecb1efSmrgAM_MISSING_PROG([AMTAR], [tar])
96121ecb1efSmrgm4_if([$1], [v7],
96221ecb1efSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
96321ecb1efSmrg     [m4_case([$1], [ustar],, [pax],,
96421ecb1efSmrg              [m4_fatal([Unknown tar format])])
96521ecb1efSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
96621ecb1efSmrg# Loop over all known methods to create a tar archive until one works.
96721ecb1efSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
96821ecb1efSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
96921ecb1efSmrg# Do not fold the above two line into one, because Tru64 sh and
97021ecb1efSmrg# Solaris sh will not grok spaces in the rhs of `-'.
97121ecb1efSmrgfor _am_tool in $_am_tools
97221ecb1efSmrgdo
97321ecb1efSmrg  case $_am_tool in
97421ecb1efSmrg  gnutar)
97521ecb1efSmrg    for _am_tar in tar gnutar gtar;
97621ecb1efSmrg    do
97721ecb1efSmrg      AM_RUN_LOG([$_am_tar --version]) && break
97821ecb1efSmrg    done
97921ecb1efSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
98021ecb1efSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
98121ecb1efSmrg    am__untar="$_am_tar -xf -"
98221ecb1efSmrg    ;;
98321ecb1efSmrg  plaintar)
98421ecb1efSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
98521ecb1efSmrg    # ustar tarball either.
98621ecb1efSmrg    (tar --version) >/dev/null 2>&1 && continue
98721ecb1efSmrg    am__tar='tar chf - "$$tardir"'
98821ecb1efSmrg    am__tar_='tar chf - "$tardir"'
98921ecb1efSmrg    am__untar='tar xf -'
99021ecb1efSmrg    ;;
99121ecb1efSmrg  pax)
99221ecb1efSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
99321ecb1efSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
99421ecb1efSmrg    am__untar='pax -r'
99521ecb1efSmrg    ;;
99621ecb1efSmrg  cpio)
99721ecb1efSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
99821ecb1efSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
99921ecb1efSmrg    am__untar='cpio -i -H $1 -d'
100021ecb1efSmrg    ;;
100121ecb1efSmrg  none)
100221ecb1efSmrg    am__tar=false
100321ecb1efSmrg    am__tar_=false
100421ecb1efSmrg    am__untar=false
100521ecb1efSmrg    ;;
100621ecb1efSmrg  esac
10071e00de39Smrg
100821ecb1efSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
100921ecb1efSmrg  # and am__untar set.
101021ecb1efSmrg  test -n "${am_cv_prog_tar_$1}" && break
10111e00de39Smrg
101221ecb1efSmrg  # tar/untar a dummy directory, and stop if the command works
101321ecb1efSmrg  rm -rf conftest.dir
10141e00de39Smrg  mkdir conftest.dir
101521ecb1efSmrg  echo GrepMe > conftest.dir/file
101621ecb1efSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
101721ecb1efSmrg  rm -rf conftest.dir
101821ecb1efSmrg  if test -s conftest.tar; then
101921ecb1efSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
102021ecb1efSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10211e00de39Smrg  fi
102221ecb1efSmrgdone
102321ecb1efSmrgrm -rf conftest.dir
102421ecb1efSmrg
102521ecb1efSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
102621ecb1efSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
102721ecb1efSmrgAC_SUBST([am__tar])
102821ecb1efSmrgAC_SUBST([am__untar])
102921ecb1efSmrg]) # _AM_PROG_TAR
103021ecb1efSmrg
103121ecb1efSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
103221ecb1efSmrgdnl
103321ecb1efSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
103421ecb1efSmrgdnl 
103521ecb1efSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
103621ecb1efSmrgdnl copy of this software and associated documentation files (the
103721ecb1efSmrgdnl "Software"), to deal in the Software without restriction, including
103821ecb1efSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
103921ecb1efSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
104021ecb1efSmrgdnl to whom the Software is furnished to do so, provided that the above
104121ecb1efSmrgdnl copyright notice(s) and this permission notice appear in all copies of
104221ecb1efSmrgdnl the Software and that both the above copyright notice(s) and this
104321ecb1efSmrgdnl permission notice appear in supporting documentation.
104421ecb1efSmrgdnl
104521ecb1efSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
104621ecb1efSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
104721ecb1efSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
104821ecb1efSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
104921ecb1efSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
105021ecb1efSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
105121ecb1efSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
105221ecb1efSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
105321ecb1efSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
105421ecb1efSmrgdnl
105521ecb1efSmrgdnl Except as contained in this notice, the name of a copyright holder
105621ecb1efSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
105721ecb1efSmrgdnl or other dealings in this Software without prior written authorization
105821ecb1efSmrgdnl of the copyright holder.
105921ecb1efSmrg
106021ecb1efSmrg# XORG_MACROS_VERSION(required-version)
106121ecb1efSmrg# -------------------------------------
106221ecb1efSmrg# Minimum version: 1.1.0
106321ecb1efSmrg#
106421ecb1efSmrg# If you're using a macro added in Version 1.1 or newer, include this in
106521ecb1efSmrg# your configure.ac with the minimum required version, such as:
106621ecb1efSmrg# XORG_MACROS_VERSION(1.1)
106721ecb1efSmrg#
106821ecb1efSmrg# To ensure that this macro is defined, also add:
106921ecb1efSmrg# m4_ifndef([XORG_MACROS_VERSION],
107021ecb1efSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
107121ecb1efSmrg#
107221ecb1efSmrg#
107321ecb1efSmrg# See the "minimum version" comment for each macro you use to see what 
107421ecb1efSmrg# version you require.
107521ecb1efSmrgm4_defun([XORG_MACROS_VERSION],[
107621ecb1efSmrgm4_define([vers_have], [1.3.0])
107721ecb1efSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
107821ecb1efSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
107921ecb1efSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
108021ecb1efSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
108121ecb1efSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
108221ecb1efSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
108321ecb1efSmrgm4_undefine([vers_have])
108421ecb1efSmrgm4_undefine([maj_have])
108521ecb1efSmrgm4_undefine([maj_needed])
108621ecb1efSmrg]) # XORG_MACROS_VERSION
108721ecb1efSmrg
108821ecb1efSmrg# XORG_PROG_RAWCPP()
108921ecb1efSmrg# ------------------
109021ecb1efSmrg# Minimum version: 1.0.0
109121ecb1efSmrg#
109221ecb1efSmrg# Find cpp program and necessary flags for use in pre-processing text files
109321ecb1efSmrg# such as man pages and config files
109421ecb1efSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
109521ecb1efSmrgAC_REQUIRE([AC_PROG_CPP])
109621ecb1efSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
109721ecb1efSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
10981e00de39Smrg
109921ecb1efSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
110021ecb1efSmrg# which is not the best choice for supporting other OS'es, but covers most
110121ecb1efSmrg# of the ones we need for now.
110221ecb1efSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
110321ecb1efSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
110421ecb1efSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
110521ecb1efSmrg	AC_MSG_RESULT([no])
110621ecb1efSmrgelse
110721ecb1efSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
110821ecb1efSmrg		RAWCPPFLAGS=-undef
110921ecb1efSmrg		AC_MSG_RESULT([yes])
111021ecb1efSmrg	# under Cygwin unix is still defined even with -undef
111121ecb1efSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
111221ecb1efSmrg		RAWCPPFLAGS="-undef -ansi"
111321ecb1efSmrg		AC_MSG_RESULT([yes, with -ansi])
111421ecb1efSmrg	else
111521ecb1efSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
111621ecb1efSmrg	fi
111721ecb1efSmrgfi
111821ecb1efSmrgrm -f conftest.$ac_ext
11191e00de39Smrg
112021ecb1efSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
112121ecb1efSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
112221ecb1efSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
112321ecb1efSmrg	AC_MSG_RESULT([no])
11241e00de39Smrgelse
112521ecb1efSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
112621ecb1efSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
112721ecb1efSmrg		AC_MSG_RESULT([yes])
112821ecb1efSmrg	else
112921ecb1efSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
113021ecb1efSmrg	fi
11311e00de39Smrgfi
113221ecb1efSmrgrm -f conftest.$ac_ext
113321ecb1efSmrgAC_SUBST(RAWCPPFLAGS)
113421ecb1efSmrg]) # XORG_PROG_RAWCPP
11351e00de39Smrg
113621ecb1efSmrg# XORG_MANPAGE_SECTIONS()
113721ecb1efSmrg# -----------------------
113821ecb1efSmrg# Minimum version: 1.0.0
113921ecb1efSmrg#
114021ecb1efSmrg# Determine which sections man pages go in for the different man page types
114121ecb1efSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
114221ecb1efSmrg# Not sure if there's any better way than just hardcoding by OS name.
114321ecb1efSmrg# Override default settings by setting environment variables
11441e00de39Smrg
114521ecb1efSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
114621ecb1efSmrgAC_REQUIRE([AC_CANONICAL_HOST])
11471e00de39Smrg
114821ecb1efSmrgif test x$APP_MAN_SUFFIX = x    ; then
114921ecb1efSmrg    APP_MAN_SUFFIX=1
115021ecb1efSmrgfi
115121ecb1efSmrgif test x$APP_MAN_DIR = x    ; then
115221ecb1efSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
115321ecb1efSmrgfi
11541e00de39Smrg
115521ecb1efSmrgif test x$LIB_MAN_SUFFIX = x    ; then
115621ecb1efSmrg    LIB_MAN_SUFFIX=3
115721ecb1efSmrgfi
115821ecb1efSmrgif test x$LIB_MAN_DIR = x    ; then
115921ecb1efSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
11601e00de39Smrgfi
11611e00de39Smrg
116221ecb1efSmrgif test x$FILE_MAN_SUFFIX = x    ; then
116321ecb1efSmrg    case $host_os in
116421ecb1efSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
116521ecb1efSmrg	*)		FILE_MAN_SUFFIX=5  ;;
116621ecb1efSmrg    esac
116721ecb1efSmrgfi
116821ecb1efSmrgif test x$FILE_MAN_DIR = x    ; then
116921ecb1efSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
117021ecb1efSmrgfi
11711e00de39Smrg
117221ecb1efSmrgif test x$MISC_MAN_SUFFIX = x    ; then
117321ecb1efSmrg    case $host_os in
117421ecb1efSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
117521ecb1efSmrg	*)		MISC_MAN_SUFFIX=7  ;;
117621ecb1efSmrg    esac
117721ecb1efSmrgfi
117821ecb1efSmrgif test x$MISC_MAN_DIR = x    ; then
117921ecb1efSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
118021ecb1efSmrgfi
11811e00de39Smrg
118221ecb1efSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
118321ecb1efSmrg    case $host_os in
118421ecb1efSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
118521ecb1efSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
118621ecb1efSmrg    esac
118721ecb1efSmrgfi
118821ecb1efSmrgif test x$DRIVER_MAN_DIR = x    ; then
118921ecb1efSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
119021ecb1efSmrgfi
11911e00de39Smrg
119221ecb1efSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
119321ecb1efSmrg    case $host_os in
119421ecb1efSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
119521ecb1efSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
119621ecb1efSmrg    esac
119721ecb1efSmrgfi
119821ecb1efSmrgif test x$ADMIN_MAN_DIR = x    ; then
119921ecb1efSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
120021ecb1efSmrgfi
12011e00de39Smrg
12021e00de39Smrg
120321ecb1efSmrgAC_SUBST([APP_MAN_SUFFIX])
120421ecb1efSmrgAC_SUBST([LIB_MAN_SUFFIX])
120521ecb1efSmrgAC_SUBST([FILE_MAN_SUFFIX])
120621ecb1efSmrgAC_SUBST([MISC_MAN_SUFFIX])
120721ecb1efSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
120821ecb1efSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
120921ecb1efSmrgAC_SUBST([APP_MAN_DIR])
121021ecb1efSmrgAC_SUBST([LIB_MAN_DIR])
121121ecb1efSmrgAC_SUBST([FILE_MAN_DIR])
121221ecb1efSmrgAC_SUBST([MISC_MAN_DIR])
121321ecb1efSmrgAC_SUBST([DRIVER_MAN_DIR])
121421ecb1efSmrgAC_SUBST([ADMIN_MAN_DIR])
121521ecb1efSmrg]) # XORG_MANPAGE_SECTIONS
12161e00de39Smrg
121721ecb1efSmrg# XORG_CHECK_LINUXDOC
121821ecb1efSmrg# -------------------
121921ecb1efSmrg# Minimum version: 1.0.0
12201e00de39Smrg#
122121ecb1efSmrg# Defines the variable MAKE_TEXT if the necessary tools and
122221ecb1efSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
122321ecb1efSmrg# Whether or not the necessary tools and files are found can be checked
122421ecb1efSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
122521ecb1efSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
122621ecb1efSmrgif test x$XORG_SGML_PATH = x ; then
122721ecb1efSmrg    XORG_SGML_PATH=$prefix/share/sgml
122821ecb1efSmrgfi
122921ecb1efSmrgHAVE_DEFS_ENT=
12301e00de39Smrg
123121ecb1efSmrgif test x"$cross_compiling" = x"yes" ; then
123221ecb1efSmrg  HAVE_DEFS_ENT=no
123321ecb1efSmrgelse
123421ecb1efSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
123521ecb1efSmrgfi
12361e00de39Smrg
123721ecb1efSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
123821ecb1efSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
12391e00de39Smrg
124021ecb1efSmrgAC_MSG_CHECKING([Whether to build documentation])
12411e00de39Smrg
124221ecb1efSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
124321ecb1efSmrg   BUILDDOC=yes
124421ecb1efSmrgelse
124521ecb1efSmrg   BUILDDOC=no
12461e00de39Smrgfi
12471e00de39Smrg
124821ecb1efSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
12491e00de39Smrg
125021ecb1efSmrgAC_MSG_RESULT([$BUILDDOC])
12511e00de39Smrg
125221ecb1efSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
12531e00de39Smrg
125421ecb1efSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
125521ecb1efSmrg   BUILDPDFDOC=yes
125621ecb1efSmrgelse
125721ecb1efSmrg   BUILDPDFDOC=no
125821ecb1efSmrgfi
12591e00de39Smrg
126021ecb1efSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
12611e00de39Smrg
126221ecb1efSmrgAC_MSG_RESULT([$BUILDPDFDOC])
12631e00de39Smrg
126421ecb1efSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
126521ecb1efSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
126621ecb1efSmrgMAKE_PDF="$PS2PDF"
126721ecb1efSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
12681e00de39Smrg
126921ecb1efSmrgAC_SUBST(MAKE_TEXT)
127021ecb1efSmrgAC_SUBST(MAKE_PS)
127121ecb1efSmrgAC_SUBST(MAKE_PDF)
127221ecb1efSmrgAC_SUBST(MAKE_HTML)
127321ecb1efSmrg]) # XORG_CHECK_LINUXDOC
127421ecb1efSmrg
127521ecb1efSmrg# XORG_CHECK_DOCBOOK
127621ecb1efSmrg# -------------------
127721ecb1efSmrg# Minimum version: 1.0.0
12781e00de39Smrg#
127921ecb1efSmrg# Checks for the ability to build output formats from SGML DocBook source.
128021ecb1efSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
128121ecb1efSmrg# indicates whether the necessary tools and files are found and, if set,
128221ecb1efSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
128321ecb1efSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
128421ecb1efSmrgif test x$XORG_SGML_PATH = x ; then
128521ecb1efSmrg    XORG_SGML_PATH=$prefix/share/sgml
128621ecb1efSmrgfi
128721ecb1efSmrgHAVE_DEFS_ENT=
128821ecb1efSmrgBUILDTXTDOC=no
128921ecb1efSmrgBUILDPDFDOC=no
129021ecb1efSmrgBUILDPSDOC=no
129121ecb1efSmrgBUILDHTMLDOC=no
12921e00de39Smrg
129321ecb1efSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
12941e00de39Smrg
129521ecb1efSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
129621ecb1efSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
129721ecb1efSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
129821ecb1efSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
12991e00de39Smrg
130021ecb1efSmrgAC_MSG_CHECKING([Whether to build text documentation])
130121ecb1efSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
130221ecb1efSmrg   test x$BUILD_TXTDOC != xno; then
130321ecb1efSmrg	BUILDTXTDOC=yes
130421ecb1efSmrgfi
130521ecb1efSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
130621ecb1efSmrgAC_MSG_RESULT([$BUILDTXTDOC])
13071e00de39Smrg
130821ecb1efSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
130921ecb1efSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
131021ecb1efSmrg   test x$BUILD_PDFDOC != xno; then
131121ecb1efSmrg	BUILDPDFDOC=yes
13121e00de39Smrgfi
131321ecb1efSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
131421ecb1efSmrgAC_MSG_RESULT([$BUILDPDFDOC])
13151e00de39Smrg
131621ecb1efSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
131721ecb1efSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
131821ecb1efSmrg   test x$BUILD_PSDOC != xno; then
131921ecb1efSmrg	BUILDPSDOC=yes
132021ecb1efSmrgfi
132121ecb1efSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
132221ecb1efSmrgAC_MSG_RESULT([$BUILDPSDOC])
13231e00de39Smrg
132421ecb1efSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
132521ecb1efSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
132621ecb1efSmrg   test x$BUILD_HTMLDOC != xno; then
132721ecb1efSmrg	BUILDHTMLDOC=yes
132821ecb1efSmrgfi
132921ecb1efSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
133021ecb1efSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
13311e00de39Smrg
133221ecb1efSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
133321ecb1efSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
133421ecb1efSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
133521ecb1efSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
13361e00de39Smrg
133721ecb1efSmrgAC_SUBST(MAKE_TEXT)
133821ecb1efSmrgAC_SUBST(MAKE_PS)
133921ecb1efSmrgAC_SUBST(MAKE_PDF)
134021ecb1efSmrgAC_SUBST(MAKE_HTML)
134121ecb1efSmrg]) # XORG_CHECK_DOCBOOK
13421e00de39Smrg
134321ecb1efSmrg# XORG_CHECK_MALLOC_ZERO
134421ecb1efSmrg# ----------------------
134521ecb1efSmrg# Minimum version: 1.0.0
134621ecb1efSmrg#
134721ecb1efSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
134821ecb1efSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
134921ecb1efSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
135021ecb1efSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
135121ecb1efSmrgAC_ARG_ENABLE(malloc0returnsnull,
135221ecb1efSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
135321ecb1efSmrg		       [malloc(0) returns NULL (default: auto)]),
135421ecb1efSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
135521ecb1efSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
13561e00de39Smrg
135721ecb1efSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
135821ecb1efSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
135921ecb1efSmrg	AC_RUN_IFELSE([
136021ecb1efSmrgchar *malloc();
136121ecb1efSmrgchar *realloc();
136221ecb1efSmrgchar *calloc();
136321ecb1efSmrgmain() {
136421ecb1efSmrg    char *m0, *r0, *c0, *p;
136521ecb1efSmrg    m0 = malloc(0);
136621ecb1efSmrg    p = malloc(10);
136721ecb1efSmrg    r0 = realloc(p,0);
136821ecb1efSmrg    c0 = calloc(0);
136921ecb1efSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
137021ecb1efSmrg}],
137121ecb1efSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
137221ecb1efSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
137321ecb1efSmrgfi
137421ecb1efSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
13751e00de39Smrg
137621ecb1efSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
137721ecb1efSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
137821ecb1efSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
137921ecb1efSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
138021ecb1efSmrgelse
138121ecb1efSmrg	MALLOC_ZERO_CFLAGS=""
138221ecb1efSmrg	XMALLOC_ZERO_CFLAGS=""
138321ecb1efSmrg	XTMALLOC_ZERO_CFLAGS=""
138421ecb1efSmrgfi
13851e00de39Smrg
138621ecb1efSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
138721ecb1efSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
138821ecb1efSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
138921ecb1efSmrg]) # XORG_CHECK_MALLOC_ZERO
13901e00de39Smrg
139121ecb1efSmrg# XORG_WITH_LINT()
139221ecb1efSmrg# ----------------
139321ecb1efSmrg# Minimum version: 1.1.0
139421ecb1efSmrg#
139521ecb1efSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
139621ecb1efSmrg# is specified.   (Use --with-lint=sparse for sparse.)
139721ecb1efSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
139821ecb1efSmrg# Sets $LINT_FLAGS to flags to pass to source checker
139921ecb1efSmrg# Sets LINT automake conditional if enabled (default: disabled)
140021ecb1efSmrg#
140121ecb1efSmrgAC_DEFUN([XORG_WITH_LINT],[
140221ecb1efSmrg
140321ecb1efSmrg# Allow checking code with lint, sparse, etc.
140421ecb1efSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
140521ecb1efSmrg		[Use a lint-style source code checker (default: disabled)])],
140621ecb1efSmrg		[use_lint=$withval], [use_lint=no])
140721ecb1efSmrgif test "x$use_lint" = "xyes" ; then
140821ecb1efSmrg	LINT="lint"
140921ecb1efSmrgelse
141021ecb1efSmrg	LINT="$use_lint"
14111e00de39Smrgfi
141221ecb1efSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
141321ecb1efSmrg    case $LINT in
141421ecb1efSmrg	lint|*/lint)
141521ecb1efSmrg	    case $host_os in
141621ecb1efSmrg		solaris*)
141721ecb1efSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
141821ecb1efSmrg			;;
141921ecb1efSmrg	    esac
142021ecb1efSmrg	    ;;
142121ecb1efSmrg    esac
14221e00de39Smrgfi
14231e00de39Smrg
142421ecb1efSmrgAC_SUBST(LINT)
142521ecb1efSmrgAC_SUBST(LINT_FLAGS)
142621ecb1efSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
14271e00de39Smrg
142821ecb1efSmrg]) # XORG_WITH_LINT
14291e00de39Smrg
143021ecb1efSmrg# XORG_LINT_LIBRARY(LIBNAME)
143121ecb1efSmrg# --------------------------
143221ecb1efSmrg# Minimum version: 1.1.0
143321ecb1efSmrg#
143421ecb1efSmrg# Sets up flags for building lint libraries for checking programs that call
143521ecb1efSmrg# functions in the library.
143621ecb1efSmrg# Disabled by default, enable with --enable-lint-library
143721ecb1efSmrg# Sets: 
143821ecb1efSmrg#	@LINTLIB@		- name of lint library file to make
143921ecb1efSmrg#	MAKE_LINT_LIB		- automake conditional
144021ecb1efSmrg#
14411e00de39Smrg
144221ecb1efSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
144321ecb1efSmrgAC_REQUIRE([XORG_WITH_LINT])
144421ecb1efSmrg# Build lint "library" for more indepth checks of programs calling this library
144521ecb1efSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
144621ecb1efSmrg	[Create lint library (default: disabled)])],
144721ecb1efSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
144821ecb1efSmrgif test "x$make_lint_lib" != "xno" ; then
144921ecb1efSmrg	if test "x$LINT" = "xno" ; then
145021ecb1efSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
145121ecb1efSmrg	fi
145221ecb1efSmrg	if test "x$make_lint_lib" = "xyes" ; then
145321ecb1efSmrg		LINTLIB=llib-l$1.ln
145421ecb1efSmrg	else
145521ecb1efSmrg		LINTLIB=$make_lint_lib
145621ecb1efSmrg	fi
145721ecb1efSmrgfi
145821ecb1efSmrgAC_SUBST(LINTLIB)
145921ecb1efSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
14601e00de39Smrg
146121ecb1efSmrg]) # XORG_LINT_LIBRARY
14621e00de39Smrg
146321ecb1efSmrg# XORG_CWARNFLAGS
146421ecb1efSmrg# ---------------
146521ecb1efSmrg# Minimum version: 1.2.0
146621ecb1efSmrg#
146721ecb1efSmrg# Defines CWARNFLAGS to enable C compiler warnings.
146821ecb1efSmrg#
146921ecb1efSmrgAC_DEFUN([XORG_CWARNFLAGS], [
147021ecb1efSmrgAC_REQUIRE([AC_PROG_CC])
147121ecb1efSmrgif  test "x$GCC" = xyes ; then
147221ecb1efSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
147321ecb1efSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
147421ecb1efSmrg-Wbad-function-cast"
147521ecb1efSmrg    case `$CC -dumpversion` in
147621ecb1efSmrg    3.4.* | 4.*)
147721ecb1efSmrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
147821ecb1efSmrg	;;
147921ecb1efSmrg    esac
14801e00de39Smrgelse
148121ecb1efSmrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
148221ecb1efSmrg    if test "x$SUNCC" = "xyes"; then
148321ecb1efSmrg	CWARNFLAGS="-v"
148421ecb1efSmrg    fi
14851e00de39Smrgfi
148621ecb1efSmrgAC_SUBST(CWARNFLAGS)
148721ecb1efSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
148821ecb1efSmrg]) # XORG_CWARNFLAGS
14891e00de39Smrg
149021ecb1efSmrg# XORG_STRICT_OPTION
149121ecb1efSmrg# -----------------------
149221ecb1efSmrg# Minimum version: 1.3.0
14931e00de39Smrg#
149421ecb1efSmrg# Add configure option to enable strict compilation
149521ecb1efSmrgAC_DEFUN([XORG_STRICT_OPTION], [
149621ecb1efSmrgAC_REQUIRE([AC_PROG_CC])
149721ecb1efSmrgAC_REQUIRE([AC_PROG_CC_C99])
149821ecb1efSmrgAC_REQUIRE([XORG_CWARNFLAGS])
149921ecb1efSmrg
150021ecb1efSmrgAC_ARG_ENABLE(strict-compilation,
150121ecb1efSmrg			  AS_HELP_STRING([--enable-strict-compilation],
150221ecb1efSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
150321ecb1efSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
150421ecb1efSmrgif test "x$STRICT_COMPILE" = "xyes"; then
150521ecb1efSmrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
150621ecb1efSmrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
150721ecb1efSmrg	if test "x$GCC" = xyes ; then
150821ecb1efSmrg		STRICT_CFLAGS="-pedantic -Werror"
150921ecb1efSmrg	elif test "x$SUNCC" = "xyes"; then
151021ecb1efSmrg		STRICT_CFLAGS="-errwarn"
151121ecb1efSmrg    elif test "x$INTELCC" = "xyes"; then
151221ecb1efSmrg		STRICT_CFLAGS="-Werror"
151321ecb1efSmrg	fi
151421ecb1efSmrgfi
151521ecb1efSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
151621ecb1efSmrgAC_SUBST([CWARNFLAGS])
151721ecb1efSmrg]) # XORG_STRICT_OPTION
15181e00de39Smrg
151921ecb1efSmrg# XORG_DEFAULT_OPTIONS
152021ecb1efSmrg# --------------------
152121ecb1efSmrg# Minimum version: 1.3.0
15221e00de39Smrg#
152321ecb1efSmrg# Defines default options for X.Org modules.
152421ecb1efSmrg#
152521ecb1efSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
152621ecb1efSmrgXORG_CWARNFLAGS
152721ecb1efSmrgXORG_STRICT_OPTION
152821ecb1efSmrgXORG_RELEASE_VERSION
152921ecb1efSmrgXORG_CHANGELOG
153021ecb1efSmrgXORG_MANPAGE_SECTIONS
153121ecb1efSmrg]) # XORG_DEFAULT_OPTIONS
153221ecb1efSmrgdnl Copyright 2005 Red Hat, Inc
153321ecb1efSmrgdnl
153421ecb1efSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
153521ecb1efSmrgdnl documentation for any purpose is hereby granted without fee, provided that
153621ecb1efSmrgdnl the above copyright notice appear in all copies and that both that
153721ecb1efSmrgdnl copyright notice and this permission notice appear in supporting
153821ecb1efSmrgdnl documentation.
153921ecb1efSmrgdnl
154021ecb1efSmrgdnl The above copyright notice and this permission notice shall be included
154121ecb1efSmrgdnl in all copies or substantial portions of the Software.
154221ecb1efSmrgdnl
154321ecb1efSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
154421ecb1efSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
154521ecb1efSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
154621ecb1efSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
154721ecb1efSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
154821ecb1efSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
154921ecb1efSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
155021ecb1efSmrgdnl
155121ecb1efSmrgdnl Except as contained in this notice, the name of the copyright holders shall
155221ecb1efSmrgdnl not be used in advertising or otherwise to promote the sale, use or
155321ecb1efSmrgdnl other dealings in this Software without prior written authorization
155421ecb1efSmrgdnl from the copyright holders.
155521ecb1efSmrgdnl
15561e00de39Smrg
155721ecb1efSmrg# XORG_RELEASE_VERSION
155821ecb1efSmrg# --------------------
155921ecb1efSmrg# Adds --with/without-release-string and changes the PACKAGE and
156021ecb1efSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
156121ecb1efSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
156221ecb1efSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
156321ecb1efSmrg 
156421ecb1efSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
156521ecb1efSmrg	AC_ARG_WITH(release-version,
156621ecb1efSmrg			AS_HELP_STRING([--with-release-version=STRING],
156721ecb1efSmrg				[Use release version string in package name]),
156821ecb1efSmrg			[RELEASE_VERSION="$withval"],
156921ecb1efSmrg			[RELEASE_VERSION=""])
157021ecb1efSmrg	if test "x$RELEASE_VERSION" != "x"; then
157121ecb1efSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
157221ecb1efSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
157321ecb1efSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
157421ecb1efSmrg	fi
157521ecb1efSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
157621ecb1efSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
157721ecb1efSmrg		[Major version of this package])
157821ecb1efSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
157921ecb1efSmrg	if test "x$PVM" = "x"; then
158021ecb1efSmrg		PVM="0"
158121ecb1efSmrg	fi
158221ecb1efSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
158321ecb1efSmrg		[$PVM],
158421ecb1efSmrg		[Minor version of this package])
158521ecb1efSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
158621ecb1efSmrg	if test "x$PVP" = "x"; then
158721ecb1efSmrg		PVP="0"
158821ecb1efSmrg	fi
158921ecb1efSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
159021ecb1efSmrg		[$PVP],
159121ecb1efSmrg		[Patch version of this package])
159221ecb1efSmrg])
15931e00de39Smrg
159421ecb1efSmrg# XORG_CHANGELOG()
159521ecb1efSmrg# ----------------
159621ecb1efSmrg# Minimum version: 1.2.0
159721ecb1efSmrg#
159821ecb1efSmrg# Defines the variable CHANGELOG_CMD as the command to generate
159921ecb1efSmrg# ChangeLog from git.
160021ecb1efSmrg#
160121ecb1efSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
160221ecb1efSmrg#
160321ecb1efSmrgAC_DEFUN([XORG_CHANGELOG], [
160421ecb1efSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
160521ecb1efSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
160621ecb1efSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
160721ecb1efSmrgAC_SUBST([CHANGELOG_CMD])
160821ecb1efSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
160921ecb1efSmrg]) # XORG_CHANGELOG
16101e00de39Smrg
161121ecb1efSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
161221ecb1efSmrg# 
161321ecb1efSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
161421ecb1efSmrg#
161521ecb1efSmrg# This program is free software; you can redistribute it and/or modify
161621ecb1efSmrg# it under the terms of the GNU General Public License as published by
161721ecb1efSmrg# the Free Software Foundation; either version 2 of the License, or
161821ecb1efSmrg# (at your option) any later version.
161921ecb1efSmrg#
162021ecb1efSmrg# This program is distributed in the hope that it will be useful, but
162121ecb1efSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
162221ecb1efSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
162321ecb1efSmrg# General Public License for more details.
162421ecb1efSmrg#
162521ecb1efSmrg# You should have received a copy of the GNU General Public License
162621ecb1efSmrg# along with this program; if not, write to the Free Software
162721ecb1efSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
162821ecb1efSmrg#
162921ecb1efSmrg# As a special exception to the GNU General Public License, if you
163021ecb1efSmrg# distribute this file as part of a program that contains a
163121ecb1efSmrg# configuration script generated by Autoconf, you may include it under
163221ecb1efSmrg# the same distribution terms that you use for the rest of that program.
16331e00de39Smrg
163421ecb1efSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
16351e00de39Smrg# ----------------------------------
163621ecb1efSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
163721ecb1efSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
163821ecb1efSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
163921ecb1efSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
164021ecb1efSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
164121ecb1efSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
164221ecb1efSmrgfi
164321ecb1efSmrgif test -n "$PKG_CONFIG"; then
164421ecb1efSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
164521ecb1efSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
164621ecb1efSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
164721ecb1efSmrg		AC_MSG_RESULT([yes])
164821ecb1efSmrg	else
164921ecb1efSmrg		AC_MSG_RESULT([no])
165021ecb1efSmrg		PKG_CONFIG=""
165121ecb1efSmrg	fi
165221ecb1efSmrg		
165321ecb1efSmrgfi[]dnl
165421ecb1efSmrg])# PKG_PROG_PKG_CONFIG
16551e00de39Smrg
165621ecb1efSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
165721ecb1efSmrg#
165821ecb1efSmrg# Check to see whether a particular set of modules exists.  Similar
165921ecb1efSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
166021ecb1efSmrg#
166121ecb1efSmrg#
166221ecb1efSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
166321ecb1efSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
166421ecb1efSmrg# PKG_CHECK_EXISTS manually
166521ecb1efSmrg# --------------------------------------------------------------
166621ecb1efSmrgAC_DEFUN([PKG_CHECK_EXISTS],
166721ecb1efSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
166821ecb1efSmrgif test -n "$PKG_CONFIG" && \
166921ecb1efSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
167021ecb1efSmrg  m4_ifval([$2], [$2], [:])
167121ecb1efSmrgm4_ifvaln([$3], [else
167221ecb1efSmrg  $3])dnl
167321ecb1efSmrgfi])
16741e00de39Smrg
16751e00de39Smrg
167621ecb1efSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
167721ecb1efSmrg# ---------------------------------------------
167821ecb1efSmrgm4_define([_PKG_CONFIG],
167921ecb1efSmrg[if test -n "$$1"; then
168021ecb1efSmrg    pkg_cv_[]$1="$$1"
168121ecb1efSmrg elif test -n "$PKG_CONFIG"; then
168221ecb1efSmrg    PKG_CHECK_EXISTS([$3],
168321ecb1efSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
168421ecb1efSmrg		     [pkg_failed=yes])
168521ecb1efSmrg else
168621ecb1efSmrg    pkg_failed=untried
168721ecb1efSmrgfi[]dnl
168821ecb1efSmrg])# _PKG_CONFIG
16891e00de39Smrg
169021ecb1efSmrg# _PKG_SHORT_ERRORS_SUPPORTED
169121ecb1efSmrg# -----------------------------
169221ecb1efSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
169321ecb1efSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
169421ecb1efSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
169521ecb1efSmrg        _pkg_short_errors_supported=yes
16961e00de39Smrgelse
169721ecb1efSmrg        _pkg_short_errors_supported=no
169821ecb1efSmrgfi[]dnl
169921ecb1efSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
17001e00de39Smrg
170121ecb1efSmrg
170221ecb1efSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
170321ecb1efSmrg# [ACTION-IF-NOT-FOUND])
17041e00de39Smrg#
170521ecb1efSmrg#
170621ecb1efSmrg# Note that if there is a possibility the first call to
170721ecb1efSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
170821ecb1efSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
170921ecb1efSmrg#
171021ecb1efSmrg#
171121ecb1efSmrg# --------------------------------------------------------------
171221ecb1efSmrgAC_DEFUN([PKG_CHECK_MODULES],
171321ecb1efSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
171421ecb1efSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
171521ecb1efSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
17161e00de39Smrg
171721ecb1efSmrgpkg_failed=no
171821ecb1efSmrgAC_MSG_CHECKING([for $1])
17191e00de39Smrg
172021ecb1efSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
172121ecb1efSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
17221e00de39Smrg
172321ecb1efSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
172421ecb1efSmrgand $1[]_LIBS to avoid the need to call pkg-config.
172521ecb1efSmrgSee the pkg-config man page for more details.])
17261e00de39Smrg
172721ecb1efSmrgif test $pkg_failed = yes; then
172821ecb1efSmrg        _PKG_SHORT_ERRORS_SUPPORTED
172921ecb1efSmrg        if test $_pkg_short_errors_supported = yes; then
173021ecb1efSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
173121ecb1efSmrg        else 
173221ecb1efSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
173321ecb1efSmrg        fi
173421ecb1efSmrg	# Put the nasty error message in config.log where it belongs
173521ecb1efSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
17361e00de39Smrg
173721ecb1efSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
173821ecb1efSmrg[Package requirements ($2) were not met:
17391e00de39Smrg
174021ecb1efSmrg$$1_PKG_ERRORS
17411e00de39Smrg
174221ecb1efSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
174321ecb1efSmrginstalled software in a non-standard prefix.
17441e00de39Smrg
174521ecb1efSmrg_PKG_TEXT
174621ecb1efSmrg])],
174721ecb1efSmrg		[AC_MSG_RESULT([no])
174821ecb1efSmrg                $4])
174921ecb1efSmrgelif test $pkg_failed = untried; then
175021ecb1efSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
175121ecb1efSmrg[The pkg-config script could not be found or is too old.  Make sure it
175221ecb1efSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
175321ecb1efSmrgpath to pkg-config.
17541e00de39Smrg
175521ecb1efSmrg_PKG_TEXT
17561e00de39Smrg
175721ecb1efSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
175821ecb1efSmrg		[$4])
175921ecb1efSmrgelse
176021ecb1efSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
176121ecb1efSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
176221ecb1efSmrg        AC_MSG_RESULT([yes])
176321ecb1efSmrg	ifelse([$3], , :, [$3])
176421ecb1efSmrgfi[]dnl
176521ecb1efSmrg])# PKG_CHECK_MODULES
17661e00de39Smrg
1767