aclocal.m4 revision 3294c433
13294c433Smrg# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
23294c433Smrg
33294c433Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
43294c433Smrg# Free Software Foundation, Inc.
53294c433Smrg# This file is free software; the Free Software Foundation
63294c433Smrg# gives unlimited permission to copy and/or distribute it,
73294c433Smrg# with or without modifications, as long as this notice is preserved.
83294c433Smrg
93294c433Smrg# This program is distributed in the hope that it will be useful,
103294c433Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
113294c433Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
123294c433Smrg# PARTICULAR PURPOSE.
133294c433Smrg
143294c433Smrg# Do all the work for Automake.                            -*- Autoconf -*-
153294c433Smrg
163294c433Smrg# This macro actually does too much some checks are only needed if
173294c433Smrg# your package does certain things.  But this isn't really a big deal.
183294c433Smrg
193294c433Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
203294c433Smrg# Free Software Foundation, Inc.
213294c433Smrg
223294c433Smrg# This program is free software; you can redistribute it and/or modify
233294c433Smrg# it under the terms of the GNU General Public License as published by
243294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
253294c433Smrg# any later version.
263294c433Smrg
273294c433Smrg# This program is distributed in the hope that it will be useful,
283294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
293294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
303294c433Smrg# GNU General Public License for more details.
313294c433Smrg
323294c433Smrg# You should have received a copy of the GNU General Public License
333294c433Smrg# along with this program; if not, write to the Free Software
343294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
353294c433Smrg# 02111-1307, USA.
363294c433Smrg
373294c433Smrg# serial 10
383294c433Smrg
393294c433SmrgAC_PREREQ([2.54])
403294c433Smrg
413294c433Smrg# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
423294c433Smrg# the ones we care about.
433294c433Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
443294c433Smrg
453294c433Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
463294c433Smrg# AM_INIT_AUTOMAKE([OPTIONS])
473294c433Smrg# -----------------------------------------------
483294c433Smrg# The call with PACKAGE and VERSION arguments is the old style
493294c433Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
503294c433Smrg# and VERSION should now be passed to AC_INIT and removed from
513294c433Smrg# the call to AM_INIT_AUTOMAKE.
523294c433Smrg# We support both call styles for the transition.  After
533294c433Smrg# the next Automake release, Autoconf can make the AC_INIT
543294c433Smrg# arguments mandatory, and then we can depend on a new Autoconf
553294c433Smrg# release and drop the old call support.
563294c433SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
573294c433Smrg[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
583294c433Smrg AC_REQUIRE([AC_PROG_INSTALL])dnl
593294c433Smrg# test to see if srcdir already configured
603294c433Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
613294c433Smrg   test -f $srcdir/config.status; then
623294c433Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
633294c433Smrgfi
643294c433Smrg
653294c433Smrg# test whether we have cygpath
663294c433Smrgif test -z "$CYGPATH_W"; then
673294c433Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
683294c433Smrg    CYGPATH_W='cygpath -w'
693294c433Smrg  else
703294c433Smrg    CYGPATH_W=echo
713294c433Smrg  fi
723294c433Smrgfi
733294c433SmrgAC_SUBST([CYGPATH_W])
743294c433Smrg
753294c433Smrg# Define the identity of the package.
763294c433Smrgdnl Distinguish between old-style and new-style calls.
773294c433Smrgm4_ifval([$2],
783294c433Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
793294c433Smrg AC_SUBST([PACKAGE], [$1])dnl
803294c433Smrg AC_SUBST([VERSION], [$2])],
813294c433Smrg[_AM_SET_OPTIONS([$1])dnl
823294c433Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
833294c433Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
843294c433Smrg
853294c433Smrg_AM_IF_OPTION([no-define],,
863294c433Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
873294c433Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
883294c433Smrg
893294c433Smrg# Some tools Automake needs.
903294c433SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
913294c433SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
923294c433SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
933294c433SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
943294c433SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
953294c433SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
963294c433SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
973294c433SmrgAM_MISSING_PROG(AMTAR, tar)
983294c433SmrgAM_PROG_INSTALL_SH
993294c433SmrgAM_PROG_INSTALL_STRIP
1003294c433Smrg# We need awk for the "check" target.  The system "awk" is bad on
1013294c433Smrg# some platforms.
1023294c433SmrgAC_REQUIRE([AC_PROG_AWK])dnl
1033294c433SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
1043294c433SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
1053294c433Smrg
1063294c433Smrg_AM_IF_OPTION([no-dependencies],,
1073294c433Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
1083294c433Smrg                  [_AM_DEPENDENCIES(CC)],
1093294c433Smrg                  [define([AC_PROG_CC],
1103294c433Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1113294c433SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
1123294c433Smrg                  [_AM_DEPENDENCIES(CXX)],
1133294c433Smrg                  [define([AC_PROG_CXX],
1143294c433Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1153294c433Smrg])
1163294c433Smrg])
1173294c433Smrg
1183294c433Smrg
1193294c433Smrg# When config.status generates a header, we must update the stamp-h file.
1203294c433Smrg# This file resides in the same directory as the config header
1213294c433Smrg# that is generated.  The stamp files are numbered to have different names.
1223294c433Smrg
1233294c433Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1243294c433Smrg# loop where config.status creates the headers, so we can generate
1253294c433Smrg# our stamp files there.
1263294c433SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1273294c433Smrg[# Compute $1's index in $config_headers.
1283294c433Smrg_am_stamp_count=1
1293294c433Smrgfor _am_header in $config_headers :; do
1303294c433Smrg  case $_am_header in
1313294c433Smrg    $1 | $1:* )
1323294c433Smrg      break ;;
1333294c433Smrg    * )
1343294c433Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1353294c433Smrg  esac
1363294c433Smrgdone
1373294c433Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1383294c433Smrg
1393294c433Smrg# Copyright 2002  Free Software Foundation, Inc.
1403294c433Smrg
1413294c433Smrg# This program is free software; you can redistribute it and/or modify
1423294c433Smrg# it under the terms of the GNU General Public License as published by
1433294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
1443294c433Smrg# any later version.
1453294c433Smrg
1463294c433Smrg# This program is distributed in the hope that it will be useful,
1473294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1483294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1493294c433Smrg# GNU General Public License for more details.
1503294c433Smrg
1513294c433Smrg# You should have received a copy of the GNU General Public License
1523294c433Smrg# along with this program; if not, write to the Free Software
1533294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1543294c433Smrg
1553294c433Smrg# AM_AUTOMAKE_VERSION(VERSION)
1563294c433Smrg# ----------------------------
1573294c433Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
1583294c433Smrg# generated from the m4 files accompanying Automake X.Y.
1593294c433SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1603294c433Smrg
1613294c433Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
1623294c433Smrg# -------------------------------
1633294c433Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
1643294c433Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1653294c433SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1663294c433Smrg	 [AM_AUTOMAKE_VERSION([1.7.9])])
1673294c433Smrg
1683294c433Smrg# Helper functions for option handling.                    -*- Autoconf -*-
1693294c433Smrg
1703294c433Smrg# Copyright 2001, 2002  Free Software Foundation, Inc.
1713294c433Smrg
1723294c433Smrg# This program is free software; you can redistribute it and/or modify
1733294c433Smrg# it under the terms of the GNU General Public License as published by
1743294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
1753294c433Smrg# any later version.
1763294c433Smrg
1773294c433Smrg# This program is distributed in the hope that it will be useful,
1783294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1793294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1803294c433Smrg# GNU General Public License for more details.
1813294c433Smrg
1823294c433Smrg# You should have received a copy of the GNU General Public License
1833294c433Smrg# along with this program; if not, write to the Free Software
1843294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1853294c433Smrg# 02111-1307, USA.
1863294c433Smrg
1873294c433Smrg# serial 2
1883294c433Smrg
1893294c433Smrg# _AM_MANGLE_OPTION(NAME)
1903294c433Smrg# -----------------------
1913294c433SmrgAC_DEFUN([_AM_MANGLE_OPTION],
1923294c433Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1933294c433Smrg
1943294c433Smrg# _AM_SET_OPTION(NAME)
1953294c433Smrg# ------------------------------
1963294c433Smrg# Set option NAME.  Presently that only means defining a flag for this option.
1973294c433SmrgAC_DEFUN([_AM_SET_OPTION],
1983294c433Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1993294c433Smrg
2003294c433Smrg# _AM_SET_OPTIONS(OPTIONS)
2013294c433Smrg# ----------------------------------
2023294c433Smrg# OPTIONS is a space-separated list of Automake options.
2033294c433SmrgAC_DEFUN([_AM_SET_OPTIONS],
2043294c433Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2053294c433Smrg
2063294c433Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2073294c433Smrg# -------------------------------------------
2083294c433Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2093294c433SmrgAC_DEFUN([_AM_IF_OPTION],
2103294c433Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2113294c433Smrg
2123294c433Smrg#
2133294c433Smrg# Check to make sure that the build environment is sane.
2143294c433Smrg#
2153294c433Smrg
2163294c433Smrg# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
2173294c433Smrg
2183294c433Smrg# This program is free software; you can redistribute it and/or modify
2193294c433Smrg# it under the terms of the GNU General Public License as published by
2203294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
2213294c433Smrg# any later version.
2223294c433Smrg
2233294c433Smrg# This program is distributed in the hope that it will be useful,
2243294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2253294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2263294c433Smrg# GNU General Public License for more details.
2273294c433Smrg
2283294c433Smrg# You should have received a copy of the GNU General Public License
2293294c433Smrg# along with this program; if not, write to the Free Software
2303294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2313294c433Smrg# 02111-1307, USA.
2323294c433Smrg
2333294c433Smrg# serial 3
2343294c433Smrg
2353294c433Smrg# AM_SANITY_CHECK
2363294c433Smrg# ---------------
2373294c433SmrgAC_DEFUN([AM_SANITY_CHECK],
2383294c433Smrg[AC_MSG_CHECKING([whether build environment is sane])
2393294c433Smrg# Just in case
2403294c433Smrgsleep 1
2413294c433Smrgecho timestamp > conftest.file
2423294c433Smrg# Do `set' in a subshell so we don't clobber the current shell's
2433294c433Smrg# arguments.  Must try -L first in case configure is actually a
2443294c433Smrg# symlink; some systems play weird games with the mod time of symlinks
2453294c433Smrg# (eg FreeBSD returns the mod time of the symlink's containing
2463294c433Smrg# directory).
2473294c433Smrgif (
2483294c433Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2493294c433Smrg   if test "$[*]" = "X"; then
2503294c433Smrg      # -L didn't work.
2513294c433Smrg      set X `ls -t $srcdir/configure conftest.file`
2523294c433Smrg   fi
2533294c433Smrg   rm -f conftest.file
2543294c433Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
2553294c433Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
2563294c433Smrg
2573294c433Smrg      # If neither matched, then we have a broken ls.  This can happen
2583294c433Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
2593294c433Smrg      # broken ls alias from the environment.  This has actually
2603294c433Smrg      # happened.  Such a system could not be considered "sane".
2613294c433Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2623294c433Smrgalias in your environment])
2633294c433Smrg   fi
2643294c433Smrg
2653294c433Smrg   test "$[2]" = conftest.file
2663294c433Smrg   )
2673294c433Smrgthen
2683294c433Smrg   # Ok.
2693294c433Smrg   :
2703294c433Smrgelse
2713294c433Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
2723294c433SmrgCheck your system clock])
2733294c433Smrgfi
2743294c433SmrgAC_MSG_RESULT(yes)])
2753294c433Smrg
2763294c433Smrg#  -*- Autoconf -*-
2773294c433Smrg
2783294c433Smrg
2793294c433Smrg# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
2803294c433Smrg
2813294c433Smrg# This program is free software; you can redistribute it and/or modify
2823294c433Smrg# it under the terms of the GNU General Public License as published by
2833294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
2843294c433Smrg# any later version.
2853294c433Smrg
2863294c433Smrg# This program is distributed in the hope that it will be useful,
2873294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2883294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2893294c433Smrg# GNU General Public License for more details.
2903294c433Smrg
2913294c433Smrg# You should have received a copy of the GNU General Public License
2923294c433Smrg# along with this program; if not, write to the Free Software
2933294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2943294c433Smrg# 02111-1307, USA.
2953294c433Smrg
2963294c433Smrg# serial 3
2973294c433Smrg
2983294c433Smrg# AM_MISSING_PROG(NAME, PROGRAM)
2993294c433Smrg# ------------------------------
3003294c433SmrgAC_DEFUN([AM_MISSING_PROG],
3013294c433Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
3023294c433Smrg$1=${$1-"${am_missing_run}$2"}
3033294c433SmrgAC_SUBST($1)])
3043294c433Smrg
3053294c433Smrg
3063294c433Smrg# AM_MISSING_HAS_RUN
3073294c433Smrg# ------------------
3083294c433Smrg# Define MISSING if not defined so far and test if it supports --run.
3093294c433Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
3103294c433SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
3113294c433Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3123294c433Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3133294c433Smrg# Use eval to expand $SHELL
3143294c433Smrgif eval "$MISSING --run true"; then
3153294c433Smrg  am_missing_run="$MISSING --run "
3163294c433Smrgelse
3173294c433Smrg  am_missing_run=
3183294c433Smrg  AC_MSG_WARN([`missing' script is too old or missing])
3193294c433Smrgfi
3203294c433Smrg])
3213294c433Smrg
3223294c433Smrg# AM_AUX_DIR_EXPAND
3233294c433Smrg
3243294c433Smrg# Copyright 2001 Free Software Foundation, Inc.
3253294c433Smrg
3263294c433Smrg# This program is free software; you can redistribute it and/or modify
3273294c433Smrg# it under the terms of the GNU General Public License as published by
3283294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
3293294c433Smrg# any later version.
3303294c433Smrg
3313294c433Smrg# This program is distributed in the hope that it will be useful,
3323294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
3333294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3343294c433Smrg# GNU General Public License for more details.
3353294c433Smrg
3363294c433Smrg# You should have received a copy of the GNU General Public License
3373294c433Smrg# along with this program; if not, write to the Free Software
3383294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3393294c433Smrg# 02111-1307, USA.
3403294c433Smrg
3413294c433Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
3423294c433Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
3433294c433Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
3443294c433Smrg#
3453294c433Smrg# Of course, Automake must honor this variable whenever it calls a
3463294c433Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
3473294c433Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
3483294c433Smrg# depending on how configure is run.  This is pretty annoying, since
3493294c433Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
3503294c433Smrg# source directory, any form will work fine, but in subdirectories a
3513294c433Smrg# relative path needs to be adjusted first.
3523294c433Smrg#
3533294c433Smrg# $ac_aux_dir/missing
3543294c433Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
3553294c433Smrg# $top_srcdir/$ac_aux_dir/missing
3563294c433Smrg#    fails if $ac_aux_dir is absolute,
3573294c433Smrg#    fails when called from a subdirectory in a VPATH build with
3583294c433Smrg#          a relative $ac_aux_dir
3593294c433Smrg#
3603294c433Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
3613294c433Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
3623294c433Smrg# harmless because $srcdir is `.', but things will broke when you
3633294c433Smrg# start a VPATH build or use an absolute $srcdir.
3643294c433Smrg#
3653294c433Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
3663294c433Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
3673294c433Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
3683294c433Smrg# and then we would define $MISSING as
3693294c433Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
3703294c433Smrg# This will work as long as MISSING is not called from configure, because
3713294c433Smrg# unfortunately $(top_srcdir) has no meaning in configure.
3723294c433Smrg# However there are other variables, like CC, which are often used in
3733294c433Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
3743294c433Smrg#
3753294c433Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
3763294c433Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
3773294c433Smrg# configured tree to be moved without reconfiguration.
3783294c433Smrg
3793294c433Smrg# Rely on autoconf to set up CDPATH properly.
3803294c433SmrgAC_PREREQ([2.50])
3813294c433Smrg
3823294c433SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], [
3833294c433Smrg# expand $ac_aux_dir to an absolute path
3843294c433Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
3853294c433Smrg])
3863294c433Smrg
3873294c433Smrg# AM_PROG_INSTALL_SH
3883294c433Smrg# ------------------
3893294c433Smrg# Define $install_sh.
3903294c433Smrg
3913294c433Smrg# Copyright 2001 Free Software Foundation, Inc.
3923294c433Smrg
3933294c433Smrg# This program is free software; you can redistribute it and/or modify
3943294c433Smrg# it under the terms of the GNU General Public License as published by
3953294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
3963294c433Smrg# any later version.
3973294c433Smrg
3983294c433Smrg# This program is distributed in the hope that it will be useful,
3993294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4003294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4013294c433Smrg# GNU General Public License for more details.
4023294c433Smrg
4033294c433Smrg# You should have received a copy of the GNU General Public License
4043294c433Smrg# along with this program; if not, write to the Free Software
4053294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4063294c433Smrg# 02111-1307, USA.
4073294c433Smrg
4083294c433SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
4093294c433Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
4103294c433Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
4113294c433SmrgAC_SUBST(install_sh)])
4123294c433Smrg
4133294c433Smrg# AM_PROG_INSTALL_STRIP
4143294c433Smrg
4153294c433Smrg# Copyright 2001 Free Software Foundation, Inc.
4163294c433Smrg
4173294c433Smrg# This program is free software; you can redistribute it and/or modify
4183294c433Smrg# it under the terms of the GNU General Public License as published by
4193294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
4203294c433Smrg# any later version.
4213294c433Smrg
4223294c433Smrg# This program is distributed in the hope that it will be useful,
4233294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4243294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4253294c433Smrg# GNU General Public License for more details.
4263294c433Smrg
4273294c433Smrg# You should have received a copy of the GNU General Public License
4283294c433Smrg# along with this program; if not, write to the Free Software
4293294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4303294c433Smrg# 02111-1307, USA.
4313294c433Smrg
4323294c433Smrg# One issue with vendor `install' (even GNU) is that you can't
4333294c433Smrg# specify the program used to strip binaries.  This is especially
4343294c433Smrg# annoying in cross-compiling environments, where the build's strip
4353294c433Smrg# is unlikely to handle the host's binaries.
4363294c433Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
4373294c433Smrg# always use install-sh in `make install-strip', and initialize
4383294c433Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
4393294c433SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
4403294c433Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4413294c433Smrg# Installed binaries are usually stripped using `strip' when the user
4423294c433Smrg# run `make install-strip'.  However `strip' might not be the right
4433294c433Smrg# tool to use in cross-compilation environments, therefore Automake
4443294c433Smrg# will honor the `STRIP' environment variable to overrule this program.
4453294c433Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
4463294c433Smrgif test "$cross_compiling" != no; then
4473294c433Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
4483294c433Smrgfi
4493294c433SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
4503294c433SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
4513294c433Smrg
4523294c433Smrg#                                                          -*- Autoconf -*-
4533294c433Smrg# Copyright (C) 2003  Free Software Foundation, Inc.
4543294c433Smrg
4553294c433Smrg# This program is free software; you can redistribute it and/or modify
4563294c433Smrg# it under the terms of the GNU General Public License as published by
4573294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
4583294c433Smrg# any later version.
4593294c433Smrg
4603294c433Smrg# This program is distributed in the hope that it will be useful,
4613294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4623294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4633294c433Smrg# GNU General Public License for more details.
4643294c433Smrg
4653294c433Smrg# You should have received a copy of the GNU General Public License
4663294c433Smrg# along with this program; if not, write to the Free Software
4673294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4683294c433Smrg# 02111-1307, USA.
4693294c433Smrg
4703294c433Smrg# serial 1
4713294c433Smrg
4723294c433Smrg# Check whether the underlying file-system supports filenames
4733294c433Smrg# with a leading dot.  For instance MS-DOS doesn't.
4743294c433SmrgAC_DEFUN([AM_SET_LEADING_DOT],
4753294c433Smrg[rm -rf .tst 2>/dev/null
4763294c433Smrgmkdir .tst 2>/dev/null
4773294c433Smrgif test -d .tst; then
4783294c433Smrg  am__leading_dot=.
4793294c433Smrgelse
4803294c433Smrg  am__leading_dot=_
4813294c433Smrgfi
4823294c433Smrgrmdir .tst 2>/dev/null
4833294c433SmrgAC_SUBST([am__leading_dot])])
4843294c433Smrg
4853294c433Smrg# serial 5						-*- Autoconf -*-
4863294c433Smrg
4873294c433Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
4883294c433Smrg
4893294c433Smrg# This program is free software; you can redistribute it and/or modify
4903294c433Smrg# it under the terms of the GNU General Public License as published by
4913294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
4923294c433Smrg# any later version.
4933294c433Smrg
4943294c433Smrg# This program is distributed in the hope that it will be useful,
4953294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
4963294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4973294c433Smrg# GNU General Public License for more details.
4983294c433Smrg
4993294c433Smrg# You should have received a copy of the GNU General Public License
5003294c433Smrg# along with this program; if not, write to the Free Software
5013294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
5023294c433Smrg# 02111-1307, USA.
5033294c433Smrg
5043294c433Smrg
5053294c433Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
5063294c433Smrg# written in clear, in which case automake, when reading aclocal.m4,
5073294c433Smrg# will think it sees a *use*, and therefore will trigger all it's
5083294c433Smrg# C support machinery.  Also note that it means that autoscan, seeing
5093294c433Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
5103294c433Smrg
5113294c433Smrg
5123294c433Smrg
5133294c433Smrg# _AM_DEPENDENCIES(NAME)
5143294c433Smrg# ----------------------
5153294c433Smrg# See how the compiler implements dependency checking.
5163294c433Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
5173294c433Smrg# We try a few techniques and use that to set a single cache variable.
5183294c433Smrg#
5193294c433Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
5203294c433Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
5213294c433Smrg# dependency, and given that the user is not expected to run this macro,
5223294c433Smrg# just rely on AC_PROG_CC.
5233294c433SmrgAC_DEFUN([_AM_DEPENDENCIES],
5243294c433Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
5253294c433SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
5263294c433SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
5273294c433SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
5283294c433Smrg
5293294c433Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
5303294c433Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
5313294c433Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
5323294c433Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
5333294c433Smrg                   [depcc="$$1"   am_compiler_list=])
5343294c433Smrg
5353294c433SmrgAC_CACHE_CHECK([dependency style of $depcc],
5363294c433Smrg               [am_cv_$1_dependencies_compiler_type],
5373294c433Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5383294c433Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
5393294c433Smrg  # making bogus files that we don't know about and never remove.  For
5403294c433Smrg  # instance it was reported that on HP-UX the gcc test will end up
5413294c433Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
5423294c433Smrg  # in D'.
5433294c433Smrg  mkdir conftest.dir
5443294c433Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
5453294c433Smrg  # using a relative directory.
5463294c433Smrg  cp "$am_depcomp" conftest.dir
5473294c433Smrg  cd conftest.dir
5483294c433Smrg  # We will build objects and dependencies in a subdirectory because
5493294c433Smrg  # it helps to detect inapplicable dependency modes.  For instance
5503294c433Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
5513294c433Smrg  # side effect of compilation, but ICC will put the dependencies in
5523294c433Smrg  # the current directory while Tru64 will put them in the object
5533294c433Smrg  # directory.
5543294c433Smrg  mkdir sub
5553294c433Smrg
5563294c433Smrg  am_cv_$1_dependencies_compiler_type=none
5573294c433Smrg  if test "$am_compiler_list" = ""; then
5583294c433Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
5593294c433Smrg  fi
5603294c433Smrg  for depmode in $am_compiler_list; do
5613294c433Smrg    # Setup a source with many dependencies, because some compilers
5623294c433Smrg    # like to wrap large dependency lists on column 80 (with \), and
5633294c433Smrg    # we should not choose a depcomp mode which is confused by this.
5643294c433Smrg    #
5653294c433Smrg    # We need to recreate these files for each test, as the compiler may
5663294c433Smrg    # overwrite some of them when testing with obscure command lines.
5673294c433Smrg    # This happens at least with the AIX C compiler.
5683294c433Smrg    : > sub/conftest.c
5693294c433Smrg    for i in 1 2 3 4 5 6; do
5703294c433Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5713294c433Smrg      : > sub/conftst$i.h
5723294c433Smrg    done
5733294c433Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5743294c433Smrg
5753294c433Smrg    case $depmode in
5763294c433Smrg    nosideeffect)
5773294c433Smrg      # after this tag, mechanisms are not by side-effect, so they'll
5783294c433Smrg      # only be used when explicitly requested
5793294c433Smrg      if test "x$enable_dependency_tracking" = xyes; then
5803294c433Smrg	continue
5813294c433Smrg      else
5823294c433Smrg	break
5833294c433Smrg      fi
5843294c433Smrg      ;;
5853294c433Smrg    none) break ;;
5863294c433Smrg    esac
5873294c433Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
5883294c433Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
5893294c433Smrg    # handle `-M -o', and we need to detect this.
5903294c433Smrg    if depmode=$depmode \
5913294c433Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5923294c433Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5933294c433Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5943294c433Smrg         >/dev/null 2>conftest.err &&
5953294c433Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5963294c433Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5973294c433Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5983294c433Smrg      # icc doesn't choke on unknown options, it will just issue warnings
5993294c433Smrg      # (even with -Werror).  So we grep stderr for any message
6003294c433Smrg      # that says an option was ignored.
6013294c433Smrg      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
6023294c433Smrg        am_cv_$1_dependencies_compiler_type=$depmode
6033294c433Smrg        break
6043294c433Smrg      fi
6053294c433Smrg    fi
6063294c433Smrg  done
6073294c433Smrg
6083294c433Smrg  cd ..
6093294c433Smrg  rm -rf conftest.dir
6103294c433Smrgelse
6113294c433Smrg  am_cv_$1_dependencies_compiler_type=none
6123294c433Smrgfi
6133294c433Smrg])
6143294c433SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6153294c433SmrgAM_CONDITIONAL([am__fastdep$1], [
6163294c433Smrg  test "x$enable_dependency_tracking" != xno \
6173294c433Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6183294c433Smrg])
6193294c433Smrg
6203294c433Smrg
6213294c433Smrg# AM_SET_DEPDIR
6223294c433Smrg# -------------
6233294c433Smrg# Choose a directory name for dependency files.
6243294c433Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6253294c433SmrgAC_DEFUN([AM_SET_DEPDIR],
6263294c433Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6273294c433SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6283294c433Smrg])
6293294c433Smrg
6303294c433Smrg
6313294c433Smrg# AM_DEP_TRACK
6323294c433Smrg# ------------
6333294c433SmrgAC_DEFUN([AM_DEP_TRACK],
6343294c433Smrg[AC_ARG_ENABLE(dependency-tracking,
6353294c433Smrg[  --disable-dependency-tracking Speeds up one-time builds
6363294c433Smrg  --enable-dependency-tracking  Do not reject slow dependency extractors])
6373294c433Smrgif test "x$enable_dependency_tracking" != xno; then
6383294c433Smrg  am_depcomp="$ac_aux_dir/depcomp"
6393294c433Smrg  AMDEPBACKSLASH='\'
6403294c433Smrgfi
6413294c433SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6423294c433SmrgAC_SUBST([AMDEPBACKSLASH])
6433294c433Smrg])
6443294c433Smrg
6453294c433Smrg# Generate code to set up dependency tracking.   -*- Autoconf -*-
6463294c433Smrg
6473294c433Smrg# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6483294c433Smrg
6493294c433Smrg# This program is free software; you can redistribute it and/or modify
6503294c433Smrg# it under the terms of the GNU General Public License as published by
6513294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
6523294c433Smrg# any later version.
6533294c433Smrg
6543294c433Smrg# This program is distributed in the hope that it will be useful,
6553294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
6563294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6573294c433Smrg# GNU General Public License for more details.
6583294c433Smrg
6593294c433Smrg# You should have received a copy of the GNU General Public License
6603294c433Smrg# along with this program; if not, write to the Free Software
6613294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6623294c433Smrg# 02111-1307, USA.
6633294c433Smrg
6643294c433Smrg#serial 2
6653294c433Smrg
6663294c433Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
6673294c433Smrg# ------------------------------
6683294c433SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6693294c433Smrg[for mf in $CONFIG_FILES; do
6703294c433Smrg  # Strip MF so we end up with the name of the file.
6713294c433Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
6723294c433Smrg  # Check whether this is an Automake generated Makefile or not.
6733294c433Smrg  # We used to match only the files named `Makefile.in', but
6743294c433Smrg  # some people rename them; so instead we look at the file content.
6753294c433Smrg  # Grep'ing the first line is not enough: some people post-process
6763294c433Smrg  # each Makefile.in and add a new line on top of each file to say so.
6773294c433Smrg  # So let's grep whole file.
6783294c433Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6793294c433Smrg    dirpart=`AS_DIRNAME("$mf")`
6803294c433Smrg  else
6813294c433Smrg    continue
6823294c433Smrg  fi
6833294c433Smrg  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
6843294c433Smrg  # Extract the definition of DEP_FILES from the Makefile without
6853294c433Smrg  # running `make'.
6863294c433Smrg  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
6873294c433Smrg  test -z "$DEPDIR" && continue
6883294c433Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
6893294c433Smrg  U=`sed -n -e '/^U = / s///p' < "$mf"`
6903294c433Smrg  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
6913294c433Smrg  # We invoke sed twice because it is the simplest approach to
6923294c433Smrg  # changing $(DEPDIR) to its actual value in the expansion.
6933294c433Smrg  for file in `sed -n -e '
6943294c433Smrg    /^DEP_FILES = .*\\\\$/ {
6953294c433Smrg      s/^DEP_FILES = //
6963294c433Smrg      :loop
6973294c433Smrg	s/\\\\$//
6983294c433Smrg	p
6993294c433Smrg	n
7003294c433Smrg	/\\\\$/ b loop
7013294c433Smrg      p
7023294c433Smrg    }
7033294c433Smrg    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7043294c433Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7053294c433Smrg    # Make sure the directory exists.
7063294c433Smrg    test -f "$dirpart/$file" && continue
7073294c433Smrg    fdir=`AS_DIRNAME(["$file"])`
7083294c433Smrg    AS_MKDIR_P([$dirpart/$fdir])
7093294c433Smrg    # echo "creating $dirpart/$file"
7103294c433Smrg    echo '# dummy' > "$dirpart/$file"
7113294c433Smrg  done
7123294c433Smrgdone
7133294c433Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7143294c433Smrg
7153294c433Smrg
7163294c433Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
7173294c433Smrg# -----------------------------
7183294c433Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
7193294c433Smrg#
7203294c433Smrg# This code is only required when automatic dependency tracking
7213294c433Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
7223294c433Smrg# need in order to bootstrap the dependency handling code.
7233294c433SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7243294c433Smrg[AC_CONFIG_COMMANDS([depfiles],
7253294c433Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7263294c433Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7273294c433Smrg])
7283294c433Smrg
7293294c433Smrg# Check to see how 'make' treats includes.	-*- Autoconf -*-
7303294c433Smrg
7313294c433Smrg# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7323294c433Smrg
7333294c433Smrg# This program is free software; you can redistribute it and/or modify
7343294c433Smrg# it under the terms of the GNU General Public License as published by
7353294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
7363294c433Smrg# any later version.
7373294c433Smrg
7383294c433Smrg# This program is distributed in the hope that it will be useful,
7393294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
7403294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7413294c433Smrg# GNU General Public License for more details.
7423294c433Smrg
7433294c433Smrg# You should have received a copy of the GNU General Public License
7443294c433Smrg# along with this program; if not, write to the Free Software
7453294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7463294c433Smrg# 02111-1307, USA.
7473294c433Smrg
7483294c433Smrg# serial 2
7493294c433Smrg
7503294c433Smrg# AM_MAKE_INCLUDE()
7513294c433Smrg# -----------------
7523294c433Smrg# Check to see how make treats includes.
7533294c433SmrgAC_DEFUN([AM_MAKE_INCLUDE],
7543294c433Smrg[am_make=${MAKE-make}
7553294c433Smrgcat > confinc << 'END'
7563294c433Smrgam__doit:
7573294c433Smrg	@echo done
7583294c433Smrg.PHONY: am__doit
7593294c433SmrgEND
7603294c433Smrg# If we don't find an include directive, just comment out the code.
7613294c433SmrgAC_MSG_CHECKING([for style of include used by $am_make])
7623294c433Smrgam__include="#"
7633294c433Smrgam__quote=
7643294c433Smrg_am_result=none
7653294c433Smrg# First try GNU make style include.
7663294c433Smrgecho "include confinc" > confmf
7673294c433Smrg# We grep out `Entering directory' and `Leaving directory'
7683294c433Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
7693294c433Smrg# In particular we don't look at `^make:' because GNU make might
7703294c433Smrg# be invoked under some other name (usually "gmake"), in which
7713294c433Smrg# case it prints its new name instead of `make'.
7723294c433Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7733294c433Smrg   am__include=include
7743294c433Smrg   am__quote=
7753294c433Smrg   _am_result=GNU
7763294c433Smrgfi
7773294c433Smrg# Now try BSD make style include.
7783294c433Smrgif test "$am__include" = "#"; then
7793294c433Smrg   echo '.include "confinc"' > confmf
7803294c433Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7813294c433Smrg      am__include=.include
7823294c433Smrg      am__quote="\""
7833294c433Smrg      _am_result=BSD
7843294c433Smrg   fi
7853294c433Smrgfi
7863294c433SmrgAC_SUBST([am__include])
7873294c433SmrgAC_SUBST([am__quote])
7883294c433SmrgAC_MSG_RESULT([$_am_result])
7893294c433Smrgrm -f confinc confmf
7903294c433Smrg])
7913294c433Smrg
7923294c433Smrg# AM_CONDITIONAL                                              -*- Autoconf -*-
7933294c433Smrg
7943294c433Smrg# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
7953294c433Smrg
7963294c433Smrg# This program is free software; you can redistribute it and/or modify
7973294c433Smrg# it under the terms of the GNU General Public License as published by
7983294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
7993294c433Smrg# any later version.
8003294c433Smrg
8013294c433Smrg# This program is distributed in the hope that it will be useful,
8023294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8033294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8043294c433Smrg# GNU General Public License for more details.
8053294c433Smrg
8063294c433Smrg# You should have received a copy of the GNU General Public License
8073294c433Smrg# along with this program; if not, write to the Free Software
8083294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8093294c433Smrg# 02111-1307, USA.
8103294c433Smrg
8113294c433Smrg# serial 5
8123294c433Smrg
8133294c433SmrgAC_PREREQ(2.52)
8143294c433Smrg
8153294c433Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8163294c433Smrg# -------------------------------------
8173294c433Smrg# Define a conditional.
8183294c433SmrgAC_DEFUN([AM_CONDITIONAL],
8193294c433Smrg[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8203294c433Smrg        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8213294c433SmrgAC_SUBST([$1_TRUE])
8223294c433SmrgAC_SUBST([$1_FALSE])
8233294c433Smrgif $2; then
8243294c433Smrg  $1_TRUE=
8253294c433Smrg  $1_FALSE='#'
8263294c433Smrgelse
8273294c433Smrg  $1_TRUE='#'
8283294c433Smrg  $1_FALSE=
8293294c433Smrgfi
8303294c433SmrgAC_CONFIG_COMMANDS_PRE(
8313294c433Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8323294c433Smrg  AC_MSG_ERROR([conditional "$1" was never defined.
8333294c433SmrgUsually this means the macro was only invoked conditionally.])
8343294c433Smrgfi])])
8353294c433Smrg
8363294c433Smrg# Add --enable-maintainer-mode option to configure.
8373294c433Smrg# From Jim Meyering
8383294c433Smrg
8393294c433Smrg# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
8403294c433Smrg
8413294c433Smrg# This program is free software; you can redistribute it and/or modify
8423294c433Smrg# it under the terms of the GNU General Public License as published by
8433294c433Smrg# the Free Software Foundation; either version 2, or (at your option)
8443294c433Smrg# any later version.
8453294c433Smrg
8463294c433Smrg# This program is distributed in the hope that it will be useful,
8473294c433Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
8483294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8493294c433Smrg# GNU General Public License for more details.
8503294c433Smrg
8513294c433Smrg# You should have received a copy of the GNU General Public License
8523294c433Smrg# along with this program; if not, write to the Free Software
8533294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8543294c433Smrg# 02111-1307, USA.
8553294c433Smrg
8563294c433Smrg# serial 2
8573294c433Smrg
8583294c433SmrgAC_DEFUN([AM_MAINTAINER_MODE],
8593294c433Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
8603294c433Smrg  dnl maintainer-mode is disabled by default
8613294c433Smrg  AC_ARG_ENABLE(maintainer-mode,
8623294c433Smrg[  --enable-maintainer-mode enable make rules and dependencies not useful
8633294c433Smrg                          (and sometimes confusing) to the casual installer],
8643294c433Smrg      USE_MAINTAINER_MODE=$enableval,
8653294c433Smrg      USE_MAINTAINER_MODE=no)
8663294c433Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8673294c433Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
8683294c433Smrg  MAINT=$MAINTAINER_MODE_TRUE
8693294c433Smrg  AC_SUBST(MAINT)dnl
8703294c433Smrg]
8713294c433Smrg)
8723294c433Smrg
8733294c433SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8743294c433Smrg
8753294c433Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8763294c433Smrg# 
8773294c433Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8783294c433Smrg#
8793294c433Smrg# This program is free software; you can redistribute it and/or modify
8803294c433Smrg# it under the terms of the GNU General Public License as published by
8813294c433Smrg# the Free Software Foundation; either version 2 of the License, or
8823294c433Smrg# (at your option) any later version.
8833294c433Smrg#
8843294c433Smrg# This program is distributed in the hope that it will be useful, but
8853294c433Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
8863294c433Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8873294c433Smrg# General Public License for more details.
8883294c433Smrg#
8893294c433Smrg# You should have received a copy of the GNU General Public License
8903294c433Smrg# along with this program; if not, write to the Free Software
8913294c433Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8923294c433Smrg#
8933294c433Smrg# As a special exception to the GNU General Public License, if you
8943294c433Smrg# distribute this file as part of a program that contains a
8953294c433Smrg# configuration script generated by Autoconf, you may include it under
8963294c433Smrg# the same distribution terms that you use for the rest of that program.
8973294c433Smrg
8983294c433Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8993294c433Smrg# ----------------------------------
9003294c433SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
9013294c433Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9023294c433Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9033294c433SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9043294c433Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9053294c433Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9063294c433Smrgfi
9073294c433Smrgif test -n "$PKG_CONFIG"; then
9083294c433Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
9093294c433Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9103294c433Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9113294c433Smrg		AC_MSG_RESULT([yes])
9123294c433Smrg	else
9133294c433Smrg		AC_MSG_RESULT([no])
9143294c433Smrg		PKG_CONFIG=""
9153294c433Smrg	fi
9163294c433Smrg		
9173294c433Smrgfi[]dnl
9183294c433Smrg])# PKG_PROG_PKG_CONFIG
9193294c433Smrg
9203294c433Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9213294c433Smrg#
9223294c433Smrg# Check to see whether a particular set of modules exists.  Similar
9233294c433Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9243294c433Smrg#
9253294c433Smrg#
9263294c433Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9273294c433Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
9283294c433Smrg# PKG_CHECK_EXISTS manually
9293294c433Smrg# --------------------------------------------------------------
9303294c433SmrgAC_DEFUN([PKG_CHECK_EXISTS],
9313294c433Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9323294c433Smrgif test -n "$PKG_CONFIG" && \
9333294c433Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9343294c433Smrg  m4_ifval([$2], [$2], [:])
9353294c433Smrgm4_ifvaln([$3], [else
9363294c433Smrg  $3])dnl
9373294c433Smrgfi])
9383294c433Smrg
9393294c433Smrg
9403294c433Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9413294c433Smrg# ---------------------------------------------
9423294c433Smrgm4_define([_PKG_CONFIG],
9433294c433Smrg[if test -n "$PKG_CONFIG"; then
9443294c433Smrg    if test -n "$$1"; then
9453294c433Smrg        pkg_cv_[]$1="$$1"
9463294c433Smrg    else
9473294c433Smrg        PKG_CHECK_EXISTS([$3],
9483294c433Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9493294c433Smrg			 [pkg_failed=yes])
9503294c433Smrg    fi
9513294c433Smrgelse
9523294c433Smrg	pkg_failed=untried
9533294c433Smrgfi[]dnl
9543294c433Smrg])# _PKG_CONFIG
9553294c433Smrg
9563294c433Smrg# _PKG_SHORT_ERRORS_SUPPORTED
9573294c433Smrg# -----------------------------
9583294c433SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9593294c433Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9603294c433Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9613294c433Smrg        _pkg_short_errors_supported=yes
9623294c433Smrgelse
9633294c433Smrg        _pkg_short_errors_supported=no
9643294c433Smrgfi[]dnl
9653294c433Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
9663294c433Smrg
9673294c433Smrg
9683294c433Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9693294c433Smrg# [ACTION-IF-NOT-FOUND])
9703294c433Smrg#
9713294c433Smrg#
9723294c433Smrg# Note that if there is a possibility the first call to
9733294c433Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
9743294c433Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9753294c433Smrg#
9763294c433Smrg#
9773294c433Smrg# --------------------------------------------------------------
9783294c433SmrgAC_DEFUN([PKG_CHECK_MODULES],
9793294c433Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9803294c433SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9813294c433SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9823294c433Smrg
9833294c433Smrgpkg_failed=no
9843294c433SmrgAC_MSG_CHECKING([for $1])
9853294c433Smrg
9863294c433Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9873294c433Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9883294c433Smrg
9893294c433Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9903294c433Smrgand $1[]_LIBS to avoid the need to call pkg-config.
9913294c433SmrgSee the pkg-config man page for more details.])
9923294c433Smrg
9933294c433Smrgif test $pkg_failed = yes; then
9943294c433Smrg        _PKG_SHORT_ERRORS_SUPPORTED
9953294c433Smrg        if test $_pkg_short_errors_supported = yes; then
9963294c433Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
9973294c433Smrg        else 
9983294c433Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
9993294c433Smrg        fi
10003294c433Smrg	# Put the nasty error message in config.log where it belongs
10013294c433Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10023294c433Smrg
10033294c433Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
10043294c433Smrg[Package requirements ($2) were not met:
10053294c433Smrg
10063294c433Smrg$$1_PKG_ERRORS
10073294c433Smrg
10083294c433SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
10093294c433Smrginstalled software in a non-standard prefix.
10103294c433Smrg
10113294c433Smrg_PKG_TEXT
10123294c433Smrg])],
10133294c433Smrg		[$4])
10143294c433Smrgelif test $pkg_failed = untried; then
10153294c433Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
10163294c433Smrg[The pkg-config script could not be found or is too old.  Make sure it
10173294c433Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
10183294c433Smrgpath to pkg-config.
10193294c433Smrg
10203294c433Smrg_PKG_TEXT
10213294c433Smrg
10223294c433SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
10233294c433Smrg		[$4])
10243294c433Smrgelse
10253294c433Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10263294c433Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10273294c433Smrg        AC_MSG_RESULT([yes])
10283294c433Smrg	ifelse([$3], , :, [$3])
10293294c433Smrgfi[]dnl
10303294c433Smrg])# PKG_CHECK_MODULES
10313294c433Smrg
10323294c433Smrgdnl Copyright 2005 Red Hat, Inc
10333294c433Smrgdnl
10343294c433Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
10353294c433Smrgdnl documentation for any purpose is hereby granted without fee, provided that
10363294c433Smrgdnl the above copyright notice appear in all copies and that both that
10373294c433Smrgdnl copyright notice and this permission notice appear in supporting
10383294c433Smrgdnl documentation.
10393294c433Smrgdnl
10403294c433Smrgdnl The above copyright notice and this permission notice shall be included
10413294c433Smrgdnl in all copies or substantial portions of the Software.
10423294c433Smrgdnl
10433294c433Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10443294c433Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10453294c433Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10463294c433Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
10473294c433Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
10483294c433Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
10493294c433Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
10503294c433Smrgdnl
10513294c433Smrgdnl Except as contained in this notice, the name of the copyright holders shall
10523294c433Smrgdnl not be used in advertising or otherwise to promote the sale, use or
10533294c433Smrgdnl other dealings in this Software without prior written authorization
10543294c433Smrgdnl from the copyright holders.
10553294c433Smrgdnl
10563294c433Smrg
10573294c433Smrg# XORG_FONT_CHECK_{maps}()
10583294c433Smrg# ------------------------
10593294c433Smrg# These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
10603294c433Smrg# JISX0201 or KOI8_R.  By default, they are all enabled.
10613294c433Smrg
10623294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_1],[
10633294c433Smrg	AC_ARG_ENABLE(iso8859-1,
10643294c433Smrg		AS_HELP_STRING([--disable-iso8859-1],
10653294c433Smrg				[Build ISO8859-1 fonts (default: yes)]),
10663294c433Smrg		[ISO8859_1=$enableval],
10673294c433Smrg		[ISO8859_1=yes])
10683294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-1 fonts])
10693294c433Smrg	AC_MSG_RESULT([$ISO8859_1])
10703294c433Smrg	AM_CONDITIONAL(ISO8859_1, [test "x$ISO8859_1" = xyes])
10713294c433Smrg])
10723294c433Smrg
10733294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_2],[
10743294c433Smrg	AC_ARG_ENABLE(iso8859-2,
10753294c433Smrg		AS_HELP_STRING([--disable-iso8859-2],
10763294c433Smrg				[Build ISO8859-2 fonts (default: yes)]),
10773294c433Smrg		[ISO8859_2=$enableval],
10783294c433Smrg		[ISO8859_2=yes])
10793294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-2 fonts])
10803294c433Smrg	AC_MSG_RESULT([$ISO8859_2])
10813294c433Smrg	AM_CONDITIONAL(ISO8859_2, [test "x$ISO8859_2" = xyes])
10823294c433Smrg])
10833294c433Smrg
10843294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_3],[
10853294c433Smrg	AC_ARG_ENABLE(iso8859-3,
10863294c433Smrg		AS_HELP_STRING([--disable-iso8859-3],
10873294c433Smrg				[Build ISO8859-3 fonts (default: yes)]),
10883294c433Smrg		[ISO8859_3=$enableval],
10893294c433Smrg		[ISO8859_3=yes])
10903294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-3 fonts])
10913294c433Smrg	AC_MSG_RESULT([$ISO8859_3])
10923294c433Smrg	AM_CONDITIONAL(ISO8859_3, [test "x$ISO8859_3" = xyes])
10933294c433Smrg])
10943294c433Smrg
10953294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_4],[
10963294c433Smrg	AC_ARG_ENABLE(iso8859-4,
10973294c433Smrg		AS_HELP_STRING([--disable-iso8859-4],
10983294c433Smrg				[Build ISO8859-4 fonts (default: yes)]),
10993294c433Smrg		[ISO8859_4=$enableval],
11003294c433Smrg		[ISO8859_4=yes])
11013294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-4 fonts])
11023294c433Smrg	AC_MSG_RESULT([$ISO8859_4])
11033294c433Smrg	AM_CONDITIONAL(ISO8859_4, [test "x$ISO8859_4" = xyes])
11043294c433Smrg])
11053294c433Smrg
11063294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_5],[
11073294c433Smrg	AC_ARG_ENABLE(iso8859-5,
11083294c433Smrg		AS_HELP_STRING([--disable-iso8859-5],
11093294c433Smrg				[Build ISO8859-5 fonts (default: yes)]),
11103294c433Smrg		[ISO8859_5=$enableval],
11113294c433Smrg		[ISO8859_5=yes])
11123294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-5 fonts])
11133294c433Smrg	AC_MSG_RESULT([$ISO8859_5])
11143294c433Smrg	AM_CONDITIONAL(ISO8859_5, [test "x$ISO8859_5" = xyes])
11153294c433Smrg])
11163294c433Smrg
11173294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_6],[
11183294c433Smrg	AC_ARG_ENABLE(iso8859-6,
11193294c433Smrg		AS_HELP_STRING([--disable-iso8859-6],
11203294c433Smrg				[Build ISO8859-6 fonts (default: yes)]),
11213294c433Smrg		[ISO8859_6=$enableval],
11223294c433Smrg		[ISO8859_6=yes])
11233294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-6 fonts])
11243294c433Smrg	AC_MSG_RESULT([$ISO8859_6])
11253294c433Smrg	AM_CONDITIONAL(ISO8859_6, [test "x$ISO8859_6" = xyes])
11263294c433Smrg])
11273294c433Smrg
11283294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_7],[
11293294c433Smrg	AC_ARG_ENABLE(iso8859-7,
11303294c433Smrg		AS_HELP_STRING([--disable-iso8859-7],
11313294c433Smrg				[Build ISO8859-7 fonts (default: yes)]),
11323294c433Smrg		[ISO8859_7=$enableval],
11333294c433Smrg		[ISO8859_7=yes])
11343294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-7 fonts])
11353294c433Smrg	AC_MSG_RESULT([$ISO8859_7])
11363294c433Smrg	AM_CONDITIONAL(ISO8859_7, [test "x$ISO8859_7" = xyes])
11373294c433Smrg])
11383294c433Smrg
11393294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_8],[
11403294c433Smrg	AC_ARG_ENABLE(iso8859-8,
11413294c433Smrg		AS_HELP_STRING([--disable-iso8859-8],
11423294c433Smrg				[Build ISO8859-8 fonts (default: yes)]),
11433294c433Smrg		[ISO8859_8=$enableval],
11443294c433Smrg		[ISO8859_8=yes])
11453294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-8 fonts])
11463294c433Smrg	AC_MSG_RESULT([$ISO8859_8])
11473294c433Smrg	AM_CONDITIONAL(ISO8859_8, [test "x$ISO8859_8" = xyes])
11483294c433Smrg])
11493294c433Smrg
11503294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_9],[
11513294c433Smrg	AC_ARG_ENABLE(iso8859-9,
11523294c433Smrg		AS_HELP_STRING([--disable-iso8859-9],
11533294c433Smrg				[Build ISO8859-9 fonts (default: yes)]),
11543294c433Smrg		[ISO8859_9=$enableval],
11553294c433Smrg		[ISO8859_9=yes])
11563294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-9 fonts])
11573294c433Smrg	AC_MSG_RESULT([$ISO8859_9])
11583294c433Smrg	AM_CONDITIONAL(ISO8859_9, [test "x$ISO8859_9" = xyes])
11593294c433Smrg])
11603294c433Smrg
11613294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[
11623294c433Smrg	AC_ARG_ENABLE(iso8859-10,
11633294c433Smrg		AS_HELP_STRING([--disable-iso8859-10],
11643294c433Smrg				[Build ISO8859-10 fonts (default: yes)]),
11653294c433Smrg		[ISO8859_10=$enableval],
11663294c433Smrg		[ISO8859_10=yes])
11673294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-10 fonts])
11683294c433Smrg	AC_MSG_RESULT([$ISO8859_10])
11693294c433Smrg	AM_CONDITIONAL(ISO8859_10, [test "x$ISO8859_10" = xyes])
11703294c433Smrg])
11713294c433Smrg
11723294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[
11733294c433Smrg	AC_ARG_ENABLE(iso8859-11,
11743294c433Smrg		AS_HELP_STRING([--disable-iso8859-11],
11753294c433Smrg				[Build ISO8859-11 fonts (default: yes)]),
11763294c433Smrg		[ISO8859_11=$enableval],
11773294c433Smrg		[ISO8859_11=yes])
11783294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-11 fonts])
11793294c433Smrg	AC_MSG_RESULT([$ISO8859_11])
11803294c433Smrg	AM_CONDITIONAL(ISO8859_11, [test "x$ISO8859_11" = xyes])
11813294c433Smrg])
11823294c433Smrg
11833294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[
11843294c433Smrg	AC_ARG_ENABLE(iso8859-12,
11853294c433Smrg		AS_HELP_STRING([--disable-iso8859-12],
11863294c433Smrg				[Build ISO8859-12 fonts (default: yes)]),
11873294c433Smrg		[ISO8859_12=$enableval],
11883294c433Smrg		[ISO8859_12=yes])
11893294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-12 fonts])
11903294c433Smrg	AC_MSG_RESULT([$ISO8859_12])
11913294c433Smrg	AM_CONDITIONAL(ISO8859_12, [test "x$ISO8859_12" = xyes])
11923294c433Smrg])
11933294c433Smrg
11943294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[
11953294c433Smrg	AC_ARG_ENABLE(iso8859-13,
11963294c433Smrg		AS_HELP_STRING([--disable-iso8859-13],
11973294c433Smrg				[Build ISO8859-13 fonts (default: yes)]),
11983294c433Smrg		[ISO8859_13=$enableval],
11993294c433Smrg		[ISO8859_13=yes])
12003294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-13 fonts])
12013294c433Smrg	AC_MSG_RESULT([$ISO8859_13])
12023294c433Smrg	AM_CONDITIONAL(ISO8859_13, [test "x$ISO8859_13" = xyes])
12033294c433Smrg])
12043294c433Smrg
12053294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[
12063294c433Smrg	AC_ARG_ENABLE(iso8859-14,
12073294c433Smrg		AS_HELP_STRING([--disable-iso8859-14],
12083294c433Smrg				[Build ISO8859-14 fonts (default: yes)]),
12093294c433Smrg		[ISO8859_14=$enableval],
12103294c433Smrg		[ISO8859_14=yes])
12113294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-14 fonts])
12123294c433Smrg	AC_MSG_RESULT([$ISO8859_14])
12133294c433Smrg	AM_CONDITIONAL(ISO8859_14, [test "x$ISO8859_14" = xyes])
12143294c433Smrg])
12153294c433Smrg
12163294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[
12173294c433Smrg	AC_ARG_ENABLE(iso8859-15,
12183294c433Smrg		AS_HELP_STRING([--disable-iso8859-15],
12193294c433Smrg				[Build ISO8859-15 fonts (default: yes)]),
12203294c433Smrg		[ISO8859_15=$enableval],
12213294c433Smrg		[ISO8859_15=yes])
12223294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-15 fonts])
12233294c433Smrg	AC_MSG_RESULT([$ISO8859_15])
12243294c433Smrg	AM_CONDITIONAL(ISO8859_15, [test "x$ISO8859_15" = xyes])
12253294c433Smrg])
12263294c433Smrg
12273294c433SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[
12283294c433Smrg	AC_ARG_ENABLE(iso8859-16,
12293294c433Smrg		AS_HELP_STRING([--disable-iso8859-16],
12303294c433Smrg				[Build ISO8859-16 fonts (default: yes)]),
12313294c433Smrg		[ISO8859_16=$enableval],
12323294c433Smrg		[ISO8859_16=yes])
12333294c433Smrg	AC_MSG_CHECKING([whether to build ISO8859-16 fonts])
12343294c433Smrg	AC_MSG_RESULT([$ISO8859_16])
12353294c433Smrg	AM_CONDITIONAL(ISO8859_16, [test "x$ISO8859_16" = xyes])
12363294c433Smrg])
12373294c433Smrg
12383294c433SmrgAC_DEFUN([XORG_FONT_CHECK_JISX0201],[
12393294c433Smrg	AC_ARG_ENABLE(jisx0201,
12403294c433Smrg		AS_HELP_STRING([--disable-jisx0201],
12413294c433Smrg				[Build JISX0201 fonts (default: yes)]),
12423294c433Smrg		[JISX0201=$enableval],
12433294c433Smrg		[JISX0201=yes])
12443294c433Smrg	AC_MSG_CHECKING([whether to build JISX0201 fonts])
12453294c433Smrg	AC_MSG_RESULT([$JISX0201])
12463294c433Smrg	AM_CONDITIONAL(JISX0201, [test "x$JISX0201" = xyes])
12473294c433Smrg])
12483294c433Smrg
12493294c433SmrgAC_DEFUN([XORG_FONT_CHECK_KOI8_R],[
12503294c433Smrg	AC_ARG_ENABLE(koi8-r,
12513294c433Smrg		AS_HELP_STRING([--disable-koi8-r],
12523294c433Smrg				[Build KOI8-R fonts (default: yes)]),
12533294c433Smrg		[KOI8_R=$enableval],
12543294c433Smrg		[KOI8_R=yes])
12553294c433Smrg	AC_MSG_CHECKING([whether to build KOI8-R fonts])
12563294c433Smrg	AC_MSG_RESULT([$KOI8_R])
12573294c433Smrg	AM_CONDITIONAL(KOI8_R, [test "x$KOI8_R" = xyes])
12583294c433Smrg])
12593294c433Smrg
12603294c433Smrgdnl Copyright 2005 Red Hat, Inc
12613294c433Smrgdnl
12623294c433Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
12633294c433Smrgdnl documentation for any purpose is hereby granted without fee, provided that
12643294c433Smrgdnl the above copyright notice appear in all copies and that both that
12653294c433Smrgdnl copyright notice and this permission notice appear in supporting
12663294c433Smrgdnl documentation.
12673294c433Smrgdnl
12683294c433Smrgdnl The above copyright notice and this permission notice shall be included
12693294c433Smrgdnl in all copies or substantial portions of the Software.
12703294c433Smrgdnl
12713294c433Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12723294c433Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12733294c433Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
12743294c433Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
12753294c433Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
12763294c433Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
12773294c433Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
12783294c433Smrgdnl
12793294c433Smrgdnl Except as contained in this notice, the name of the copyright holders shall
12803294c433Smrgdnl not be used in advertising or otherwise to promote the sale, use or
12813294c433Smrgdnl other dealings in this Software without prior written authorization
12823294c433Smrgdnl from the copyright holders.
12833294c433Smrgdnl
12843294c433Smrg
12853294c433Smrg# XORG_RELEASE_VERSION
12863294c433Smrg# --------------------
12873294c433Smrg# Adds --with/without-release-string and changes the PACKAGE and
12883294c433Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
12893294c433Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
12903294c433Smrg 
12913294c433SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
12923294c433Smrg	AC_ARG_WITH(release-version,
12933294c433Smrg			AC_HELP_STRING([--with-release-version=STRING],
12943294c433Smrg				[Use release version string in package name]),
12953294c433Smrg			[RELEASE_VERSION="$withval"],
12963294c433Smrg			[RELEASE_VERSION=""])
12973294c433Smrg	if test "x$RELEASE_VERSION" != "x"; then
12983294c433Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
12993294c433Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
13003294c433Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
13013294c433Smrg	fi
13023294c433Smrg])
13033294c433Smrg
1304