aclocal.m4 revision 5c10afb9
15c10afb9Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
25c10afb9Smrg
35c10afb9Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
45c10afb9Smrg# Free Software Foundation, Inc.
55c10afb9Smrg# This file is free software; the Free Software Foundation
65c10afb9Smrg# gives unlimited permission to copy and/or distribute it,
75c10afb9Smrg# with or without modifications, as long as this notice is preserved.
85c10afb9Smrg
95c10afb9Smrg# This program is distributed in the hope that it will be useful,
105c10afb9Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
115c10afb9Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
125c10afb9Smrg# PARTICULAR PURPOSE.
135c10afb9Smrg
145c10afb9Smrg# Do all the work for Automake.                            -*- Autoconf -*-
155c10afb9Smrg
165c10afb9Smrg# This macro actually does too much some checks are only needed if
175c10afb9Smrg# your package does certain things.  But this isn't really a big deal.
185c10afb9Smrg
195c10afb9Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
205c10afb9Smrg# Free Software Foundation, Inc.
215c10afb9Smrg
225c10afb9Smrg# This program is free software; you can redistribute it and/or modify
235c10afb9Smrg# it under the terms of the GNU General Public License as published by
245c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
255c10afb9Smrg# any later version.
265c10afb9Smrg
275c10afb9Smrg# This program is distributed in the hope that it will be useful,
285c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
295c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
305c10afb9Smrg# GNU General Public License for more details.
315c10afb9Smrg
325c10afb9Smrg# You should have received a copy of the GNU General Public License
335c10afb9Smrg# along with this program; if not, write to the Free Software
345c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
355c10afb9Smrg# 02111-1307, USA.
365c10afb9Smrg
375c10afb9Smrg# serial 10
385c10afb9Smrg
395c10afb9SmrgAC_PREREQ([2.54])
405c10afb9Smrg
415c10afb9Smrg# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
425c10afb9Smrg# the ones we care about.
435c10afb9Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
445c10afb9Smrg
455c10afb9Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
465c10afb9Smrg# AM_INIT_AUTOMAKE([OPTIONS])
475c10afb9Smrg# -----------------------------------------------
485c10afb9Smrg# The call with PACKAGE and VERSION arguments is the old style
495c10afb9Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
505c10afb9Smrg# and VERSION should now be passed to AC_INIT and removed from
515c10afb9Smrg# the call to AM_INIT_AUTOMAKE.
525c10afb9Smrg# We support both call styles for the transition.  After
535c10afb9Smrg# the next Automake release, Autoconf can make the AC_INIT
545c10afb9Smrg# arguments mandatory, and then we can depend on a new Autoconf
555c10afb9Smrg# release and drop the old call support.
565c10afb9SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
575c10afb9Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
585c10afb9Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl
595c10afb9Smrg# test to see if srcdir already configured
605c10afb9Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
615c10afb9Smrg   test -f $srcdir/config.status; then
625c10afb9Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
635c10afb9Smrgfi
645c10afb9Smrg
655c10afb9Smrg# test whether we have cygpath
665c10afb9Smrgif test -z "$CYGPATH_W"; then
675c10afb9Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
685c10afb9Smrg    CYGPATH_W='cygpath -w'
695c10afb9Smrg  else
705c10afb9Smrg    CYGPATH_W=echo
715c10afb9Smrg  fi
725c10afb9Smrgfi
735c10afb9SmrgAC_SUBST([CYGPATH_W])
745c10afb9Smrg
755c10afb9Smrg# Define the identity of the package.
765c10afb9Smrgdnl Distinguish between old-style and new-style calls.
775c10afb9Smrgm4_ifval([$2],
785c10afb9Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
795c10afb9Smrg AC_SUBST([PACKAGE], [$1])dnl
805c10afb9Smrg AC_SUBST([VERSION], [$2])],
815c10afb9Smrg[_AM_SET_OPTIONS([$1])dnl
825c10afb9Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
835c10afb9Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
845c10afb9Smrg
855c10afb9Smrg_AM_IF_OPTION([no-define],,
865c10afb9Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
875c10afb9Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
885c10afb9Smrg
895c10afb9Smrg# Some tools Automake needs.
905c10afb9SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
915c10afb9SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
925c10afb9SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
935c10afb9SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
945c10afb9SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
955c10afb9SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
965c10afb9SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
975c10afb9SmrgAM_MISSING_PROG(AMTAR, tar)
985c10afb9SmrgAM_PROG_INSTALL_SH
995c10afb9SmrgAM_PROG_INSTALL_STRIP
1005c10afb9Smrg# We need awk for the "check" target.  The system "awk" is bad on
1015c10afb9Smrg# some platforms.
1025c10afb9SmrgAC_REQUIRE([AC_PROG_AWK])dnl
1035c10afb9SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
1045c10afb9SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
1055c10afb9Smrg
1065c10afb9Smrg_AM_IF_OPTION([no-dependencies],,
1075c10afb9Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
1085c10afb9Smrg                  [_AM_DEPENDENCIES(CC)],
1095c10afb9Smrg                  [define([AC_PROG_CC],
1105c10afb9Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1115c10afb9SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
1125c10afb9Smrg                  [_AM_DEPENDENCIES(CXX)],
1135c10afb9Smrg                  [define([AC_PROG_CXX],
1145c10afb9Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1155c10afb9Smrg])
1165c10afb9Smrg])
1175c10afb9Smrg
1185c10afb9Smrg
1195c10afb9Smrg# When config.status generates a header, we must update the stamp-h file.
1205c10afb9Smrg# This file resides in the same directory as the config header
1215c10afb9Smrg# that is generated.  The stamp files are numbered to have different names.
1225c10afb9Smrg
1235c10afb9Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1245c10afb9Smrg# loop where config.status creates the headers, so we can generate
1255c10afb9Smrg# our stamp files there.
1265c10afb9SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1275c10afb9Smrg[# Compute $1's index in $config_headers.
1285c10afb9Smrg_am_stamp_count=1
1295c10afb9Smrgfor _am_header in $config_headers :; do
1305c10afb9Smrg  case $_am_header in
1315c10afb9Smrg    $1 | $1:* )
1325c10afb9Smrg      break ;;
1335c10afb9Smrg    * )
1345c10afb9Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1355c10afb9Smrg  esac
1365c10afb9Smrgdone
1375c10afb9Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1385c10afb9Smrg
1395c10afb9Smrg# Copyright 2002  Free Software Foundation, Inc.
1405c10afb9Smrg
1415c10afb9Smrg# This program is free software; you can redistribute it and/or modify
1425c10afb9Smrg# it under the terms of the GNU General Public License as published by
1435c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
1445c10afb9Smrg# any later version.
1455c10afb9Smrg
1465c10afb9Smrg# This program is distributed in the hope that it will be useful,
1475c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1485c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1495c10afb9Smrg# GNU General Public License for more details.
1505c10afb9Smrg
1515c10afb9Smrg# You should have received a copy of the GNU General Public License
1525c10afb9Smrg# along with this program; if not, write to the Free Software
1535c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1545c10afb9Smrg
1555c10afb9Smrg# AM_AUTOMAKE_VERSION(VERSION)
1565c10afb9Smrg# ----------------------------
1575c10afb9Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
1585c10afb9Smrg# generated from the m4 files accompanying Automake X.Y.
1595c10afb9SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1605c10afb9Smrg
1615c10afb9Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
1625c10afb9Smrg# -------------------------------
1635c10afb9Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
1645c10afb9Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1655c10afb9SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1665c10afb9Smrg	 [AM_AUTOMAKE_VERSION([1.7.9])])
1675c10afb9Smrg
1685c10afb9Smrg# Helper functions for option handling.                    -*- Autoconf -*-
1695c10afb9Smrg
1705c10afb9Smrg# Copyright 2001, 2002  Free Software Foundation, Inc.
1715c10afb9Smrg
1725c10afb9Smrg# This program is free software; you can redistribute it and/or modify
1735c10afb9Smrg# it under the terms of the GNU General Public License as published by
1745c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
1755c10afb9Smrg# any later version.
1765c10afb9Smrg
1775c10afb9Smrg# This program is distributed in the hope that it will be useful,
1785c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1795c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1805c10afb9Smrg# GNU General Public License for more details.
1815c10afb9Smrg
1825c10afb9Smrg# You should have received a copy of the GNU General Public License
1835c10afb9Smrg# along with this program; if not, write to the Free Software
1845c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1855c10afb9Smrg# 02111-1307, USA.
1865c10afb9Smrg
1875c10afb9Smrg# serial 2
1885c10afb9Smrg
1895c10afb9Smrg# _AM_MANGLE_OPTION(NAME)
1905c10afb9Smrg# -----------------------
1915c10afb9SmrgAC_DEFUN([_AM_MANGLE_OPTION],
1925c10afb9Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1935c10afb9Smrg
1945c10afb9Smrg# _AM_SET_OPTION(NAME)
1955c10afb9Smrg# ------------------------------
1965c10afb9Smrg# Set option NAME.  Presently that only means defining a flag for this option.
1975c10afb9SmrgAC_DEFUN([_AM_SET_OPTION],
1985c10afb9Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1995c10afb9Smrg
2005c10afb9Smrg# _AM_SET_OPTIONS(OPTIONS)
2015c10afb9Smrg# ----------------------------------
2025c10afb9Smrg# OPTIONS is a space-separated list of Automake options.
2035c10afb9SmrgAC_DEFUN([_AM_SET_OPTIONS],
2045c10afb9Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2055c10afb9Smrg
2065c10afb9Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2075c10afb9Smrg# -------------------------------------------
2085c10afb9Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2095c10afb9SmrgAC_DEFUN([_AM_IF_OPTION],
2105c10afb9Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2115c10afb9Smrg
2125c10afb9Smrg#
2135c10afb9Smrg# Check to make sure that the build environment is sane.
2145c10afb9Smrg#
2155c10afb9Smrg
2165c10afb9Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2175c10afb9Smrg
2185c10afb9Smrg# This program is free software; you can redistribute it and/or modify
2195c10afb9Smrg# it under the terms of the GNU General Public License as published by
2205c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
2215c10afb9Smrg# any later version.
2225c10afb9Smrg
2235c10afb9Smrg# This program is distributed in the hope that it will be useful,
2245c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2255c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2265c10afb9Smrg# GNU General Public License for more details.
2275c10afb9Smrg
2285c10afb9Smrg# You should have received a copy of the GNU General Public License
2295c10afb9Smrg# along with this program; if not, write to the Free Software
2305c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2315c10afb9Smrg# 02111-1307, USA.
2325c10afb9Smrg
2335c10afb9Smrg# serial 3
2345c10afb9Smrg
2355c10afb9Smrg# AM_SANITY_CHECK
2365c10afb9Smrg# ---------------
2375c10afb9SmrgAC_DEFUN([AM_SANITY_CHECK],
2385c10afb9Smrg[AC_MSG_CHECKING([whether build environment is sane])
2395c10afb9Smrg# Just in case
2405c10afb9Smrgsleep 1
2415c10afb9Smrgecho timestamp > conftest.file
2425c10afb9Smrg# Do `set' in a subshell so we don't clobber the current shell's
2435c10afb9Smrg# arguments.  Must try -L first in case configure is actually a
2445c10afb9Smrg# symlink; some systems play weird games with the mod time of symlinks
2455c10afb9Smrg# (eg FreeBSD returns the mod time of the symlink's containing
2465c10afb9Smrg# directory).
2475c10afb9Smrgif (
2485c10afb9Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2495c10afb9Smrg   if test "$[*]" = "X"; then
2505c10afb9Smrg      # -L didn't work.
2515c10afb9Smrg      set X `ls -t $srcdir/configure conftest.file`
2525c10afb9Smrg   fi
2535c10afb9Smrg   rm -f conftest.file
2545c10afb9Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
2555c10afb9Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
2565c10afb9Smrg
2575c10afb9Smrg      # If neither matched, then we have a broken ls.  This can happen
2585c10afb9Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
2595c10afb9Smrg      # broken ls alias from the environment.  This has actually
2605c10afb9Smrg      # happened.  Such a system could not be considered "sane".
2615c10afb9Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2625c10afb9Smrgalias in your environment])
2635c10afb9Smrg   fi
2645c10afb9Smrg
2655c10afb9Smrg   test "$[2]" = conftest.file
2665c10afb9Smrg   )
2675c10afb9Smrgthen
2685c10afb9Smrg   # Ok.
2695c10afb9Smrg   :
2705c10afb9Smrgelse
2715c10afb9Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
2725c10afb9SmrgCheck your system clock])
2735c10afb9Smrgfi
2745c10afb9SmrgAC_MSG_RESULT(yes)])
2755c10afb9Smrg
2765c10afb9Smrg#  -*- Autoconf -*-
2775c10afb9Smrg
2785c10afb9Smrg
2795c10afb9Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2805c10afb9Smrg
2815c10afb9Smrg# This program is free software; you can redistribute it and/or modify
2825c10afb9Smrg# it under the terms of the GNU General Public License as published by
2835c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
2845c10afb9Smrg# any later version.
2855c10afb9Smrg
2865c10afb9Smrg# This program is distributed in the hope that it will be useful,
2875c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2885c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2895c10afb9Smrg# GNU General Public License for more details.
2905c10afb9Smrg
2915c10afb9Smrg# You should have received a copy of the GNU General Public License
2925c10afb9Smrg# along with this program; if not, write to the Free Software
2935c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2945c10afb9Smrg# 02111-1307, USA.
2955c10afb9Smrg
2965c10afb9Smrg# serial 3
2975c10afb9Smrg
2985c10afb9Smrg# AM_MISSING_PROG(NAME, PROGRAM)
2995c10afb9Smrg# ------------------------------
3005c10afb9SmrgAC_DEFUN([AM_MISSING_PROG],
3015c10afb9Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
3025c10afb9Smrg$1=${$1-"${am_missing_run}$2"}
3035c10afb9SmrgAC_SUBST($1)])
3045c10afb9Smrg
3055c10afb9Smrg
3065c10afb9Smrg# AM_MISSING_HAS_RUN
3075c10afb9Smrg# ------------------
3085c10afb9Smrg# Define MISSING if not defined so far and test if it supports --run.
3095c10afb9Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
3105c10afb9SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
3115c10afb9Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3125c10afb9Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3135c10afb9Smrg# Use eval to expand $SHELL
3145c10afb9Smrgif eval "$MISSING --run true"; then
3155c10afb9Smrg  am_missing_run="$MISSING --run "
3165c10afb9Smrgelse
3175c10afb9Smrg  am_missing_run=
3185c10afb9Smrg  AC_MSG_WARN([`missing' script is too old or missing])
3195c10afb9Smrgfi
3205c10afb9Smrg])
3215c10afb9Smrg
3225c10afb9Smrg# AM_AUX_DIR_EXPAND
3235c10afb9Smrg
3245c10afb9Smrg# Copyright 2001 Free Software Foundation, Inc.
3255c10afb9Smrg
3265c10afb9Smrg# This program is free software; you can redistribute it and/or modify
3275c10afb9Smrg# it under the terms of the GNU General Public License as published by
3285c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
3295c10afb9Smrg# any later version.
3305c10afb9Smrg
3315c10afb9Smrg# This program is distributed in the hope that it will be useful,
3325c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
3335c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3345c10afb9Smrg# GNU General Public License for more details.
3355c10afb9Smrg
3365c10afb9Smrg# You should have received a copy of the GNU General Public License
3375c10afb9Smrg# along with this program; if not, write to the Free Software
3385c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3395c10afb9Smrg# 02111-1307, USA.
3405c10afb9Smrg
3415c10afb9Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3425c10afb9Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
3435c10afb9Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
3445c10afb9Smrg#
3455c10afb9Smrg# Of course, Automake must honor this variable whenever it calls a
3465c10afb9Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
3475c10afb9Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
3485c10afb9Smrg# depending on how configure is run.  This is pretty annoying, since
3495c10afb9Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
3505c10afb9Smrg# source directory, any form will work fine, but in subdirectories a
3515c10afb9Smrg# relative path needs to be adjusted first.
3525c10afb9Smrg#
3535c10afb9Smrg# $ac_aux_dir/missing
3545c10afb9Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
3555c10afb9Smrg# $top_srcdir/$ac_aux_dir/missing
3565c10afb9Smrg#    fails if $ac_aux_dir is absolute,
3575c10afb9Smrg#    fails when called from a subdirectory in a VPATH build with
3585c10afb9Smrg#          a relative $ac_aux_dir
3595c10afb9Smrg#
3605c10afb9Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3615c10afb9Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
3625c10afb9Smrg# harmless because $srcdir is `.', but things will broke when you
3635c10afb9Smrg# start a VPATH build or use an absolute $srcdir.
3645c10afb9Smrg#
3655c10afb9Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3665c10afb9Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
3675c10afb9Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3685c10afb9Smrg# and then we would define $MISSING as
3695c10afb9Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
3705c10afb9Smrg# This will work as long as MISSING is not called from configure, because
3715c10afb9Smrg# unfortunately $(top_srcdir) has no meaning in configure.
3725c10afb9Smrg# However there are other variables, like CC, which are often used in
3735c10afb9Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
3745c10afb9Smrg#
3755c10afb9Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
3765c10afb9Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
3775c10afb9Smrg# configured tree to be moved without reconfiguration.
3785c10afb9Smrg
3795c10afb9Smrg# Rely on autoconf to set up CDPATH properly.
3805c10afb9SmrgAC_PREREQ([2.50])
3815c10afb9Smrg
3825c10afb9SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [
3835c10afb9Smrg# expand $ac_aux_dir to an absolute path
3845c10afb9Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
3855c10afb9Smrg])
3865c10afb9Smrg
3875c10afb9Smrg# AM_PROG_INSTALL_SH
3885c10afb9Smrg# ------------------
3895c10afb9Smrg# Define $install_sh.
3905c10afb9Smrg
3915c10afb9Smrg# Copyright 2001 Free Software Foundation, Inc.
3925c10afb9Smrg
3935c10afb9Smrg# This program is free software; you can redistribute it and/or modify
3945c10afb9Smrg# it under the terms of the GNU General Public License as published by
3955c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
3965c10afb9Smrg# any later version.
3975c10afb9Smrg
3985c10afb9Smrg# This program is distributed in the hope that it will be useful,
3995c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4005c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4015c10afb9Smrg# GNU General Public License for more details.
4025c10afb9Smrg
4035c10afb9Smrg# You should have received a copy of the GNU General Public License
4045c10afb9Smrg# along with this program; if not, write to the Free Software
4055c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4065c10afb9Smrg# 02111-1307, USA.
4075c10afb9Smrg
4085c10afb9SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
4095c10afb9Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4105c10afb9Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
4115c10afb9SmrgAC_SUBST(install_sh)])
4125c10afb9Smrg
4135c10afb9Smrg# AM_PROG_INSTALL_STRIP
4145c10afb9Smrg
4155c10afb9Smrg# Copyright 2001 Free Software Foundation, Inc.
4165c10afb9Smrg
4175c10afb9Smrg# This program is free software; you can redistribute it and/or modify
4185c10afb9Smrg# it under the terms of the GNU General Public License as published by
4195c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
4205c10afb9Smrg# any later version.
4215c10afb9Smrg
4225c10afb9Smrg# This program is distributed in the hope that it will be useful,
4235c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4245c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4255c10afb9Smrg# GNU General Public License for more details.
4265c10afb9Smrg
4275c10afb9Smrg# You should have received a copy of the GNU General Public License
4285c10afb9Smrg# along with this program; if not, write to the Free Software
4295c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4305c10afb9Smrg# 02111-1307, USA.
4315c10afb9Smrg
4325c10afb9Smrg# One issue with vendor `install' (even GNU) is that you can't
4335c10afb9Smrg# specify the program used to strip binaries.  This is especially
4345c10afb9Smrg# annoying in cross-compiling environments, where the build's strip
4355c10afb9Smrg# is unlikely to handle the host's binaries.
4365c10afb9Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
4375c10afb9Smrg# always use install-sh in `make install-strip', and initialize
4385c10afb9Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
4395c10afb9SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
4405c10afb9Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4415c10afb9Smrg# Installed binaries are usually stripped using `strip' when the user
4425c10afb9Smrg# run `make install-strip'.  However `strip' might not be the right
4435c10afb9Smrg# tool to use in cross-compilation environments, therefore Automake
4445c10afb9Smrg# will honor the `STRIP' environment variable to overrule this program.
4455c10afb9Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4465c10afb9Smrgif test "$cross_compiling" != no; then
4475c10afb9Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
4485c10afb9Smrgfi
4495c10afb9SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
4505c10afb9SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
4515c10afb9Smrg
4525c10afb9Smrg#                                                          -*- Autoconf -*-
4535c10afb9Smrg# Copyright (C) 2003  Free Software Foundation, Inc.
4545c10afb9Smrg
4555c10afb9Smrg# This program is free software; you can redistribute it and/or modify
4565c10afb9Smrg# it under the terms of the GNU General Public License as published by
4575c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
4585c10afb9Smrg# any later version.
4595c10afb9Smrg
4605c10afb9Smrg# This program is distributed in the hope that it will be useful,
4615c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4625c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4635c10afb9Smrg# GNU General Public License for more details.
4645c10afb9Smrg
4655c10afb9Smrg# You should have received a copy of the GNU General Public License
4665c10afb9Smrg# along with this program; if not, write to the Free Software
4675c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4685c10afb9Smrg# 02111-1307, USA.
4695c10afb9Smrg
4705c10afb9Smrg# serial 1
4715c10afb9Smrg
4725c10afb9Smrg# Check whether the underlying file-system supports filenames
4735c10afb9Smrg# with a leading dot.  For instance MS-DOS doesn't.
4745c10afb9SmrgAC_DEFUN([AM_SET_LEADING_DOT],
4755c10afb9Smrg[rm -rf .tst 2>/dev/null
4765c10afb9Smrgmkdir .tst 2>/dev/null
4775c10afb9Smrgif test -d .tst; then
4785c10afb9Smrg  am__leading_dot=.
4795c10afb9Smrgelse
4805c10afb9Smrg  am__leading_dot=_
4815c10afb9Smrgfi
4825c10afb9Smrgrmdir .tst 2>/dev/null
4835c10afb9SmrgAC_SUBST([am__leading_dot])])
4845c10afb9Smrg
4855c10afb9Smrg# serial 5						-*- Autoconf -*-
4865c10afb9Smrg
4875c10afb9Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
4885c10afb9Smrg
4895c10afb9Smrg# This program is free software; you can redistribute it and/or modify
4905c10afb9Smrg# it under the terms of the GNU General Public License as published by
4915c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
4925c10afb9Smrg# any later version.
4935c10afb9Smrg
4945c10afb9Smrg# This program is distributed in the hope that it will be useful,
4955c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4965c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4975c10afb9Smrg# GNU General Public License for more details.
4985c10afb9Smrg
4995c10afb9Smrg# You should have received a copy of the GNU General Public License
5005c10afb9Smrg# along with this program; if not, write to the Free Software
5015c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
5025c10afb9Smrg# 02111-1307, USA.
5035c10afb9Smrg
5045c10afb9Smrg
5055c10afb9Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
5065c10afb9Smrg# written in clear, in which case automake, when reading aclocal.m4,
5075c10afb9Smrg# will think it sees a *use*, and therefore will trigger all it's
5085c10afb9Smrg# C support machinery.  Also note that it means that autoscan, seeing
5095c10afb9Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
5105c10afb9Smrg
5115c10afb9Smrg
5125c10afb9Smrg
5135c10afb9Smrg# _AM_DEPENDENCIES(NAME)
5145c10afb9Smrg# ----------------------
5155c10afb9Smrg# See how the compiler implements dependency checking.
5165c10afb9Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
5175c10afb9Smrg# We try a few techniques and use that to set a single cache variable.
5185c10afb9Smrg#
5195c10afb9Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
5205c10afb9Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
5215c10afb9Smrg# dependency, and given that the user is not expected to run this macro,
5225c10afb9Smrg# just rely on AC_PROG_CC.
5235c10afb9SmrgAC_DEFUN([_AM_DEPENDENCIES],
5245c10afb9Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
5255c10afb9SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
5265c10afb9SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
5275c10afb9SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
5285c10afb9Smrg
5295c10afb9Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
5305c10afb9Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
5315c10afb9Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
5325c10afb9Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
5335c10afb9Smrg                   [depcc="$$1"   am_compiler_list=])
5345c10afb9Smrg
5355c10afb9SmrgAC_CACHE_CHECK([dependency style of $depcc],
5365c10afb9Smrg               [am_cv_$1_dependencies_compiler_type],
5375c10afb9Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5385c10afb9Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
5395c10afb9Smrg  # making bogus files that we don't know about and never remove.  For
5405c10afb9Smrg  # instance it was reported that on HP-UX the gcc test will end up
5415c10afb9Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
5425c10afb9Smrg  # in D'.
5435c10afb9Smrg  mkdir conftest.dir
5445c10afb9Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
5455c10afb9Smrg  # using a relative directory.
5465c10afb9Smrg  cp "$am_depcomp" conftest.dir
5475c10afb9Smrg  cd conftest.dir
5485c10afb9Smrg  # We will build objects and dependencies in a subdirectory because
5495c10afb9Smrg  # it helps to detect inapplicable dependency modes.  For instance
5505c10afb9Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
5515c10afb9Smrg  # side effect of compilation, but ICC will put the dependencies in
5525c10afb9Smrg  # the current directory while Tru64 will put them in the object
5535c10afb9Smrg  # directory.
5545c10afb9Smrg  mkdir sub
5555c10afb9Smrg
5565c10afb9Smrg  am_cv_$1_dependencies_compiler_type=none
5575c10afb9Smrg  if test "$am_compiler_list" = ""; then
5585c10afb9Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
5595c10afb9Smrg  fi
5605c10afb9Smrg  for depmode in $am_compiler_list; do
5615c10afb9Smrg    # Setup a source with many dependencies, because some compilers
5625c10afb9Smrg    # like to wrap large dependency lists on column 80 (with \), and
5635c10afb9Smrg    # we should not choose a depcomp mode which is confused by this.
5645c10afb9Smrg    #
5655c10afb9Smrg    # We need to recreate these files for each test, as the compiler may
5665c10afb9Smrg    # overwrite some of them when testing with obscure command lines.
5675c10afb9Smrg    # This happens at least with the AIX C compiler.
5685c10afb9Smrg    : > sub/conftest.c
5695c10afb9Smrg    for i in 1 2 3 4 5 6; do
5705c10afb9Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5715c10afb9Smrg      : > sub/conftst$i.h
5725c10afb9Smrg    done
5735c10afb9Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5745c10afb9Smrg
5755c10afb9Smrg    case $depmode in
5765c10afb9Smrg    nosideeffect)
5775c10afb9Smrg      # after this tag, mechanisms are not by side-effect, so they'll
5785c10afb9Smrg      # only be used when explicitly requested
5795c10afb9Smrg      if test "x$enable_dependency_tracking" = xyes; then
5805c10afb9Smrg	continue
5815c10afb9Smrg      else
5825c10afb9Smrg	break
5835c10afb9Smrg      fi
5845c10afb9Smrg      ;;
5855c10afb9Smrg    none) break ;;
5865c10afb9Smrg    esac
5875c10afb9Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
5885c10afb9Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
5895c10afb9Smrg    # handle `-M -o', and we need to detect this.
5905c10afb9Smrg    if depmode=$depmode \
5915c10afb9Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5925c10afb9Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5935c10afb9Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5945c10afb9Smrg         >/dev/null 2>conftest.err &&
5955c10afb9Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5965c10afb9Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5975c10afb9Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5985c10afb9Smrg      # icc doesn't choke on unknown options, it will just issue warnings
5995c10afb9Smrg      # (even with -Werror).  So we grep stderr for any message
6005c10afb9Smrg      # that says an option was ignored.
6015c10afb9Smrg      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
6025c10afb9Smrg        am_cv_$1_dependencies_compiler_type=$depmode
6035c10afb9Smrg        break
6045c10afb9Smrg      fi
6055c10afb9Smrg    fi
6065c10afb9Smrg  done
6075c10afb9Smrg
6085c10afb9Smrg  cd ..
6095c10afb9Smrg  rm -rf conftest.dir
6105c10afb9Smrgelse
6115c10afb9Smrg  am_cv_$1_dependencies_compiler_type=none
6125c10afb9Smrgfi
6135c10afb9Smrg])
6145c10afb9SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6155c10afb9SmrgAM_CONDITIONAL([am__fastdep$1], [
6165c10afb9Smrg  test "x$enable_dependency_tracking" != xno \
6175c10afb9Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6185c10afb9Smrg])
6195c10afb9Smrg
6205c10afb9Smrg
6215c10afb9Smrg# AM_SET_DEPDIR
6225c10afb9Smrg# -------------
6235c10afb9Smrg# Choose a directory name for dependency files.
6245c10afb9Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6255c10afb9SmrgAC_DEFUN([AM_SET_DEPDIR],
6265c10afb9Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6275c10afb9SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6285c10afb9Smrg])
6295c10afb9Smrg
6305c10afb9Smrg
6315c10afb9Smrg# AM_DEP_TRACK
6325c10afb9Smrg# ------------
6335c10afb9SmrgAC_DEFUN([AM_DEP_TRACK],
6345c10afb9Smrg[AC_ARG_ENABLE(dependency-tracking,
6355c10afb9Smrg[  --disable-dependency-tracking Speeds up one-time builds
6365c10afb9Smrg  --enable-dependency-tracking  Do not reject slow dependency extractors])
6375c10afb9Smrgif test "x$enable_dependency_tracking" != xno; then
6385c10afb9Smrg  am_depcomp="$ac_aux_dir/depcomp"
6395c10afb9Smrg  AMDEPBACKSLASH='\'
6405c10afb9Smrgfi
6415c10afb9SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6425c10afb9SmrgAC_SUBST([AMDEPBACKSLASH])
6435c10afb9Smrg])
6445c10afb9Smrg
6455c10afb9Smrg# Generate code to set up dependency tracking.   -*- Autoconf -*-
6465c10afb9Smrg
6475c10afb9Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6485c10afb9Smrg
6495c10afb9Smrg# This program is free software; you can redistribute it and/or modify
6505c10afb9Smrg# it under the terms of the GNU General Public License as published by
6515c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
6525c10afb9Smrg# any later version.
6535c10afb9Smrg
6545c10afb9Smrg# This program is distributed in the hope that it will be useful,
6555c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
6565c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6575c10afb9Smrg# GNU General Public License for more details.
6585c10afb9Smrg
6595c10afb9Smrg# You should have received a copy of the GNU General Public License
6605c10afb9Smrg# along with this program; if not, write to the Free Software
6615c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6625c10afb9Smrg# 02111-1307, USA.
6635c10afb9Smrg
6645c10afb9Smrg#serial 2
6655c10afb9Smrg
6665c10afb9Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
6675c10afb9Smrg# ------------------------------
6685c10afb9SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6695c10afb9Smrg[for mf in $CONFIG_FILES; do
6705c10afb9Smrg  # Strip MF so we end up with the name of the file.
6715c10afb9Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
6725c10afb9Smrg  # Check whether this is an Automake generated Makefile or not.
6735c10afb9Smrg  # We used to match only the files named `Makefile.in', but
6745c10afb9Smrg  # some people rename them; so instead we look at the file content.
6755c10afb9Smrg  # Grep'ing the first line is not enough: some people post-process
6765c10afb9Smrg  # each Makefile.in and add a new line on top of each file to say so.
6775c10afb9Smrg  # So let's grep whole file.
6785c10afb9Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6795c10afb9Smrg    dirpart=`AS_DIRNAME("$mf")`
6805c10afb9Smrg  else
6815c10afb9Smrg    continue
6825c10afb9Smrg  fi
6835c10afb9Smrg  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
6845c10afb9Smrg  # Extract the definition of DEP_FILES from the Makefile without
6855c10afb9Smrg  # running `make'.
6865c10afb9Smrg  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
6875c10afb9Smrg  test -z "$DEPDIR" && continue
6885c10afb9Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
6895c10afb9Smrg  U=`sed -n -e '/^U = / s///p' < "$mf"`
6905c10afb9Smrg  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6915c10afb9Smrg  # We invoke sed twice because it is the simplest approach to
6925c10afb9Smrg  # changing $(DEPDIR) to its actual value in the expansion.
6935c10afb9Smrg  for file in `sed -n -e '
6945c10afb9Smrg    /^DEP_FILES = .*\\\\$/ {
6955c10afb9Smrg      s/^DEP_FILES = //
6965c10afb9Smrg      :loop
6975c10afb9Smrg	s/\\\\$//
6985c10afb9Smrg	p
6995c10afb9Smrg	n
7005c10afb9Smrg	/\\\\$/ b loop
7015c10afb9Smrg      p
7025c10afb9Smrg    }
7035c10afb9Smrg    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7045c10afb9Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7055c10afb9Smrg    # Make sure the directory exists.
7065c10afb9Smrg    test -f "$dirpart/$file" && continue
7075c10afb9Smrg    fdir=`AS_DIRNAME(["$file"])`
7085c10afb9Smrg    AS_MKDIR_P([$dirpart/$fdir])
7095c10afb9Smrg    # echo "creating $dirpart/$file"
7105c10afb9Smrg    echo '# dummy' > "$dirpart/$file"
7115c10afb9Smrg  done
7125c10afb9Smrgdone
7135c10afb9Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7145c10afb9Smrg
7155c10afb9Smrg
7165c10afb9Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
7175c10afb9Smrg# -----------------------------
7185c10afb9Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
7195c10afb9Smrg#
7205c10afb9Smrg# This code is only required when automatic dependency tracking
7215c10afb9Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
7225c10afb9Smrg# need in order to bootstrap the dependency handling code.
7235c10afb9SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7245c10afb9Smrg[AC_CONFIG_COMMANDS([depfiles],
7255c10afb9Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7265c10afb9Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7275c10afb9Smrg])
7285c10afb9Smrg
7295c10afb9Smrg# Check to see how 'make' treats includes.	-*- Autoconf -*-
7305c10afb9Smrg
7315c10afb9Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7325c10afb9Smrg
7335c10afb9Smrg# This program is free software; you can redistribute it and/or modify
7345c10afb9Smrg# it under the terms of the GNU General Public License as published by
7355c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
7365c10afb9Smrg# any later version.
7375c10afb9Smrg
7385c10afb9Smrg# This program is distributed in the hope that it will be useful,
7395c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
7405c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7415c10afb9Smrg# GNU General Public License for more details.
7425c10afb9Smrg
7435c10afb9Smrg# You should have received a copy of the GNU General Public License
7445c10afb9Smrg# along with this program; if not, write to the Free Software
7455c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7465c10afb9Smrg# 02111-1307, USA.
7475c10afb9Smrg
7485c10afb9Smrg# serial 2
7495c10afb9Smrg
7505c10afb9Smrg# AM_MAKE_INCLUDE()
7515c10afb9Smrg# -----------------
7525c10afb9Smrg# Check to see how make treats includes.
7535c10afb9SmrgAC_DEFUN([AM_MAKE_INCLUDE],
7545c10afb9Smrg[am_make=${MAKE-make}
7555c10afb9Smrgcat > confinc << 'END'
7565c10afb9Smrgam__doit:
7575c10afb9Smrg	@echo done
7585c10afb9Smrg.PHONY: am__doit
7595c10afb9SmrgEND
7605c10afb9Smrg# If we don't find an include directive, just comment out the code.
7615c10afb9SmrgAC_MSG_CHECKING([for style of include used by $am_make])
7625c10afb9Smrgam__include="#"
7635c10afb9Smrgam__quote=
7645c10afb9Smrg_am_result=none
7655c10afb9Smrg# First try GNU make style include.
7665c10afb9Smrgecho "include confinc" > confmf
7675c10afb9Smrg# We grep out `Entering directory' and `Leaving directory'
7685c10afb9Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
7695c10afb9Smrg# In particular we don't look at `^make:' because GNU make might
7705c10afb9Smrg# be invoked under some other name (usually "gmake"), in which
7715c10afb9Smrg# case it prints its new name instead of `make'.
7725c10afb9Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7735c10afb9Smrg   am__include=include
7745c10afb9Smrg   am__quote=
7755c10afb9Smrg   _am_result=GNU
7765c10afb9Smrgfi
7775c10afb9Smrg# Now try BSD make style include.
7785c10afb9Smrgif test "$am__include" = "#"; then
7795c10afb9Smrg   echo '.include "confinc"' > confmf
7805c10afb9Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7815c10afb9Smrg      am__include=.include
7825c10afb9Smrg      am__quote="\""
7835c10afb9Smrg      _am_result=BSD
7845c10afb9Smrg   fi
7855c10afb9Smrgfi
7865c10afb9SmrgAC_SUBST([am__include])
7875c10afb9SmrgAC_SUBST([am__quote])
7885c10afb9SmrgAC_MSG_RESULT([$_am_result])
7895c10afb9Smrgrm -f confinc confmf
7905c10afb9Smrg])
7915c10afb9Smrg
7925c10afb9Smrg# AM_CONDITIONAL                                              -*- Autoconf -*-
7935c10afb9Smrg
7945c10afb9Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
7955c10afb9Smrg
7965c10afb9Smrg# This program is free software; you can redistribute it and/or modify
7975c10afb9Smrg# it under the terms of the GNU General Public License as published by
7985c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
7995c10afb9Smrg# any later version.
8005c10afb9Smrg
8015c10afb9Smrg# This program is distributed in the hope that it will be useful,
8025c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8035c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8045c10afb9Smrg# GNU General Public License for more details.
8055c10afb9Smrg
8065c10afb9Smrg# You should have received a copy of the GNU General Public License
8075c10afb9Smrg# along with this program; if not, write to the Free Software
8085c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8095c10afb9Smrg# 02111-1307, USA.
8105c10afb9Smrg
8115c10afb9Smrg# serial 5
8125c10afb9Smrg
8135c10afb9SmrgAC_PREREQ(2.52)
8145c10afb9Smrg
8155c10afb9Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8165c10afb9Smrg# -------------------------------------
8175c10afb9Smrg# Define a conditional.
8185c10afb9SmrgAC_DEFUN([AM_CONDITIONAL],
8195c10afb9Smrg[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8205c10afb9Smrg        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8215c10afb9SmrgAC_SUBST([$1_TRUE])
8225c10afb9SmrgAC_SUBST([$1_FALSE])
8235c10afb9Smrgif $2; then
8245c10afb9Smrg  $1_TRUE=
8255c10afb9Smrg  $1_FALSE='#'
8265c10afb9Smrgelse
8275c10afb9Smrg  $1_TRUE='#'
8285c10afb9Smrg  $1_FALSE=
8295c10afb9Smrgfi
8305c10afb9SmrgAC_CONFIG_COMMANDS_PRE(
8315c10afb9Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8325c10afb9Smrg  AC_MSG_ERROR([conditional "$1" was never defined.
8335c10afb9SmrgUsually this means the macro was only invoked conditionally.])
8345c10afb9Smrgfi])])
8355c10afb9Smrg
8365c10afb9Smrg# Add --enable-maintainer-mode option to configure.
8375c10afb9Smrg# From Jim Meyering
8385c10afb9Smrg
8395c10afb9Smrg# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
8405c10afb9Smrg
8415c10afb9Smrg# This program is free software; you can redistribute it and/or modify
8425c10afb9Smrg# it under the terms of the GNU General Public License as published by
8435c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
8445c10afb9Smrg# any later version.
8455c10afb9Smrg
8465c10afb9Smrg# This program is distributed in the hope that it will be useful,
8475c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8485c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8495c10afb9Smrg# GNU General Public License for more details.
8505c10afb9Smrg
8515c10afb9Smrg# You should have received a copy of the GNU General Public License
8525c10afb9Smrg# along with this program; if not, write to the Free Software
8535c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8545c10afb9Smrg# 02111-1307, USA.
8555c10afb9Smrg
8565c10afb9Smrg# serial 2
8575c10afb9Smrg
8585c10afb9SmrgAC_DEFUN([AM_MAINTAINER_MODE],
8595c10afb9Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
8605c10afb9Smrg  dnl maintainer-mode is disabled by default
8615c10afb9Smrg  AC_ARG_ENABLE(maintainer-mode,
8625c10afb9Smrg[  --enable-maintainer-mode enable make rules and dependencies not useful
8635c10afb9Smrg                          (and sometimes confusing) to the casual installer],
8645c10afb9Smrg      USE_MAINTAINER_MODE=$enableval,
8655c10afb9Smrg      USE_MAINTAINER_MODE=no)
8665c10afb9Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8675c10afb9Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
8685c10afb9Smrg  MAINT=$MAINTAINER_MODE_TRUE
8695c10afb9Smrg  AC_SUBST(MAINT)dnl
8705c10afb9Smrg]
8715c10afb9Smrg)
8725c10afb9Smrg
8735c10afb9SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8745c10afb9Smrg
8755c10afb9Smrg# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
8765c10afb9Smrg
8775c10afb9Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
8785c10afb9Smrg
8795c10afb9Smrg# This program is free software; you can redistribute it and/or modify
8805c10afb9Smrg# it under the terms of the GNU General Public License as published by
8815c10afb9Smrg# the Free Software Foundation; either version 2, or (at your option)
8825c10afb9Smrg# any later version.
8835c10afb9Smrg
8845c10afb9Smrg# This program is distributed in the hope that it will be useful,
8855c10afb9Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8865c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8875c10afb9Smrg# GNU General Public License for more details.
8885c10afb9Smrg
8895c10afb9Smrg# You should have received a copy of the GNU General Public License
8905c10afb9Smrg# along with this program; if not, write to the Free Software
8915c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8925c10afb9Smrg# 02111-1307, USA.
8935c10afb9Smrg
8945c10afb9SmrgAC_PREREQ([2.52])
8955c10afb9Smrg
8965c10afb9Smrg# serial 6
8975c10afb9Smrg
8985c10afb9Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
8995c10afb9SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9005c10afb9Smrg
9015c10afb9Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9025c10afb9Smrg# 
9035c10afb9Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9045c10afb9Smrg#
9055c10afb9Smrg# This program is free software; you can redistribute it and/or modify
9065c10afb9Smrg# it under the terms of the GNU General Public License as published by
9075c10afb9Smrg# the Free Software Foundation; either version 2 of the License, or
9085c10afb9Smrg# (at your option) any later version.
9095c10afb9Smrg#
9105c10afb9Smrg# This program is distributed in the hope that it will be useful, but
9115c10afb9Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
9125c10afb9Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9135c10afb9Smrg# General Public License for more details.
9145c10afb9Smrg#
9155c10afb9Smrg# You should have received a copy of the GNU General Public License
9165c10afb9Smrg# along with this program; if not, write to the Free Software
9175c10afb9Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9185c10afb9Smrg#
9195c10afb9Smrg# As a special exception to the GNU General Public License, if you
9205c10afb9Smrg# distribute this file as part of a program that contains a
9215c10afb9Smrg# configuration script generated by Autoconf, you may include it under
9225c10afb9Smrg# the same distribution terms that you use for the rest of that program.
9235c10afb9Smrg
9245c10afb9Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9255c10afb9Smrg# ----------------------------------
9265c10afb9SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
9275c10afb9Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9285c10afb9Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9295c10afb9SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9305c10afb9Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9315c10afb9Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9325c10afb9Smrgfi
9335c10afb9Smrgif test -n "$PKG_CONFIG"; then
9345c10afb9Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
9355c10afb9Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9365c10afb9Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9375c10afb9Smrg		AC_MSG_RESULT([yes])
9385c10afb9Smrg	else
9395c10afb9Smrg		AC_MSG_RESULT([no])
9405c10afb9Smrg		PKG_CONFIG=""
9415c10afb9Smrg	fi
9425c10afb9Smrg		
9435c10afb9Smrgfi[]dnl
9445c10afb9Smrg])# PKG_PROG_PKG_CONFIG
9455c10afb9Smrg
9465c10afb9Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9475c10afb9Smrg#
9485c10afb9Smrg# Check to see whether a particular set of modules exists.  Similar
9495c10afb9Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9505c10afb9Smrg#
9515c10afb9Smrg#
9525c10afb9Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9535c10afb9Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
9545c10afb9Smrg# PKG_CHECK_EXISTS manually
9555c10afb9Smrg# --------------------------------------------------------------
9565c10afb9SmrgAC_DEFUN([PKG_CHECK_EXISTS],
9575c10afb9Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9585c10afb9Smrgif test -n "$PKG_CONFIG" && \
9595c10afb9Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9605c10afb9Smrg  m4_ifval([$2], [$2], [:])
9615c10afb9Smrgm4_ifvaln([$3], [else
9625c10afb9Smrg  $3])dnl
9635c10afb9Smrgfi])
9645c10afb9Smrg
9655c10afb9Smrg
9665c10afb9Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9675c10afb9Smrg# ---------------------------------------------
9685c10afb9Smrgm4_define([_PKG_CONFIG],
9695c10afb9Smrg[if test -n "$PKG_CONFIG"; then
9705c10afb9Smrg    if test -n "$$1"; then
9715c10afb9Smrg        pkg_cv_[]$1="$$1"
9725c10afb9Smrg    else
9735c10afb9Smrg        PKG_CHECK_EXISTS([$3],
9745c10afb9Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9755c10afb9Smrg			 [pkg_failed=yes])
9765c10afb9Smrg    fi
9775c10afb9Smrgelse
9785c10afb9Smrg	pkg_failed=untried
9795c10afb9Smrgfi[]dnl
9805c10afb9Smrg])# _PKG_CONFIG
9815c10afb9Smrg
9825c10afb9Smrg# _PKG_SHORT_ERRORS_SUPPORTED
9835c10afb9Smrg# -----------------------------
9845c10afb9SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9855c10afb9Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9865c10afb9Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9875c10afb9Smrg        _pkg_short_errors_supported=yes
9885c10afb9Smrgelse
9895c10afb9Smrg        _pkg_short_errors_supported=no
9905c10afb9Smrgfi[]dnl
9915c10afb9Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
9925c10afb9Smrg
9935c10afb9Smrg
9945c10afb9Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9955c10afb9Smrg# [ACTION-IF-NOT-FOUND])
9965c10afb9Smrg#
9975c10afb9Smrg#
9985c10afb9Smrg# Note that if there is a possibility the first call to
9995c10afb9Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
10005c10afb9Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10015c10afb9Smrg#
10025c10afb9Smrg#
10035c10afb9Smrg# --------------------------------------------------------------
10045c10afb9SmrgAC_DEFUN([PKG_CHECK_MODULES],
10055c10afb9Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10065c10afb9SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10075c10afb9SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10085c10afb9Smrg
10095c10afb9Smrgpkg_failed=no
10105c10afb9SmrgAC_MSG_CHECKING([for $1])
10115c10afb9Smrg
10125c10afb9Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10135c10afb9Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
10145c10afb9Smrg
10155c10afb9Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10165c10afb9Smrgand $1[]_LIBS to avoid the need to call pkg-config.
10175c10afb9SmrgSee the pkg-config man page for more details.])
10185c10afb9Smrg
10195c10afb9Smrgif test $pkg_failed = yes; then
10205c10afb9Smrg        _PKG_SHORT_ERRORS_SUPPORTED
10215c10afb9Smrg        if test $_pkg_short_errors_supported = yes; then
10225c10afb9Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
10235c10afb9Smrg        else 
10245c10afb9Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
10255c10afb9Smrg        fi
10265c10afb9Smrg	# Put the nasty error message in config.log where it belongs
10275c10afb9Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10285c10afb9Smrg
10295c10afb9Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
10305c10afb9Smrg[Package requirements ($2) were not met:
10315c10afb9Smrg
10325c10afb9Smrg$$1_PKG_ERRORS
10335c10afb9Smrg
10345c10afb9SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
10355c10afb9Smrginstalled software in a non-standard prefix.
10365c10afb9Smrg
10375c10afb9Smrg_PKG_TEXT
10385c10afb9Smrg])],
10395c10afb9Smrg		[$4])
10405c10afb9Smrgelif test $pkg_failed = untried; then
10415c10afb9Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
10425c10afb9Smrg[The pkg-config script could not be found or is too old.  Make sure it
10435c10afb9Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
10445c10afb9Smrgpath to pkg-config.
10455c10afb9Smrg
10465c10afb9Smrg_PKG_TEXT
10475c10afb9Smrg
10485c10afb9SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
10495c10afb9Smrg		[$4])
10505c10afb9Smrgelse
10515c10afb9Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10525c10afb9Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10535c10afb9Smrg        AC_MSG_RESULT([yes])
10545c10afb9Smrg	ifelse([$3], , :, [$3])
10555c10afb9Smrgfi[]dnl
10565c10afb9Smrg])# PKG_CHECK_MODULES
10575c10afb9Smrg
10585c10afb9Smrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
10595c10afb9Smrgdnl
10605c10afb9Smrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
10615c10afb9Smrgdnl 
10625c10afb9Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
10635c10afb9Smrgdnl documentation for any purpose is hereby granted without fee, provided that
10645c10afb9Smrgdnl the above copyright notice appear in all copies and that both that
10655c10afb9Smrgdnl copyright notice and this permission notice appear in supporting
10665c10afb9Smrgdnl documentation.
10675c10afb9Smrgdnl 
10685c10afb9Smrgdnl The above copyright notice and this permission notice shall be included
10695c10afb9Smrgdnl in all copies or substantial portions of the Software.
10705c10afb9Smrgdnl 
10715c10afb9Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10725c10afb9Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10735c10afb9Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10745c10afb9Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
10755c10afb9Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
10765c10afb9Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
10775c10afb9Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
10785c10afb9Smrgdnl 
10795c10afb9Smrgdnl Except as contained in this notice, the name of the copyright holders shall
10805c10afb9Smrgdnl not be used in advertising or otherwise to promote the sale, use or
10815c10afb9Smrgdnl other dealings in this Software without prior written authorization
10825c10afb9Smrgdnl from the copyright holders.
10835c10afb9Smrgdnl 
10845c10afb9Smrg
10855c10afb9Smrg# XTRANS_TCP_FLAGS()
10865c10afb9Smrg# ------------------
10875c10afb9Smrg# Find needed libraries for TCP sockets, and check for IPv6 support
10885c10afb9SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[
10895c10afb9Smrg # SVR4 hides these in libraries other than libc
10905c10afb9Smrg AC_SEARCH_LIBS(socket, [socket])
10915c10afb9Smrg AC_SEARCH_LIBS(gethostbyname, [nsl])
10925c10afb9Smrg
10935c10afb9Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
10945c10afb9Smrg AC_ARG_ENABLE(ipv6, 
10955c10afb9Smrg	AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]),
10965c10afb9Smrg	[IPV6CONN=$enableval], 
10975c10afb9Smrg	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
10985c10afb9Smrg AC_MSG_CHECKING([if IPv6 support should be built])
10995c10afb9Smrg if test "$IPV6CONN" = "yes"; then
11005c10afb9Smrg	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
11015c10afb9Smrg fi
11025c10afb9Smrg AC_MSG_RESULT($IPV6CONN)
11035c10afb9Smrg
11045c10afb9Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in
11055c10afb9Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
11065c10afb9Smrg	AC_DEFINE([BSD44SOCKETS],1,
11075c10afb9Smrg 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
11085c10afb9Smrg#include <sys/types.h>
11095c10afb9Smrg#include <sys/socket.h>
11105c10afb9Smrg#include <netinet/in.h>
11115c10afb9Smrg ])
11125c10afb9Smrg]) # XTRANS_TCP_FLAGS
11135c10afb9Smrg
11145c10afb9Smrg# XTRANS_CONNECTION_FLAGS()
11155c10afb9Smrg# -------------------------
11165c10afb9Smrg# Standard checks for which Xtrans transports to use by the Xorg packages
11175c10afb9Smrg# that use Xtrans functions
11185c10afb9SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],
11195c10afb9Smrg[AC_REQUIRE([AC_TYPE_SIGNAL])
11205c10afb9Smrg AC_ARG_ENABLE(unix-transport,
11215c10afb9Smrg	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
11225c10afb9Smrg	[UNIXCONN=$enableval], [UNIXCONN=yes])
11235c10afb9Smrg AC_ARG_ENABLE(tcp-transport, 
11245c10afb9Smrg	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
11255c10afb9Smrg	[TCPCONN=$enableval], [TCPCONN=yes])
11265c10afb9Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
11275c10afb9Smrg if test "$UNIXCONN" = "yes"; then
11285c10afb9Smrg	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
11295c10afb9Smrg fi
11305c10afb9Smrg AC_MSG_RESULT($UNIXCONN)
11315c10afb9Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
11325c10afb9Smrg AC_MSG_RESULT($TCPCONN)
11335c10afb9Smrg if test "$TCPCONN" = "yes"; then
11345c10afb9Smrg	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
11355c10afb9Smrg	XTRANS_TCP_FLAGS
11365c10afb9Smrg fi
11375c10afb9Smrg]) # XTRANS_CONNECTION_FLAGS
11385c10afb9Smrg
11395c10afb9Smrg
11405c10afb9Smrg# XTRANS_SECURE_RPC_FLAGS()
11415c10afb9Smrg# -------------------------
11425c10afb9Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
11435c10afb9Smrg# so that any necessary networking libraries are already found
11445c10afb9SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
11455c10afb9Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS])
11465c10afb9Smrg AC_ARG_ENABLE(secure-rpc, 
11475c10afb9Smrg	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
11485c10afb9Smrg        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
11495c10afb9Smrg
11505c10afb9Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
11515c10afb9Smrg	FOUND_SECURE_RPC="no"
11525c10afb9Smrg	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
11535c10afb9Smrg			[FOUND_SECURE_RPC="yes"])
11545c10afb9Smrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
11555c10afb9Smrg		if test "x$SECURE_RPC" = "xyes" ; then
11565c10afb9Smrg	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
11575c10afb9Smrg		fi	
11585c10afb9Smrg		SECURE_RPC="no"
11595c10afb9Smrg	else
11605c10afb9Smrg		dnl FreeBSD keeps getsecretkey in librpcsvc
11615c10afb9Smrg		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
11625c10afb9Smrg		SECURE_RPC="yes"
11635c10afb9Smrg	fi
11645c10afb9Smrg fi
11655c10afb9Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
11665c10afb9Smrg if test "x$SECURE_RPC" = "xyes" ; then
11675c10afb9Smrg	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
11685c10afb9Smrg fi
11695c10afb9Smrg AC_MSG_RESULT($SECURE_RPC)
11705c10afb9Smrg]) # XTRANS_SECURE_RPC_FLAGS
11715c10afb9Smrg
11725c10afb9Smrg
11735c10afb9Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 04:08:39 mrg Exp $
11745c10afb9Smrgdnl
11755c10afb9Smrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
11765c10afb9Smrgdnl 
11775c10afb9Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
11785c10afb9Smrgdnl documentation for any purpose is hereby granted without fee, provided that
11795c10afb9Smrgdnl the above copyright notice appear in all copies and that both that
11805c10afb9Smrgdnl copyright notice and this permission notice appear in supporting
11815c10afb9Smrgdnl documentation.
11825c10afb9Smrgdnl 
11835c10afb9Smrgdnl The above copyright notice and this permission notice shall be included
11845c10afb9Smrgdnl in all copies or substantial portions of the Software.
11855c10afb9Smrgdnl 
11865c10afb9Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11875c10afb9Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11885c10afb9Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11895c10afb9Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11905c10afb9Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11915c10afb9Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11925c10afb9Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
11935c10afb9Smrgdnl 
11945c10afb9Smrgdnl Except as contained in this notice, the name of the copyright holders shall
11955c10afb9Smrgdnl not be used in advertising or otherwise to promote the sale, use or
11965c10afb9Smrgdnl other dealings in this Software without prior written authorization
11975c10afb9Smrgdnl from the copyright holders.
11985c10afb9Smrgdnl 
11995c10afb9Smrg
12005c10afb9Smrg# XORG_PROG_RAWCPP()
12015c10afb9Smrg# ------------------
12025c10afb9Smrg# Find cpp program and necessary flags for use in pre-processing text files
12035c10afb9Smrg# such as man pages and config files
12045c10afb9SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
12055c10afb9SmrgAC_REQUIRE([AC_PROG_CPP])
12065c10afb9SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
12075c10afb9Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
12085c10afb9Smrg
12095c10afb9Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
12105c10afb9Smrg# which is not the best choice for supporting other OS'es, but covers most
12115c10afb9Smrg# of the ones we need for now.
12125c10afb9SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
12135c10afb9SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
12145c10afb9Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
12155c10afb9Smrg	AC_MSG_RESULT([no])
12165c10afb9Smrgelse
12175c10afb9Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
12185c10afb9Smrg		RAWCPPFLAGS=-undef
12195c10afb9Smrg		AC_MSG_RESULT([yes])
12205c10afb9Smrg	else
12215c10afb9Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
12225c10afb9Smrg	fi
12235c10afb9Smrgfi
12245c10afb9Smrgrm -f conftest.$ac_ext
12255c10afb9Smrg
12265c10afb9SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
12275c10afb9SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
12285c10afb9Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
12295c10afb9Smrg	AC_MSG_RESULT([no])
12305c10afb9Smrgelse
12315c10afb9Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
12325c10afb9Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
12335c10afb9Smrg		AC_MSG_RESULT([yes])
12345c10afb9Smrg	else
12355c10afb9Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
12365c10afb9Smrg	fi
12375c10afb9Smrgfi
12385c10afb9Smrgrm -f conftest.$ac_ext
12395c10afb9SmrgAC_SUBST(RAWCPPFLAGS)
12405c10afb9Smrg]) # XORG_PROG_RAWCPP
12415c10afb9Smrg
12425c10afb9Smrg# XORG_MANPAGE_SECTIONS()
12435c10afb9Smrg# -----------------------
12445c10afb9Smrg# Determine which sections man pages go in for the different man page types
12455c10afb9Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
12465c10afb9Smrg# Not sure if there's any better way than just hardcoding by OS name.
12475c10afb9Smrg# Override default settings by setting environment variables
12485c10afb9Smrg
12495c10afb9SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
12505c10afb9SmrgAC_REQUIRE([AC_CANONICAL_HOST])
12515c10afb9Smrg
12525c10afb9Smrgif test x$APP_MAN_SUFFIX = x    ; then
12535c10afb9Smrg    case $host_os in
12545c10afb9Smrg	linux*)	APP_MAN_SUFFIX=1x ;;
12555c10afb9Smrg	*)	APP_MAN_SUFFIX=1  ;;
12565c10afb9Smrg    esac
12575c10afb9Smrgfi
12585c10afb9Smrgif test x$APP_MAN_DIR = x    ; then
12595c10afb9Smrg    case $host_os in
12605c10afb9Smrg	linux*)	APP_MAN_DIR='$(mandir)/man1' ;;
12615c10afb9Smrg	*)	APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
12625c10afb9Smrg    esac
12635c10afb9Smrgfi
12645c10afb9Smrg
12655c10afb9Smrgif test x$LIB_MAN_SUFFIX = x    ; then
12665c10afb9Smrg    case $host_os in
12675c10afb9Smrg	linux*)	LIB_MAN_SUFFIX=3x ;;
12685c10afb9Smrg	*)	LIB_MAN_SUFFIX=3  ;;
12695c10afb9Smrg    esac
12705c10afb9Smrgfi
12715c10afb9Smrgif test x$LIB_MAN_DIR = x    ; then
12725c10afb9Smrg    case $host_os in
12735c10afb9Smrg	linux*)	LIB_MAN_DIR='$(mandir)/man3' ;;
12745c10afb9Smrg	*)	LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
12755c10afb9Smrg    esac
12765c10afb9Smrgfi
12775c10afb9Smrg
12785c10afb9Smrgif test x$FILE_MAN_SUFFIX = x    ; then
12795c10afb9Smrg    case $host_os in
12805c10afb9Smrg	linux*)		FILE_MAN_SUFFIX=5x ;;
12815c10afb9Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
12825c10afb9Smrg	*)		FILE_MAN_SUFFIX=5  ;;
12835c10afb9Smrg    esac
12845c10afb9Smrgfi
12855c10afb9Smrgif test x$FILE_MAN_DIR = x    ; then
12865c10afb9Smrg    case $host_os in
12875c10afb9Smrg	linux*)	FILE_MAN_DIR='$(mandir)/man5' ;;
12885c10afb9Smrg	*)	FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
12895c10afb9Smrg    esac
12905c10afb9Smrgfi
12915c10afb9Smrg
12925c10afb9Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 
12935c10afb9Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
12945c10afb9Smrgif test x$MISC_MAN_SUFFIX = x    ; then
12955c10afb9Smrg    case $host_os in
12965c10afb9Smrg#	linux*)		MISC_MAN_SUFFIX=7x ;;
12975c10afb9Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
12985c10afb9Smrg	*)		MISC_MAN_SUFFIX=7  ;;
12995c10afb9Smrg    esac
13005c10afb9Smrgfi
13015c10afb9Smrgif test x$MISC_MAN_DIR = x    ; then
13025c10afb9Smrg    case $host_os in
13035c10afb9Smrg#	linux*)	MISC_MAN_DIR='$(mandir)/man7' ;;
13045c10afb9Smrg	*)	MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
13055c10afb9Smrg    esac
13065c10afb9Smrgfi
13075c10afb9Smrg
13085c10afb9Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 
13095c10afb9Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
13105c10afb9Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
13115c10afb9Smrg    case $host_os in
13125c10afb9Smrg#	linux*)		DRIVER_MAN_SUFFIX=4x ;;
13135c10afb9Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
13145c10afb9Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
13155c10afb9Smrg    esac
13165c10afb9Smrgfi
13175c10afb9Smrgif test x$DRIVER_MAN_DIR = x    ; then
13185c10afb9Smrg    case $host_os in
13195c10afb9Smrg#	linux*)	DRIVER_MAN_DIR='$(mandir)/man4' ;;
13205c10afb9Smrg	*)	DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
13215c10afb9Smrg    esac
13225c10afb9Smrgfi
13235c10afb9Smrg
13245c10afb9Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
13255c10afb9Smrg    case $host_os in
13265c10afb9Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
13275c10afb9Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
13285c10afb9Smrg    esac
13295c10afb9Smrgfi
13305c10afb9Smrgif test x$ADMIN_MAN_DIR = x    ; then
13315c10afb9Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
13325c10afb9Smrgfi
13335c10afb9Smrg
13345c10afb9Smrg
13355c10afb9SmrgAC_SUBST([APP_MAN_SUFFIX])
13365c10afb9SmrgAC_SUBST([LIB_MAN_SUFFIX])
13375c10afb9SmrgAC_SUBST([FILE_MAN_SUFFIX])
13385c10afb9SmrgAC_SUBST([MISC_MAN_SUFFIX])
13395c10afb9SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
13405c10afb9SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
13415c10afb9SmrgAC_SUBST([APP_MAN_DIR])
13425c10afb9SmrgAC_SUBST([LIB_MAN_DIR])
13435c10afb9SmrgAC_SUBST([FILE_MAN_DIR])
13445c10afb9SmrgAC_SUBST([MISC_MAN_DIR])
13455c10afb9SmrgAC_SUBST([DRIVER_MAN_DIR])
13465c10afb9SmrgAC_SUBST([ADMIN_MAN_DIR])
13475c10afb9Smrg]) # XORG_MANPAGE_SECTIONS
13485c10afb9Smrg
13495c10afb9Smrg# XORG_CHECK_LINUXDOC
13505c10afb9Smrg# -------------------
13515c10afb9Smrg# Defines the variable MAKE_TEXT if the necessary tools and
13525c10afb9Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
13535c10afb9Smrg# Whether or not the necessary tools and files are found can be checked
13545c10afb9Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
13555c10afb9SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
13565c10afb9SmrgAC_CHECK_FILE(
13575c10afb9Smrg	[$prefix/share/X11/sgml/defs.ent], 
13585c10afb9Smrg	[DEFS_ENT_PATH=$prefix/share/X11/sgml],
13595c10afb9Smrg	[DEFS_ENT_PATH=]
13605c10afb9Smrg)
13615c10afb9Smrg
13625c10afb9SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
13635c10afb9SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
13645c10afb9Smrg
13655c10afb9SmrgAC_MSG_CHECKING([Whether to build documentation])
13665c10afb9Smrg
13675c10afb9Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
13685c10afb9Smrg   BUILDDOC=yes
13695c10afb9Smrgelse
13705c10afb9Smrg   BUILDDOC=no
13715c10afb9Smrgfi
13725c10afb9Smrg
13735c10afb9SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
13745c10afb9Smrg
13755c10afb9SmrgAC_MSG_RESULT([$BUILDDOC])
13765c10afb9Smrg
13775c10afb9SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
13785c10afb9Smrg
13795c10afb9Smrgif test x$PS2PDF != x ; then
13805c10afb9Smrg   BUILDPDFDOC=yes
13815c10afb9Smrgelse
13825c10afb9Smrg   BUILDPDFDOC=no
13835c10afb9Smrgfi
13845c10afb9Smrg
13855c10afb9SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
13865c10afb9Smrg
13875c10afb9SmrgAC_MSG_RESULT([$BUILDPDFDOC])
13885c10afb9Smrg
13895c10afb9SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
13905c10afb9SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
13915c10afb9SmrgMAKE_PDF="$PS2PDF"
13925c10afb9SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
13935c10afb9Smrg
13945c10afb9SmrgAC_SUBST(MAKE_TEXT)
13955c10afb9SmrgAC_SUBST(MAKE_PS)
13965c10afb9SmrgAC_SUBST(MAKE_PDF)
13975c10afb9SmrgAC_SUBST(MAKE_HTML)
13985c10afb9Smrg]) # XORG_CHECK_LINUXDOC
13995c10afb9Smrg
14005c10afb9Smrg# XORG_CHECK_MALLOC_ZERO
14015c10afb9Smrg# ----------------------
14025c10afb9Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
14035c10afb9Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
14045c10afb9Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
14055c10afb9SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
14065c10afb9SmrgAC_ARG_ENABLE(malloc0returnsnull,
14075c10afb9Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
14085c10afb9Smrg		       [malloc(0) returns NULL (default: auto)]),
14095c10afb9Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
14105c10afb9Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
14115c10afb9Smrg
14125c10afb9SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
14135c10afb9Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
14145c10afb9Smrg	AC_RUN_IFELSE([
14155c10afb9Smrgchar *malloc();
14165c10afb9Smrgchar *realloc();
14175c10afb9Smrgchar *calloc();
14185c10afb9Smrgmain() {
14195c10afb9Smrg    char *m0, *r0, *c0, *p;
14205c10afb9Smrg    m0 = malloc(0);
14215c10afb9Smrg    p = malloc(10);
14225c10afb9Smrg    r0 = realloc(p,0);
14235c10afb9Smrg    c0 = calloc(0);
14245c10afb9Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
14255c10afb9Smrg}],
14265c10afb9Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
14275c10afb9Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
14285c10afb9Smrgfi
14295c10afb9SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
14305c10afb9Smrg
14315c10afb9Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
14325c10afb9Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
14335c10afb9Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
14345c10afb9Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
14355c10afb9Smrgelse
14365c10afb9Smrg	MALLOC_ZERO_CFLAGS=""
14375c10afb9Smrg	XMALLOC_ZERO_CFLAGS=""
14385c10afb9Smrg	XTMALLOC_ZERO_CFLAGS=""
14395c10afb9Smrgfi
14405c10afb9Smrg
14415c10afb9SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
14425c10afb9SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
14435c10afb9SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
14445c10afb9Smrg]) # XORG_CHECK_MALLOC_ZERO
14455c10afb9Smrg
14465c10afb9Smrgdnl Copyright 2005 Red Hat, Inc
14475c10afb9Smrgdnl
14485c10afb9Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
14495c10afb9Smrgdnl documentation for any purpose is hereby granted without fee, provided that
14505c10afb9Smrgdnl the above copyright notice appear in all copies and that both that
14515c10afb9Smrgdnl copyright notice and this permission notice appear in supporting
14525c10afb9Smrgdnl documentation.
14535c10afb9Smrgdnl
14545c10afb9Smrgdnl The above copyright notice and this permission notice shall be included
14555c10afb9Smrgdnl in all copies or substantial portions of the Software.
14565c10afb9Smrgdnl
14575c10afb9Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14585c10afb9Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14595c10afb9Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
14605c10afb9Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
14615c10afb9Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
14625c10afb9Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
14635c10afb9Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
14645c10afb9Smrgdnl
14655c10afb9Smrgdnl Except as contained in this notice, the name of the copyright holders shall
14665c10afb9Smrgdnl not be used in advertising or otherwise to promote the sale, use or
14675c10afb9Smrgdnl other dealings in this Software without prior written authorization
14685c10afb9Smrgdnl from the copyright holders.
14695c10afb9Smrgdnl
14705c10afb9Smrg
14715c10afb9Smrg# XORG_RELEASE_VERSION
14725c10afb9Smrg# --------------------
14735c10afb9Smrg# Adds --with/without-release-string and changes the PACKAGE and
14745c10afb9Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
14755c10afb9Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
14765c10afb9Smrg 
14775c10afb9SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
14785c10afb9Smrg	AC_ARG_WITH(release-version,
14795c10afb9Smrg			AC_HELP_STRING([--with-release-version=STRING],
14805c10afb9Smrg				[Use release version string in package name]),
14815c10afb9Smrg			[RELEASE_VERSION="$withval"],
14825c10afb9Smrg			[RELEASE_VERSION=""])
14835c10afb9Smrg	if test "x$RELEASE_VERSION" != "x"; then
14845c10afb9Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
14855c10afb9Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
14865c10afb9Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
14875c10afb9Smrg	fi
14885c10afb9Smrg])
14895c10afb9Smrg
1490