nkeynes@1: # generated automatically by aclocal 1.7.9 -*- Autoconf -*- nkeynes@1: nkeynes@1: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 nkeynes@1: # Free Software Foundation, Inc. nkeynes@1: # This file is free software; the Free Software Foundation nkeynes@1: # gives unlimited permission to copy and/or distribute it, nkeynes@1: # with or without modifications, as long as this notice is preserved. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without nkeynes@1: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A nkeynes@1: # PARTICULAR PURPOSE. nkeynes@1: nkeynes@1: # Do all the work for Automake. -*- Autoconf -*- nkeynes@1: nkeynes@1: # This macro actually does too much some checks are only needed if nkeynes@1: # your package does certain things. But this isn't really a big deal. nkeynes@1: nkeynes@1: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 nkeynes@1: # Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 10 nkeynes@1: nkeynes@1: AC_PREREQ([2.54]) nkeynes@1: nkeynes@1: # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow nkeynes@1: # the ones we care about. nkeynes@1: m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl nkeynes@1: nkeynes@1: # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) nkeynes@1: # AM_INIT_AUTOMAKE([OPTIONS]) nkeynes@1: # ----------------------------------------------- nkeynes@1: # The call with PACKAGE and VERSION arguments is the old style nkeynes@1: # call (pre autoconf-2.50), which is being phased out. PACKAGE nkeynes@1: # and VERSION should now be passed to AC_INIT and removed from nkeynes@1: # the call to AM_INIT_AUTOMAKE. nkeynes@1: # We support both call styles for the transition. After nkeynes@1: # the next Automake release, Autoconf can make the AC_INIT nkeynes@1: # arguments mandatory, and then we can depend on a new Autoconf nkeynes@1: # release and drop the old call support. nkeynes@1: AC_DEFUN([AM_INIT_AUTOMAKE], nkeynes@1: [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl nkeynes@1: AC_REQUIRE([AC_PROG_INSTALL])dnl nkeynes@1: # test to see if srcdir already configured nkeynes@1: if test "`cd $srcdir && pwd`" != "`pwd`" && nkeynes@1: test -f $srcdir/config.status; then nkeynes@1: AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) nkeynes@1: fi nkeynes@1: nkeynes@1: # test whether we have cygpath nkeynes@1: if test -z "$CYGPATH_W"; then nkeynes@1: if (cygpath --version) >/dev/null 2>/dev/null; then nkeynes@1: CYGPATH_W='cygpath -w' nkeynes@1: else nkeynes@1: CYGPATH_W=echo nkeynes@1: fi nkeynes@1: fi nkeynes@1: AC_SUBST([CYGPATH_W]) nkeynes@1: nkeynes@1: # Define the identity of the package. nkeynes@1: dnl Distinguish between old-style and new-style calls. nkeynes@1: m4_ifval([$2], nkeynes@1: [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl nkeynes@1: AC_SUBST([PACKAGE], [$1])dnl nkeynes@1: AC_SUBST([VERSION], [$2])], nkeynes@1: [_AM_SET_OPTIONS([$1])dnl nkeynes@1: AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl nkeynes@1: AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl nkeynes@1: nkeynes@1: _AM_IF_OPTION([no-define],, nkeynes@1: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) nkeynes@1: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl nkeynes@1: nkeynes@1: # Some tools Automake needs. nkeynes@1: AC_REQUIRE([AM_SANITY_CHECK])dnl nkeynes@1: AC_REQUIRE([AC_ARG_PROGRAM])dnl nkeynes@1: AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) nkeynes@1: AM_MISSING_PROG(AUTOCONF, autoconf) nkeynes@1: AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) nkeynes@1: AM_MISSING_PROG(AUTOHEADER, autoheader) nkeynes@1: AM_MISSING_PROG(MAKEINFO, makeinfo) nkeynes@1: AM_MISSING_PROG(AMTAR, tar) nkeynes@1: AM_PROG_INSTALL_SH nkeynes@1: AM_PROG_INSTALL_STRIP nkeynes@1: # We need awk for the "check" target. The system "awk" is bad on nkeynes@1: # some platforms. nkeynes@1: AC_REQUIRE([AC_PROG_AWK])dnl nkeynes@1: AC_REQUIRE([AC_PROG_MAKE_SET])dnl nkeynes@1: AC_REQUIRE([AM_SET_LEADING_DOT])dnl nkeynes@1: nkeynes@1: _AM_IF_OPTION([no-dependencies],, nkeynes@1: [AC_PROVIDE_IFELSE([AC_PROG_CC], nkeynes@1: [_AM_DEPENDENCIES(CC)], nkeynes@1: [define([AC_PROG_CC], nkeynes@1: defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl nkeynes@1: AC_PROVIDE_IFELSE([AC_PROG_CXX], nkeynes@1: [_AM_DEPENDENCIES(CXX)], nkeynes@1: [define([AC_PROG_CXX], nkeynes@1: defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl nkeynes@1: ]) nkeynes@1: ]) nkeynes@1: nkeynes@1: nkeynes@1: # When config.status generates a header, we must update the stamp-h file. nkeynes@1: # This file resides in the same directory as the config header nkeynes@1: # that is generated. The stamp files are numbered to have different names. nkeynes@1: nkeynes@1: # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the nkeynes@1: # loop where config.status creates the headers, so we can generate nkeynes@1: # our stamp files there. nkeynes@1: AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], nkeynes@1: [# Compute $1's index in $config_headers. nkeynes@1: _am_stamp_count=1 nkeynes@1: for _am_header in $config_headers :; do nkeynes@1: case $_am_header in nkeynes@1: $1 | $1:* ) nkeynes@1: break ;; nkeynes@1: * ) nkeynes@1: _am_stamp_count=`expr $_am_stamp_count + 1` ;; nkeynes@1: esac nkeynes@1: done nkeynes@1: echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) nkeynes@1: nkeynes@1: # Copyright 2002 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: nkeynes@1: # AM_AUTOMAKE_VERSION(VERSION) nkeynes@1: # ---------------------------- nkeynes@1: # Automake X.Y traces this macro to ensure aclocal.m4 has been nkeynes@1: # generated from the m4 files accompanying Automake X.Y. nkeynes@1: AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) nkeynes@1: nkeynes@1: # AM_SET_CURRENT_AUTOMAKE_VERSION nkeynes@1: # ------------------------------- nkeynes@1: # Call AM_AUTOMAKE_VERSION so it can be traced. nkeynes@1: # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. nkeynes@1: AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], nkeynes@1: [AM_AUTOMAKE_VERSION([1.7.9])]) nkeynes@1: nkeynes@1: # Helper functions for option handling. -*- Autoconf -*- nkeynes@1: nkeynes@1: # Copyright 2001, 2002 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 2 nkeynes@1: nkeynes@1: # _AM_MANGLE_OPTION(NAME) nkeynes@1: # ----------------------- nkeynes@1: AC_DEFUN([_AM_MANGLE_OPTION], nkeynes@1: [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) nkeynes@1: nkeynes@1: # _AM_SET_OPTION(NAME) nkeynes@1: # ------------------------------ nkeynes@1: # Set option NAME. Presently that only means defining a flag for this option. nkeynes@1: AC_DEFUN([_AM_SET_OPTION], nkeynes@1: [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) nkeynes@1: nkeynes@1: # _AM_SET_OPTIONS(OPTIONS) nkeynes@1: # ---------------------------------- nkeynes@1: # OPTIONS is a space-separated list of Automake options. nkeynes@1: AC_DEFUN([_AM_SET_OPTIONS], nkeynes@1: [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) nkeynes@1: nkeynes@1: # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) nkeynes@1: # ------------------------------------------- nkeynes@1: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. nkeynes@1: AC_DEFUN([_AM_IF_OPTION], nkeynes@1: [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) nkeynes@1: nkeynes@1: # nkeynes@1: # Check to make sure that the build environment is sane. nkeynes@1: # nkeynes@1: nkeynes@1: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 3 nkeynes@1: nkeynes@1: # AM_SANITY_CHECK nkeynes@1: # --------------- nkeynes@1: AC_DEFUN([AM_SANITY_CHECK], nkeynes@1: [AC_MSG_CHECKING([whether build environment is sane]) nkeynes@1: # Just in case nkeynes@1: sleep 1 nkeynes@1: echo timestamp > conftest.file nkeynes@1: # Do `set' in a subshell so we don't clobber the current shell's nkeynes@1: # arguments. Must try -L first in case configure is actually a nkeynes@1: # symlink; some systems play weird games with the mod time of symlinks nkeynes@1: # (eg FreeBSD returns the mod time of the symlink's containing nkeynes@1: # directory). nkeynes@1: if ( nkeynes@1: set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` nkeynes@1: if test "$[*]" = "X"; then nkeynes@1: # -L didn't work. nkeynes@1: set X `ls -t $srcdir/configure conftest.file` nkeynes@1: fi nkeynes@1: rm -f conftest.file nkeynes@1: if test "$[*]" != "X $srcdir/configure conftest.file" \ nkeynes@1: && test "$[*]" != "X conftest.file $srcdir/configure"; then nkeynes@1: nkeynes@1: # If neither matched, then we have a broken ls. This can happen nkeynes@1: # if, for instance, CONFIG_SHELL is bash and it inherits a nkeynes@1: # broken ls alias from the environment. This has actually nkeynes@1: # happened. Such a system could not be considered "sane". nkeynes@1: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken nkeynes@1: alias in your environment]) nkeynes@1: fi nkeynes@1: nkeynes@1: test "$[2]" = conftest.file nkeynes@1: ) nkeynes@1: then nkeynes@1: # Ok. nkeynes@1: : nkeynes@1: else nkeynes@1: AC_MSG_ERROR([newly created file is older than distributed files! nkeynes@1: Check your system clock]) nkeynes@1: fi nkeynes@1: AC_MSG_RESULT(yes)]) nkeynes@1: nkeynes@1: # -*- Autoconf -*- nkeynes@1: nkeynes@1: nkeynes@1: # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 3 nkeynes@1: nkeynes@1: # AM_MISSING_PROG(NAME, PROGRAM) nkeynes@1: # ------------------------------ nkeynes@1: AC_DEFUN([AM_MISSING_PROG], nkeynes@1: [AC_REQUIRE([AM_MISSING_HAS_RUN]) nkeynes@1: $1=${$1-"${am_missing_run}$2"} nkeynes@1: AC_SUBST($1)]) nkeynes@1: nkeynes@1: nkeynes@1: # AM_MISSING_HAS_RUN nkeynes@1: # ------------------ nkeynes@1: # Define MISSING if not defined so far and test if it supports --run. nkeynes@1: # If it does, set am_missing_run to use it, otherwise, to nothing. nkeynes@1: AC_DEFUN([AM_MISSING_HAS_RUN], nkeynes@1: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl nkeynes@1: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" nkeynes@1: # Use eval to expand $SHELL nkeynes@1: if eval "$MISSING --run true"; then nkeynes@1: am_missing_run="$MISSING --run " nkeynes@1: else nkeynes@1: am_missing_run= nkeynes@1: AC_MSG_WARN([`missing' script is too old or missing]) nkeynes@1: fi nkeynes@1: ]) nkeynes@1: nkeynes@1: # AM_AUX_DIR_EXPAND nkeynes@1: nkeynes@1: # Copyright 2001 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets nkeynes@1: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to nkeynes@1: # `$srcdir', `$srcdir/..', or `$srcdir/../..'. nkeynes@1: # nkeynes@1: # Of course, Automake must honor this variable whenever it calls a nkeynes@1: # tool from the auxiliary directory. The problem is that $srcdir (and nkeynes@1: # therefore $ac_aux_dir as well) can be either absolute or relative, nkeynes@1: # depending on how configure is run. This is pretty annoying, since nkeynes@1: # it makes $ac_aux_dir quite unusable in subdirectories: in the top nkeynes@1: # source directory, any form will work fine, but in subdirectories a nkeynes@1: # relative path needs to be adjusted first. nkeynes@1: # nkeynes@1: # $ac_aux_dir/missing nkeynes@1: # fails when called from a subdirectory if $ac_aux_dir is relative nkeynes@1: # $top_srcdir/$ac_aux_dir/missing nkeynes@1: # fails if $ac_aux_dir is absolute, nkeynes@1: # fails when called from a subdirectory in a VPATH build with nkeynes@1: # a relative $ac_aux_dir nkeynes@1: # nkeynes@1: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir nkeynes@1: # are both prefixed by $srcdir. In an in-source build this is usually nkeynes@1: # harmless because $srcdir is `.', but things will broke when you nkeynes@1: # start a VPATH build or use an absolute $srcdir. nkeynes@1: # nkeynes@1: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, nkeynes@1: # iff we strip the leading $srcdir from $ac_aux_dir. That would be: nkeynes@1: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` nkeynes@1: # and then we would define $MISSING as nkeynes@1: # MISSING="\${SHELL} $am_aux_dir/missing" nkeynes@1: # This will work as long as MISSING is not called from configure, because nkeynes@1: # unfortunately $(top_srcdir) has no meaning in configure. nkeynes@1: # However there are other variables, like CC, which are often used in nkeynes@1: # configure, and could therefore not use this "fixed" $ac_aux_dir. nkeynes@1: # nkeynes@1: # Another solution, used here, is to always expand $ac_aux_dir to an nkeynes@1: # absolute PATH. The drawback is that using absolute paths prevent a nkeynes@1: # configured tree to be moved without reconfiguration. nkeynes@1: nkeynes@1: # Rely on autoconf to set up CDPATH properly. nkeynes@1: AC_PREREQ([2.50]) nkeynes@1: nkeynes@1: AC_DEFUN([AM_AUX_DIR_EXPAND], [ nkeynes@1: # expand $ac_aux_dir to an absolute path nkeynes@1: am_aux_dir=`cd $ac_aux_dir && pwd` nkeynes@1: ]) nkeynes@1: nkeynes@1: # AM_PROG_INSTALL_SH nkeynes@1: # ------------------ nkeynes@1: # Define $install_sh. nkeynes@1: nkeynes@1: # Copyright 2001 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: AC_DEFUN([AM_PROG_INSTALL_SH], nkeynes@1: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl nkeynes@1: install_sh=${install_sh-"$am_aux_dir/install-sh"} nkeynes@1: AC_SUBST(install_sh)]) nkeynes@1: nkeynes@1: # AM_PROG_INSTALL_STRIP nkeynes@1: nkeynes@1: # Copyright 2001 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # One issue with vendor `install' (even GNU) is that you can't nkeynes@1: # specify the program used to strip binaries. This is especially nkeynes@1: # annoying in cross-compiling environments, where the build's strip nkeynes@1: # is unlikely to handle the host's binaries. nkeynes@1: # Fortunately install-sh will honor a STRIPPROG variable, so we nkeynes@1: # always use install-sh in `make install-strip', and initialize nkeynes@1: # STRIPPROG with the value of the STRIP variable (set by the user). nkeynes@1: AC_DEFUN([AM_PROG_INSTALL_STRIP], nkeynes@1: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl nkeynes@1: # Installed binaries are usually stripped using `strip' when the user nkeynes@1: # run `make install-strip'. However `strip' might not be the right nkeynes@1: # tool to use in cross-compilation environments, therefore Automake nkeynes@1: # will honor the `STRIP' environment variable to overrule this program. nkeynes@1: dnl Don't test for $cross_compiling = yes, because it might be `maybe'. nkeynes@1: if test "$cross_compiling" != no; then nkeynes@1: AC_CHECK_TOOL([STRIP], [strip], :) nkeynes@1: fi nkeynes@1: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" nkeynes@1: AC_SUBST([INSTALL_STRIP_PROGRAM])]) nkeynes@1: nkeynes@1: # -*- Autoconf -*- nkeynes@1: # Copyright (C) 2003 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 1 nkeynes@1: nkeynes@1: # Check whether the underlying file-system supports filenames nkeynes@1: # with a leading dot. For instance MS-DOS doesn't. nkeynes@1: AC_DEFUN([AM_SET_LEADING_DOT], nkeynes@1: [rm -rf .tst 2>/dev/null nkeynes@1: mkdir .tst 2>/dev/null nkeynes@1: if test -d .tst; then nkeynes@1: am__leading_dot=. nkeynes@1: else nkeynes@1: am__leading_dot=_ nkeynes@1: fi nkeynes@1: rmdir .tst 2>/dev/null nkeynes@1: AC_SUBST([am__leading_dot])]) nkeynes@1: nkeynes@1: # serial 5 -*- Autoconf -*- nkeynes@1: nkeynes@1: # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: nkeynes@1: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be nkeynes@1: # written in clear, in which case automake, when reading aclocal.m4, nkeynes@1: # will think it sees a *use*, and therefore will trigger all it's nkeynes@1: # C support machinery. Also note that it means that autoscan, seeing nkeynes@1: # CC etc. in the Makefile, will ask for an AC_PROG_CC use... nkeynes@1: nkeynes@1: nkeynes@1: nkeynes@1: # _AM_DEPENDENCIES(NAME) nkeynes@1: # ---------------------- nkeynes@1: # See how the compiler implements dependency checking. nkeynes@1: # NAME is "CC", "CXX", "GCJ", or "OBJC". nkeynes@1: # We try a few techniques and use that to set a single cache variable. nkeynes@1: # nkeynes@1: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was nkeynes@1: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular nkeynes@1: # dependency, and given that the user is not expected to run this macro, nkeynes@1: # just rely on AC_PROG_CC. nkeynes@1: AC_DEFUN([_AM_DEPENDENCIES], nkeynes@1: [AC_REQUIRE([AM_SET_DEPDIR])dnl nkeynes@1: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl nkeynes@1: AC_REQUIRE([AM_MAKE_INCLUDE])dnl nkeynes@1: AC_REQUIRE([AM_DEP_TRACK])dnl nkeynes@1: nkeynes@1: ifelse([$1], CC, [depcc="$CC" am_compiler_list=], nkeynes@1: [$1], CXX, [depcc="$CXX" am_compiler_list=], nkeynes@1: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], nkeynes@1: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], nkeynes@1: [depcc="$$1" am_compiler_list=]) nkeynes@1: nkeynes@1: AC_CACHE_CHECK([dependency style of $depcc], nkeynes@1: [am_cv_$1_dependencies_compiler_type], nkeynes@1: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then nkeynes@1: # We make a subdir and do the tests there. Otherwise we can end up nkeynes@1: # making bogus files that we don't know about and never remove. For nkeynes@1: # instance it was reported that on HP-UX the gcc test will end up nkeynes@1: # making a dummy file named `D' -- because `-MD' means `put the output nkeynes@1: # in D'. nkeynes@1: mkdir conftest.dir nkeynes@1: # Copy depcomp to subdir because otherwise we won't find it if we're nkeynes@1: # using a relative directory. nkeynes@1: cp "$am_depcomp" conftest.dir nkeynes@1: cd conftest.dir nkeynes@1: # We will build objects and dependencies in a subdirectory because nkeynes@1: # it helps to detect inapplicable dependency modes. For instance nkeynes@1: # both Tru64's cc and ICC support -MD to output dependencies as a nkeynes@1: # side effect of compilation, but ICC will put the dependencies in nkeynes@1: # the current directory while Tru64 will put them in the object nkeynes@1: # directory. nkeynes@1: mkdir sub nkeynes@1: nkeynes@1: am_cv_$1_dependencies_compiler_type=none nkeynes@1: if test "$am_compiler_list" = ""; then nkeynes@1: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` nkeynes@1: fi nkeynes@1: for depmode in $am_compiler_list; do nkeynes@1: # Setup a source with many dependencies, because some compilers nkeynes@1: # like to wrap large dependency lists on column 80 (with \), and nkeynes@1: # we should not choose a depcomp mode which is confused by this. nkeynes@1: # nkeynes@1: # We need to recreate these files for each test, as the compiler may nkeynes@1: # overwrite some of them when testing with obscure command lines. nkeynes@1: # This happens at least with the AIX C compiler. nkeynes@1: : > sub/conftest.c nkeynes@1: for i in 1 2 3 4 5 6; do nkeynes@1: echo '#include "conftst'$i'.h"' >> sub/conftest.c nkeynes@1: : > sub/conftst$i.h nkeynes@1: done nkeynes@1: echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf nkeynes@1: nkeynes@1: case $depmode in nkeynes@1: nosideeffect) nkeynes@1: # after this tag, mechanisms are not by side-effect, so they'll nkeynes@1: # only be used when explicitly requested nkeynes@1: if test "x$enable_dependency_tracking" = xyes; then nkeynes@1: continue nkeynes@1: else nkeynes@1: break nkeynes@1: fi nkeynes@1: ;; nkeynes@1: none) break ;; nkeynes@1: esac nkeynes@1: # We check with `-c' and `-o' for the sake of the "dashmstdout" nkeynes@1: # mode. It turns out that the SunPro C++ compiler does not properly nkeynes@1: # handle `-M -o', and we need to detect this. nkeynes@1: if depmode=$depmode \ nkeynes@1: source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ nkeynes@1: depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ nkeynes@1: $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ nkeynes@1: >/dev/null 2>conftest.err && nkeynes@1: grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && nkeynes@1: grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && nkeynes@1: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then nkeynes@1: # icc doesn't choke on unknown options, it will just issue warnings nkeynes@1: # (even with -Werror). So we grep stderr for any message nkeynes@1: # that says an option was ignored. nkeynes@1: if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else nkeynes@1: am_cv_$1_dependencies_compiler_type=$depmode nkeynes@1: break nkeynes@1: fi nkeynes@1: fi nkeynes@1: done nkeynes@1: nkeynes@1: cd .. nkeynes@1: rm -rf conftest.dir nkeynes@1: else nkeynes@1: am_cv_$1_dependencies_compiler_type=none nkeynes@1: fi nkeynes@1: ]) nkeynes@1: AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) nkeynes@1: AM_CONDITIONAL([am__fastdep$1], [ nkeynes@1: test "x$enable_dependency_tracking" != xno \ nkeynes@1: && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) nkeynes@1: ]) nkeynes@1: nkeynes@1: nkeynes@1: # AM_SET_DEPDIR nkeynes@1: # ------------- nkeynes@1: # Choose a directory name for dependency files. nkeynes@1: # This macro is AC_REQUIREd in _AM_DEPENDENCIES nkeynes@1: AC_DEFUN([AM_SET_DEPDIR], nkeynes@1: [AC_REQUIRE([AM_SET_LEADING_DOT])dnl nkeynes@1: AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl nkeynes@1: ]) nkeynes@1: nkeynes@1: nkeynes@1: # AM_DEP_TRACK nkeynes@1: # ------------ nkeynes@1: AC_DEFUN([AM_DEP_TRACK], nkeynes@1: [AC_ARG_ENABLE(dependency-tracking, nkeynes@1: [ --disable-dependency-tracking Speeds up one-time builds nkeynes@1: --enable-dependency-tracking Do not reject slow dependency extractors]) nkeynes@1: if test "x$enable_dependency_tracking" != xno; then nkeynes@1: am_depcomp="$ac_aux_dir/depcomp" nkeynes@1: AMDEPBACKSLASH='\' nkeynes@1: fi nkeynes@1: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) nkeynes@1: AC_SUBST([AMDEPBACKSLASH]) nkeynes@1: ]) nkeynes@1: nkeynes@1: # Generate code to set up dependency tracking. -*- Autoconf -*- nkeynes@1: nkeynes@1: # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: #serial 2 nkeynes@1: nkeynes@1: # _AM_OUTPUT_DEPENDENCY_COMMANDS nkeynes@1: # ------------------------------ nkeynes@1: AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], nkeynes@1: [for mf in $CONFIG_FILES; do nkeynes@1: # Strip MF so we end up with the name of the file. nkeynes@1: mf=`echo "$mf" | sed -e 's/:.*$//'` nkeynes@1: # Check whether this is an Automake generated Makefile or not. nkeynes@1: # We used to match only the files named `Makefile.in', but nkeynes@1: # some people rename them; so instead we look at the file content. nkeynes@1: # Grep'ing the first line is not enough: some people post-process nkeynes@1: # each Makefile.in and add a new line on top of each file to say so. nkeynes@1: # So let's grep whole file. nkeynes@1: if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then nkeynes@1: dirpart=`AS_DIRNAME("$mf")` nkeynes@1: else nkeynes@1: continue nkeynes@1: fi nkeynes@1: grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue nkeynes@1: # Extract the definition of DEP_FILES from the Makefile without nkeynes@1: # running `make'. nkeynes@1: DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` nkeynes@1: test -z "$DEPDIR" && continue nkeynes@1: # When using ansi2knr, U may be empty or an underscore; expand it nkeynes@1: U=`sed -n -e '/^U = / s///p' < "$mf"` nkeynes@1: test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" nkeynes@1: # We invoke sed twice because it is the simplest approach to nkeynes@1: # changing $(DEPDIR) to its actual value in the expansion. nkeynes@1: for file in `sed -n -e ' nkeynes@1: /^DEP_FILES = .*\\\\$/ { nkeynes@1: s/^DEP_FILES = // nkeynes@1: :loop nkeynes@1: s/\\\\$// nkeynes@1: p nkeynes@1: n nkeynes@1: /\\\\$/ b loop nkeynes@1: p nkeynes@1: } nkeynes@1: /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ nkeynes@1: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do nkeynes@1: # Make sure the directory exists. nkeynes@1: test -f "$dirpart/$file" && continue nkeynes@1: fdir=`AS_DIRNAME(["$file"])` nkeynes@1: AS_MKDIR_P([$dirpart/$fdir]) nkeynes@1: # echo "creating $dirpart/$file" nkeynes@1: echo '# dummy' > "$dirpart/$file" nkeynes@1: done nkeynes@1: done nkeynes@1: ])# _AM_OUTPUT_DEPENDENCY_COMMANDS nkeynes@1: nkeynes@1: nkeynes@1: # AM_OUTPUT_DEPENDENCY_COMMANDS nkeynes@1: # ----------------------------- nkeynes@1: # This macro should only be invoked once -- use via AC_REQUIRE. nkeynes@1: # nkeynes@1: # This code is only required when automatic dependency tracking nkeynes@1: # is enabled. FIXME. This creates each `.P' file that we will nkeynes@1: # need in order to bootstrap the dependency handling code. nkeynes@1: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], nkeynes@1: [AC_CONFIG_COMMANDS([depfiles], nkeynes@1: [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], nkeynes@1: [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) nkeynes@1: ]) nkeynes@1: nkeynes@1: # Check to see how 'make' treats includes. -*- Autoconf -*- nkeynes@1: nkeynes@1: # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 2 nkeynes@1: nkeynes@1: # AM_MAKE_INCLUDE() nkeynes@1: # ----------------- nkeynes@1: # Check to see how make treats includes. nkeynes@1: AC_DEFUN([AM_MAKE_INCLUDE], nkeynes@1: [am_make=${MAKE-make} nkeynes@1: cat > confinc << 'END' nkeynes@1: am__doit: nkeynes@1: @echo done nkeynes@1: .PHONY: am__doit nkeynes@1: END nkeynes@1: # If we don't find an include directive, just comment out the code. nkeynes@1: AC_MSG_CHECKING([for style of include used by $am_make]) nkeynes@1: am__include="#" nkeynes@1: am__quote= nkeynes@1: _am_result=none nkeynes@1: # First try GNU make style include. nkeynes@1: echo "include confinc" > confmf nkeynes@1: # We grep out `Entering directory' and `Leaving directory' nkeynes@1: # messages which can occur if `w' ends up in MAKEFLAGS. nkeynes@1: # In particular we don't look at `^make:' because GNU make might nkeynes@1: # be invoked under some other name (usually "gmake"), in which nkeynes@1: # case it prints its new name instead of `make'. nkeynes@1: if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then nkeynes@1: am__include=include nkeynes@1: am__quote= nkeynes@1: _am_result=GNU nkeynes@1: fi nkeynes@1: # Now try BSD make style include. nkeynes@1: if test "$am__include" = "#"; then nkeynes@1: echo '.include "confinc"' > confmf nkeynes@1: if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then nkeynes@1: am__include=.include nkeynes@1: am__quote="\"" nkeynes@1: _am_result=BSD nkeynes@1: fi nkeynes@1: fi nkeynes@1: AC_SUBST([am__include]) nkeynes@1: AC_SUBST([am__quote]) nkeynes@1: AC_MSG_RESULT([$_am_result]) nkeynes@1: rm -f confinc confmf nkeynes@1: ]) nkeynes@1: nkeynes@1: # AM_CONDITIONAL -*- Autoconf -*- nkeynes@1: nkeynes@1: # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 5 nkeynes@1: nkeynes@1: AC_PREREQ(2.52) nkeynes@1: nkeynes@1: # AM_CONDITIONAL(NAME, SHELL-CONDITION) nkeynes@1: # ------------------------------------- nkeynes@1: # Define a conditional. nkeynes@1: AC_DEFUN([AM_CONDITIONAL], nkeynes@1: [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], nkeynes@1: [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl nkeynes@1: AC_SUBST([$1_TRUE]) nkeynes@1: AC_SUBST([$1_FALSE]) nkeynes@1: if $2; then nkeynes@1: $1_TRUE= nkeynes@1: $1_FALSE='#' nkeynes@1: else nkeynes@1: $1_TRUE='#' nkeynes@1: $1_FALSE= nkeynes@1: fi nkeynes@1: AC_CONFIG_COMMANDS_PRE( nkeynes@1: [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then nkeynes@1: AC_MSG_ERROR([conditional "$1" was never defined. nkeynes@1: Usually this means the macro was only invoked conditionally.]) nkeynes@1: fi])]) nkeynes@1: nkeynes@1: # Add --enable-maintainer-mode option to configure. nkeynes@1: # From Jim Meyering nkeynes@1: nkeynes@1: # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 2 nkeynes@1: nkeynes@1: AC_DEFUN([AM_MAINTAINER_MODE], nkeynes@1: [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) nkeynes@1: dnl maintainer-mode is disabled by default nkeynes@1: AC_ARG_ENABLE(maintainer-mode, nkeynes@1: [ --enable-maintainer-mode enable make rules and dependencies not useful nkeynes@1: (and sometimes confusing) to the casual installer], nkeynes@1: USE_MAINTAINER_MODE=$enableval, nkeynes@1: USE_MAINTAINER_MODE=no) nkeynes@1: AC_MSG_RESULT([$USE_MAINTAINER_MODE]) nkeynes@1: AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) nkeynes@1: MAINT=$MAINTAINER_MODE_TRUE nkeynes@1: AC_SUBST(MAINT)dnl nkeynes@1: ] nkeynes@1: ) nkeynes@1: nkeynes@1: AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) nkeynes@1: nkeynes@1: # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- nkeynes@1: nkeynes@1: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: AC_PREREQ([2.52]) nkeynes@1: nkeynes@1: # serial 6 nkeynes@1: nkeynes@1: # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. nkeynes@1: AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) nkeynes@1: nkeynes@1: # isc-posix.m4 serial 2 (gettext-0.11.2) nkeynes@1: dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. nkeynes@1: dnl This file is free software, distributed under the terms of the GNU nkeynes@1: dnl General Public License. As a special exception to the GNU General nkeynes@1: dnl Public License, this file may be distributed as part of a program nkeynes@1: dnl that contains a configuration script generated by Autoconf, under nkeynes@1: dnl the same distribution terms as the rest of that program. nkeynes@1: nkeynes@1: # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. nkeynes@1: nkeynes@1: # This test replaces the one in autoconf. nkeynes@1: # Currently this macro should have the same name as the autoconf macro nkeynes@1: # because gettext's gettext.m4 (distributed in the automake package) nkeynes@1: # still uses it. Otherwise, the use in gettext.m4 makes autoheader nkeynes@1: # give these diagnostics: nkeynes@1: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX nkeynes@1: # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX nkeynes@1: nkeynes@1: undefine([AC_ISC_POSIX]) nkeynes@1: nkeynes@1: AC_DEFUN([AC_ISC_POSIX], nkeynes@1: [ nkeynes@1: dnl This test replaces the obsolescent AC_ISC_POSIX kludge. nkeynes@1: AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) nkeynes@1: ] nkeynes@1: ) nkeynes@1: nkeynes@1: nkeynes@1: # Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. nkeynes@1: nkeynes@1: # This program is free software; you can redistribute it and/or modify nkeynes@1: # it under the terms of the GNU General Public License as published by nkeynes@1: # the Free Software Foundation; either version 2, or (at your option) nkeynes@1: # any later version. nkeynes@1: nkeynes@1: # This program is distributed in the hope that it will be useful, nkeynes@1: # but WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@1: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nkeynes@1: # GNU General Public License for more details. nkeynes@1: nkeynes@1: # You should have received a copy of the GNU General Public License nkeynes@1: # along with this program; if not, write to the Free Software nkeynes@1: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA nkeynes@1: # 02111-1307, USA. nkeynes@1: nkeynes@1: # serial 2 nkeynes@1: nkeynes@1: # @defmac AC_PROG_CC_STDC nkeynes@1: # @maindex PROG_CC_STDC nkeynes@1: # @ovindex CC nkeynes@1: # If the C compiler in not in ANSI C mode by default, try to add an option nkeynes@1: # to output variable @code{CC} to make it so. This macro tries various nkeynes@1: # options that select ANSI C on some system or another. It considers the nkeynes@1: # compiler to be in ANSI C mode if it handles function prototypes correctly. nkeynes@1: # nkeynes@1: # If you use this macro, you should check after calling it whether the C nkeynes@1: # compiler has been set to accept ANSI C; if not, the shell variable nkeynes@1: # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source nkeynes@1: # code in ANSI C, you can make an un-ANSIfied copy of it by using the nkeynes@1: # program @code{ansi2knr}, which comes with Ghostscript. nkeynes@1: # @end defmac nkeynes@1: nkeynes@1: AC_DEFUN([AM_PROG_CC_STDC], nkeynes@1: [AC_REQUIRE([AC_PROG_CC]) nkeynes@1: AC_BEFORE([$0], [AC_C_INLINE]) nkeynes@1: AC_BEFORE([$0], [AC_C_CONST]) nkeynes@1: dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require nkeynes@1: dnl a magic option to avoid problems with ANSI preprocessor commands nkeynes@1: dnl like #elif. nkeynes@1: dnl FIXME: can't do this because then AC_AIX won't work due to a nkeynes@1: dnl circular dependency. nkeynes@1: dnl AC_BEFORE([$0], [AC_PROG_CPP]) nkeynes@1: AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C]) nkeynes@1: AC_CACHE_VAL(am_cv_prog_cc_stdc, nkeynes@1: [am_cv_prog_cc_stdc=no nkeynes@1: ac_save_CC="$CC" nkeynes@1: # Don't try gcc -ansi; that turns off useful extensions and nkeynes@1: # breaks some systems' header files. nkeynes@1: # AIX -qlanglvl=ansi nkeynes@1: # Ultrix and OSF/1 -std1 nkeynes@1: # HP-UX 10.20 and later -Ae nkeynes@1: # HP-UX older versions -Aa -D_HPUX_SOURCE nkeynes@1: # SVR4 -Xc -D__EXTENSIONS__ nkeynes@1: for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" nkeynes@1: do nkeynes@1: CC="$ac_save_CC $ac_arg" nkeynes@1: AC_TRY_COMPILE( nkeynes@1: [#include nkeynes@1: #include nkeynes@1: #include nkeynes@1: #include nkeynes@1: /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ nkeynes@1: struct buf { int x; }; nkeynes@1: FILE * (*rcsopen) (struct buf *, struct stat *, int); nkeynes@1: static char *e (p, i) nkeynes@1: char **p; nkeynes@1: int i; nkeynes@1: { nkeynes@1: return p[i]; nkeynes@1: } nkeynes@1: static char *f (char * (*g) (char **, int), char **p, ...) nkeynes@1: { nkeynes@1: char *s; nkeynes@1: va_list v; nkeynes@1: va_start (v,p); nkeynes@1: s = g (p, va_arg (v,int)); nkeynes@1: va_end (v); nkeynes@1: return s; nkeynes@1: } nkeynes@1: int test (int i, double x); nkeynes@1: struct s1 {int (*f) (int a);}; nkeynes@1: struct s2 {int (*f) (double a);}; nkeynes@1: int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); nkeynes@1: int argc; nkeynes@1: char **argv; nkeynes@1: ], [ nkeynes@1: return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; nkeynes@1: ], nkeynes@1: [am_cv_prog_cc_stdc="$ac_arg"; break]) nkeynes@1: done nkeynes@1: CC="$ac_save_CC" nkeynes@1: ]) nkeynes@1: if test -z "$am_cv_prog_cc_stdc"; then nkeynes@1: AC_MSG_RESULT([none needed]) nkeynes@1: else nkeynes@1: AC_MSG_RESULT([$am_cv_prog_cc_stdc]) nkeynes@1: fi nkeynes@1: case "x$am_cv_prog_cc_stdc" in nkeynes@1: x|xno) ;; nkeynes@1: *) CC="$CC $am_cv_prog_cc_stdc" ;; nkeynes@1: esac nkeynes@1: ]) nkeynes@1: nkeynes@1: AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC]) nkeynes@1: nkeynes@180: # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- nkeynes@180: # nkeynes@180: # Copyright © 2004 Scott James Remnant . nkeynes@180: # nkeynes@180: # This program is free software; you can redistribute it and/or modify nkeynes@180: # it under the terms of the GNU General Public License as published by nkeynes@180: # the Free Software Foundation; either version 2 of the License, or nkeynes@180: # (at your option) any later version. nkeynes@180: # nkeynes@180: # This program is distributed in the hope that it will be useful, but nkeynes@180: # WITHOUT ANY WARRANTY; without even the implied warranty of nkeynes@180: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU nkeynes@180: # General Public License for more details. nkeynes@180: # nkeynes@180: # You should have received a copy of the GNU General Public License nkeynes@180: # along with this program; if not, write to the Free Software nkeynes@180: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. nkeynes@180: # nkeynes@180: # As a special exception to the GNU General Public License, if you nkeynes@180: # distribute this file as part of a program that contains a nkeynes@180: # configuration script generated by Autoconf, you may include it under nkeynes@180: # the same distribution terms that you use for the rest of that program. nkeynes@1: nkeynes@180: # PKG_PROG_PKG_CONFIG([MIN-VERSION]) nkeynes@180: # ---------------------------------- nkeynes@180: AC_DEFUN([PKG_PROG_PKG_CONFIG], nkeynes@180: [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) nkeynes@180: m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) nkeynes@180: AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl nkeynes@180: if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then nkeynes@180: AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) nkeynes@180: fi nkeynes@180: if test -n "$PKG_CONFIG"; then nkeynes@180: _pkg_min_version=m4_default([$1], [0.9.0]) nkeynes@180: AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) nkeynes@180: if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then nkeynes@180: AC_MSG_RESULT([yes]) nkeynes@180: else nkeynes@180: AC_MSG_RESULT([no]) nkeynes@180: PKG_CONFIG="" nkeynes@180: fi nkeynes@180: nkeynes@180: fi[]dnl nkeynes@180: ])# PKG_PROG_PKG_CONFIG nkeynes@1: nkeynes@180: # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) nkeynes@180: # nkeynes@180: # Check to see whether a particular set of modules exists. Similar nkeynes@180: # to PKG_CHECK_MODULES(), but does not set variables or print errors. nkeynes@180: # nkeynes@180: # nkeynes@180: # Similar to PKG_CHECK_MODULES, make sure that the first instance of nkeynes@180: # this or PKG_CHECK_MODULES is called, or make sure to call nkeynes@180: # PKG_CHECK_EXISTS manually nkeynes@180: # -------------------------------------------------------------- nkeynes@180: AC_DEFUN([PKG_CHECK_EXISTS], nkeynes@180: [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl nkeynes@180: if test -n "$PKG_CONFIG" && \ nkeynes@180: AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then nkeynes@180: m4_ifval([$2], [$2], [:]) nkeynes@180: m4_ifvaln([$3], [else nkeynes@180: $3])dnl nkeynes@180: fi]) nkeynes@1: nkeynes@1: nkeynes@180: # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) nkeynes@180: # --------------------------------------------- nkeynes@180: m4_define([_PKG_CONFIG], nkeynes@180: [if test -n "$PKG_CONFIG"; then nkeynes@180: if test -n "$$1"; then nkeynes@180: pkg_cv_[]$1="$$1" nkeynes@180: else nkeynes@180: PKG_CHECK_EXISTS([$3], nkeynes@180: [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], nkeynes@180: [pkg_failed=yes]) nkeynes@180: fi nkeynes@180: else nkeynes@180: pkg_failed=untried nkeynes@180: fi[]dnl nkeynes@180: ])# _PKG_CONFIG nkeynes@1: nkeynes@180: # _PKG_SHORT_ERRORS_SUPPORTED nkeynes@180: # ----------------------------- nkeynes@180: AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], nkeynes@180: [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) nkeynes@180: if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then nkeynes@180: _pkg_short_errors_supported=yes nkeynes@180: else nkeynes@180: _pkg_short_errors_supported=no nkeynes@180: fi[]dnl nkeynes@180: ])# _PKG_SHORT_ERRORS_SUPPORTED nkeynes@1: nkeynes@180: nkeynes@180: # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], nkeynes@180: # [ACTION-IF-NOT-FOUND]) nkeynes@180: # nkeynes@180: # nkeynes@180: # Note that if there is a possibility the first call to nkeynes@180: # PKG_CHECK_MODULES might not happen, you should be sure to include an nkeynes@180: # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac nkeynes@180: # nkeynes@180: # nkeynes@180: # -------------------------------------------------------------- nkeynes@180: AC_DEFUN([PKG_CHECK_MODULES], nkeynes@180: [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl nkeynes@180: AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl nkeynes@180: AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl nkeynes@180: nkeynes@180: pkg_failed=no nkeynes@180: AC_MSG_CHECKING([for $1]) nkeynes@180: nkeynes@180: _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) nkeynes@180: _PKG_CONFIG([$1][_LIBS], [libs], [$2]) nkeynes@180: nkeynes@180: m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS nkeynes@180: and $1[]_LIBS to avoid the need to call pkg-config. nkeynes@180: See the pkg-config man page for more details.]) nkeynes@180: nkeynes@180: if test $pkg_failed = yes; then nkeynes@180: _PKG_SHORT_ERRORS_SUPPORTED nkeynes@180: if test $_pkg_short_errors_supported = yes; then nkeynes@180: $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` nkeynes@180: else nkeynes@180: $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` nkeynes@1: fi nkeynes@180: # Put the nasty error message in config.log where it belongs nkeynes@180: echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD nkeynes@1: nkeynes@180: ifelse([$4], , [AC_MSG_ERROR(dnl nkeynes@180: [Package requirements ($2) were not met: nkeynes@1: nkeynes@180: $$1_PKG_ERRORS nkeynes@1: nkeynes@180: Consider adjusting the PKG_CONFIG_PATH environment variable if you nkeynes@180: installed software in a non-standard prefix. nkeynes@1: nkeynes@180: _PKG_TEXT nkeynes@180: ])], nkeynes@180: [$4]) nkeynes@180: elif test $pkg_failed = untried; then nkeynes@180: ifelse([$4], , [AC_MSG_FAILURE(dnl nkeynes@180: [The pkg-config script could not be found or is too old. Make sure it nkeynes@180: is in your PATH or set the PKG_CONFIG environment variable to the full nkeynes@180: path to pkg-config. nkeynes@180: nkeynes@180: _PKG_TEXT nkeynes@180: nkeynes@180: To get pkg-config, see .])], nkeynes@180: [$4]) nkeynes@180: else nkeynes@180: $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS nkeynes@180: $1[]_LIBS=$pkg_cv_[]$1[]_LIBS nkeynes@180: AC_MSG_RESULT([yes]) nkeynes@180: ifelse([$3], , :, [$3]) nkeynes@180: fi[]dnl nkeynes@180: ])# PKG_CHECK_MODULES nkeynes@1: nkeynes@1: # Copyright (C) 1995-2002 Free Software Foundation, Inc. nkeynes@10: # Copyright (C) 2001-2003,2004 Red Hat, Inc. nkeynes@1: # nkeynes@1: # This file is free software, distributed under the terms of the GNU nkeynes@1: # General Public License. As a special exception to the GNU General nkeynes@1: # Public License, this file may be distributed as part of a program nkeynes@1: # that contains a configuration script generated by Autoconf, under nkeynes@1: # the same distribution terms as the rest of that program. nkeynes@1: # nkeynes@1: # This file can be copied and used freely without restrictions. It can nkeynes@1: # be used in projects which are not available under the GNU Public License nkeynes@1: # but which still want to provide support for the GNU gettext functionality. nkeynes@1: # nkeynes@1: # Macro to add for using GNU gettext. nkeynes@1: # Ulrich Drepper , 1995, 1996 nkeynes@1: # nkeynes@1: # Modified to never use included libintl. nkeynes@1: # Owen Taylor , 12/15/1998 nkeynes@1: # nkeynes@1: # Major rework to remove unused code nkeynes@1: # Owen Taylor , 12/11/2002 nkeynes@1: # nkeynes@1: # Added better handling of ALL_LINGUAS from GNU gettext version nkeynes@1: # written by Bruno Haible, Owen Taylor 5/30/3002 nkeynes@10: # nkeynes@10: # Modified to require ngettext nkeynes@10: # Matthias Clasen 08/06/2004 nkeynes@1: # nkeynes@1: # We need this here as well, since someone might use autoconf-2.5x nkeynes@1: # to configure GLib then an older version to configure a package nkeynes@1: # using AM_GLIB_GNU_GETTEXT nkeynes@1: AC_PREREQ(2.53) nkeynes@1: nkeynes@1: dnl nkeynes@1: dnl We go to great lengths to make sure that aclocal won't nkeynes@1: dnl try to pull in the installed version of these macros nkeynes@1: dnl when running aclocal in the glib directory. nkeynes@1: dnl nkeynes@1: m4_copy([AC_DEFUN],[glib_DEFUN]) nkeynes@1: m4_copy([AC_REQUIRE],[glib_REQUIRE]) nkeynes@1: dnl nkeynes@1: dnl At the end, if we're not within glib, we'll define the public nkeynes@1: dnl definitions in terms of our private definitions. nkeynes@1: dnl nkeynes@1: nkeynes@1: # GLIB_LC_MESSAGES nkeynes@1: #-------------------- nkeynes@1: glib_DEFUN([GLIB_LC_MESSAGES], nkeynes@1: [AC_CHECK_HEADERS([locale.h]) nkeynes@1: if test $ac_cv_header_locale_h = yes; then nkeynes@1: AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, nkeynes@1: [AC_TRY_LINK([#include ], [return LC_MESSAGES], nkeynes@1: am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) nkeynes@1: if test $am_cv_val_LC_MESSAGES = yes; then nkeynes@1: AC_DEFINE(HAVE_LC_MESSAGES, 1, nkeynes@1: [Define if your file defines LC_MESSAGES.]) nkeynes@1: fi nkeynes@1: fi]) nkeynes@1: nkeynes@1: # GLIB_PATH_PROG_WITH_TEST nkeynes@1: #---------------------------- nkeynes@1: dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, nkeynes@1: dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) nkeynes@1: glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], nkeynes@1: [# Extract the first word of "$2", so it can be a program name with args. nkeynes@1: set dummy $2; ac_word=[$]2 nkeynes@1: AC_MSG_CHECKING([for $ac_word]) nkeynes@1: AC_CACHE_VAL(ac_cv_path_$1, nkeynes@1: [case "[$]$1" in nkeynes@1: /*) nkeynes@1: ac_cv_path_$1="[$]$1" # Let the user override the test with a path. nkeynes@1: ;; nkeynes@1: *) nkeynes@1: IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" nkeynes@1: for ac_dir in ifelse([$5], , $PATH, [$5]); do nkeynes@1: test -z "$ac_dir" && ac_dir=. nkeynes@1: if test -f $ac_dir/$ac_word; then nkeynes@1: if [$3]; then nkeynes@1: ac_cv_path_$1="$ac_dir/$ac_word" nkeynes@1: break nkeynes@1: fi nkeynes@1: fi nkeynes@1: done nkeynes@1: IFS="$ac_save_ifs" nkeynes@1: dnl If no 4th arg is given, leave the cache variable unset, nkeynes@1: dnl so AC_PATH_PROGS will keep looking. nkeynes@1: ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" nkeynes@1: ])dnl nkeynes@1: ;; nkeynes@1: esac])dnl nkeynes@1: $1="$ac_cv_path_$1" nkeynes@1: if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then nkeynes@1: AC_MSG_RESULT([$]$1) nkeynes@1: else nkeynes@1: AC_MSG_RESULT(no) nkeynes@1: fi nkeynes@1: AC_SUBST($1)dnl nkeynes@1: ]) nkeynes@1: nkeynes@1: # GLIB_WITH_NLS nkeynes@1: #----------------- nkeynes@1: glib_DEFUN([GLIB_WITH_NLS], nkeynes@1: dnl NLS is obligatory nkeynes@1: [USE_NLS=yes nkeynes@1: AC_SUBST(USE_NLS) nkeynes@1: nkeynes@1: gt_cv_have_gettext=no nkeynes@1: nkeynes@1: CATOBJEXT=NONE nkeynes@1: XGETTEXT=: nkeynes@1: INTLLIBS= nkeynes@1: nkeynes@1: AC_CHECK_HEADER(libintl.h, nkeynes@1: [gt_cv_func_dgettext_libintl="no" nkeynes@1: libintl_extra_libs="" nkeynes@1: nkeynes@1: # nkeynes@1: # First check in libc nkeynes@1: # nkeynes@10: AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, nkeynes@1: [AC_TRY_LINK([ nkeynes@1: #include nkeynes@1: ], nkeynes@10: [return !ngettext ("","", 1)], nkeynes@10: gt_cv_func_ngettext_libc=yes, nkeynes@10: gt_cv_func_ngettext_libc=no) nkeynes@1: ]) nkeynes@1: nkeynes@10: if test "$gt_cv_func_ngettext_libc" = "yes" ; then nkeynes@10: AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, nkeynes@10: [AC_TRY_LINK([ nkeynes@10: #include nkeynes@10: ], nkeynes@10: [return !dgettext ("","")], nkeynes@10: gt_cv_func_dgettext_libc=yes, nkeynes@10: gt_cv_func_dgettext_libc=no) nkeynes@10: ]) nkeynes@10: fi nkeynes@10: nkeynes@10: if test "$gt_cv_func_ngettext_libc" = "yes" ; then nkeynes@1: AC_CHECK_FUNCS(bind_textdomain_codeset) nkeynes@1: fi nkeynes@1: nkeynes@1: # nkeynes@1: # If we don't have everything we want, check in libintl nkeynes@1: # nkeynes@1: if test "$gt_cv_func_dgettext_libc" != "yes" \ nkeynes@10: || test "$gt_cv_func_ngettext_libc" != "yes" \ nkeynes@1: || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then nkeynes@1: nkeynes@1: AC_CHECK_LIB(intl, bindtextdomain, nkeynes@10: [AC_CHECK_LIB(intl, ngettext, nkeynes@10: [AC_CHECK_LIB(intl, dgettext, nkeynes@10: gt_cv_func_dgettext_libintl=yes)])]) nkeynes@1: nkeynes@1: if test "$gt_cv_func_dgettext_libintl" != "yes" ; then nkeynes@1: AC_MSG_CHECKING([if -liconv is needed to use gettext]) nkeynes@1: AC_MSG_RESULT([]) nkeynes@10: AC_CHECK_LIB(intl, ngettext, nkeynes@10: [AC_CHECK_LIB(intl, dcgettext, nkeynes@1: [gt_cv_func_dgettext_libintl=yes nkeynes@1: libintl_extra_libs=-liconv], nkeynes@10: :,-liconv)], nkeynes@10: :,-liconv) nkeynes@1: fi nkeynes@1: nkeynes@1: # nkeynes@1: # If we found libintl, then check in it for bind_textdomain_codeset(); nkeynes@1: # we'll prefer libc if neither have bind_textdomain_codeset(), nkeynes@10: # and both have dgettext and ngettext nkeynes@1: # nkeynes@1: if test "$gt_cv_func_dgettext_libintl" = "yes" ; then nkeynes@1: glib_save_LIBS="$LIBS" nkeynes@1: LIBS="$LIBS -lintl $libintl_extra_libs" nkeynes@1: unset ac_cv_func_bind_textdomain_codeset nkeynes@1: AC_CHECK_FUNCS(bind_textdomain_codeset) nkeynes@1: LIBS="$glib_save_LIBS" nkeynes@1: nkeynes@1: if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then nkeynes@1: gt_cv_func_dgettext_libc=no nkeynes@1: else nkeynes@10: if test "$gt_cv_func_dgettext_libc" = "yes" \ nkeynes@10: && test "$gt_cv_func_ngettext_libc" = "yes"; then nkeynes@1: gt_cv_func_dgettext_libintl=no nkeynes@1: fi nkeynes@1: fi nkeynes@1: fi nkeynes@1: fi nkeynes@1: nkeynes@1: if test "$gt_cv_func_dgettext_libc" = "yes" \ nkeynes@1: || test "$gt_cv_func_dgettext_libintl" = "yes"; then nkeynes@1: gt_cv_have_gettext=yes nkeynes@1: fi nkeynes@1: nkeynes@1: if test "$gt_cv_func_dgettext_libintl" = "yes"; then nkeynes@1: INTLLIBS="-lintl $libintl_extra_libs" nkeynes@1: fi nkeynes@1: nkeynes@1: if test "$gt_cv_have_gettext" = "yes"; then nkeynes@1: AC_DEFINE(HAVE_GETTEXT,1, nkeynes@1: [Define if the GNU gettext() function is already present or preinstalled.]) nkeynes@1: GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, nkeynes@1: [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl nkeynes@1: if test "$MSGFMT" != "no"; then nkeynes@1: glib_save_LIBS="$LIBS" nkeynes@1: LIBS="$LIBS $INTLLIBS" nkeynes@1: AC_CHECK_FUNCS(dcgettext) nkeynes@1: AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) nkeynes@1: GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, nkeynes@1: [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) nkeynes@1: AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; nkeynes@1: return _nl_msg_cat_cntr], nkeynes@1: [CATOBJEXT=.gmo nkeynes@1: DATADIRNAME=share], nkeynes@1: [case $host in nkeynes@1: *-*-solaris*) nkeynes@1: dnl On Solaris, if bind_textdomain_codeset is in libc, nkeynes@1: dnl GNU format message catalog is always supported, nkeynes@1: dnl since both are added to the libc all together. nkeynes@1: dnl Hence, we'd like to go with DATADIRNAME=share and nkeynes@1: dnl and CATOBJEXT=.gmo in this case. nkeynes@1: AC_CHECK_FUNC(bind_textdomain_codeset, nkeynes@1: [CATOBJEXT=.gmo nkeynes@1: DATADIRNAME=share], nkeynes@1: [CATOBJEXT=.mo nkeynes@1: DATADIRNAME=lib]) nkeynes@1: ;; nkeynes@1: *) nkeynes@1: CATOBJEXT=.mo nkeynes@1: DATADIRNAME=lib nkeynes@1: ;; nkeynes@1: esac]) nkeynes@1: LIBS="$glib_save_LIBS" nkeynes@1: INSTOBJEXT=.mo nkeynes@1: else nkeynes@1: gt_cv_have_gettext=no nkeynes@1: fi nkeynes@1: fi nkeynes@1: ]) nkeynes@1: nkeynes@1: if test "$gt_cv_have_gettext" = "yes" ; then nkeynes@1: AC_DEFINE(ENABLE_NLS, 1, nkeynes@1: [always defined to indicate that i18n is enabled]) nkeynes@1: fi nkeynes@1: nkeynes@1: dnl Test whether we really found GNU xgettext. nkeynes@1: if test "$XGETTEXT" != ":"; then nkeynes@1: dnl If it is not GNU xgettext we define it as : so that the nkeynes@1: dnl Makefiles still can work. nkeynes@1: if $XGETTEXT --omit-header /dev/null 2> /dev/null; then nkeynes@1: : ; nkeynes@1: else nkeynes@1: AC_MSG_RESULT( nkeynes@1: [found xgettext program is not GNU xgettext; ignore it]) nkeynes@1: XGETTEXT=":" nkeynes@1: fi nkeynes@1: fi nkeynes@1: nkeynes@1: # We need to process the po/ directory. nkeynes@1: POSUB=po nkeynes@1: nkeynes@1: AC_OUTPUT_COMMANDS( nkeynes@1: [case "$CONFIG_FILES" in *po/Makefile.in*) nkeynes@1: sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile nkeynes@1: esac]) nkeynes@1: nkeynes@1: dnl These rules are solely for the distribution goal. While doing this nkeynes@1: dnl we only have to keep exactly one list of the available catalogs nkeynes@1: dnl in configure.in. nkeynes@1: for lang in $ALL_LINGUAS; do nkeynes@1: GMOFILES="$GMOFILES $lang.gmo" nkeynes@1: POFILES="$POFILES $lang.po" nkeynes@1: done nkeynes@1: nkeynes@1: dnl Make all variables we use known to autoconf. nkeynes@1: AC_SUBST(CATALOGS) nkeynes@1: AC_SUBST(CATOBJEXT) nkeynes@1: AC_SUBST(DATADIRNAME) nkeynes@1: AC_SUBST(GMOFILES) nkeynes@1: AC_SUBST(INSTOBJEXT) nkeynes@1: AC_SUBST(INTLLIBS) nkeynes@1: AC_SUBST(PO_IN_DATADIR_TRUE) nkeynes@1: AC_SUBST(PO_IN_DATADIR_FALSE) nkeynes@1: AC_SUBST(POFILES) nkeynes@1: AC_SUBST(POSUB) nkeynes@1: ]) nkeynes@1: nkeynes@1: # AM_GLIB_GNU_GETTEXT nkeynes@1: # ------------------- nkeynes@1: # Do checks necessary for use of gettext. If a suitable implementation nkeynes@1: # of gettext is found in either in libintl or in the C library, nkeynes@1: # it will set INTLLIBS to the libraries needed for use of gettext nkeynes@1: # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable nkeynes@1: # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() nkeynes@1: # on various variables needed by the Makefile.in.in installed by nkeynes@1: # glib-gettextize. nkeynes@1: dnl nkeynes@10: glib_DEFUN([GLIB_GNU_GETTEXT], nkeynes@1: [AC_REQUIRE([AC_PROG_CC])dnl nkeynes@1: AC_REQUIRE([AC_HEADER_STDC])dnl nkeynes@1: nkeynes@1: GLIB_LC_MESSAGES nkeynes@1: GLIB_WITH_NLS nkeynes@1: nkeynes@1: if test "$gt_cv_have_gettext" = "yes"; then nkeynes@1: if test "x$ALL_LINGUAS" = "x"; then nkeynes@1: LINGUAS= nkeynes@1: else nkeynes@1: AC_MSG_CHECKING(for catalogs to be installed) nkeynes@1: NEW_LINGUAS= nkeynes@1: for presentlang in $ALL_LINGUAS; do nkeynes@1: useit=no nkeynes@1: if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then nkeynes@1: desiredlanguages="$LINGUAS" nkeynes@1: else nkeynes@1: desiredlanguages="$ALL_LINGUAS" nkeynes@1: fi nkeynes@1: for desiredlang in $desiredlanguages; do nkeynes@1: # Use the presentlang catalog if desiredlang is nkeynes@1: # a. equal to presentlang, or nkeynes@1: # b. a variant of presentlang (because in this case, nkeynes@1: # presentlang can be used as a fallback for messages nkeynes@1: # which are not translated in the desiredlang catalog). nkeynes@1: case "$desiredlang" in nkeynes@1: "$presentlang"*) useit=yes;; nkeynes@1: esac nkeynes@1: done nkeynes@1: if test $useit = yes; then nkeynes@1: NEW_LINGUAS="$NEW_LINGUAS $presentlang" nkeynes@1: fi nkeynes@1: done nkeynes@1: LINGUAS=$NEW_LINGUAS nkeynes@1: AC_MSG_RESULT($LINGUAS) nkeynes@1: fi nkeynes@1: nkeynes@1: dnl Construct list of names of catalog files to be constructed. nkeynes@1: if test -n "$LINGUAS"; then nkeynes@1: for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done nkeynes@1: fi nkeynes@1: fi nkeynes@1: nkeynes@1: dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly nkeynes@1: dnl find the mkinstalldirs script in another subdir but ($top_srcdir). nkeynes@1: dnl Try to locate is. nkeynes@1: MKINSTALLDIRS= nkeynes@1: if test -n "$ac_aux_dir"; then nkeynes@1: MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" nkeynes@1: fi nkeynes@1: if test -z "$MKINSTALLDIRS"; then nkeynes@1: MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" nkeynes@1: fi nkeynes@1: AC_SUBST(MKINSTALLDIRS) nkeynes@1: nkeynes@1: dnl Generate list of files to be processed by xgettext which will nkeynes@1: dnl be included in po/Makefile. nkeynes@1: test -d po || mkdir po nkeynes@1: if test "x$srcdir" != "x."; then nkeynes@1: if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then nkeynes@1: posrcprefix="$srcdir/" nkeynes@1: else nkeynes@1: posrcprefix="../$srcdir/" nkeynes@1: fi nkeynes@1: else nkeynes@1: posrcprefix="../" nkeynes@1: fi nkeynes@1: rm -f po/POTFILES nkeynes@1: sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ nkeynes@1: < $srcdir/po/POTFILES.in > po/POTFILES nkeynes@1: ]) nkeynes@1: nkeynes@1: # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) nkeynes@1: # ------------------------------- nkeynes@1: # Define VARIABLE to the location where catalog files will nkeynes@1: # be installed by po/Makefile. nkeynes@10: glib_DEFUN([GLIB_DEFINE_LOCALEDIR], nkeynes@1: [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl nkeynes@1: glib_save_prefix="$prefix" nkeynes@1: glib_save_exec_prefix="$exec_prefix" nkeynes@1: test "x$prefix" = xNONE && prefix=$ac_default_prefix nkeynes@1: test "x$exec_prefix" = xNONE && exec_prefix=$prefix nkeynes@1: if test "x$CATOBJEXT" = "x.mo" ; then nkeynes@1: localedir=`eval echo "${libdir}/locale"` nkeynes@1: else nkeynes@1: localedir=`eval echo "${datadir}/locale"` nkeynes@1: fi nkeynes@1: prefix="$glib_save_prefix" nkeynes@1: exec_prefix="$glib_save_exec_prefix" nkeynes@1: AC_DEFINE_UNQUOTED($1, "$localedir", nkeynes@1: [Define the location where the catalogs will be installed]) nkeynes@1: ]) nkeynes@1: nkeynes@1: dnl nkeynes@1: dnl Now the definitions that aclocal will find nkeynes@1: dnl nkeynes@1: ifdef(glib_configure_in,[],[ nkeynes@10: AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) nkeynes@10: AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) nkeynes@1: ])dnl nkeynes@1: