aclocal.m4 revision 2c7c4e3d
12c7c4e3dSmrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
22c7c4e3dSmrg
32c7c4e3dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
42c7c4e3dSmrg# Free Software Foundation, Inc.
52c7c4e3dSmrg# This file is free software; the Free Software Foundation
62c7c4e3dSmrg# gives unlimited permission to copy and/or distribute it,
72c7c4e3dSmrg# with or without modifications, as long as this notice is preserved.
82c7c4e3dSmrg
92c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
102c7c4e3dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
112c7c4e3dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
122c7c4e3dSmrg# PARTICULAR PURPOSE.
132c7c4e3dSmrg
142c7c4e3dSmrg# Do all the work for Automake.                            -*- Autoconf -*-
152c7c4e3dSmrg
162c7c4e3dSmrg# This macro actually does too much some checks are only needed if
172c7c4e3dSmrg# your package does certain things.  But this isn't really a big deal.
182c7c4e3dSmrg
192c7c4e3dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
202c7c4e3dSmrg# Free Software Foundation, Inc.
212c7c4e3dSmrg
222c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
232c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
242c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
252c7c4e3dSmrg# any later version.
262c7c4e3dSmrg
272c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
282c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
292c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
302c7c4e3dSmrg# GNU General Public License for more details.
312c7c4e3dSmrg
322c7c4e3dSmrg# You should have received a copy of the GNU General Public License
332c7c4e3dSmrg# along with this program; if not, write to the Free Software
342c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
352c7c4e3dSmrg# 02111-1307, USA.
362c7c4e3dSmrg
372c7c4e3dSmrg# serial 10
382c7c4e3dSmrg
392c7c4e3dSmrgAC_PREREQ([2.54])
402c7c4e3dSmrg
412c7c4e3dSmrg# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
422c7c4e3dSmrg# the ones we care about.
432c7c4e3dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
442c7c4e3dSmrg
452c7c4e3dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
462c7c4e3dSmrg# AM_INIT_AUTOMAKE([OPTIONS])
472c7c4e3dSmrg# -----------------------------------------------
482c7c4e3dSmrg# The call with PACKAGE and VERSION arguments is the old style
492c7c4e3dSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
502c7c4e3dSmrg# and VERSION should now be passed to AC_INIT and removed from
512c7c4e3dSmrg# the call to AM_INIT_AUTOMAKE.
522c7c4e3dSmrg# We support both call styles for the transition.  After
532c7c4e3dSmrg# the next Automake release, Autoconf can make the AC_INIT
542c7c4e3dSmrg# arguments mandatory, and then we can depend on a new Autoconf
552c7c4e3dSmrg# release and drop the old call support.
562c7c4e3dSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
572c7c4e3dSmrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
582c7c4e3dSmrg AC_REQUIRE([AC_PROG_INSTALL])dnl
592c7c4e3dSmrg# test to see if srcdir already configured
602c7c4e3dSmrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
612c7c4e3dSmrg   test -f $srcdir/config.status; then
622c7c4e3dSmrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
632c7c4e3dSmrgfi
642c7c4e3dSmrg
652c7c4e3dSmrg# test whether we have cygpath
662c7c4e3dSmrgif test -z "$CYGPATH_W"; then
672c7c4e3dSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
682c7c4e3dSmrg    CYGPATH_W='cygpath -w'
692c7c4e3dSmrg  else
702c7c4e3dSmrg    CYGPATH_W=echo
712c7c4e3dSmrg  fi
722c7c4e3dSmrgfi
732c7c4e3dSmrgAC_SUBST([CYGPATH_W])
742c7c4e3dSmrg
752c7c4e3dSmrg# Define the identity of the package.
762c7c4e3dSmrgdnl Distinguish between old-style and new-style calls.
772c7c4e3dSmrgm4_ifval([$2],
782c7c4e3dSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
792c7c4e3dSmrg AC_SUBST([PACKAGE], [$1])dnl
802c7c4e3dSmrg AC_SUBST([VERSION], [$2])],
812c7c4e3dSmrg[_AM_SET_OPTIONS([$1])dnl
822c7c4e3dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
832c7c4e3dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
842c7c4e3dSmrg
852c7c4e3dSmrg_AM_IF_OPTION([no-define],,
862c7c4e3dSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
872c7c4e3dSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
882c7c4e3dSmrg
892c7c4e3dSmrg# Some tools Automake needs.
902c7c4e3dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
912c7c4e3dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
922c7c4e3dSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
932c7c4e3dSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
942c7c4e3dSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
952c7c4e3dSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
962c7c4e3dSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
972c7c4e3dSmrgAM_MISSING_PROG(AMTAR, tar)
982c7c4e3dSmrgAM_PROG_INSTALL_SH
992c7c4e3dSmrgAM_PROG_INSTALL_STRIP
1002c7c4e3dSmrg# We need awk for the "check" target.  The system "awk" is bad on
1012c7c4e3dSmrg# some platforms.
1022c7c4e3dSmrgAC_REQUIRE([AC_PROG_AWK])dnl
1032c7c4e3dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
1042c7c4e3dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
1052c7c4e3dSmrg
1062c7c4e3dSmrg_AM_IF_OPTION([no-dependencies],,
1072c7c4e3dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
1082c7c4e3dSmrg                  [_AM_DEPENDENCIES(CC)],
1092c7c4e3dSmrg                  [define([AC_PROG_CC],
1102c7c4e3dSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1112c7c4e3dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
1122c7c4e3dSmrg                  [_AM_DEPENDENCIES(CXX)],
1132c7c4e3dSmrg                  [define([AC_PROG_CXX],
1142c7c4e3dSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1152c7c4e3dSmrg])
1162c7c4e3dSmrg])
1172c7c4e3dSmrg
1182c7c4e3dSmrg
1192c7c4e3dSmrg# When config.status generates a header, we must update the stamp-h file.
1202c7c4e3dSmrg# This file resides in the same directory as the config header
1212c7c4e3dSmrg# that is generated.  The stamp files are numbered to have different names.
1222c7c4e3dSmrg
1232c7c4e3dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1242c7c4e3dSmrg# loop where config.status creates the headers, so we can generate
1252c7c4e3dSmrg# our stamp files there.
1262c7c4e3dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1272c7c4e3dSmrg[# Compute $1's index in $config_headers.
1282c7c4e3dSmrg_am_stamp_count=1
1292c7c4e3dSmrgfor _am_header in $config_headers :; do
1302c7c4e3dSmrg  case $_am_header in
1312c7c4e3dSmrg    $1 | $1:* )
1322c7c4e3dSmrg      break ;;
1332c7c4e3dSmrg    * )
1342c7c4e3dSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1352c7c4e3dSmrg  esac
1362c7c4e3dSmrgdone
1372c7c4e3dSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1382c7c4e3dSmrg
1392c7c4e3dSmrg# Copyright 2002  Free Software Foundation, Inc.
1402c7c4e3dSmrg
1412c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
1422c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
1432c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
1442c7c4e3dSmrg# any later version.
1452c7c4e3dSmrg
1462c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
1472c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1482c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1492c7c4e3dSmrg# GNU General Public License for more details.
1502c7c4e3dSmrg
1512c7c4e3dSmrg# You should have received a copy of the GNU General Public License
1522c7c4e3dSmrg# along with this program; if not, write to the Free Software
1532c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1542c7c4e3dSmrg
1552c7c4e3dSmrg# AM_AUTOMAKE_VERSION(VERSION)
1562c7c4e3dSmrg# ----------------------------
1572c7c4e3dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
1582c7c4e3dSmrg# generated from the m4 files accompanying Automake X.Y.
1592c7c4e3dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1602c7c4e3dSmrg
1612c7c4e3dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
1622c7c4e3dSmrg# -------------------------------
1632c7c4e3dSmrg# Call AM_AUTOMAKE_VERSION so it can be traced.
1642c7c4e3dSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1652c7c4e3dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1662c7c4e3dSmrg	 [AM_AUTOMAKE_VERSION([1.7.9])])
1672c7c4e3dSmrg
1682c7c4e3dSmrg# Helper functions for option handling.                    -*- Autoconf -*-
1692c7c4e3dSmrg
1702c7c4e3dSmrg# Copyright 2001, 2002  Free Software Foundation, Inc.
1712c7c4e3dSmrg
1722c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
1732c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
1742c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
1752c7c4e3dSmrg# any later version.
1762c7c4e3dSmrg
1772c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
1782c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1792c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1802c7c4e3dSmrg# GNU General Public License for more details.
1812c7c4e3dSmrg
1822c7c4e3dSmrg# You should have received a copy of the GNU General Public License
1832c7c4e3dSmrg# along with this program; if not, write to the Free Software
1842c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1852c7c4e3dSmrg# 02111-1307, USA.
1862c7c4e3dSmrg
1872c7c4e3dSmrg# serial 2
1882c7c4e3dSmrg
1892c7c4e3dSmrg# _AM_MANGLE_OPTION(NAME)
1902c7c4e3dSmrg# -----------------------
1912c7c4e3dSmrgAC_DEFUN([_AM_MANGLE_OPTION],
1922c7c4e3dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1932c7c4e3dSmrg
1942c7c4e3dSmrg# _AM_SET_OPTION(NAME)
1952c7c4e3dSmrg# ------------------------------
1962c7c4e3dSmrg# Set option NAME.  Presently that only means defining a flag for this option.
1972c7c4e3dSmrgAC_DEFUN([_AM_SET_OPTION],
1982c7c4e3dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1992c7c4e3dSmrg
2002c7c4e3dSmrg# _AM_SET_OPTIONS(OPTIONS)
2012c7c4e3dSmrg# ----------------------------------
2022c7c4e3dSmrg# OPTIONS is a space-separated list of Automake options.
2032c7c4e3dSmrgAC_DEFUN([_AM_SET_OPTIONS],
2042c7c4e3dSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2052c7c4e3dSmrg
2062c7c4e3dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2072c7c4e3dSmrg# -------------------------------------------
2082c7c4e3dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2092c7c4e3dSmrgAC_DEFUN([_AM_IF_OPTION],
2102c7c4e3dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2112c7c4e3dSmrg
2122c7c4e3dSmrg#
2132c7c4e3dSmrg# Check to make sure that the build environment is sane.
2142c7c4e3dSmrg#
2152c7c4e3dSmrg
2162c7c4e3dSmrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2172c7c4e3dSmrg
2182c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
2192c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
2202c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
2212c7c4e3dSmrg# any later version.
2222c7c4e3dSmrg
2232c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
2242c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2252c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2262c7c4e3dSmrg# GNU General Public License for more details.
2272c7c4e3dSmrg
2282c7c4e3dSmrg# You should have received a copy of the GNU General Public License
2292c7c4e3dSmrg# along with this program; if not, write to the Free Software
2302c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2312c7c4e3dSmrg# 02111-1307, USA.
2322c7c4e3dSmrg
2332c7c4e3dSmrg# serial 3
2342c7c4e3dSmrg
2352c7c4e3dSmrg# AM_SANITY_CHECK
2362c7c4e3dSmrg# ---------------
2372c7c4e3dSmrgAC_DEFUN([AM_SANITY_CHECK],
2382c7c4e3dSmrg[AC_MSG_CHECKING([whether build environment is sane])
2392c7c4e3dSmrg# Just in case
2402c7c4e3dSmrgsleep 1
2412c7c4e3dSmrgecho timestamp > conftest.file
2422c7c4e3dSmrg# Do `set' in a subshell so we don't clobber the current shell's
2432c7c4e3dSmrg# arguments.  Must try -L first in case configure is actually a
2442c7c4e3dSmrg# symlink; some systems play weird games with the mod time of symlinks
2452c7c4e3dSmrg# (eg FreeBSD returns the mod time of the symlink's containing
2462c7c4e3dSmrg# directory).
2472c7c4e3dSmrgif (
2482c7c4e3dSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2492c7c4e3dSmrg   if test "$[*]" = "X"; then
2502c7c4e3dSmrg      # -L didn't work.
2512c7c4e3dSmrg      set X `ls -t $srcdir/configure conftest.file`
2522c7c4e3dSmrg   fi
2532c7c4e3dSmrg   rm -f conftest.file
2542c7c4e3dSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
2552c7c4e3dSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
2562c7c4e3dSmrg
2572c7c4e3dSmrg      # If neither matched, then we have a broken ls.  This can happen
2582c7c4e3dSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
2592c7c4e3dSmrg      # broken ls alias from the environment.  This has actually
2602c7c4e3dSmrg      # happened.  Such a system could not be considered "sane".
2612c7c4e3dSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2622c7c4e3dSmrgalias in your environment])
2632c7c4e3dSmrg   fi
2642c7c4e3dSmrg
2652c7c4e3dSmrg   test "$[2]" = conftest.file
2662c7c4e3dSmrg   )
2672c7c4e3dSmrgthen
2682c7c4e3dSmrg   # Ok.
2692c7c4e3dSmrg   :
2702c7c4e3dSmrgelse
2712c7c4e3dSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
2722c7c4e3dSmrgCheck your system clock])
2732c7c4e3dSmrgfi
2742c7c4e3dSmrgAC_MSG_RESULT(yes)])
2752c7c4e3dSmrg
2762c7c4e3dSmrg#  -*- Autoconf -*-
2772c7c4e3dSmrg
2782c7c4e3dSmrg
2792c7c4e3dSmrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2802c7c4e3dSmrg
2812c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
2822c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
2832c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
2842c7c4e3dSmrg# any later version.
2852c7c4e3dSmrg
2862c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
2872c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2882c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2892c7c4e3dSmrg# GNU General Public License for more details.
2902c7c4e3dSmrg
2912c7c4e3dSmrg# You should have received a copy of the GNU General Public License
2922c7c4e3dSmrg# along with this program; if not, write to the Free Software
2932c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2942c7c4e3dSmrg# 02111-1307, USA.
2952c7c4e3dSmrg
2962c7c4e3dSmrg# serial 3
2972c7c4e3dSmrg
2982c7c4e3dSmrg# AM_MISSING_PROG(NAME, PROGRAM)
2992c7c4e3dSmrg# ------------------------------
3002c7c4e3dSmrgAC_DEFUN([AM_MISSING_PROG],
3012c7c4e3dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
3022c7c4e3dSmrg$1=${$1-"${am_missing_run}$2"}
3032c7c4e3dSmrgAC_SUBST($1)])
3042c7c4e3dSmrg
3052c7c4e3dSmrg
3062c7c4e3dSmrg# AM_MISSING_HAS_RUN
3072c7c4e3dSmrg# ------------------
3082c7c4e3dSmrg# Define MISSING if not defined so far and test if it supports --run.
3092c7c4e3dSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
3102c7c4e3dSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
3112c7c4e3dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3122c7c4e3dSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3132c7c4e3dSmrg# Use eval to expand $SHELL
3142c7c4e3dSmrgif eval "$MISSING --run true"; then
3152c7c4e3dSmrg  am_missing_run="$MISSING --run "
3162c7c4e3dSmrgelse
3172c7c4e3dSmrg  am_missing_run=
3182c7c4e3dSmrg  AC_MSG_WARN([`missing' script is too old or missing])
3192c7c4e3dSmrgfi
3202c7c4e3dSmrg])
3212c7c4e3dSmrg
3222c7c4e3dSmrg# AM_AUX_DIR_EXPAND
3232c7c4e3dSmrg
3242c7c4e3dSmrg# Copyright 2001 Free Software Foundation, Inc.
3252c7c4e3dSmrg
3262c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
3272c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
3282c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
3292c7c4e3dSmrg# any later version.
3302c7c4e3dSmrg
3312c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
3322c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
3332c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3342c7c4e3dSmrg# GNU General Public License for more details.
3352c7c4e3dSmrg
3362c7c4e3dSmrg# You should have received a copy of the GNU General Public License
3372c7c4e3dSmrg# along with this program; if not, write to the Free Software
3382c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3392c7c4e3dSmrg# 02111-1307, USA.
3402c7c4e3dSmrg
3412c7c4e3dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3422c7c4e3dSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
3432c7c4e3dSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
3442c7c4e3dSmrg#
3452c7c4e3dSmrg# Of course, Automake must honor this variable whenever it calls a
3462c7c4e3dSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
3472c7c4e3dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
3482c7c4e3dSmrg# depending on how configure is run.  This is pretty annoying, since
3492c7c4e3dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
3502c7c4e3dSmrg# source directory, any form will work fine, but in subdirectories a
3512c7c4e3dSmrg# relative path needs to be adjusted first.
3522c7c4e3dSmrg#
3532c7c4e3dSmrg# $ac_aux_dir/missing
3542c7c4e3dSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
3552c7c4e3dSmrg# $top_srcdir/$ac_aux_dir/missing
3562c7c4e3dSmrg#    fails if $ac_aux_dir is absolute,
3572c7c4e3dSmrg#    fails when called from a subdirectory in a VPATH build with
3582c7c4e3dSmrg#          a relative $ac_aux_dir
3592c7c4e3dSmrg#
3602c7c4e3dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3612c7c4e3dSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
3622c7c4e3dSmrg# harmless because $srcdir is `.', but things will broke when you
3632c7c4e3dSmrg# start a VPATH build or use an absolute $srcdir.
3642c7c4e3dSmrg#
3652c7c4e3dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3662c7c4e3dSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
3672c7c4e3dSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3682c7c4e3dSmrg# and then we would define $MISSING as
3692c7c4e3dSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
3702c7c4e3dSmrg# This will work as long as MISSING is not called from configure, because
3712c7c4e3dSmrg# unfortunately $(top_srcdir) has no meaning in configure.
3722c7c4e3dSmrg# However there are other variables, like CC, which are often used in
3732c7c4e3dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
3742c7c4e3dSmrg#
3752c7c4e3dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
3762c7c4e3dSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
3772c7c4e3dSmrg# configured tree to be moved without reconfiguration.
3782c7c4e3dSmrg
3792c7c4e3dSmrg# Rely on autoconf to set up CDPATH properly.
3802c7c4e3dSmrgAC_PREREQ([2.50])
3812c7c4e3dSmrg
3822c7c4e3dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [
3832c7c4e3dSmrg# expand $ac_aux_dir to an absolute path
3842c7c4e3dSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
3852c7c4e3dSmrg])
3862c7c4e3dSmrg
3872c7c4e3dSmrg# AM_PROG_INSTALL_SH
3882c7c4e3dSmrg# ------------------
3892c7c4e3dSmrg# Define $install_sh.
3902c7c4e3dSmrg
3912c7c4e3dSmrg# Copyright 2001 Free Software Foundation, Inc.
3922c7c4e3dSmrg
3932c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
3942c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
3952c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
3962c7c4e3dSmrg# any later version.
3972c7c4e3dSmrg
3982c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
3992c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4002c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4012c7c4e3dSmrg# GNU General Public License for more details.
4022c7c4e3dSmrg
4032c7c4e3dSmrg# You should have received a copy of the GNU General Public License
4042c7c4e3dSmrg# along with this program; if not, write to the Free Software
4052c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4062c7c4e3dSmrg# 02111-1307, USA.
4072c7c4e3dSmrg
4082c7c4e3dSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
4092c7c4e3dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4102c7c4e3dSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
4112c7c4e3dSmrgAC_SUBST(install_sh)])
4122c7c4e3dSmrg
4132c7c4e3dSmrg# AM_PROG_INSTALL_STRIP
4142c7c4e3dSmrg
4152c7c4e3dSmrg# Copyright 2001 Free Software Foundation, Inc.
4162c7c4e3dSmrg
4172c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
4182c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
4192c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
4202c7c4e3dSmrg# any later version.
4212c7c4e3dSmrg
4222c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
4232c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4242c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4252c7c4e3dSmrg# GNU General Public License for more details.
4262c7c4e3dSmrg
4272c7c4e3dSmrg# You should have received a copy of the GNU General Public License
4282c7c4e3dSmrg# along with this program; if not, write to the Free Software
4292c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4302c7c4e3dSmrg# 02111-1307, USA.
4312c7c4e3dSmrg
4322c7c4e3dSmrg# One issue with vendor `install' (even GNU) is that you can't
4332c7c4e3dSmrg# specify the program used to strip binaries.  This is especially
4342c7c4e3dSmrg# annoying in cross-compiling environments, where the build's strip
4352c7c4e3dSmrg# is unlikely to handle the host's binaries.
4362c7c4e3dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
4372c7c4e3dSmrg# always use install-sh in `make install-strip', and initialize
4382c7c4e3dSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
4392c7c4e3dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
4402c7c4e3dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4412c7c4e3dSmrg# Installed binaries are usually stripped using `strip' when the user
4422c7c4e3dSmrg# run `make install-strip'.  However `strip' might not be the right
4432c7c4e3dSmrg# tool to use in cross-compilation environments, therefore Automake
4442c7c4e3dSmrg# will honor the `STRIP' environment variable to overrule this program.
4452c7c4e3dSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4462c7c4e3dSmrgif test "$cross_compiling" != no; then
4472c7c4e3dSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
4482c7c4e3dSmrgfi
4492c7c4e3dSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
4502c7c4e3dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
4512c7c4e3dSmrg
4522c7c4e3dSmrg#                                                          -*- Autoconf -*-
4532c7c4e3dSmrg# Copyright (C) 2003  Free Software Foundation, Inc.
4542c7c4e3dSmrg
4552c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
4562c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
4572c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
4582c7c4e3dSmrg# any later version.
4592c7c4e3dSmrg
4602c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
4612c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4622c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4632c7c4e3dSmrg# GNU General Public License for more details.
4642c7c4e3dSmrg
4652c7c4e3dSmrg# You should have received a copy of the GNU General Public License
4662c7c4e3dSmrg# along with this program; if not, write to the Free Software
4672c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4682c7c4e3dSmrg# 02111-1307, USA.
4692c7c4e3dSmrg
4702c7c4e3dSmrg# serial 1
4712c7c4e3dSmrg
4722c7c4e3dSmrg# Check whether the underlying file-system supports filenames
4732c7c4e3dSmrg# with a leading dot.  For instance MS-DOS doesn't.
4742c7c4e3dSmrgAC_DEFUN([AM_SET_LEADING_DOT],
4752c7c4e3dSmrg[rm -rf .tst 2>/dev/null
4762c7c4e3dSmrgmkdir .tst 2>/dev/null
4772c7c4e3dSmrgif test -d .tst; then
4782c7c4e3dSmrg  am__leading_dot=.
4792c7c4e3dSmrgelse
4802c7c4e3dSmrg  am__leading_dot=_
4812c7c4e3dSmrgfi
4822c7c4e3dSmrgrmdir .tst 2>/dev/null
4832c7c4e3dSmrgAC_SUBST([am__leading_dot])])
4842c7c4e3dSmrg
4852c7c4e3dSmrg# serial 5						-*- Autoconf -*-
4862c7c4e3dSmrg
4872c7c4e3dSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
4882c7c4e3dSmrg
4892c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
4902c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
4912c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
4922c7c4e3dSmrg# any later version.
4932c7c4e3dSmrg
4942c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
4952c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4962c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4972c7c4e3dSmrg# GNU General Public License for more details.
4982c7c4e3dSmrg
4992c7c4e3dSmrg# You should have received a copy of the GNU General Public License
5002c7c4e3dSmrg# along with this program; if not, write to the Free Software
5012c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
5022c7c4e3dSmrg# 02111-1307, USA.
5032c7c4e3dSmrg
5042c7c4e3dSmrg
5052c7c4e3dSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
5062c7c4e3dSmrg# written in clear, in which case automake, when reading aclocal.m4,
5072c7c4e3dSmrg# will think it sees a *use*, and therefore will trigger all it's
5082c7c4e3dSmrg# C support machinery.  Also note that it means that autoscan, seeing
5092c7c4e3dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
5102c7c4e3dSmrg
5112c7c4e3dSmrg
5122c7c4e3dSmrg
5132c7c4e3dSmrg# _AM_DEPENDENCIES(NAME)
5142c7c4e3dSmrg# ----------------------
5152c7c4e3dSmrg# See how the compiler implements dependency checking.
5162c7c4e3dSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
5172c7c4e3dSmrg# We try a few techniques and use that to set a single cache variable.
5182c7c4e3dSmrg#
5192c7c4e3dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
5202c7c4e3dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
5212c7c4e3dSmrg# dependency, and given that the user is not expected to run this macro,
5222c7c4e3dSmrg# just rely on AC_PROG_CC.
5232c7c4e3dSmrgAC_DEFUN([_AM_DEPENDENCIES],
5242c7c4e3dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
5252c7c4e3dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
5262c7c4e3dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
5272c7c4e3dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
5282c7c4e3dSmrg
5292c7c4e3dSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
5302c7c4e3dSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
5312c7c4e3dSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
5322c7c4e3dSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
5332c7c4e3dSmrg                   [depcc="$$1"   am_compiler_list=])
5342c7c4e3dSmrg
5352c7c4e3dSmrgAC_CACHE_CHECK([dependency style of $depcc],
5362c7c4e3dSmrg               [am_cv_$1_dependencies_compiler_type],
5372c7c4e3dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5382c7c4e3dSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
5392c7c4e3dSmrg  # making bogus files that we don't know about and never remove.  For
5402c7c4e3dSmrg  # instance it was reported that on HP-UX the gcc test will end up
5412c7c4e3dSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
5422c7c4e3dSmrg  # in D'.
5432c7c4e3dSmrg  mkdir conftest.dir
5442c7c4e3dSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
5452c7c4e3dSmrg  # using a relative directory.
5462c7c4e3dSmrg  cp "$am_depcomp" conftest.dir
5472c7c4e3dSmrg  cd conftest.dir
5482c7c4e3dSmrg  # We will build objects and dependencies in a subdirectory because
5492c7c4e3dSmrg  # it helps to detect inapplicable dependency modes.  For instance
5502c7c4e3dSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
5512c7c4e3dSmrg  # side effect of compilation, but ICC will put the dependencies in
5522c7c4e3dSmrg  # the current directory while Tru64 will put them in the object
5532c7c4e3dSmrg  # directory.
5542c7c4e3dSmrg  mkdir sub
5552c7c4e3dSmrg
5562c7c4e3dSmrg  am_cv_$1_dependencies_compiler_type=none
5572c7c4e3dSmrg  if test "$am_compiler_list" = ""; then
5582c7c4e3dSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
5592c7c4e3dSmrg  fi
5602c7c4e3dSmrg  for depmode in $am_compiler_list; do
5612c7c4e3dSmrg    # Setup a source with many dependencies, because some compilers
5622c7c4e3dSmrg    # like to wrap large dependency lists on column 80 (with \), and
5632c7c4e3dSmrg    # we should not choose a depcomp mode which is confused by this.
5642c7c4e3dSmrg    #
5652c7c4e3dSmrg    # We need to recreate these files for each test, as the compiler may
5662c7c4e3dSmrg    # overwrite some of them when testing with obscure command lines.
5672c7c4e3dSmrg    # This happens at least with the AIX C compiler.
5682c7c4e3dSmrg    : > sub/conftest.c
5692c7c4e3dSmrg    for i in 1 2 3 4 5 6; do
5702c7c4e3dSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5712c7c4e3dSmrg      : > sub/conftst$i.h
5722c7c4e3dSmrg    done
5732c7c4e3dSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5742c7c4e3dSmrg
5752c7c4e3dSmrg    case $depmode in
5762c7c4e3dSmrg    nosideeffect)
5772c7c4e3dSmrg      # after this tag, mechanisms are not by side-effect, so they'll
5782c7c4e3dSmrg      # only be used when explicitly requested
5792c7c4e3dSmrg      if test "x$enable_dependency_tracking" = xyes; then
5802c7c4e3dSmrg	continue
5812c7c4e3dSmrg      else
5822c7c4e3dSmrg	break
5832c7c4e3dSmrg      fi
5842c7c4e3dSmrg      ;;
5852c7c4e3dSmrg    none) break ;;
5862c7c4e3dSmrg    esac
5872c7c4e3dSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
5882c7c4e3dSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
5892c7c4e3dSmrg    # handle `-M -o', and we need to detect this.
5902c7c4e3dSmrg    if depmode=$depmode \
5912c7c4e3dSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5922c7c4e3dSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5932c7c4e3dSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5942c7c4e3dSmrg         >/dev/null 2>conftest.err &&
5952c7c4e3dSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5962c7c4e3dSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5972c7c4e3dSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5982c7c4e3dSmrg      # icc doesn't choke on unknown options, it will just issue warnings
5992c7c4e3dSmrg      # (even with -Werror).  So we grep stderr for any message
6002c7c4e3dSmrg      # that says an option was ignored.
6012c7c4e3dSmrg      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
6022c7c4e3dSmrg        am_cv_$1_dependencies_compiler_type=$depmode
6032c7c4e3dSmrg        break
6042c7c4e3dSmrg      fi
6052c7c4e3dSmrg    fi
6062c7c4e3dSmrg  done
6072c7c4e3dSmrg
6082c7c4e3dSmrg  cd ..
6092c7c4e3dSmrg  rm -rf conftest.dir
6102c7c4e3dSmrgelse
6112c7c4e3dSmrg  am_cv_$1_dependencies_compiler_type=none
6122c7c4e3dSmrgfi
6132c7c4e3dSmrg])
6142c7c4e3dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6152c7c4e3dSmrgAM_CONDITIONAL([am__fastdep$1], [
6162c7c4e3dSmrg  test "x$enable_dependency_tracking" != xno \
6172c7c4e3dSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6182c7c4e3dSmrg])
6192c7c4e3dSmrg
6202c7c4e3dSmrg
6212c7c4e3dSmrg# AM_SET_DEPDIR
6222c7c4e3dSmrg# -------------
6232c7c4e3dSmrg# Choose a directory name for dependency files.
6242c7c4e3dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6252c7c4e3dSmrgAC_DEFUN([AM_SET_DEPDIR],
6262c7c4e3dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6272c7c4e3dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6282c7c4e3dSmrg])
6292c7c4e3dSmrg
6302c7c4e3dSmrg
6312c7c4e3dSmrg# AM_DEP_TRACK
6322c7c4e3dSmrg# ------------
6332c7c4e3dSmrgAC_DEFUN([AM_DEP_TRACK],
6342c7c4e3dSmrg[AC_ARG_ENABLE(dependency-tracking,
6352c7c4e3dSmrg[  --disable-dependency-tracking Speeds up one-time builds
6362c7c4e3dSmrg  --enable-dependency-tracking  Do not reject slow dependency extractors])
6372c7c4e3dSmrgif test "x$enable_dependency_tracking" != xno; then
6382c7c4e3dSmrg  am_depcomp="$ac_aux_dir/depcomp"
6392c7c4e3dSmrg  AMDEPBACKSLASH='\'
6402c7c4e3dSmrgfi
6412c7c4e3dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6422c7c4e3dSmrgAC_SUBST([AMDEPBACKSLASH])
6432c7c4e3dSmrg])
6442c7c4e3dSmrg
6452c7c4e3dSmrg# Generate code to set up dependency tracking.   -*- Autoconf -*-
6462c7c4e3dSmrg
6472c7c4e3dSmrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6482c7c4e3dSmrg
6492c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
6502c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
6512c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
6522c7c4e3dSmrg# any later version.
6532c7c4e3dSmrg
6542c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
6552c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
6562c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6572c7c4e3dSmrg# GNU General Public License for more details.
6582c7c4e3dSmrg
6592c7c4e3dSmrg# You should have received a copy of the GNU General Public License
6602c7c4e3dSmrg# along with this program; if not, write to the Free Software
6612c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6622c7c4e3dSmrg# 02111-1307, USA.
6632c7c4e3dSmrg
6642c7c4e3dSmrg#serial 2
6652c7c4e3dSmrg
6662c7c4e3dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
6672c7c4e3dSmrg# ------------------------------
6682c7c4e3dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6692c7c4e3dSmrg[for mf in $CONFIG_FILES; do
6702c7c4e3dSmrg  # Strip MF so we end up with the name of the file.
6712c7c4e3dSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
6722c7c4e3dSmrg  # Check whether this is an Automake generated Makefile or not.
6732c7c4e3dSmrg  # We used to match only the files named `Makefile.in', but
6742c7c4e3dSmrg  # some people rename them; so instead we look at the file content.
6752c7c4e3dSmrg  # Grep'ing the first line is not enough: some people post-process
6762c7c4e3dSmrg  # each Makefile.in and add a new line on top of each file to say so.
6772c7c4e3dSmrg  # So let's grep whole file.
6782c7c4e3dSmrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6792c7c4e3dSmrg    dirpart=`AS_DIRNAME("$mf")`
6802c7c4e3dSmrg  else
6812c7c4e3dSmrg    continue
6822c7c4e3dSmrg  fi
6832c7c4e3dSmrg  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
6842c7c4e3dSmrg  # Extract the definition of DEP_FILES from the Makefile without
6852c7c4e3dSmrg  # running `make'.
6862c7c4e3dSmrg  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
6872c7c4e3dSmrg  test -z "$DEPDIR" && continue
6882c7c4e3dSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
6892c7c4e3dSmrg  U=`sed -n -e '/^U = / s///p' < "$mf"`
6902c7c4e3dSmrg  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6912c7c4e3dSmrg  # We invoke sed twice because it is the simplest approach to
6922c7c4e3dSmrg  # changing $(DEPDIR) to its actual value in the expansion.
6932c7c4e3dSmrg  for file in `sed -n -e '
6942c7c4e3dSmrg    /^DEP_FILES = .*\\\\$/ {
6952c7c4e3dSmrg      s/^DEP_FILES = //
6962c7c4e3dSmrg      :loop
6972c7c4e3dSmrg	s/\\\\$//
6982c7c4e3dSmrg	p
6992c7c4e3dSmrg	n
7002c7c4e3dSmrg	/\\\\$/ b loop
7012c7c4e3dSmrg      p
7022c7c4e3dSmrg    }
7032c7c4e3dSmrg    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7042c7c4e3dSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7052c7c4e3dSmrg    # Make sure the directory exists.
7062c7c4e3dSmrg    test -f "$dirpart/$file" && continue
7072c7c4e3dSmrg    fdir=`AS_DIRNAME(["$file"])`
7082c7c4e3dSmrg    AS_MKDIR_P([$dirpart/$fdir])
7092c7c4e3dSmrg    # echo "creating $dirpart/$file"
7102c7c4e3dSmrg    echo '# dummy' > "$dirpart/$file"
7112c7c4e3dSmrg  done
7122c7c4e3dSmrgdone
7132c7c4e3dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7142c7c4e3dSmrg
7152c7c4e3dSmrg
7162c7c4e3dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
7172c7c4e3dSmrg# -----------------------------
7182c7c4e3dSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
7192c7c4e3dSmrg#
7202c7c4e3dSmrg# This code is only required when automatic dependency tracking
7212c7c4e3dSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
7222c7c4e3dSmrg# need in order to bootstrap the dependency handling code.
7232c7c4e3dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7242c7c4e3dSmrg[AC_CONFIG_COMMANDS([depfiles],
7252c7c4e3dSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7262c7c4e3dSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7272c7c4e3dSmrg])
7282c7c4e3dSmrg
7292c7c4e3dSmrg# Check to see how 'make' treats includes.	-*- Autoconf -*-
7302c7c4e3dSmrg
7312c7c4e3dSmrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7322c7c4e3dSmrg
7332c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
7342c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
7352c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
7362c7c4e3dSmrg# any later version.
7372c7c4e3dSmrg
7382c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
7392c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
7402c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7412c7c4e3dSmrg# GNU General Public License for more details.
7422c7c4e3dSmrg
7432c7c4e3dSmrg# You should have received a copy of the GNU General Public License
7442c7c4e3dSmrg# along with this program; if not, write to the Free Software
7452c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7462c7c4e3dSmrg# 02111-1307, USA.
7472c7c4e3dSmrg
7482c7c4e3dSmrg# serial 2
7492c7c4e3dSmrg
7502c7c4e3dSmrg# AM_MAKE_INCLUDE()
7512c7c4e3dSmrg# -----------------
7522c7c4e3dSmrg# Check to see how make treats includes.
7532c7c4e3dSmrgAC_DEFUN([AM_MAKE_INCLUDE],
7542c7c4e3dSmrg[am_make=${MAKE-make}
7552c7c4e3dSmrgcat > confinc << 'END'
7562c7c4e3dSmrgam__doit:
7572c7c4e3dSmrg	@echo done
7582c7c4e3dSmrg.PHONY: am__doit
7592c7c4e3dSmrgEND
7602c7c4e3dSmrg# If we don't find an include directive, just comment out the code.
7612c7c4e3dSmrgAC_MSG_CHECKING([for style of include used by $am_make])
7622c7c4e3dSmrgam__include="#"
7632c7c4e3dSmrgam__quote=
7642c7c4e3dSmrg_am_result=none
7652c7c4e3dSmrg# First try GNU make style include.
7662c7c4e3dSmrgecho "include confinc" > confmf
7672c7c4e3dSmrg# We grep out `Entering directory' and `Leaving directory'
7682c7c4e3dSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
7692c7c4e3dSmrg# In particular we don't look at `^make:' because GNU make might
7702c7c4e3dSmrg# be invoked under some other name (usually "gmake"), in which
7712c7c4e3dSmrg# case it prints its new name instead of `make'.
7722c7c4e3dSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7732c7c4e3dSmrg   am__include=include
7742c7c4e3dSmrg   am__quote=
7752c7c4e3dSmrg   _am_result=GNU
7762c7c4e3dSmrgfi
7772c7c4e3dSmrg# Now try BSD make style include.
7782c7c4e3dSmrgif test "$am__include" = "#"; then
7792c7c4e3dSmrg   echo '.include "confinc"' > confmf
7802c7c4e3dSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7812c7c4e3dSmrg      am__include=.include
7822c7c4e3dSmrg      am__quote="\""
7832c7c4e3dSmrg      _am_result=BSD
7842c7c4e3dSmrg   fi
7852c7c4e3dSmrgfi
7862c7c4e3dSmrgAC_SUBST([am__include])
7872c7c4e3dSmrgAC_SUBST([am__quote])
7882c7c4e3dSmrgAC_MSG_RESULT([$_am_result])
7892c7c4e3dSmrgrm -f confinc confmf
7902c7c4e3dSmrg])
7912c7c4e3dSmrg
7922c7c4e3dSmrg# AM_CONDITIONAL                                              -*- Autoconf -*-
7932c7c4e3dSmrg
7942c7c4e3dSmrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
7952c7c4e3dSmrg
7962c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
7972c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
7982c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
7992c7c4e3dSmrg# any later version.
8002c7c4e3dSmrg
8012c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
8022c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8032c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8042c7c4e3dSmrg# GNU General Public License for more details.
8052c7c4e3dSmrg
8062c7c4e3dSmrg# You should have received a copy of the GNU General Public License
8072c7c4e3dSmrg# along with this program; if not, write to the Free Software
8082c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8092c7c4e3dSmrg# 02111-1307, USA.
8102c7c4e3dSmrg
8112c7c4e3dSmrg# serial 5
8122c7c4e3dSmrg
8132c7c4e3dSmrgAC_PREREQ(2.52)
8142c7c4e3dSmrg
8152c7c4e3dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8162c7c4e3dSmrg# -------------------------------------
8172c7c4e3dSmrg# Define a conditional.
8182c7c4e3dSmrgAC_DEFUN([AM_CONDITIONAL],
8192c7c4e3dSmrg[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8202c7c4e3dSmrg        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8212c7c4e3dSmrgAC_SUBST([$1_TRUE])
8222c7c4e3dSmrgAC_SUBST([$1_FALSE])
8232c7c4e3dSmrgif $2; then
8242c7c4e3dSmrg  $1_TRUE=
8252c7c4e3dSmrg  $1_FALSE='#'
8262c7c4e3dSmrgelse
8272c7c4e3dSmrg  $1_TRUE='#'
8282c7c4e3dSmrg  $1_FALSE=
8292c7c4e3dSmrgfi
8302c7c4e3dSmrgAC_CONFIG_COMMANDS_PRE(
8312c7c4e3dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8322c7c4e3dSmrg  AC_MSG_ERROR([conditional "$1" was never defined.
8332c7c4e3dSmrgUsually this means the macro was only invoked conditionally.])
8342c7c4e3dSmrgfi])])
8352c7c4e3dSmrg
8362c7c4e3dSmrg# Add --enable-maintainer-mode option to configure.
8372c7c4e3dSmrg# From Jim Meyering
8382c7c4e3dSmrg
8392c7c4e3dSmrg# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
8402c7c4e3dSmrg
8412c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
8422c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
8432c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
8442c7c4e3dSmrg# any later version.
8452c7c4e3dSmrg
8462c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
8472c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8482c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8492c7c4e3dSmrg# GNU General Public License for more details.
8502c7c4e3dSmrg
8512c7c4e3dSmrg# You should have received a copy of the GNU General Public License
8522c7c4e3dSmrg# along with this program; if not, write to the Free Software
8532c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8542c7c4e3dSmrg# 02111-1307, USA.
8552c7c4e3dSmrg
8562c7c4e3dSmrg# serial 2
8572c7c4e3dSmrg
8582c7c4e3dSmrgAC_DEFUN([AM_MAINTAINER_MODE],
8592c7c4e3dSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
8602c7c4e3dSmrg  dnl maintainer-mode is disabled by default
8612c7c4e3dSmrg  AC_ARG_ENABLE(maintainer-mode,
8622c7c4e3dSmrg[  --enable-maintainer-mode enable make rules and dependencies not useful
8632c7c4e3dSmrg                          (and sometimes confusing) to the casual installer],
8642c7c4e3dSmrg      USE_MAINTAINER_MODE=$enableval,
8652c7c4e3dSmrg      USE_MAINTAINER_MODE=no)
8662c7c4e3dSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8672c7c4e3dSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
8682c7c4e3dSmrg  MAINT=$MAINTAINER_MODE_TRUE
8692c7c4e3dSmrg  AC_SUBST(MAINT)dnl
8702c7c4e3dSmrg]
8712c7c4e3dSmrg)
8722c7c4e3dSmrg
8732c7c4e3dSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8742c7c4e3dSmrg
8752c7c4e3dSmrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
8762c7c4e3dSmrg
8772c7c4e3dSmrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
8782c7c4e3dSmrg
8792c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
8802c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
8812c7c4e3dSmrg# the Free Software Foundation; either version 2, or (at your option)
8822c7c4e3dSmrg# any later version.
8832c7c4e3dSmrg
8842c7c4e3dSmrg# This program is distributed in the hope that it will be useful,
8852c7c4e3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8862c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8872c7c4e3dSmrg# GNU General Public License for more details.
8882c7c4e3dSmrg
8892c7c4e3dSmrg# You should have received a copy of the GNU General Public License
8902c7c4e3dSmrg# along with this program; if not, write to the Free Software
8912c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8922c7c4e3dSmrg# 02111-1307, USA.
8932c7c4e3dSmrg
8942c7c4e3dSmrgAC_PREREQ([2.52])
8952c7c4e3dSmrg
8962c7c4e3dSmrg# serial 6
8972c7c4e3dSmrg
8982c7c4e3dSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
8992c7c4e3dSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9002c7c4e3dSmrg
9012c7c4e3dSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9022c7c4e3dSmrg# 
9032c7c4e3dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9042c7c4e3dSmrg#
9052c7c4e3dSmrg# This program is free software; you can redistribute it and/or modify
9062c7c4e3dSmrg# it under the terms of the GNU General Public License as published by
9072c7c4e3dSmrg# the Free Software Foundation; either version 2 of the License, or
9082c7c4e3dSmrg# (at your option) any later version.
9092c7c4e3dSmrg#
9102c7c4e3dSmrg# This program is distributed in the hope that it will be useful, but
9112c7c4e3dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
9122c7c4e3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9132c7c4e3dSmrg# General Public License for more details.
9142c7c4e3dSmrg#
9152c7c4e3dSmrg# You should have received a copy of the GNU General Public License
9162c7c4e3dSmrg# along with this program; if not, write to the Free Software
9172c7c4e3dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9182c7c4e3dSmrg#
9192c7c4e3dSmrg# As a special exception to the GNU General Public License, if you
9202c7c4e3dSmrg# distribute this file as part of a program that contains a
9212c7c4e3dSmrg# configuration script generated by Autoconf, you may include it under
9222c7c4e3dSmrg# the same distribution terms that you use for the rest of that program.
9232c7c4e3dSmrg
9242c7c4e3dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9252c7c4e3dSmrg# ----------------------------------
9262c7c4e3dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
9272c7c4e3dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9282c7c4e3dSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9292c7c4e3dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9302c7c4e3dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9312c7c4e3dSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9322c7c4e3dSmrgfi
9332c7c4e3dSmrgif test -n "$PKG_CONFIG"; then
9342c7c4e3dSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
9352c7c4e3dSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9362c7c4e3dSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9372c7c4e3dSmrg		AC_MSG_RESULT([yes])
9382c7c4e3dSmrg	else
9392c7c4e3dSmrg		AC_MSG_RESULT([no])
9402c7c4e3dSmrg		PKG_CONFIG=""
9412c7c4e3dSmrg	fi
9422c7c4e3dSmrg		
9432c7c4e3dSmrgfi[]dnl
9442c7c4e3dSmrg])# PKG_PROG_PKG_CONFIG
9452c7c4e3dSmrg
9462c7c4e3dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9472c7c4e3dSmrg#
9482c7c4e3dSmrg# Check to see whether a particular set of modules exists.  Similar
9492c7c4e3dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9502c7c4e3dSmrg#
9512c7c4e3dSmrg#
9522c7c4e3dSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9532c7c4e3dSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
9542c7c4e3dSmrg# PKG_CHECK_EXISTS manually
9552c7c4e3dSmrg# --------------------------------------------------------------
9562c7c4e3dSmrgAC_DEFUN([PKG_CHECK_EXISTS],
9572c7c4e3dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9582c7c4e3dSmrgif test -n "$PKG_CONFIG" && \
9592c7c4e3dSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9602c7c4e3dSmrg  m4_ifval([$2], [$2], [:])
9612c7c4e3dSmrgm4_ifvaln([$3], [else
9622c7c4e3dSmrg  $3])dnl
9632c7c4e3dSmrgfi])
9642c7c4e3dSmrg
9652c7c4e3dSmrg
9662c7c4e3dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9672c7c4e3dSmrg# ---------------------------------------------
9682c7c4e3dSmrgm4_define([_PKG_CONFIG],
9692c7c4e3dSmrg[if test -n "$PKG_CONFIG"; then
9702c7c4e3dSmrg    if test -n "$$1"; then
9712c7c4e3dSmrg        pkg_cv_[]$1="$$1"
9722c7c4e3dSmrg    else
9732c7c4e3dSmrg        PKG_CHECK_EXISTS([$3],
9742c7c4e3dSmrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9752c7c4e3dSmrg			 [pkg_failed=yes])
9762c7c4e3dSmrg    fi
9772c7c4e3dSmrgelse
9782c7c4e3dSmrg	pkg_failed=untried
9792c7c4e3dSmrgfi[]dnl
9802c7c4e3dSmrg])# _PKG_CONFIG
9812c7c4e3dSmrg
9822c7c4e3dSmrg# _PKG_SHORT_ERRORS_SUPPORTED
9832c7c4e3dSmrg# -----------------------------
9842c7c4e3dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9852c7c4e3dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9862c7c4e3dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9872c7c4e3dSmrg        _pkg_short_errors_supported=yes
9882c7c4e3dSmrgelse
9892c7c4e3dSmrg        _pkg_short_errors_supported=no
9902c7c4e3dSmrgfi[]dnl
9912c7c4e3dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
9922c7c4e3dSmrg
9932c7c4e3dSmrg
9942c7c4e3dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9952c7c4e3dSmrg# [ACTION-IF-NOT-FOUND])
9962c7c4e3dSmrg#
9972c7c4e3dSmrg#
9982c7c4e3dSmrg# Note that if there is a possibility the first call to
9992c7c4e3dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
10002c7c4e3dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10012c7c4e3dSmrg#
10022c7c4e3dSmrg#
10032c7c4e3dSmrg# --------------------------------------------------------------
10042c7c4e3dSmrgAC_DEFUN([PKG_CHECK_MODULES],
10052c7c4e3dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10062c7c4e3dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10072c7c4e3dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10082c7c4e3dSmrg
10092c7c4e3dSmrgpkg_failed=no
10102c7c4e3dSmrgAC_MSG_CHECKING([for $1])
10112c7c4e3dSmrg
10122c7c4e3dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10132c7c4e3dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
10142c7c4e3dSmrg
10152c7c4e3dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10162c7c4e3dSmrgand $1[]_LIBS to avoid the need to call pkg-config.
10172c7c4e3dSmrgSee the pkg-config man page for more details.])
10182c7c4e3dSmrg
10192c7c4e3dSmrgif test $pkg_failed = yes; then
10202c7c4e3dSmrg        _PKG_SHORT_ERRORS_SUPPORTED
10212c7c4e3dSmrg        if test $_pkg_short_errors_supported = yes; then
10222c7c4e3dSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
10232c7c4e3dSmrg        else 
10242c7c4e3dSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
10252c7c4e3dSmrg        fi
10262c7c4e3dSmrg	# Put the nasty error message in config.log where it belongs
10272c7c4e3dSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10282c7c4e3dSmrg
10292c7c4e3dSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
10302c7c4e3dSmrg[Package requirements ($2) were not met:
10312c7c4e3dSmrg
10322c7c4e3dSmrg$$1_PKG_ERRORS
10332c7c4e3dSmrg
10342c7c4e3dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
10352c7c4e3dSmrginstalled software in a non-standard prefix.
10362c7c4e3dSmrg
10372c7c4e3dSmrg_PKG_TEXT
10382c7c4e3dSmrg])],
10392c7c4e3dSmrg		[$4])
10402c7c4e3dSmrgelif test $pkg_failed = untried; then
10412c7c4e3dSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
10422c7c4e3dSmrg[The pkg-config script could not be found or is too old.  Make sure it
10432c7c4e3dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
10442c7c4e3dSmrgpath to pkg-config.
10452c7c4e3dSmrg
10462c7c4e3dSmrg_PKG_TEXT
10472c7c4e3dSmrg
10482c7c4e3dSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
10492c7c4e3dSmrg		[$4])
10502c7c4e3dSmrgelse
10512c7c4e3dSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10522c7c4e3dSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10532c7c4e3dSmrg        AC_MSG_RESULT([yes])
10542c7c4e3dSmrg	ifelse([$3], , :, [$3])
10552c7c4e3dSmrgfi[]dnl
10562c7c4e3dSmrg])# PKG_CHECK_MODULES
10572c7c4e3dSmrg
10582c7c4e3dSmrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:13:51 mrg Exp $
10592c7c4e3dSmrgdnl
10602c7c4e3dSmrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
10612c7c4e3dSmrgdnl 
10622c7c4e3dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
10632c7c4e3dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
10642c7c4e3dSmrgdnl the above copyright notice appear in all copies and that both that
10652c7c4e3dSmrgdnl copyright notice and this permission notice appear in supporting
10662c7c4e3dSmrgdnl documentation.
10672c7c4e3dSmrgdnl 
10682c7c4e3dSmrgdnl The above copyright notice and this permission notice shall be included
10692c7c4e3dSmrgdnl in all copies or substantial portions of the Software.
10702c7c4e3dSmrgdnl 
10712c7c4e3dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10722c7c4e3dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10732c7c4e3dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10742c7c4e3dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
10752c7c4e3dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
10762c7c4e3dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
10772c7c4e3dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
10782c7c4e3dSmrgdnl 
10792c7c4e3dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
10802c7c4e3dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
10812c7c4e3dSmrgdnl other dealings in this Software without prior written authorization
10822c7c4e3dSmrgdnl from the copyright holders.
10832c7c4e3dSmrgdnl 
10842c7c4e3dSmrg
10852c7c4e3dSmrg# XORG_PROG_RAWCPP()
10862c7c4e3dSmrg# ------------------
10872c7c4e3dSmrg# Find cpp program and necessary flags for use in pre-processing text files
10882c7c4e3dSmrg# such as man pages and config files
10892c7c4e3dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
10902c7c4e3dSmrgAC_REQUIRE([AC_PROG_CPP])
10912c7c4e3dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
10922c7c4e3dSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
10932c7c4e3dSmrg
10942c7c4e3dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
10952c7c4e3dSmrg# which is not the best choice for supporting other OS'es, but covers most
10962c7c4e3dSmrg# of the ones we need for now.
10972c7c4e3dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
10982c7c4e3dSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
10992c7c4e3dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11002c7c4e3dSmrg	AC_MSG_RESULT([no])
11012c7c4e3dSmrgelse
11022c7c4e3dSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
11032c7c4e3dSmrg		RAWCPPFLAGS=-undef
11042c7c4e3dSmrg		AC_MSG_RESULT([yes])
11052c7c4e3dSmrg	else
11062c7c4e3dSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
11072c7c4e3dSmrg	fi
11082c7c4e3dSmrgfi
11092c7c4e3dSmrgrm -f conftest.$ac_ext
11102c7c4e3dSmrg
11112c7c4e3dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
11122c7c4e3dSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
11132c7c4e3dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
11142c7c4e3dSmrg	AC_MSG_RESULT([no])
11152c7c4e3dSmrgelse
11162c7c4e3dSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
11172c7c4e3dSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
11182c7c4e3dSmrg		AC_MSG_RESULT([yes])
11192c7c4e3dSmrg	else
11202c7c4e3dSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
11212c7c4e3dSmrg	fi
11222c7c4e3dSmrgfi
11232c7c4e3dSmrgrm -f conftest.$ac_ext
11242c7c4e3dSmrgAC_SUBST(RAWCPPFLAGS)
11252c7c4e3dSmrg]) # XORG_PROG_RAWCPP
11262c7c4e3dSmrg
11272c7c4e3dSmrg# XORG_MANPAGE_SECTIONS()
11282c7c4e3dSmrg# -----------------------
11292c7c4e3dSmrg# Determine which sections man pages go in for the different man page types
11302c7c4e3dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
11312c7c4e3dSmrg# Not sure if there's any better way than just hardcoding by OS name.
11322c7c4e3dSmrg# Override default settings by setting environment variables
11332c7c4e3dSmrg
11342c7c4e3dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
11352c7c4e3dSmrgAC_REQUIRE([AC_CANONICAL_HOST])
11362c7c4e3dSmrg
11372c7c4e3dSmrgif test x$APP_MAN_SUFFIX = x    ; then
11382c7c4e3dSmrg    case $host_os in
11392c7c4e3dSmrg	linux*)	APP_MAN_SUFFIX=1x ;;
11402c7c4e3dSmrg	*)	APP_MAN_SUFFIX=1  ;;
11412c7c4e3dSmrg    esac
11422c7c4e3dSmrgfi
11432c7c4e3dSmrgif test x$APP_MAN_DIR = x    ; then
11442c7c4e3dSmrg    case $host_os in
11452c7c4e3dSmrg	linux*)	APP_MAN_DIR='$(mandir)/man1' ;;
11462c7c4e3dSmrg	*)	APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
11472c7c4e3dSmrg    esac
11482c7c4e3dSmrgfi
11492c7c4e3dSmrg
11502c7c4e3dSmrgif test x$LIB_MAN_SUFFIX = x    ; then
11512c7c4e3dSmrg    case $host_os in
11522c7c4e3dSmrg	linux*)	LIB_MAN_SUFFIX=3x ;;
11532c7c4e3dSmrg	*)	LIB_MAN_SUFFIX=3  ;;
11542c7c4e3dSmrg    esac
11552c7c4e3dSmrgfi
11562c7c4e3dSmrgif test x$LIB_MAN_DIR = x    ; then
11572c7c4e3dSmrg    case $host_os in
11582c7c4e3dSmrg	linux*)	LIB_MAN_DIR='$(mandir)/man3' ;;
11592c7c4e3dSmrg	*)	LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
11602c7c4e3dSmrg    esac
11612c7c4e3dSmrgfi
11622c7c4e3dSmrg
11632c7c4e3dSmrgif test x$FILE_MAN_SUFFIX = x    ; then
11642c7c4e3dSmrg    case $host_os in
11652c7c4e3dSmrg	linux*)		FILE_MAN_SUFFIX=5x ;;
11662c7c4e3dSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
11672c7c4e3dSmrg	*)		FILE_MAN_SUFFIX=5  ;;
11682c7c4e3dSmrg    esac
11692c7c4e3dSmrgfi
11702c7c4e3dSmrgif test x$FILE_MAN_DIR = x    ; then
11712c7c4e3dSmrg    case $host_os in
11722c7c4e3dSmrg	linux*)	FILE_MAN_DIR='$(mandir)/man5' ;;
11732c7c4e3dSmrg	*)	FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
11742c7c4e3dSmrg    esac
11752c7c4e3dSmrgfi
11762c7c4e3dSmrg
11772c7c4e3dSmrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 
11782c7c4e3dSmrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
11792c7c4e3dSmrgif test x$MISC_MAN_SUFFIX = x    ; then
11802c7c4e3dSmrg    case $host_os in
11812c7c4e3dSmrg#	linux*)		MISC_MAN_SUFFIX=7x ;;
11822c7c4e3dSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
11832c7c4e3dSmrg	*)		MISC_MAN_SUFFIX=7  ;;
11842c7c4e3dSmrg    esac
11852c7c4e3dSmrgfi
11862c7c4e3dSmrgif test x$MISC_MAN_DIR = x    ; then
11872c7c4e3dSmrg    case $host_os in
11882c7c4e3dSmrg#	linux*)	MISC_MAN_DIR='$(mandir)/man7' ;;
11892c7c4e3dSmrg	*)	MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
11902c7c4e3dSmrg    esac
11912c7c4e3dSmrgfi
11922c7c4e3dSmrg
11932c7c4e3dSmrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 
11942c7c4e3dSmrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
11952c7c4e3dSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
11962c7c4e3dSmrg    case $host_os in
11972c7c4e3dSmrg#	linux*)		DRIVER_MAN_SUFFIX=4x ;;
11982c7c4e3dSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
11992c7c4e3dSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
12002c7c4e3dSmrg    esac
12012c7c4e3dSmrgfi
12022c7c4e3dSmrgif test x$DRIVER_MAN_DIR = x    ; then
12032c7c4e3dSmrg    case $host_os in
12042c7c4e3dSmrg#	linux*)	DRIVER_MAN_DIR='$(mandir)/man4' ;;
12052c7c4e3dSmrg	*)	DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
12062c7c4e3dSmrg    esac
12072c7c4e3dSmrgfi
12082c7c4e3dSmrg
12092c7c4e3dSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
12102c7c4e3dSmrg    case $host_os in
12112c7c4e3dSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
12122c7c4e3dSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
12132c7c4e3dSmrg    esac
12142c7c4e3dSmrgfi
12152c7c4e3dSmrgif test x$ADMIN_MAN_DIR = x    ; then
12162c7c4e3dSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
12172c7c4e3dSmrgfi
12182c7c4e3dSmrg
12192c7c4e3dSmrg
12202c7c4e3dSmrgAC_SUBST([APP_MAN_SUFFIX])
12212c7c4e3dSmrgAC_SUBST([LIB_MAN_SUFFIX])
12222c7c4e3dSmrgAC_SUBST([FILE_MAN_SUFFIX])
12232c7c4e3dSmrgAC_SUBST([MISC_MAN_SUFFIX])
12242c7c4e3dSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
12252c7c4e3dSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
12262c7c4e3dSmrgAC_SUBST([APP_MAN_DIR])
12272c7c4e3dSmrgAC_SUBST([LIB_MAN_DIR])
12282c7c4e3dSmrgAC_SUBST([FILE_MAN_DIR])
12292c7c4e3dSmrgAC_SUBST([MISC_MAN_DIR])
12302c7c4e3dSmrgAC_SUBST([DRIVER_MAN_DIR])
12312c7c4e3dSmrgAC_SUBST([ADMIN_MAN_DIR])
12322c7c4e3dSmrg]) # XORG_MANPAGE_SECTIONS
12332c7c4e3dSmrg
12342c7c4e3dSmrg# XORG_CHECK_LINUXDOC
12352c7c4e3dSmrg# -------------------
12362c7c4e3dSmrg# Defines the variable MAKE_TEXT if the necessary tools and
12372c7c4e3dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
12382c7c4e3dSmrg# Whether or not the necessary tools and files are found can be checked
12392c7c4e3dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
12402c7c4e3dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
12412c7c4e3dSmrgAC_CHECK_FILE(
12422c7c4e3dSmrg	[$prefix/share/X11/sgml/defs.ent], 
12432c7c4e3dSmrg	[DEFS_ENT_PATH=$prefix/share/X11/sgml],
12442c7c4e3dSmrg	[DEFS_ENT_PATH=]
12452c7c4e3dSmrg)
12462c7c4e3dSmrg
12472c7c4e3dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
12482c7c4e3dSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
12492c7c4e3dSmrg
12502c7c4e3dSmrgAC_MSG_CHECKING([Whether to build documentation])
12512c7c4e3dSmrg
12522c7c4e3dSmrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
12532c7c4e3dSmrg   BUILDDOC=yes
12542c7c4e3dSmrgelse
12552c7c4e3dSmrg   BUILDDOC=no
12562c7c4e3dSmrgfi
12572c7c4e3dSmrg
12582c7c4e3dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
12592c7c4e3dSmrg
12602c7c4e3dSmrgAC_MSG_RESULT([$BUILDDOC])
12612c7c4e3dSmrg
12622c7c4e3dSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
12632c7c4e3dSmrg
12642c7c4e3dSmrgif test x$PS2PDF != x ; then
12652c7c4e3dSmrg   BUILDPDFDOC=yes
12662c7c4e3dSmrgelse
12672c7c4e3dSmrg   BUILDPDFDOC=no
12682c7c4e3dSmrgfi
12692c7c4e3dSmrg
12702c7c4e3dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
12712c7c4e3dSmrg
12722c7c4e3dSmrgAC_MSG_RESULT([$BUILDPDFDOC])
12732c7c4e3dSmrg
12742c7c4e3dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
12752c7c4e3dSmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
12762c7c4e3dSmrgMAKE_PDF="$PS2PDF"
12772c7c4e3dSmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
12782c7c4e3dSmrg
12792c7c4e3dSmrgAC_SUBST(MAKE_TEXT)
12802c7c4e3dSmrgAC_SUBST(MAKE_PS)
12812c7c4e3dSmrgAC_SUBST(MAKE_PDF)
12822c7c4e3dSmrgAC_SUBST(MAKE_HTML)
12832c7c4e3dSmrg]) # XORG_CHECK_LINUXDOC
12842c7c4e3dSmrg
12852c7c4e3dSmrg# XORG_CHECK_MALLOC_ZERO
12862c7c4e3dSmrg# ----------------------
12872c7c4e3dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
12882c7c4e3dSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
12892c7c4e3dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
12902c7c4e3dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
12912c7c4e3dSmrgAC_ARG_ENABLE(malloc0returnsnull,
12922c7c4e3dSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
12932c7c4e3dSmrg		       [malloc(0) returns NULL (default: auto)]),
12942c7c4e3dSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
12952c7c4e3dSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
12962c7c4e3dSmrg
12972c7c4e3dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
12982c7c4e3dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
12992c7c4e3dSmrg	AC_RUN_IFELSE([
13002c7c4e3dSmrgchar *malloc();
13012c7c4e3dSmrgchar *realloc();
13022c7c4e3dSmrgchar *calloc();
13032c7c4e3dSmrgmain() {
13042c7c4e3dSmrg    char *m0, *r0, *c0, *p;
13052c7c4e3dSmrg    m0 = malloc(0);
13062c7c4e3dSmrg    p = malloc(10);
13072c7c4e3dSmrg    r0 = realloc(p,0);
13082c7c4e3dSmrg    c0 = calloc(0);
13092c7c4e3dSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
13102c7c4e3dSmrg}],
13112c7c4e3dSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
13122c7c4e3dSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
13132c7c4e3dSmrgfi
13142c7c4e3dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
13152c7c4e3dSmrg
13162c7c4e3dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
13172c7c4e3dSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
13182c7c4e3dSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
13192c7c4e3dSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
13202c7c4e3dSmrgelse
13212c7c4e3dSmrg	MALLOC_ZERO_CFLAGS=""
13222c7c4e3dSmrg	XMALLOC_ZERO_CFLAGS=""
13232c7c4e3dSmrg	XTMALLOC_ZERO_CFLAGS=""
13242c7c4e3dSmrgfi
13252c7c4e3dSmrg
13262c7c4e3dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
13272c7c4e3dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
13282c7c4e3dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
13292c7c4e3dSmrg]) # XORG_CHECK_MALLOC_ZERO
13302c7c4e3dSmrg
13312c7c4e3dSmrgdnl Copyright 2005 Red Hat, Inc
13322c7c4e3dSmrgdnl
13332c7c4e3dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
13342c7c4e3dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
13352c7c4e3dSmrgdnl the above copyright notice appear in all copies and that both that
13362c7c4e3dSmrgdnl copyright notice and this permission notice appear in supporting
13372c7c4e3dSmrgdnl documentation.
13382c7c4e3dSmrgdnl
13392c7c4e3dSmrgdnl The above copyright notice and this permission notice shall be included
13402c7c4e3dSmrgdnl in all copies or substantial portions of the Software.
13412c7c4e3dSmrgdnl
13422c7c4e3dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
13432c7c4e3dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
13442c7c4e3dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
13452c7c4e3dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
13462c7c4e3dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
13472c7c4e3dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
13482c7c4e3dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
13492c7c4e3dSmrgdnl
13502c7c4e3dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
13512c7c4e3dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
13522c7c4e3dSmrgdnl other dealings in this Software without prior written authorization
13532c7c4e3dSmrgdnl from the copyright holders.
13542c7c4e3dSmrgdnl
13552c7c4e3dSmrg
13562c7c4e3dSmrg# XORG_RELEASE_VERSION
13572c7c4e3dSmrg# --------------------
13582c7c4e3dSmrg# Adds --with/without-release-string and changes the PACKAGE and
13592c7c4e3dSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
13602c7c4e3dSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
13612c7c4e3dSmrg 
13622c7c4e3dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
13632c7c4e3dSmrg	AC_ARG_WITH(release-version,
13642c7c4e3dSmrg			AC_HELP_STRING([--with-release-version=STRING],
13652c7c4e3dSmrg				[Use release version string in package name]),
13662c7c4e3dSmrg			[RELEASE_VERSION="$withval"],
13672c7c4e3dSmrg			[RELEASE_VERSION=""])
13682c7c4e3dSmrg	if test "x$RELEASE_VERSION" != "x"; then
13692c7c4e3dSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
13702c7c4e3dSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
13712c7c4e3dSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
13722c7c4e3dSmrg	fi
13732c7c4e3dSmrg])
13742c7c4e3dSmrg
1375