aclocal.m4 revision 8b6d6341
18b6d6341Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
21abf7346Smrg
31abf7346Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
48b6d6341Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
51abf7346Smrg# This file is free software; the Free Software Foundation
61abf7346Smrg# gives unlimited permission to copy and/or distribute it,
71abf7346Smrg# with or without modifications, as long as this notice is preserved.
81abf7346Smrg
91abf7346Smrg# This program is distributed in the hope that it will be useful,
101abf7346Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
111abf7346Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
121abf7346Smrg# PARTICULAR PURPOSE.
131abf7346Smrg
148b6d6341Smrgm4_ifndef([AC_AUTOCONF_VERSION],
158b6d6341Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
168b6d6341Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
178b6d6341Smrg[m4_warning([this file was generated for autoconf 2.63.
188b6d6341SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
198b6d6341SmrgIf you have problems, you may need to regenerate the build system entirely.
208b6d6341SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
211abf7346Smrg
228b6d6341Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
231abf7346Smrg#
248b6d6341Smrg# This file is free software; the Free Software Foundation
258b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
268b6d6341Smrg# with or without modifications, as long as this notice is preserved.
271abf7346Smrg
288b6d6341Smrg# AM_AUTOMAKE_VERSION(VERSION)
298b6d6341Smrg# ----------------------------
308b6d6341Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
318b6d6341Smrg# generated from the m4 files accompanying Automake X.Y.
328b6d6341Smrg# (This private macro should not be called outside this file.)
338b6d6341SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
348b6d6341Smrg[am__api_version='1.11'
358b6d6341Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
368b6d6341Smrgdnl require some minimum version.  Point them to the right macro.
378b6d6341Smrgm4_if([$1], [1.11], [],
388b6d6341Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
398b6d6341Smrg])
401abf7346Smrg
418b6d6341Smrg# _AM_AUTOCONF_VERSION(VERSION)
428b6d6341Smrg# -----------------------------
438b6d6341Smrg# aclocal traces this macro to find the Autoconf version.
448b6d6341Smrg# This is a private macro too.  Using m4_define simplifies
458b6d6341Smrg# the logic in aclocal, which can simply ignore this definition.
468b6d6341Smrgm4_define([_AM_AUTOCONF_VERSION], [])
471abf7346Smrg
488b6d6341Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
498b6d6341Smrg# -------------------------------
508b6d6341Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
518b6d6341Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
528b6d6341SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
538b6d6341Smrg[AM_AUTOMAKE_VERSION([1.11])dnl
548b6d6341Smrgm4_ifndef([AC_AUTOCONF_VERSION],
558b6d6341Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
568b6d6341Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
571abf7346Smrg
588b6d6341Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
591abf7346Smrg
608b6d6341Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
618b6d6341Smrg#
628b6d6341Smrg# This file is free software; the Free Software Foundation
638b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
648b6d6341Smrg# with or without modifications, as long as this notice is preserved.
651abf7346Smrg
668b6d6341Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
678b6d6341Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
688b6d6341Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
691abf7346Smrg#
708b6d6341Smrg# Of course, Automake must honor this variable whenever it calls a
718b6d6341Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
728b6d6341Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
738b6d6341Smrg# depending on how configure is run.  This is pretty annoying, since
748b6d6341Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
758b6d6341Smrg# source directory, any form will work fine, but in subdirectories a
768b6d6341Smrg# relative path needs to be adjusted first.
771abf7346Smrg#
788b6d6341Smrg# $ac_aux_dir/missing
798b6d6341Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
808b6d6341Smrg# $top_srcdir/$ac_aux_dir/missing
818b6d6341Smrg#    fails if $ac_aux_dir is absolute,
828b6d6341Smrg#    fails when called from a subdirectory in a VPATH build with
838b6d6341Smrg#          a relative $ac_aux_dir
841abf7346Smrg#
858b6d6341Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
868b6d6341Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
878b6d6341Smrg# harmless because $srcdir is `.', but things will broke when you
888b6d6341Smrg# start a VPATH build or use an absolute $srcdir.
891abf7346Smrg#
908b6d6341Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
918b6d6341Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
928b6d6341Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
938b6d6341Smrg# and then we would define $MISSING as
948b6d6341Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
958b6d6341Smrg# This will work as long as MISSING is not called from configure, because
968b6d6341Smrg# unfortunately $(top_srcdir) has no meaning in configure.
978b6d6341Smrg# However there are other variables, like CC, which are often used in
988b6d6341Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
998b6d6341Smrg#
1008b6d6341Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
1018b6d6341Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
1028b6d6341Smrg# configured tree to be moved without reconfiguration.
1031abf7346Smrg
1048b6d6341SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1058b6d6341Smrg[dnl Rely on autoconf to set up CDPATH properly.
1068b6d6341SmrgAC_PREREQ([2.50])dnl
1078b6d6341Smrg# expand $ac_aux_dir to an absolute path
1088b6d6341Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
1098b6d6341Smrg])
1101abf7346Smrg
1118b6d6341Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1121abf7346Smrg
1138b6d6341Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1148b6d6341Smrg# Free Software Foundation, Inc.
1158b6d6341Smrg#
1168b6d6341Smrg# This file is free software; the Free Software Foundation
1178b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
1188b6d6341Smrg# with or without modifications, as long as this notice is preserved.
1191abf7346Smrg
1208b6d6341Smrg# serial 9
1211abf7346Smrg
1228b6d6341Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1238b6d6341Smrg# -------------------------------------
1248b6d6341Smrg# Define a conditional.
1258b6d6341SmrgAC_DEFUN([AM_CONDITIONAL],
1268b6d6341Smrg[AC_PREREQ(2.52)dnl
1278b6d6341Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1288b6d6341Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1298b6d6341SmrgAC_SUBST([$1_TRUE])dnl
1308b6d6341SmrgAC_SUBST([$1_FALSE])dnl
1318b6d6341Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1328b6d6341Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1338b6d6341Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1348b6d6341Smrgif $2; then
1358b6d6341Smrg  $1_TRUE=
1368b6d6341Smrg  $1_FALSE='#'
1378b6d6341Smrgelse
1388b6d6341Smrg  $1_TRUE='#'
1398b6d6341Smrg  $1_FALSE=
1408b6d6341Smrgfi
1418b6d6341SmrgAC_CONFIG_COMMANDS_PRE(
1428b6d6341Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1438b6d6341Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1448b6d6341SmrgUsually this means the macro was only invoked conditionally.]])
1458b6d6341Smrgfi])])
1461abf7346Smrg
1478b6d6341Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1488b6d6341Smrg# Free Software Foundation, Inc.
1498b6d6341Smrg#
1508b6d6341Smrg# This file is free software; the Free Software Foundation
1518b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
1528b6d6341Smrg# with or without modifications, as long as this notice is preserved.
1531abf7346Smrg
1548b6d6341Smrg# serial 10
1551abf7346Smrg
1568b6d6341Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1578b6d6341Smrg# written in clear, in which case automake, when reading aclocal.m4,
1588b6d6341Smrg# will think it sees a *use*, and therefore will trigger all it's
1598b6d6341Smrg# C support machinery.  Also note that it means that autoscan, seeing
1608b6d6341Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1611abf7346Smrg
1621abf7346Smrg
1638b6d6341Smrg# _AM_DEPENDENCIES(NAME)
1648b6d6341Smrg# ----------------------
1658b6d6341Smrg# See how the compiler implements dependency checking.
1668b6d6341Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
1678b6d6341Smrg# We try a few techniques and use that to set a single cache variable.
1688b6d6341Smrg#
1698b6d6341Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1708b6d6341Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1718b6d6341Smrg# dependency, and given that the user is not expected to run this macro,
1728b6d6341Smrg# just rely on AC_PROG_CC.
1738b6d6341SmrgAC_DEFUN([_AM_DEPENDENCIES],
1748b6d6341Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1758b6d6341SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1768b6d6341SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1778b6d6341SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1781abf7346Smrg
1798b6d6341Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
1808b6d6341Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
1818b6d6341Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1828b6d6341Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
1838b6d6341Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1848b6d6341Smrg                   [depcc="$$1"   am_compiler_list=])
1851abf7346Smrg
1868b6d6341SmrgAC_CACHE_CHECK([dependency style of $depcc],
1878b6d6341Smrg               [am_cv_$1_dependencies_compiler_type],
1888b6d6341Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1898b6d6341Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
1908b6d6341Smrg  # making bogus files that we don't know about and never remove.  For
1918b6d6341Smrg  # instance it was reported that on HP-UX the gcc test will end up
1928b6d6341Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
1938b6d6341Smrg  # in D'.
1948b6d6341Smrg  mkdir conftest.dir
1958b6d6341Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1968b6d6341Smrg  # using a relative directory.
1978b6d6341Smrg  cp "$am_depcomp" conftest.dir
1988b6d6341Smrg  cd conftest.dir
1998b6d6341Smrg  # We will build objects and dependencies in a subdirectory because
2008b6d6341Smrg  # it helps to detect inapplicable dependency modes.  For instance
2018b6d6341Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
2028b6d6341Smrg  # side effect of compilation, but ICC will put the dependencies in
2038b6d6341Smrg  # the current directory while Tru64 will put them in the object
2048b6d6341Smrg  # directory.
2058b6d6341Smrg  mkdir sub
2061abf7346Smrg
2078b6d6341Smrg  am_cv_$1_dependencies_compiler_type=none
2088b6d6341Smrg  if test "$am_compiler_list" = ""; then
2098b6d6341Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2108b6d6341Smrg  fi
2118b6d6341Smrg  am__universal=false
2128b6d6341Smrg  m4_case([$1], [CC],
2138b6d6341Smrg    [case " $depcc " in #(
2148b6d6341Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2158b6d6341Smrg     esac],
2168b6d6341Smrg    [CXX],
2178b6d6341Smrg    [case " $depcc " in #(
2188b6d6341Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2198b6d6341Smrg     esac])
2201abf7346Smrg
2218b6d6341Smrg  for depmode in $am_compiler_list; do
2228b6d6341Smrg    # Setup a source with many dependencies, because some compilers
2238b6d6341Smrg    # like to wrap large dependency lists on column 80 (with \), and
2248b6d6341Smrg    # we should not choose a depcomp mode which is confused by this.
2258b6d6341Smrg    #
2268b6d6341Smrg    # We need to recreate these files for each test, as the compiler may
2278b6d6341Smrg    # overwrite some of them when testing with obscure command lines.
2288b6d6341Smrg    # This happens at least with the AIX C compiler.
2298b6d6341Smrg    : > sub/conftest.c
2308b6d6341Smrg    for i in 1 2 3 4 5 6; do
2318b6d6341Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2328b6d6341Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2338b6d6341Smrg      # Solaris 8's {/usr,}/bin/sh.
2348b6d6341Smrg      touch sub/conftst$i.h
2358b6d6341Smrg    done
2368b6d6341Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2371abf7346Smrg
2388b6d6341Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
2398b6d6341Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2408b6d6341Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
2418b6d6341Smrg    # versions had trouble with output in subdirs
2428b6d6341Smrg    am__obj=sub/conftest.${OBJEXT-o}
2438b6d6341Smrg    am__minus_obj="-o $am__obj"
2448b6d6341Smrg    case $depmode in
2458b6d6341Smrg    gcc)
2468b6d6341Smrg      # This depmode causes a compiler race in universal mode.
2478b6d6341Smrg      test "$am__universal" = false || continue
2488b6d6341Smrg      ;;
2498b6d6341Smrg    nosideeffect)
2508b6d6341Smrg      # after this tag, mechanisms are not by side-effect, so they'll
2518b6d6341Smrg      # only be used when explicitly requested
2528b6d6341Smrg      if test "x$enable_dependency_tracking" = xyes; then
2538b6d6341Smrg	continue
2548b6d6341Smrg      else
2558b6d6341Smrg	break
2568b6d6341Smrg      fi
2578b6d6341Smrg      ;;
2588b6d6341Smrg    msvisualcpp | msvcmsys)
2598b6d6341Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
2608b6d6341Smrg      # not run yet.  These depmodes are late enough in the game, and
2618b6d6341Smrg      # so weak that their functioning should not be impacted.
2628b6d6341Smrg      am__obj=conftest.${OBJEXT-o}
2638b6d6341Smrg      am__minus_obj=
2648b6d6341Smrg      ;;
2658b6d6341Smrg    none) break ;;
2668b6d6341Smrg    esac
2678b6d6341Smrg    if depmode=$depmode \
2688b6d6341Smrg       source=sub/conftest.c object=$am__obj \
2698b6d6341Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2708b6d6341Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2718b6d6341Smrg         >/dev/null 2>conftest.err &&
2728b6d6341Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2738b6d6341Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2748b6d6341Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2758b6d6341Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2768b6d6341Smrg      # icc doesn't choke on unknown options, it will just issue warnings
2778b6d6341Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
2788b6d6341Smrg      # that says an option was ignored or not supported.
2798b6d6341Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2808b6d6341Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2818b6d6341Smrg      # The diagnosis changed in icc 8.0:
2828b6d6341Smrg      #   icc: Command line remark: option '-MP' not supported
2838b6d6341Smrg      if (grep 'ignoring option' conftest.err ||
2848b6d6341Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2858b6d6341Smrg        am_cv_$1_dependencies_compiler_type=$depmode
2868b6d6341Smrg        break
2878b6d6341Smrg      fi
2888b6d6341Smrg    fi
2898b6d6341Smrg  done
2901abf7346Smrg
2918b6d6341Smrg  cd ..
2928b6d6341Smrg  rm -rf conftest.dir
2931abf7346Smrgelse
2948b6d6341Smrg  am_cv_$1_dependencies_compiler_type=none
2951abf7346Smrgfi
2968b6d6341Smrg])
2978b6d6341SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2988b6d6341SmrgAM_CONDITIONAL([am__fastdep$1], [
2998b6d6341Smrg  test "x$enable_dependency_tracking" != xno \
3008b6d6341Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3018b6d6341Smrg])
3021abf7346Smrg
3031abf7346Smrg
3048b6d6341Smrg# AM_SET_DEPDIR
3058b6d6341Smrg# -------------
3068b6d6341Smrg# Choose a directory name for dependency files.
3078b6d6341Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
3088b6d6341SmrgAC_DEFUN([AM_SET_DEPDIR],
3098b6d6341Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3108b6d6341SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3118b6d6341Smrg])
3121abf7346Smrg
3131abf7346Smrg
3148b6d6341Smrg# AM_DEP_TRACK
3158b6d6341Smrg# ------------
3168b6d6341SmrgAC_DEFUN([AM_DEP_TRACK],
3178b6d6341Smrg[AC_ARG_ENABLE(dependency-tracking,
3188b6d6341Smrg[  --disable-dependency-tracking  speeds up one-time build
3198b6d6341Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
3208b6d6341Smrgif test "x$enable_dependency_tracking" != xno; then
3218b6d6341Smrg  am_depcomp="$ac_aux_dir/depcomp"
3228b6d6341Smrg  AMDEPBACKSLASH='\'
3231abf7346Smrgfi
3248b6d6341SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3258b6d6341SmrgAC_SUBST([AMDEPBACKSLASH])dnl
3268b6d6341Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3278b6d6341Smrg])
3281abf7346Smrg
3298b6d6341Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
3301abf7346Smrg
3318b6d6341Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3328b6d6341Smrg# Free Software Foundation, Inc.
3331abf7346Smrg#
3348b6d6341Smrg# This file is free software; the Free Software Foundation
3358b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
3368b6d6341Smrg# with or without modifications, as long as this notice is preserved.
3371abf7346Smrg
3388b6d6341Smrg#serial 5
3391abf7346Smrg
3408b6d6341Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3418b6d6341Smrg# ------------------------------
3428b6d6341SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3438b6d6341Smrg[{
3448b6d6341Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
3458b6d6341Smrg  # are listed without --file.  Let's play safe and only enable the eval
3468b6d6341Smrg  # if we detect the quoting.
3478b6d6341Smrg  case $CONFIG_FILES in
3488b6d6341Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
3498b6d6341Smrg  *)   set x $CONFIG_FILES ;;
3508b6d6341Smrg  esac
3518b6d6341Smrg  shift
3528b6d6341Smrg  for mf
3538b6d6341Smrg  do
3548b6d6341Smrg    # Strip MF so we end up with the name of the file.
3558b6d6341Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
3568b6d6341Smrg    # Check whether this is an Automake generated Makefile or not.
3578b6d6341Smrg    # We used to match only the files named `Makefile.in', but
3588b6d6341Smrg    # some people rename them; so instead we look at the file content.
3598b6d6341Smrg    # Grep'ing the first line is not enough: some people post-process
3608b6d6341Smrg    # each Makefile.in and add a new line on top of each file to say so.
3618b6d6341Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
3628b6d6341Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
3638b6d6341Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3648b6d6341Smrg      dirpart=`AS_DIRNAME("$mf")`
3658b6d6341Smrg    else
3668b6d6341Smrg      continue
3678b6d6341Smrg    fi
3688b6d6341Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
3698b6d6341Smrg    # from the Makefile without running `make'.
3708b6d6341Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3718b6d6341Smrg    test -z "$DEPDIR" && continue
3728b6d6341Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
3738b6d6341Smrg    test -z "am__include" && continue
3748b6d6341Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3758b6d6341Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
3768b6d6341Smrg    U=`sed -n 's/^U = //p' < "$mf"`
3778b6d6341Smrg    # Find all dependency output files, they are included files with
3788b6d6341Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
3798b6d6341Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
3808b6d6341Smrg    # expansion.
3818b6d6341Smrg    for file in `sed -n "
3828b6d6341Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3838b6d6341Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3848b6d6341Smrg      # Make sure the directory exists.
3858b6d6341Smrg      test -f "$dirpart/$file" && continue
3868b6d6341Smrg      fdir=`AS_DIRNAME(["$file"])`
3878b6d6341Smrg      AS_MKDIR_P([$dirpart/$fdir])
3888b6d6341Smrg      # echo "creating $dirpart/$file"
3898b6d6341Smrg      echo '# dummy' > "$dirpart/$file"
3908b6d6341Smrg    done
3918b6d6341Smrg  done
3928b6d6341Smrg}
3938b6d6341Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3941abf7346Smrg
3951abf7346Smrg
3968b6d6341Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3978b6d6341Smrg# -----------------------------
3988b6d6341Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
3998b6d6341Smrg#
4008b6d6341Smrg# This code is only required when automatic dependency tracking
4018b6d6341Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
4028b6d6341Smrg# need in order to bootstrap the dependency handling code.
4038b6d6341SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4048b6d6341Smrg[AC_CONFIG_COMMANDS([depfiles],
4058b6d6341Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4068b6d6341Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
4078b6d6341Smrg])
4081abf7346Smrg
4098b6d6341Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
4108b6d6341Smrg# Free Software Foundation, Inc.
4118b6d6341Smrg#
4128b6d6341Smrg# This file is free software; the Free Software Foundation
4138b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
4148b6d6341Smrg# with or without modifications, as long as this notice is preserved.
4151abf7346Smrg
4168b6d6341Smrg# serial 8
4171abf7346Smrg
4188b6d6341Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
4198b6d6341SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
4201abf7346Smrg
4218b6d6341Smrg# Do all the work for Automake.                             -*- Autoconf -*-
4221abf7346Smrg
4238b6d6341Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4248b6d6341Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
4258b6d6341Smrg#
4268b6d6341Smrg# This file is free software; the Free Software Foundation
4278b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
4288b6d6341Smrg# with or without modifications, as long as this notice is preserved.
4291abf7346Smrg
4308b6d6341Smrg# serial 16
4311abf7346Smrg
4328b6d6341Smrg# This macro actually does too much.  Some checks are only needed if
4338b6d6341Smrg# your package does certain things.  But this isn't really a big deal.
4341abf7346Smrg
4358b6d6341Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4368b6d6341Smrg# AM_INIT_AUTOMAKE([OPTIONS])
4378b6d6341Smrg# -----------------------------------------------
4388b6d6341Smrg# The call with PACKAGE and VERSION arguments is the old style
4398b6d6341Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4408b6d6341Smrg# and VERSION should now be passed to AC_INIT and removed from
4418b6d6341Smrg# the call to AM_INIT_AUTOMAKE.
4428b6d6341Smrg# We support both call styles for the transition.  After
4438b6d6341Smrg# the next Automake release, Autoconf can make the AC_INIT
4448b6d6341Smrg# arguments mandatory, and then we can depend on a new Autoconf
4458b6d6341Smrg# release and drop the old call support.
4468b6d6341SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4478b6d6341Smrg[AC_PREREQ([2.62])dnl
4488b6d6341Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4498b6d6341Smrgdnl the ones we care about.
4508b6d6341Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4518b6d6341SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4528b6d6341SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4538b6d6341Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4548b6d6341Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4558b6d6341Smrg  # is not polluted with repeated "-I."
4568b6d6341Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4578b6d6341Smrg  # test to see if srcdir already configured
4588b6d6341Smrg  if test -f $srcdir/config.status; then
4598b6d6341Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4608b6d6341Smrg  fi
4618b6d6341Smrgfi
4621abf7346Smrg
4638b6d6341Smrg# test whether we have cygpath
4648b6d6341Smrgif test -z "$CYGPATH_W"; then
4658b6d6341Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4668b6d6341Smrg    CYGPATH_W='cygpath -w'
4678b6d6341Smrg  else
4688b6d6341Smrg    CYGPATH_W=echo
4698b6d6341Smrg  fi
4708b6d6341Smrgfi
4718b6d6341SmrgAC_SUBST([CYGPATH_W])
4721abf7346Smrg
4738b6d6341Smrg# Define the identity of the package.
4748b6d6341Smrgdnl Distinguish between old-style and new-style calls.
4758b6d6341Smrgm4_ifval([$2],
4768b6d6341Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4778b6d6341Smrg AC_SUBST([PACKAGE], [$1])dnl
4788b6d6341Smrg AC_SUBST([VERSION], [$2])],
4798b6d6341Smrg[_AM_SET_OPTIONS([$1])dnl
4808b6d6341Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4818b6d6341Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
4828b6d6341Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4838b6d6341Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4848b6d6341Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4851abf7346Smrg
4868b6d6341Smrg_AM_IF_OPTION([no-define],,
4878b6d6341Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
4888b6d6341Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4891abf7346Smrg
4908b6d6341Smrg# Some tools Automake needs.
4918b6d6341SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4928b6d6341SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
4938b6d6341SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
4948b6d6341SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
4958b6d6341SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
4968b6d6341SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
4978b6d6341SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
4988b6d6341SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4998b6d6341SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
5008b6d6341SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
5018b6d6341Smrg# We need awk for the "check" target.  The system "awk" is bad on
5028b6d6341Smrg# some platforms.
5038b6d6341SmrgAC_REQUIRE([AC_PROG_AWK])dnl
5048b6d6341SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5058b6d6341SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5068b6d6341Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5078b6d6341Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5088b6d6341Smrg			     [_AM_PROG_TAR([v7])])])
5098b6d6341Smrg_AM_IF_OPTION([no-dependencies],,
5108b6d6341Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
5118b6d6341Smrg		  [_AM_DEPENDENCIES(CC)],
5128b6d6341Smrg		  [define([AC_PROG_CC],
5138b6d6341Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
5148b6d6341SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5158b6d6341Smrg		  [_AM_DEPENDENCIES(CXX)],
5168b6d6341Smrg		  [define([AC_PROG_CXX],
5178b6d6341Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
5188b6d6341SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5198b6d6341Smrg		  [_AM_DEPENDENCIES(OBJC)],
5208b6d6341Smrg		  [define([AC_PROG_OBJC],
5218b6d6341Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
5228b6d6341Smrg])
5238b6d6341Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
5248b6d6341Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
5258b6d6341Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
5268b6d6341Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
5278b6d6341SmrgAC_CONFIG_COMMANDS_PRE(dnl
5288b6d6341Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5298b6d6341Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5308b6d6341Smrg])
5311abf7346Smrg
5328b6d6341Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5338b6d6341Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5348b6d6341Smrgdnl mangled by Autoconf and run in a shell conditional statement.
5358b6d6341Smrgm4_define([_AC_COMPILER_EXEEXT],
5368b6d6341Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5371abf7346Smrg
5381abf7346Smrg
5398b6d6341Smrg# When config.status generates a header, we must update the stamp-h file.
5408b6d6341Smrg# This file resides in the same directory as the config header
5418b6d6341Smrg# that is generated.  The stamp files are numbered to have different names.
5421abf7346Smrg
5438b6d6341Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
5448b6d6341Smrg# loop where config.status creates the headers, so we can generate
5458b6d6341Smrg# our stamp files there.
5468b6d6341SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
5478b6d6341Smrg[# Compute $1's index in $config_headers.
5488b6d6341Smrg_am_arg=$1
5498b6d6341Smrg_am_stamp_count=1
5508b6d6341Smrgfor _am_header in $config_headers :; do
5518b6d6341Smrg  case $_am_header in
5528b6d6341Smrg    $_am_arg | $_am_arg:* )
5538b6d6341Smrg      break ;;
5548b6d6341Smrg    * )
5558b6d6341Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
5568b6d6341Smrg  esac
5578b6d6341Smrgdone
5588b6d6341Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
5591abf7346Smrg
5608b6d6341Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
5611abf7346Smrg#
5628b6d6341Smrg# This file is free software; the Free Software Foundation
5638b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
5648b6d6341Smrg# with or without modifications, as long as this notice is preserved.
5651abf7346Smrg
5668b6d6341Smrg# AM_PROG_INSTALL_SH
5678b6d6341Smrg# ------------------
5688b6d6341Smrg# Define $install_sh.
5698b6d6341SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
5708b6d6341Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5718b6d6341Smrgif test x"${install_sh}" != xset; then
5728b6d6341Smrg  case $am_aux_dir in
5738b6d6341Smrg  *\ * | *\	*)
5748b6d6341Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5758b6d6341Smrg  *)
5768b6d6341Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
5778b6d6341Smrg  esac
5781abf7346Smrgfi
5798b6d6341SmrgAC_SUBST(install_sh)])
5801abf7346Smrg
5818b6d6341Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
5828b6d6341Smrg#
5838b6d6341Smrg# This file is free software; the Free Software Foundation
5848b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
5858b6d6341Smrg# with or without modifications, as long as this notice is preserved.
5868b6d6341Smrg
5878b6d6341Smrg# serial 2
5888b6d6341Smrg
5898b6d6341Smrg# Check whether the underlying file-system supports filenames
5908b6d6341Smrg# with a leading dot.  For instance MS-DOS doesn't.
5918b6d6341SmrgAC_DEFUN([AM_SET_LEADING_DOT],
5928b6d6341Smrg[rm -rf .tst 2>/dev/null
5938b6d6341Smrgmkdir .tst 2>/dev/null
5948b6d6341Smrgif test -d .tst; then
5958b6d6341Smrg  am__leading_dot=.
5961abf7346Smrgelse
5978b6d6341Smrg  am__leading_dot=_
5981abf7346Smrgfi
5998b6d6341Smrgrmdir .tst 2>/dev/null
6008b6d6341SmrgAC_SUBST([am__leading_dot])])
6011abf7346Smrg
6028b6d6341Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
6038b6d6341Smrg# From Jim Meyering
6041abf7346Smrg
6058b6d6341Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
6068b6d6341Smrg# Free Software Foundation, Inc.
6071abf7346Smrg#
6088b6d6341Smrg# This file is free software; the Free Software Foundation
6098b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
6108b6d6341Smrg# with or without modifications, as long as this notice is preserved.
6111abf7346Smrg
6128b6d6341Smrg# serial 5
6131abf7346Smrg
6148b6d6341Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
6158b6d6341Smrg# ----------------------------------
6168b6d6341Smrg# Control maintainer-specific portions of Makefiles.
6178b6d6341Smrg# Default is to disable them, unless `enable' is passed literally.
6188b6d6341Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
6198b6d6341Smrg# can override the default with the --enable/--disable switch.
6208b6d6341SmrgAC_DEFUN([AM_MAINTAINER_MODE],
6218b6d6341Smrg[m4_case(m4_default([$1], [disable]),
6228b6d6341Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
6238b6d6341Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
6248b6d6341Smrg       [m4_define([am_maintainer_other], [enable])
6258b6d6341Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
6268b6d6341SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
6278b6d6341Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
6288b6d6341Smrg  AC_ARG_ENABLE([maintainer-mode],
6298b6d6341Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
6308b6d6341Smrg			  (and sometimes confusing) to the casual installer],
6318b6d6341Smrg      [USE_MAINTAINER_MODE=$enableval],
6328b6d6341Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
6338b6d6341Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6348b6d6341Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
6358b6d6341Smrg  MAINT=$MAINTAINER_MODE_TRUE
6368b6d6341Smrg  AC_SUBST([MAINT])dnl
6378b6d6341Smrg]
6388b6d6341Smrg)
6391abf7346Smrg
6408b6d6341SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6411abf7346Smrg
6428b6d6341Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6438b6d6341Smrg
6448b6d6341Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
6451abf7346Smrg#
6468b6d6341Smrg# This file is free software; the Free Software Foundation
6478b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
6488b6d6341Smrg# with or without modifications, as long as this notice is preserved.
6498b6d6341Smrg
6508b6d6341Smrg# serial 4
6518b6d6341Smrg
6528b6d6341Smrg# AM_MAKE_INCLUDE()
6538b6d6341Smrg# -----------------
6548b6d6341Smrg# Check to see how make treats includes.
6558b6d6341SmrgAC_DEFUN([AM_MAKE_INCLUDE],
6568b6d6341Smrg[am_make=${MAKE-make}
6578b6d6341Smrgcat > confinc << 'END'
6588b6d6341Smrgam__doit:
6598b6d6341Smrg	@echo this is the am__doit target
6608b6d6341Smrg.PHONY: am__doit
6618b6d6341SmrgEND
6628b6d6341Smrg# If we don't find an include directive, just comment out the code.
6638b6d6341SmrgAC_MSG_CHECKING([for style of include used by $am_make])
6648b6d6341Smrgam__include="#"
6658b6d6341Smrgam__quote=
6668b6d6341Smrg_am_result=none
6678b6d6341Smrg# First try GNU make style include.
6688b6d6341Smrgecho "include confinc" > confmf
6698b6d6341Smrg# Ignore all kinds of additional output from `make'.
6708b6d6341Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
6718b6d6341Smrg*the\ am__doit\ target*)
6728b6d6341Smrg  am__include=include
6738b6d6341Smrg  am__quote=
6748b6d6341Smrg  _am_result=GNU
6758b6d6341Smrg  ;;
6768b6d6341Smrgesac
6778b6d6341Smrg# Now try BSD make style include.
6788b6d6341Smrgif test "$am__include" = "#"; then
6798b6d6341Smrg   echo '.include "confinc"' > confmf
6808b6d6341Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
6818b6d6341Smrg   *the\ am__doit\ target*)
6828b6d6341Smrg     am__include=.include
6838b6d6341Smrg     am__quote="\""
6848b6d6341Smrg     _am_result=BSD
6858b6d6341Smrg     ;;
6868b6d6341Smrg   esac
6878b6d6341Smrgfi
6888b6d6341SmrgAC_SUBST([am__include])
6898b6d6341SmrgAC_SUBST([am__quote])
6908b6d6341SmrgAC_MSG_RESULT([$_am_result])
6918b6d6341Smrgrm -f confinc confmf
6928b6d6341Smrg])
6938b6d6341Smrg
6948b6d6341Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6958b6d6341Smrg
6968b6d6341Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
6978b6d6341Smrg# Free Software Foundation, Inc.
6981abf7346Smrg#
6998b6d6341Smrg# This file is free software; the Free Software Foundation
7008b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
7018b6d6341Smrg# with or without modifications, as long as this notice is preserved.
7021abf7346Smrg
7038b6d6341Smrg# serial 6
7041abf7346Smrg
7058b6d6341Smrg# AM_MISSING_PROG(NAME, PROGRAM)
7068b6d6341Smrg# ------------------------------
7078b6d6341SmrgAC_DEFUN([AM_MISSING_PROG],
7088b6d6341Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7098b6d6341Smrg$1=${$1-"${am_missing_run}$2"}
7108b6d6341SmrgAC_SUBST($1)])
7111abf7346Smrg
7121abf7346Smrg
7138b6d6341Smrg# AM_MISSING_HAS_RUN
7148b6d6341Smrg# ------------------
7158b6d6341Smrg# Define MISSING if not defined so far and test if it supports --run.
7168b6d6341Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
7178b6d6341SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7188b6d6341Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7198b6d6341SmrgAC_REQUIRE_AUX_FILE([missing])dnl
7208b6d6341Smrgif test x"${MISSING+set}" != xset; then
7218b6d6341Smrg  case $am_aux_dir in
7228b6d6341Smrg  *\ * | *\	*)
7238b6d6341Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7248b6d6341Smrg  *)
7258b6d6341Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
7268b6d6341Smrg  esac
7278b6d6341Smrgfi
7288b6d6341Smrg# Use eval to expand $SHELL
7298b6d6341Smrgif eval "$MISSING --run true"; then
7308b6d6341Smrg  am_missing_run="$MISSING --run "
7318b6d6341Smrgelse
7328b6d6341Smrg  am_missing_run=
7338b6d6341Smrg  AC_MSG_WARN([`missing' script is too old or missing])
7348b6d6341Smrgfi
7351abf7346Smrg])
7361abf7346Smrg
7378b6d6341Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7381abf7346Smrg#
7391abf7346Smrg# This file is free software; the Free Software Foundation
7401abf7346Smrg# gives unlimited permission to copy and/or distribute it,
7411abf7346Smrg# with or without modifications, as long as this notice is preserved.
7421abf7346Smrg
7438b6d6341Smrg# AM_PROG_MKDIR_P
7448b6d6341Smrg# ---------------
7458b6d6341Smrg# Check for `mkdir -p'.
7468b6d6341SmrgAC_DEFUN([AM_PROG_MKDIR_P],
7478b6d6341Smrg[AC_PREREQ([2.60])dnl
7488b6d6341SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
7498b6d6341Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
7508b6d6341Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
7518b6d6341Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7528b6d6341Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7538b6d6341Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
7548b6d6341Smrgdnl adjustment using top_builddir (which is defined more often than
7558b6d6341Smrgdnl MKDIR_P).
7568b6d6341SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7578b6d6341Smrgcase $mkdir_p in
7588b6d6341Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
7598b6d6341Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7608b6d6341Smrgesac
7611abf7346Smrg])
7621abf7346Smrg
7638b6d6341Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7641abf7346Smrg
7658b6d6341Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
7668b6d6341Smrg#
7678b6d6341Smrg# This file is free software; the Free Software Foundation
7688b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
7698b6d6341Smrg# with or without modifications, as long as this notice is preserved.
7701abf7346Smrg
7718b6d6341Smrg# serial 4
7721abf7346Smrg
7738b6d6341Smrg# _AM_MANGLE_OPTION(NAME)
7748b6d6341Smrg# -----------------------
7758b6d6341SmrgAC_DEFUN([_AM_MANGLE_OPTION],
7768b6d6341Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7778b6d6341Smrg
7788b6d6341Smrg# _AM_SET_OPTION(NAME)
7798b6d6341Smrg# ------------------------------
7808b6d6341Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7818b6d6341SmrgAC_DEFUN([_AM_SET_OPTION],
7828b6d6341Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7838b6d6341Smrg
7848b6d6341Smrg# _AM_SET_OPTIONS(OPTIONS)
7858b6d6341Smrg# ----------------------------------
7868b6d6341Smrg# OPTIONS is a space-separated list of Automake options.
7878b6d6341SmrgAC_DEFUN([_AM_SET_OPTIONS],
7888b6d6341Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7898b6d6341Smrg
7908b6d6341Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7918b6d6341Smrg# -------------------------------------------
7928b6d6341Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7938b6d6341SmrgAC_DEFUN([_AM_IF_OPTION],
7948b6d6341Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7958b6d6341Smrg
7968b6d6341Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7978b6d6341Smrg
7988b6d6341Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
7998b6d6341Smrg# Free Software Foundation, Inc.
8001abf7346Smrg#
8011abf7346Smrg# This file is free software; the Free Software Foundation
8021abf7346Smrg# gives unlimited permission to copy and/or distribute it,
8031abf7346Smrg# with or without modifications, as long as this notice is preserved.
8041abf7346Smrg
8058b6d6341Smrg# serial 5
8061abf7346Smrg
8078b6d6341Smrg# AM_SANITY_CHECK
8088b6d6341Smrg# ---------------
8098b6d6341SmrgAC_DEFUN([AM_SANITY_CHECK],
8108b6d6341Smrg[AC_MSG_CHECKING([whether build environment is sane])
8118b6d6341Smrg# Just in case
8128b6d6341Smrgsleep 1
8138b6d6341Smrgecho timestamp > conftest.file
8148b6d6341Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8158b6d6341Smrg# name.  Accept space and tab only in the latter.
8168b6d6341Smrgam_lf='
8178b6d6341Smrg'
8188b6d6341Smrgcase `pwd` in
8198b6d6341Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8208b6d6341Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8218b6d6341Smrgesac
8228b6d6341Smrgcase $srcdir in
8238b6d6341Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8248b6d6341Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8258b6d6341Smrgesac
8261abf7346Smrg
8278b6d6341Smrg# Do `set' in a subshell so we don't clobber the current shell's
8288b6d6341Smrg# arguments.  Must try -L first in case configure is actually a
8298b6d6341Smrg# symlink; some systems play weird games with the mod time of symlinks
8308b6d6341Smrg# (eg FreeBSD returns the mod time of the symlink's containing
8318b6d6341Smrg# directory).
8328b6d6341Smrgif (
8338b6d6341Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8348b6d6341Smrg   if test "$[*]" = "X"; then
8358b6d6341Smrg      # -L didn't work.
8368b6d6341Smrg      set X `ls -t "$srcdir/configure" conftest.file`
8378b6d6341Smrg   fi
8388b6d6341Smrg   rm -f conftest.file
8398b6d6341Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
8408b6d6341Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8418b6d6341Smrg
8428b6d6341Smrg      # If neither matched, then we have a broken ls.  This can happen
8438b6d6341Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
8448b6d6341Smrg      # broken ls alias from the environment.  This has actually
8458b6d6341Smrg      # happened.  Such a system could not be considered "sane".
8468b6d6341Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8478b6d6341Smrgalias in your environment])
8488b6d6341Smrg   fi
8498b6d6341Smrg
8508b6d6341Smrg   test "$[2]" = conftest.file
8518b6d6341Smrg   )
8528b6d6341Smrgthen
8538b6d6341Smrg   # Ok.
8548b6d6341Smrg   :
8558b6d6341Smrgelse
8568b6d6341Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
8578b6d6341SmrgCheck your system clock])
8588b6d6341Smrgfi
8598b6d6341SmrgAC_MSG_RESULT(yes)])
8601abf7346Smrg
8618b6d6341Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
8621abf7346Smrg#
8631abf7346Smrg# This file is free software; the Free Software Foundation
8641abf7346Smrg# gives unlimited permission to copy and/or distribute it,
8651abf7346Smrg# with or without modifications, as long as this notice is preserved.
8661abf7346Smrg
8678b6d6341Smrg# serial 1
8681abf7346Smrg
8698b6d6341Smrg# AM_SILENT_RULES([DEFAULT])
8708b6d6341Smrg# --------------------------
8718b6d6341Smrg# Enable less verbose build rules; with the default set to DEFAULT
8728b6d6341Smrg# (`yes' being less verbose, `no' or empty being verbose).
8738b6d6341SmrgAC_DEFUN([AM_SILENT_RULES],
8748b6d6341Smrg[AC_ARG_ENABLE([silent-rules],
8758b6d6341Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8768b6d6341Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
8778b6d6341Smrgcase $enable_silent_rules in
8788b6d6341Smrgyes) AM_DEFAULT_VERBOSITY=0;;
8798b6d6341Smrgno)  AM_DEFAULT_VERBOSITY=1;;
8808b6d6341Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8818b6d6341Smrgesac
8828b6d6341SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8838b6d6341SmrgAM_BACKSLASH='\'
8848b6d6341SmrgAC_SUBST([AM_BACKSLASH])dnl
8858b6d6341Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8868b6d6341Smrg])
8871abf7346Smrg
8888b6d6341Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8891abf7346Smrg#
8901abf7346Smrg# This file is free software; the Free Software Foundation
8911abf7346Smrg# gives unlimited permission to copy and/or distribute it,
8921abf7346Smrg# with or without modifications, as long as this notice is preserved.
8931abf7346Smrg
8948b6d6341Smrg# AM_PROG_INSTALL_STRIP
8958b6d6341Smrg# ---------------------
8968b6d6341Smrg# One issue with vendor `install' (even GNU) is that you can't
8978b6d6341Smrg# specify the program used to strip binaries.  This is especially
8988b6d6341Smrg# annoying in cross-compiling environments, where the build's strip
8998b6d6341Smrg# is unlikely to handle the host's binaries.
9008b6d6341Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9018b6d6341Smrg# always use install-sh in `make install-strip', and initialize
9028b6d6341Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
9038b6d6341SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9048b6d6341Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9058b6d6341Smrg# Installed binaries are usually stripped using `strip' when the user
9068b6d6341Smrg# run `make install-strip'.  However `strip' might not be the right
9078b6d6341Smrg# tool to use in cross-compilation environments, therefore Automake
9088b6d6341Smrg# will honor the `STRIP' environment variable to overrule this program.
9098b6d6341Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9108b6d6341Smrgif test "$cross_compiling" != no; then
9118b6d6341Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9128b6d6341Smrgfi
9138b6d6341SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9148b6d6341SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9151abf7346Smrg
9168b6d6341Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9171abf7346Smrg#
9188b6d6341Smrg# This file is free software; the Free Software Foundation
9198b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
9208b6d6341Smrg# with or without modifications, as long as this notice is preserved.
9211abf7346Smrg
9228b6d6341Smrg# serial 2
9231abf7346Smrg
9248b6d6341Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
9258b6d6341Smrg# ---------------------------
9268b6d6341Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9278b6d6341Smrg# This macro is traced by Automake.
9288b6d6341SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9291abf7346Smrg
9308b6d6341Smrg# AM_SUBST_NOTMAKE(VARIABLE)
9318b6d6341Smrg# ---------------------------
9328b6d6341Smrg# Public sister of _AM_SUBST_NOTMAKE.
9338b6d6341SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9341abf7346Smrg
9358b6d6341Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9361abf7346Smrg
9378b6d6341Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9388b6d6341Smrg#
9398b6d6341Smrg# This file is free software; the Free Software Foundation
9408b6d6341Smrg# gives unlimited permission to copy and/or distribute it,
9418b6d6341Smrg# with or without modifications, as long as this notice is preserved.
9421abf7346Smrg
9438b6d6341Smrg# serial 2
9441abf7346Smrg
9458b6d6341Smrg# _AM_PROG_TAR(FORMAT)
9468b6d6341Smrg# --------------------
9478b6d6341Smrg# Check how to create a tarball in format FORMAT.
9488b6d6341Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9498b6d6341Smrg#
9508b6d6341Smrg# Substitute a variable $(am__tar) that is a command
9518b6d6341Smrg# writing to stdout a FORMAT-tarball containing the directory
9528b6d6341Smrg# $tardir.
9538b6d6341Smrg#     tardir=directory && $(am__tar) > result.tar
9548b6d6341Smrg#
9558b6d6341Smrg# Substitute a variable $(am__untar) that extract such
9568b6d6341Smrg# a tarball read from stdin.
9578b6d6341Smrg#     $(am__untar) < result.tar
9588b6d6341SmrgAC_DEFUN([_AM_PROG_TAR],
9598b6d6341Smrg[# Always define AMTAR for backward compatibility.
9608b6d6341SmrgAM_MISSING_PROG([AMTAR], [tar])
9618b6d6341Smrgm4_if([$1], [v7],
9628b6d6341Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9638b6d6341Smrg     [m4_case([$1], [ustar],, [pax],,
9648b6d6341Smrg              [m4_fatal([Unknown tar format])])
9658b6d6341SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9668b6d6341Smrg# Loop over all known methods to create a tar archive until one works.
9678b6d6341Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9688b6d6341Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9698b6d6341Smrg# Do not fold the above two line into one, because Tru64 sh and
9708b6d6341Smrg# Solaris sh will not grok spaces in the rhs of `-'.
9718b6d6341Smrgfor _am_tool in $_am_tools
9728b6d6341Smrgdo
9738b6d6341Smrg  case $_am_tool in
9748b6d6341Smrg  gnutar)
9758b6d6341Smrg    for _am_tar in tar gnutar gtar;
9768b6d6341Smrg    do
9778b6d6341Smrg      AM_RUN_LOG([$_am_tar --version]) && break
9788b6d6341Smrg    done
9798b6d6341Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9808b6d6341Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9818b6d6341Smrg    am__untar="$_am_tar -xf -"
9828b6d6341Smrg    ;;
9838b6d6341Smrg  plaintar)
9848b6d6341Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9858b6d6341Smrg    # ustar tarball either.
9868b6d6341Smrg    (tar --version) >/dev/null 2>&1 && continue
9878b6d6341Smrg    am__tar='tar chf - "$$tardir"'
9888b6d6341Smrg    am__tar_='tar chf - "$tardir"'
9898b6d6341Smrg    am__untar='tar xf -'
9908b6d6341Smrg    ;;
9918b6d6341Smrg  pax)
9928b6d6341Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
9938b6d6341Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
9948b6d6341Smrg    am__untar='pax -r'
9958b6d6341Smrg    ;;
9968b6d6341Smrg  cpio)
9978b6d6341Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9988b6d6341Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9998b6d6341Smrg    am__untar='cpio -i -H $1 -d'
10008b6d6341Smrg    ;;
10018b6d6341Smrg  none)
10028b6d6341Smrg    am__tar=false
10038b6d6341Smrg    am__tar_=false
10048b6d6341Smrg    am__untar=false
10058b6d6341Smrg    ;;
10068b6d6341Smrg  esac
10071abf7346Smrg
10088b6d6341Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
10098b6d6341Smrg  # and am__untar set.
10108b6d6341Smrg  test -n "${am_cv_prog_tar_$1}" && break
10111abf7346Smrg
10128b6d6341Smrg  # tar/untar a dummy directory, and stop if the command works
10138b6d6341Smrg  rm -rf conftest.dir
10148b6d6341Smrg  mkdir conftest.dir
10158b6d6341Smrg  echo GrepMe > conftest.dir/file
10168b6d6341Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10178b6d6341Smrg  rm -rf conftest.dir
10188b6d6341Smrg  if test -s conftest.tar; then
10198b6d6341Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
10208b6d6341Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10218b6d6341Smrg  fi
10228b6d6341Smrgdone
10238b6d6341Smrgrm -rf conftest.dir
10241abf7346Smrg
10258b6d6341SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10268b6d6341SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
10278b6d6341SmrgAC_SUBST([am__tar])
10288b6d6341SmrgAC_SUBST([am__untar])
10298b6d6341Smrg]) # _AM_PROG_TAR
10301abf7346Smrg
10318b6d6341Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
10328b6d6341Smrgdnl
10338b6d6341Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
10348b6d6341Smrgdnl 
10358b6d6341Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
10368b6d6341Smrgdnl copy of this software and associated documentation files (the
10378b6d6341Smrgdnl "Software"), to deal in the Software without restriction, including
10388b6d6341Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
10398b6d6341Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
10408b6d6341Smrgdnl to whom the Software is furnished to do so, provided that the above
10418b6d6341Smrgdnl copyright notice(s) and this permission notice appear in all copies of
10428b6d6341Smrgdnl the Software and that both the above copyright notice(s) and this
10438b6d6341Smrgdnl permission notice appear in supporting documentation.
10448b6d6341Smrgdnl
10458b6d6341Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10468b6d6341Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10478b6d6341Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
10488b6d6341Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
10498b6d6341Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
10508b6d6341Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
10518b6d6341Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
10528b6d6341Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
10538b6d6341Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
10548b6d6341Smrgdnl
10558b6d6341Smrgdnl Except as contained in this notice, the name of a copyright holder
10568b6d6341Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
10578b6d6341Smrgdnl or other dealings in this Software without prior written authorization
10588b6d6341Smrgdnl of the copyright holder.
10598b6d6341Smrg
10608b6d6341Smrg# XORG_MACROS_VERSION(required-version)
10618b6d6341Smrg# -------------------------------------
10628b6d6341Smrg# Minimum version: 1.1.0
10631abf7346Smrg#
10648b6d6341Smrg# If you're using a macro added in Version 1.1 or newer, include this in
10658b6d6341Smrg# your configure.ac with the minimum required version, such as:
10668b6d6341Smrg# XORG_MACROS_VERSION(1.1)
10678b6d6341Smrg#
10688b6d6341Smrg# To ensure that this macro is defined, also add:
10698b6d6341Smrg# m4_ifndef([XORG_MACROS_VERSION],
10708b6d6341Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
10718b6d6341Smrg#
10728b6d6341Smrg#
10738b6d6341Smrg# See the "minimum version" comment for each macro you use to see what 
10748b6d6341Smrg# version you require.
10758b6d6341Smrgm4_defun([XORG_MACROS_VERSION],[
10768b6d6341Smrgm4_define([vers_have], [1.3.0])
10778b6d6341Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
10788b6d6341Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
10798b6d6341Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
10808b6d6341Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
10818b6d6341Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
10828b6d6341Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
10838b6d6341Smrgm4_undefine([vers_have])
10848b6d6341Smrgm4_undefine([maj_have])
10858b6d6341Smrgm4_undefine([maj_needed])
10868b6d6341Smrg]) # XORG_MACROS_VERSION
10871abf7346Smrg
10888b6d6341Smrg# XORG_PROG_RAWCPP()
10898b6d6341Smrg# ------------------
10908b6d6341Smrg# Minimum version: 1.0.0
10918b6d6341Smrg#
10928b6d6341Smrg# Find cpp program and necessary flags for use in pre-processing text files
10938b6d6341Smrg# such as man pages and config files
10948b6d6341SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
10958b6d6341SmrgAC_REQUIRE([AC_PROG_CPP])
10968b6d6341SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
10978b6d6341Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
10981abf7346Smrg
10998b6d6341Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
11008b6d6341Smrg# which is not the best choice for supporting other OS'es, but covers most
11018b6d6341Smrg# of the ones we need for now.
11028b6d6341SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
11038b6d6341SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
11048b6d6341Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11058b6d6341Smrg	AC_MSG_RESULT([no])
11068b6d6341Smrgelse
11078b6d6341Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11088b6d6341Smrg		RAWCPPFLAGS=-undef
11098b6d6341Smrg		AC_MSG_RESULT([yes])
11108b6d6341Smrg	# under Cygwin unix is still defined even with -undef
11118b6d6341Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11128b6d6341Smrg		RAWCPPFLAGS="-undef -ansi"
11138b6d6341Smrg		AC_MSG_RESULT([yes, with -ansi])
11148b6d6341Smrg	else
11158b6d6341Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
11168b6d6341Smrg	fi
11178b6d6341Smrgfi
11188b6d6341Smrgrm -f conftest.$ac_ext
11191abf7346Smrg
11208b6d6341SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
11218b6d6341SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
11228b6d6341Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
11238b6d6341Smrg	AC_MSG_RESULT([no])
11248b6d6341Smrgelse
11258b6d6341Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
11268b6d6341Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
11278b6d6341Smrg		AC_MSG_RESULT([yes])
11288b6d6341Smrg	else
11298b6d6341Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
11308b6d6341Smrg	fi
11318b6d6341Smrgfi
11328b6d6341Smrgrm -f conftest.$ac_ext
11338b6d6341SmrgAC_SUBST(RAWCPPFLAGS)
11348b6d6341Smrg]) # XORG_PROG_RAWCPP
11351abf7346Smrg
11368b6d6341Smrg# XORG_MANPAGE_SECTIONS()
11378b6d6341Smrg# -----------------------
11388b6d6341Smrg# Minimum version: 1.0.0
11391abf7346Smrg#
11408b6d6341Smrg# Determine which sections man pages go in for the different man page types
11418b6d6341Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
11428b6d6341Smrg# Not sure if there's any better way than just hardcoding by OS name.
11438b6d6341Smrg# Override default settings by setting environment variables
11441abf7346Smrg
11458b6d6341SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
11468b6d6341SmrgAC_REQUIRE([AC_CANONICAL_HOST])
11471abf7346Smrg
11488b6d6341Smrgif test x$APP_MAN_SUFFIX = x    ; then
11498b6d6341Smrg    APP_MAN_SUFFIX=1
11508b6d6341Smrgfi
11518b6d6341Smrgif test x$APP_MAN_DIR = x    ; then
11528b6d6341Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
11538b6d6341Smrgfi
11541abf7346Smrg
11558b6d6341Smrgif test x$LIB_MAN_SUFFIX = x    ; then
11568b6d6341Smrg    LIB_MAN_SUFFIX=3
11578b6d6341Smrgfi
11588b6d6341Smrgif test x$LIB_MAN_DIR = x    ; then
11598b6d6341Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
11608b6d6341Smrgfi
11611abf7346Smrg
11628b6d6341Smrgif test x$FILE_MAN_SUFFIX = x    ; then
11638b6d6341Smrg    case $host_os in
11648b6d6341Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
11658b6d6341Smrg	*)		FILE_MAN_SUFFIX=5  ;;
11668b6d6341Smrg    esac
11678b6d6341Smrgfi
11688b6d6341Smrgif test x$FILE_MAN_DIR = x    ; then
11698b6d6341Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
11708b6d6341Smrgfi
11711abf7346Smrg
11728b6d6341Smrgif test x$MISC_MAN_SUFFIX = x    ; then
11738b6d6341Smrg    case $host_os in
11748b6d6341Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
11758b6d6341Smrg	*)		MISC_MAN_SUFFIX=7  ;;
11768b6d6341Smrg    esac
11778b6d6341Smrgfi
11788b6d6341Smrgif test x$MISC_MAN_DIR = x    ; then
11798b6d6341Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
11808b6d6341Smrgfi
11811abf7346Smrg
11828b6d6341Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
11838b6d6341Smrg    case $host_os in
11848b6d6341Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
11858b6d6341Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
11868b6d6341Smrg    esac
11878b6d6341Smrgfi
11888b6d6341Smrgif test x$DRIVER_MAN_DIR = x    ; then
11898b6d6341Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
11908b6d6341Smrgfi
11911abf7346Smrg
11928b6d6341Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
11938b6d6341Smrg    case $host_os in
11948b6d6341Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
11958b6d6341Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
11968b6d6341Smrg    esac
11978b6d6341Smrgfi
11988b6d6341Smrgif test x$ADMIN_MAN_DIR = x    ; then
11998b6d6341Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
12008b6d6341Smrgfi
12011abf7346Smrg
12028b6d6341Smrg
12038b6d6341SmrgAC_SUBST([APP_MAN_SUFFIX])
12048b6d6341SmrgAC_SUBST([LIB_MAN_SUFFIX])
12058b6d6341SmrgAC_SUBST([FILE_MAN_SUFFIX])
12068b6d6341SmrgAC_SUBST([MISC_MAN_SUFFIX])
12078b6d6341SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
12088b6d6341SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
12098b6d6341SmrgAC_SUBST([APP_MAN_DIR])
12108b6d6341SmrgAC_SUBST([LIB_MAN_DIR])
12118b6d6341SmrgAC_SUBST([FILE_MAN_DIR])
12128b6d6341SmrgAC_SUBST([MISC_MAN_DIR])
12138b6d6341SmrgAC_SUBST([DRIVER_MAN_DIR])
12148b6d6341SmrgAC_SUBST([ADMIN_MAN_DIR])
12158b6d6341Smrg]) # XORG_MANPAGE_SECTIONS
12168b6d6341Smrg
12178b6d6341Smrg# XORG_CHECK_LINUXDOC
12188b6d6341Smrg# -------------------
12198b6d6341Smrg# Minimum version: 1.0.0
12208b6d6341Smrg#
12218b6d6341Smrg# Defines the variable MAKE_TEXT if the necessary tools and
12228b6d6341Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
12238b6d6341Smrg# Whether or not the necessary tools and files are found can be checked
12248b6d6341Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
12258b6d6341SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
12268b6d6341Smrgif test x$XORG_SGML_PATH = x ; then
12278b6d6341Smrg    XORG_SGML_PATH=$prefix/share/sgml
12281abf7346Smrgfi
12298b6d6341SmrgHAVE_DEFS_ENT=
12301abf7346Smrg
12318b6d6341Smrgif test x"$cross_compiling" = x"yes" ; then
12328b6d6341Smrg  HAVE_DEFS_ENT=no
12338b6d6341Smrgelse
12348b6d6341Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
12351abf7346Smrgfi
12361abf7346Smrg
12378b6d6341SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
12388b6d6341SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
12391abf7346Smrg
12408b6d6341SmrgAC_MSG_CHECKING([Whether to build documentation])
12411abf7346Smrg
12428b6d6341Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
12438b6d6341Smrg   BUILDDOC=yes
12448b6d6341Smrgelse
12458b6d6341Smrg   BUILDDOC=no
12468b6d6341Smrgfi
12471abf7346Smrg
12488b6d6341SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
12491abf7346Smrg
12508b6d6341SmrgAC_MSG_RESULT([$BUILDDOC])
12511abf7346Smrg
12528b6d6341SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
12531abf7346Smrg
12548b6d6341Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
12558b6d6341Smrg   BUILDPDFDOC=yes
12568b6d6341Smrgelse
12578b6d6341Smrg   BUILDPDFDOC=no
12588b6d6341Smrgfi
12591abf7346Smrg
12608b6d6341SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
12611abf7346Smrg
12628b6d6341SmrgAC_MSG_RESULT([$BUILDPDFDOC])
12631abf7346Smrg
12648b6d6341SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
12658b6d6341SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
12668b6d6341SmrgMAKE_PDF="$PS2PDF"
12678b6d6341SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
12681abf7346Smrg
12698b6d6341SmrgAC_SUBST(MAKE_TEXT)
12708b6d6341SmrgAC_SUBST(MAKE_PS)
12718b6d6341SmrgAC_SUBST(MAKE_PDF)
12728b6d6341SmrgAC_SUBST(MAKE_HTML)
12738b6d6341Smrg]) # XORG_CHECK_LINUXDOC
12748b6d6341Smrg
12758b6d6341Smrg# XORG_CHECK_DOCBOOK
12768b6d6341Smrg# -------------------
12778b6d6341Smrg# Minimum version: 1.0.0
12788b6d6341Smrg#
12798b6d6341Smrg# Checks for the ability to build output formats from SGML DocBook source.
12808b6d6341Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
12818b6d6341Smrg# indicates whether the necessary tools and files are found and, if set,
12828b6d6341Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
12838b6d6341SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
12848b6d6341Smrgif test x$XORG_SGML_PATH = x ; then
12858b6d6341Smrg    XORG_SGML_PATH=$prefix/share/sgml
12861abf7346Smrgfi
12878b6d6341SmrgHAVE_DEFS_ENT=
12888b6d6341SmrgBUILDTXTDOC=no
12898b6d6341SmrgBUILDPDFDOC=no
12908b6d6341SmrgBUILDPSDOC=no
12918b6d6341SmrgBUILDHTMLDOC=no
12921abf7346Smrg
12938b6d6341SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
12941abf7346Smrg
12958b6d6341SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
12968b6d6341SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
12978b6d6341SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
12988b6d6341SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
12991abf7346Smrg
13008b6d6341SmrgAC_MSG_CHECKING([Whether to build text documentation])
13018b6d6341Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
13028b6d6341Smrg   test x$BUILD_TXTDOC != xno; then
13038b6d6341Smrg	BUILDTXTDOC=yes
13048b6d6341Smrgfi
13058b6d6341SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
13068b6d6341SmrgAC_MSG_RESULT([$BUILDTXTDOC])
13071abf7346Smrg
13088b6d6341SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
13098b6d6341Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
13108b6d6341Smrg   test x$BUILD_PDFDOC != xno; then
13118b6d6341Smrg	BUILDPDFDOC=yes
13128b6d6341Smrgfi
13138b6d6341SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
13148b6d6341SmrgAC_MSG_RESULT([$BUILDPDFDOC])
13151abf7346Smrg
13168b6d6341SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
13178b6d6341Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
13188b6d6341Smrg   test x$BUILD_PSDOC != xno; then
13198b6d6341Smrg	BUILDPSDOC=yes
13208b6d6341Smrgfi
13218b6d6341SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
13228b6d6341SmrgAC_MSG_RESULT([$BUILDPSDOC])
13231abf7346Smrg
13248b6d6341SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
13258b6d6341Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
13268b6d6341Smrg   test x$BUILD_HTMLDOC != xno; then
13278b6d6341Smrg	BUILDHTMLDOC=yes
13288b6d6341Smrgfi
13298b6d6341SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
13308b6d6341SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
13311abf7346Smrg
13328b6d6341SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
13338b6d6341SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
13348b6d6341SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
13358b6d6341SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
13361abf7346Smrg
13378b6d6341SmrgAC_SUBST(MAKE_TEXT)
13388b6d6341SmrgAC_SUBST(MAKE_PS)
13398b6d6341SmrgAC_SUBST(MAKE_PDF)
13408b6d6341SmrgAC_SUBST(MAKE_HTML)
13418b6d6341Smrg]) # XORG_CHECK_DOCBOOK
13421abf7346Smrg
13438b6d6341Smrg# XORG_CHECK_MALLOC_ZERO
13448b6d6341Smrg# ----------------------
13458b6d6341Smrg# Minimum version: 1.0.0
13468b6d6341Smrg#
13478b6d6341Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
13488b6d6341Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
13498b6d6341Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
13508b6d6341SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
13518b6d6341SmrgAC_ARG_ENABLE(malloc0returnsnull,
13528b6d6341Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
13538b6d6341Smrg		       [malloc(0) returns NULL (default: auto)]),
13548b6d6341Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
13558b6d6341Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
13568b6d6341Smrg
13578b6d6341SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
13588b6d6341Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
13598b6d6341Smrg	AC_RUN_IFELSE([
13608b6d6341Smrgchar *malloc();
13618b6d6341Smrgchar *realloc();
13628b6d6341Smrgchar *calloc();
13638b6d6341Smrgmain() {
13648b6d6341Smrg    char *m0, *r0, *c0, *p;
13658b6d6341Smrg    m0 = malloc(0);
13668b6d6341Smrg    p = malloc(10);
13678b6d6341Smrg    r0 = realloc(p,0);
13688b6d6341Smrg    c0 = calloc(0);
13698b6d6341Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
13708b6d6341Smrg}],
13718b6d6341Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
13728b6d6341Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
13731abf7346Smrgfi
13748b6d6341SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
13758b6d6341Smrg
13768b6d6341Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
13778b6d6341Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
13788b6d6341Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
13798b6d6341Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
13808b6d6341Smrgelse
13818b6d6341Smrg	MALLOC_ZERO_CFLAGS=""
13828b6d6341Smrg	XMALLOC_ZERO_CFLAGS=""
13838b6d6341Smrg	XTMALLOC_ZERO_CFLAGS=""
13841abf7346Smrgfi
13851abf7346Smrg
13868b6d6341SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
13878b6d6341SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
13888b6d6341SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
13898b6d6341Smrg]) # XORG_CHECK_MALLOC_ZERO
13901abf7346Smrg
13918b6d6341Smrg# XORG_WITH_LINT()
13928b6d6341Smrg# ----------------
13938b6d6341Smrg# Minimum version: 1.1.0
13941abf7346Smrg#
13958b6d6341Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
13968b6d6341Smrg# is specified.   (Use --with-lint=sparse for sparse.)
13978b6d6341Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
13988b6d6341Smrg# Sets $LINT_FLAGS to flags to pass to source checker
13998b6d6341Smrg# Sets LINT automake conditional if enabled (default: disabled)
14008b6d6341Smrg#
14018b6d6341SmrgAC_DEFUN([XORG_WITH_LINT],[
14021abf7346Smrg
14038b6d6341Smrg# Allow checking code with lint, sparse, etc.
14048b6d6341SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
14058b6d6341Smrg		[Use a lint-style source code checker (default: disabled)])],
14068b6d6341Smrg		[use_lint=$withval], [use_lint=no])
14078b6d6341Smrgif test "x$use_lint" = "xyes" ; then
14088b6d6341Smrg	LINT="lint"
14098b6d6341Smrgelse
14108b6d6341Smrg	LINT="$use_lint"
14118b6d6341Smrgfi
14128b6d6341Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
14138b6d6341Smrg    case $LINT in
14148b6d6341Smrg	lint|*/lint)
14158b6d6341Smrg	    case $host_os in
14168b6d6341Smrg		solaris*)
14178b6d6341Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
14188b6d6341Smrg			;;
14198b6d6341Smrg	    esac
14208b6d6341Smrg	    ;;
14218b6d6341Smrg    esac
14228b6d6341Smrgfi
14231abf7346Smrg
14248b6d6341SmrgAC_SUBST(LINT)
14258b6d6341SmrgAC_SUBST(LINT_FLAGS)
14268b6d6341SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
14271abf7346Smrg
14288b6d6341Smrg]) # XORG_WITH_LINT
14291abf7346Smrg
14308b6d6341Smrg# XORG_LINT_LIBRARY(LIBNAME)
14318b6d6341Smrg# --------------------------
14328b6d6341Smrg# Minimum version: 1.1.0
14338b6d6341Smrg#
14348b6d6341Smrg# Sets up flags for building lint libraries for checking programs that call
14358b6d6341Smrg# functions in the library.
14368b6d6341Smrg# Disabled by default, enable with --enable-lint-library
14378b6d6341Smrg# Sets: 
14388b6d6341Smrg#	@LINTLIB@		- name of lint library file to make
14398b6d6341Smrg#	MAKE_LINT_LIB		- automake conditional
14408b6d6341Smrg#
14418b6d6341Smrg
14428b6d6341SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
14438b6d6341SmrgAC_REQUIRE([XORG_WITH_LINT])
14448b6d6341Smrg# Build lint "library" for more indepth checks of programs calling this library
14458b6d6341SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
14468b6d6341Smrg	[Create lint library (default: disabled)])],
14478b6d6341Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
14488b6d6341Smrgif test "x$make_lint_lib" != "xno" ; then
14498b6d6341Smrg	if test "x$LINT" = "xno" ; then
14508b6d6341Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
14518b6d6341Smrg	fi
14528b6d6341Smrg	if test "x$make_lint_lib" = "xyes" ; then
14538b6d6341Smrg		LINTLIB=llib-l$1.ln
14548b6d6341Smrg	else
14558b6d6341Smrg		LINTLIB=$make_lint_lib
14568b6d6341Smrg	fi
14571abf7346Smrgfi
14588b6d6341SmrgAC_SUBST(LINTLIB)
14598b6d6341SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
14601abf7346Smrg
14618b6d6341Smrg]) # XORG_LINT_LIBRARY
14621abf7346Smrg
14638b6d6341Smrg# XORG_CWARNFLAGS
14641abf7346Smrg# ---------------
14658b6d6341Smrg# Minimum version: 1.2.0
14668b6d6341Smrg#
14678b6d6341Smrg# Defines CWARNFLAGS to enable C compiler warnings.
14688b6d6341Smrg#
14698b6d6341SmrgAC_DEFUN([XORG_CWARNFLAGS], [
14708b6d6341SmrgAC_REQUIRE([AC_PROG_CC])
14718b6d6341Smrgif  test "x$GCC" = xyes ; then
14728b6d6341Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
14738b6d6341Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
14748b6d6341Smrg-Wbad-function-cast"
14758b6d6341Smrg    case `$CC -dumpversion` in
14768b6d6341Smrg    3.4.* | 4.*)
14778b6d6341Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
14788b6d6341Smrg	;;
14798b6d6341Smrg    esac
14808b6d6341Smrgelse
14818b6d6341Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
14828b6d6341Smrg    if test "x$SUNCC" = "xyes"; then
14838b6d6341Smrg	CWARNFLAGS="-v"
14848b6d6341Smrg    fi
14858b6d6341Smrgfi
14868b6d6341SmrgAC_SUBST(CWARNFLAGS)
14878b6d6341Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
14888b6d6341Smrg]) # XORG_CWARNFLAGS
14891abf7346Smrg
14908b6d6341Smrg# XORG_STRICT_OPTION
14918b6d6341Smrg# -----------------------
14928b6d6341Smrg# Minimum version: 1.3.0
14938b6d6341Smrg#
14948b6d6341Smrg# Add configure option to enable strict compilation
14958b6d6341SmrgAC_DEFUN([XORG_STRICT_OPTION], [
14968b6d6341SmrgAC_REQUIRE([AC_PROG_CC])
14978b6d6341SmrgAC_REQUIRE([AC_PROG_CC_C99])
14988b6d6341SmrgAC_REQUIRE([XORG_CWARNFLAGS])
14998b6d6341Smrg
15008b6d6341SmrgAC_ARG_ENABLE(strict-compilation,
15018b6d6341Smrg			  AS_HELP_STRING([--enable-strict-compilation],
15028b6d6341Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
15038b6d6341Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
15048b6d6341Smrgif test "x$STRICT_COMPILE" = "xyes"; then
15058b6d6341Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
15068b6d6341Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
15078b6d6341Smrg	if test "x$GCC" = xyes ; then
15088b6d6341Smrg		STRICT_CFLAGS="-pedantic -Werror"
15098b6d6341Smrg	elif test "x$SUNCC" = "xyes"; then
15108b6d6341Smrg		STRICT_CFLAGS="-errwarn"
15118b6d6341Smrg    elif test "x$INTELCC" = "xyes"; then
15128b6d6341Smrg		STRICT_CFLAGS="-Werror"
15138b6d6341Smrg	fi
15148b6d6341Smrgfi
15158b6d6341SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
15168b6d6341SmrgAC_SUBST([CWARNFLAGS])
15178b6d6341Smrg]) # XORG_STRICT_OPTION
15181abf7346Smrg
15198b6d6341Smrg# XORG_DEFAULT_OPTIONS
15208b6d6341Smrg# --------------------
15218b6d6341Smrg# Minimum version: 1.3.0
15221abf7346Smrg#
15238b6d6341Smrg# Defines default options for X.Org modules.
15248b6d6341Smrg#
15258b6d6341SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
15268b6d6341SmrgXORG_CWARNFLAGS
15278b6d6341SmrgXORG_STRICT_OPTION
15288b6d6341SmrgXORG_RELEASE_VERSION
15298b6d6341SmrgXORG_CHANGELOG
15308b6d6341SmrgXORG_MANPAGE_SECTIONS
15318b6d6341Smrg]) # XORG_DEFAULT_OPTIONS
15328b6d6341Smrgdnl Copyright 2005 Red Hat, Inc
15338b6d6341Smrgdnl
15348b6d6341Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
15358b6d6341Smrgdnl documentation for any purpose is hereby granted without fee, provided that
15368b6d6341Smrgdnl the above copyright notice appear in all copies and that both that
15378b6d6341Smrgdnl copyright notice and this permission notice appear in supporting
15388b6d6341Smrgdnl documentation.
15398b6d6341Smrgdnl
15408b6d6341Smrgdnl The above copyright notice and this permission notice shall be included
15418b6d6341Smrgdnl in all copies or substantial portions of the Software.
15428b6d6341Smrgdnl
15438b6d6341Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15448b6d6341Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15458b6d6341Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15468b6d6341Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
15478b6d6341Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15488b6d6341Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
15498b6d6341Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
15508b6d6341Smrgdnl
15518b6d6341Smrgdnl Except as contained in this notice, the name of the copyright holders shall
15528b6d6341Smrgdnl not be used in advertising or otherwise to promote the sale, use or
15538b6d6341Smrgdnl other dealings in this Software without prior written authorization
15548b6d6341Smrgdnl from the copyright holders.
15558b6d6341Smrgdnl
15561abf7346Smrg
15578b6d6341Smrg# XORG_RELEASE_VERSION
15588b6d6341Smrg# --------------------
15598b6d6341Smrg# Adds --with/without-release-string and changes the PACKAGE and
15608b6d6341Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
15618b6d6341Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
15628b6d6341Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
15638b6d6341Smrg 
15648b6d6341SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
15658b6d6341Smrg	AC_ARG_WITH(release-version,
15668b6d6341Smrg			AS_HELP_STRING([--with-release-version=STRING],
15678b6d6341Smrg				[Use release version string in package name]),
15688b6d6341Smrg			[RELEASE_VERSION="$withval"],
15698b6d6341Smrg			[RELEASE_VERSION=""])
15708b6d6341Smrg	if test "x$RELEASE_VERSION" != "x"; then
15718b6d6341Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
15728b6d6341Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
15738b6d6341Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
15748b6d6341Smrg	fi
15758b6d6341Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
15768b6d6341Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
15778b6d6341Smrg		[Major version of this package])
15788b6d6341Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
15798b6d6341Smrg	if test "x$PVM" = "x"; then
15808b6d6341Smrg		PVM="0"
15818b6d6341Smrg	fi
15828b6d6341Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
15838b6d6341Smrg		[$PVM],
15848b6d6341Smrg		[Minor version of this package])
15858b6d6341Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
15868b6d6341Smrg	if test "x$PVP" = "x"; then
15878b6d6341Smrg		PVP="0"
15888b6d6341Smrg	fi
15898b6d6341Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
15908b6d6341Smrg		[$PVP],
15918b6d6341Smrg		[Patch version of this package])
15928b6d6341Smrg])
15931abf7346Smrg
15948b6d6341Smrg# XORG_CHANGELOG()
15958b6d6341Smrg# ----------------
15968b6d6341Smrg# Minimum version: 1.2.0
15978b6d6341Smrg#
15988b6d6341Smrg# Defines the variable CHANGELOG_CMD as the command to generate
15998b6d6341Smrg# ChangeLog from git.
16008b6d6341Smrg#
16018b6d6341Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
16028b6d6341Smrg#
16038b6d6341SmrgAC_DEFUN([XORG_CHANGELOG], [
16048b6d6341SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
16058b6d6341Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
16068b6d6341Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
16078b6d6341SmrgAC_SUBST([CHANGELOG_CMD])
16088b6d6341SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
16098b6d6341Smrg]) # XORG_CHANGELOG
16101abf7346Smrg
16118b6d6341Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
16128b6d6341Smrg# 
16138b6d6341Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
16148b6d6341Smrg#
16158b6d6341Smrg# This program is free software; you can redistribute it and/or modify
16168b6d6341Smrg# it under the terms of the GNU General Public License as published by
16178b6d6341Smrg# the Free Software Foundation; either version 2 of the License, or
16188b6d6341Smrg# (at your option) any later version.
16198b6d6341Smrg#
16208b6d6341Smrg# This program is distributed in the hope that it will be useful, but
16218b6d6341Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
16228b6d6341Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16238b6d6341Smrg# General Public License for more details.
16248b6d6341Smrg#
16258b6d6341Smrg# You should have received a copy of the GNU General Public License
16268b6d6341Smrg# along with this program; if not, write to the Free Software
16278b6d6341Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16288b6d6341Smrg#
16298b6d6341Smrg# As a special exception to the GNU General Public License, if you
16308b6d6341Smrg# distribute this file as part of a program that contains a
16318b6d6341Smrg# configuration script generated by Autoconf, you may include it under
16328b6d6341Smrg# the same distribution terms that you use for the rest of that program.
16331abf7346Smrg
16348b6d6341Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
16351abf7346Smrg# ----------------------------------
16368b6d6341SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
16378b6d6341Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
16388b6d6341Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
16398b6d6341SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
16408b6d6341Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
16418b6d6341Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
16428b6d6341Smrgfi
16438b6d6341Smrgif test -n "$PKG_CONFIG"; then
16448b6d6341Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
16458b6d6341Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
16468b6d6341Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
16478b6d6341Smrg		AC_MSG_RESULT([yes])
16488b6d6341Smrg	else
16498b6d6341Smrg		AC_MSG_RESULT([no])
16508b6d6341Smrg		PKG_CONFIG=""
16518b6d6341Smrg	fi
16528b6d6341Smrg		
16538b6d6341Smrgfi[]dnl
16548b6d6341Smrg])# PKG_PROG_PKG_CONFIG
16551abf7346Smrg
16568b6d6341Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
16571abf7346Smrg#
16588b6d6341Smrg# Check to see whether a particular set of modules exists.  Similar
16598b6d6341Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
16608b6d6341Smrg#
16618b6d6341Smrg#
16628b6d6341Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
16638b6d6341Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
16648b6d6341Smrg# PKG_CHECK_EXISTS manually
16658b6d6341Smrg# --------------------------------------------------------------
16668b6d6341SmrgAC_DEFUN([PKG_CHECK_EXISTS],
16678b6d6341Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
16688b6d6341Smrgif test -n "$PKG_CONFIG" && \
16698b6d6341Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
16708b6d6341Smrg  m4_ifval([$2], [$2], [:])
16718b6d6341Smrgm4_ifvaln([$3], [else
16728b6d6341Smrg  $3])dnl
16738b6d6341Smrgfi])
16741abf7346Smrg
16751abf7346Smrg
16768b6d6341Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
16778b6d6341Smrg# ---------------------------------------------
16788b6d6341Smrgm4_define([_PKG_CONFIG],
16798b6d6341Smrg[if test -n "$$1"; then
16808b6d6341Smrg    pkg_cv_[]$1="$$1"
16818b6d6341Smrg elif test -n "$PKG_CONFIG"; then
16828b6d6341Smrg    PKG_CHECK_EXISTS([$3],
16838b6d6341Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
16848b6d6341Smrg		     [pkg_failed=yes])
16858b6d6341Smrg else
16868b6d6341Smrg    pkg_failed=untried
16878b6d6341Smrgfi[]dnl
16888b6d6341Smrg])# _PKG_CONFIG
16891abf7346Smrg
16908b6d6341Smrg# _PKG_SHORT_ERRORS_SUPPORTED
16918b6d6341Smrg# -----------------------------
16928b6d6341SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
16938b6d6341Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
16948b6d6341Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16958b6d6341Smrg        _pkg_short_errors_supported=yes
16961abf7346Smrgelse
16978b6d6341Smrg        _pkg_short_errors_supported=no
16988b6d6341Smrgfi[]dnl
16998b6d6341Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
17001abf7346Smrg
17018b6d6341Smrg
17028b6d6341Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
17038b6d6341Smrg# [ACTION-IF-NOT-FOUND])
17041abf7346Smrg#
17058b6d6341Smrg#
17068b6d6341Smrg# Note that if there is a possibility the first call to
17078b6d6341Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
17088b6d6341Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
17098b6d6341Smrg#
17108b6d6341Smrg#
17118b6d6341Smrg# --------------------------------------------------------------
17128b6d6341SmrgAC_DEFUN([PKG_CHECK_MODULES],
17138b6d6341Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
17148b6d6341SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
17158b6d6341SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
17161abf7346Smrg
17178b6d6341Smrgpkg_failed=no
17188b6d6341SmrgAC_MSG_CHECKING([for $1])
17191abf7346Smrg
17208b6d6341Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
17218b6d6341Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
17221abf7346Smrg
17238b6d6341Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
17248b6d6341Smrgand $1[]_LIBS to avoid the need to call pkg-config.
17258b6d6341SmrgSee the pkg-config man page for more details.])
17261abf7346Smrg
17278b6d6341Smrgif test $pkg_failed = yes; then
17288b6d6341Smrg        _PKG_SHORT_ERRORS_SUPPORTED
17298b6d6341Smrg        if test $_pkg_short_errors_supported = yes; then
17308b6d6341Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
17318b6d6341Smrg        else 
17328b6d6341Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
17338b6d6341Smrg        fi
17348b6d6341Smrg	# Put the nasty error message in config.log where it belongs
17358b6d6341Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
17361abf7346Smrg
17378b6d6341Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
17388b6d6341Smrg[Package requirements ($2) were not met:
17391abf7346Smrg
17408b6d6341Smrg$$1_PKG_ERRORS
17411abf7346Smrg
17428b6d6341SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
17438b6d6341Smrginstalled software in a non-standard prefix.
17441abf7346Smrg
17458b6d6341Smrg_PKG_TEXT
17468b6d6341Smrg])],
17478b6d6341Smrg		[AC_MSG_RESULT([no])
17488b6d6341Smrg                $4])
17498b6d6341Smrgelif test $pkg_failed = untried; then
17508b6d6341Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
17518b6d6341Smrg[The pkg-config script could not be found or is too old.  Make sure it
17528b6d6341Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
17538b6d6341Smrgpath to pkg-config.
17541abf7346Smrg
17558b6d6341Smrg_PKG_TEXT
17561abf7346Smrg
17578b6d6341SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
17588b6d6341Smrg		[$4])
17598b6d6341Smrgelse
17608b6d6341Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
17618b6d6341Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
17628b6d6341Smrg        AC_MSG_RESULT([yes])
17638b6d6341Smrg	ifelse([$3], , :, [$3])
17648b6d6341Smrgfi[]dnl
17658b6d6341Smrg])# PKG_CHECK_MODULES
17661abf7346Smrg
1767