meillo@0: # generated automatically by aclocal 1.7.9 -*- Autoconf -*- meillo@0: meillo@0: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 meillo@0: # Free Software Foundation, Inc. meillo@0: # This file is free software; the Free Software Foundation meillo@0: # gives unlimited permission to copy and/or distribute it, meillo@0: # with or without modifications, as long as this notice is preserved. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without meillo@0: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A meillo@0: # PARTICULAR PURPOSE. meillo@0: meillo@0: # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- meillo@0: meillo@0: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: AC_PREREQ([2.52]) meillo@0: meillo@0: # serial 6 meillo@0: meillo@0: # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. meillo@0: AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) meillo@0: meillo@0: # Do all the work for Automake. -*- Autoconf -*- meillo@0: meillo@0: # This macro actually does too much some checks are only needed if meillo@0: # your package does certain things. But this isn't really a big deal. meillo@0: meillo@0: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 meillo@0: # Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # serial 10 meillo@0: meillo@0: AC_PREREQ([2.54]) meillo@0: meillo@0: # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow meillo@0: # the ones we care about. meillo@0: m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl meillo@0: meillo@0: # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) meillo@0: # AM_INIT_AUTOMAKE([OPTIONS]) meillo@0: # ----------------------------------------------- meillo@0: # The call with PACKAGE and VERSION arguments is the old style meillo@0: # call (pre autoconf-2.50), which is being phased out. PACKAGE meillo@0: # and VERSION should now be passed to AC_INIT and removed from meillo@0: # the call to AM_INIT_AUTOMAKE. meillo@0: # We support both call styles for the transition. After meillo@0: # the next Automake release, Autoconf can make the AC_INIT meillo@0: # arguments mandatory, and then we can depend on a new Autoconf meillo@0: # release and drop the old call support. meillo@0: AC_DEFUN([AM_INIT_AUTOMAKE], meillo@0: [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl meillo@0: AC_REQUIRE([AC_PROG_INSTALL])dnl meillo@0: # test to see if srcdir already configured meillo@0: if test "`cd $srcdir && pwd`" != "`pwd`" && meillo@0: test -f $srcdir/config.status; then meillo@0: AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) meillo@0: fi meillo@0: meillo@0: # test whether we have cygpath meillo@0: if test -z "$CYGPATH_W"; then meillo@0: if (cygpath --version) >/dev/null 2>/dev/null; then meillo@0: CYGPATH_W='cygpath -w' meillo@0: else meillo@0: CYGPATH_W=echo meillo@0: fi meillo@0: fi meillo@0: AC_SUBST([CYGPATH_W]) meillo@0: meillo@0: # Define the identity of the package. meillo@0: dnl Distinguish between old-style and new-style calls. meillo@0: m4_ifval([$2], meillo@0: [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl meillo@0: AC_SUBST([PACKAGE], [$1])dnl meillo@0: AC_SUBST([VERSION], [$2])], meillo@0: [_AM_SET_OPTIONS([$1])dnl meillo@0: AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl meillo@0: AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl meillo@0: meillo@0: _AM_IF_OPTION([no-define],, meillo@0: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) meillo@0: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl meillo@0: meillo@0: # Some tools Automake needs. meillo@0: AC_REQUIRE([AM_SANITY_CHECK])dnl meillo@0: AC_REQUIRE([AC_ARG_PROGRAM])dnl meillo@0: AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) meillo@0: AM_MISSING_PROG(AUTOCONF, autoconf) meillo@0: AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) meillo@0: AM_MISSING_PROG(AUTOHEADER, autoheader) meillo@0: AM_MISSING_PROG(MAKEINFO, makeinfo) meillo@0: AM_MISSING_PROG(AMTAR, tar) meillo@0: AM_PROG_INSTALL_SH meillo@0: AM_PROG_INSTALL_STRIP meillo@0: # We need awk for the "check" target. The system "awk" is bad on meillo@0: # some platforms. meillo@0: AC_REQUIRE([AC_PROG_AWK])dnl meillo@0: AC_REQUIRE([AC_PROG_MAKE_SET])dnl meillo@0: AC_REQUIRE([AM_SET_LEADING_DOT])dnl meillo@0: meillo@0: _AM_IF_OPTION([no-dependencies],, meillo@0: [AC_PROVIDE_IFELSE([AC_PROG_CC], meillo@0: [_AM_DEPENDENCIES(CC)], meillo@0: [define([AC_PROG_CC], meillo@0: defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl meillo@0: AC_PROVIDE_IFELSE([AC_PROG_CXX], meillo@0: [_AM_DEPENDENCIES(CXX)], meillo@0: [define([AC_PROG_CXX], meillo@0: defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl meillo@0: ]) meillo@0: ]) meillo@0: meillo@0: meillo@0: # When config.status generates a header, we must update the stamp-h file. meillo@0: # This file resides in the same directory as the config header meillo@0: # that is generated. The stamp files are numbered to have different names. meillo@0: meillo@0: # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the meillo@0: # loop where config.status creates the headers, so we can generate meillo@0: # our stamp files there. meillo@0: AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], meillo@0: [# Compute $1's index in $config_headers. meillo@0: _am_stamp_count=1 meillo@0: for _am_header in $config_headers :; do meillo@0: case $_am_header in meillo@0: $1 | $1:* ) meillo@0: break ;; meillo@0: * ) meillo@0: _am_stamp_count=`expr $_am_stamp_count + 1` ;; meillo@0: esac meillo@0: done meillo@0: echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) meillo@0: meillo@0: # Copyright 2002 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: meillo@0: # AM_AUTOMAKE_VERSION(VERSION) meillo@0: # ---------------------------- meillo@0: # Automake X.Y traces this macro to ensure aclocal.m4 has been meillo@0: # generated from the m4 files accompanying Automake X.Y. meillo@0: AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) meillo@0: meillo@0: # AM_SET_CURRENT_AUTOMAKE_VERSION meillo@0: # ------------------------------- meillo@0: # Call AM_AUTOMAKE_VERSION so it can be traced. meillo@0: # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. meillo@0: AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], meillo@0: [AM_AUTOMAKE_VERSION([1.7.9])]) meillo@0: meillo@0: # Helper functions for option handling. -*- Autoconf -*- meillo@0: meillo@0: # Copyright 2001, 2002 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # serial 2 meillo@0: meillo@0: # _AM_MANGLE_OPTION(NAME) meillo@0: # ----------------------- meillo@0: AC_DEFUN([_AM_MANGLE_OPTION], meillo@0: [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) meillo@0: meillo@0: # _AM_SET_OPTION(NAME) meillo@0: # ------------------------------ meillo@0: # Set option NAME. Presently that only means defining a flag for this option. meillo@0: AC_DEFUN([_AM_SET_OPTION], meillo@0: [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) meillo@0: meillo@0: # _AM_SET_OPTIONS(OPTIONS) meillo@0: # ---------------------------------- meillo@0: # OPTIONS is a space-separated list of Automake options. meillo@0: AC_DEFUN([_AM_SET_OPTIONS], meillo@0: [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) meillo@0: meillo@0: # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) meillo@0: # ------------------------------------------- meillo@0: # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. meillo@0: AC_DEFUN([_AM_IF_OPTION], meillo@0: [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) meillo@0: meillo@0: # meillo@0: # Check to make sure that the build environment is sane. meillo@0: # meillo@0: meillo@0: # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # serial 3 meillo@0: meillo@0: # AM_SANITY_CHECK meillo@0: # --------------- meillo@0: AC_DEFUN([AM_SANITY_CHECK], meillo@0: [AC_MSG_CHECKING([whether build environment is sane]) meillo@0: # Just in case meillo@0: sleep 1 meillo@0: echo timestamp > conftest.file meillo@0: # Do `set' in a subshell so we don't clobber the current shell's meillo@0: # arguments. Must try -L first in case configure is actually a meillo@0: # symlink; some systems play weird games with the mod time of symlinks meillo@0: # (eg FreeBSD returns the mod time of the symlink's containing meillo@0: # directory). meillo@0: if ( meillo@0: set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` meillo@0: if test "$[*]" = "X"; then meillo@0: # -L didn't work. meillo@0: set X `ls -t $srcdir/configure conftest.file` meillo@0: fi meillo@0: rm -f conftest.file meillo@0: if test "$[*]" != "X $srcdir/configure conftest.file" \ meillo@0: && test "$[*]" != "X conftest.file $srcdir/configure"; then meillo@0: meillo@0: # If neither matched, then we have a broken ls. This can happen meillo@0: # if, for instance, CONFIG_SHELL is bash and it inherits a meillo@0: # broken ls alias from the environment. This has actually meillo@0: # happened. Such a system could not be considered "sane". meillo@0: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken meillo@0: alias in your environment]) meillo@0: fi meillo@0: meillo@0: test "$[2]" = conftest.file meillo@0: ) meillo@0: then meillo@0: # Ok. meillo@0: : meillo@0: else meillo@0: AC_MSG_ERROR([newly created file is older than distributed files! meillo@0: Check your system clock]) meillo@0: fi meillo@0: AC_MSG_RESULT(yes)]) meillo@0: meillo@0: # -*- Autoconf -*- meillo@0: meillo@0: meillo@0: # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # serial 3 meillo@0: meillo@0: # AM_MISSING_PROG(NAME, PROGRAM) meillo@0: # ------------------------------ meillo@0: AC_DEFUN([AM_MISSING_PROG], meillo@0: [AC_REQUIRE([AM_MISSING_HAS_RUN]) meillo@0: $1=${$1-"${am_missing_run}$2"} meillo@0: AC_SUBST($1)]) meillo@0: meillo@0: meillo@0: # AM_MISSING_HAS_RUN meillo@0: # ------------------ meillo@0: # Define MISSING if not defined so far and test if it supports --run. meillo@0: # If it does, set am_missing_run to use it, otherwise, to nothing. meillo@0: AC_DEFUN([AM_MISSING_HAS_RUN], meillo@0: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl meillo@0: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" meillo@0: # Use eval to expand $SHELL meillo@0: if eval "$MISSING --run true"; then meillo@0: am_missing_run="$MISSING --run " meillo@0: else meillo@0: am_missing_run= meillo@0: AC_MSG_WARN([`missing' script is too old or missing]) meillo@0: fi meillo@0: ]) meillo@0: meillo@0: # AM_AUX_DIR_EXPAND meillo@0: meillo@0: # Copyright 2001 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets meillo@0: # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to meillo@0: # `$srcdir', `$srcdir/..', or `$srcdir/../..'. meillo@0: # meillo@0: # Of course, Automake must honor this variable whenever it calls a meillo@0: # tool from the auxiliary directory. The problem is that $srcdir (and meillo@0: # therefore $ac_aux_dir as well) can be either absolute or relative, meillo@0: # depending on how configure is run. This is pretty annoying, since meillo@0: # it makes $ac_aux_dir quite unusable in subdirectories: in the top meillo@0: # source directory, any form will work fine, but in subdirectories a meillo@0: # relative path needs to be adjusted first. meillo@0: # meillo@0: # $ac_aux_dir/missing meillo@0: # fails when called from a subdirectory if $ac_aux_dir is relative meillo@0: # $top_srcdir/$ac_aux_dir/missing meillo@0: # fails if $ac_aux_dir is absolute, meillo@0: # fails when called from a subdirectory in a VPATH build with meillo@0: # a relative $ac_aux_dir meillo@0: # meillo@0: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir meillo@0: # are both prefixed by $srcdir. In an in-source build this is usually meillo@0: # harmless because $srcdir is `.', but things will broke when you meillo@0: # start a VPATH build or use an absolute $srcdir. meillo@0: # meillo@0: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, meillo@0: # iff we strip the leading $srcdir from $ac_aux_dir. That would be: meillo@0: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` meillo@0: # and then we would define $MISSING as meillo@0: # MISSING="\${SHELL} $am_aux_dir/missing" meillo@0: # This will work as long as MISSING is not called from configure, because meillo@0: # unfortunately $(top_srcdir) has no meaning in configure. meillo@0: # However there are other variables, like CC, which are often used in meillo@0: # configure, and could therefore not use this "fixed" $ac_aux_dir. meillo@0: # meillo@0: # Another solution, used here, is to always expand $ac_aux_dir to an meillo@0: # absolute PATH. The drawback is that using absolute paths prevent a meillo@0: # configured tree to be moved without reconfiguration. meillo@0: meillo@0: # Rely on autoconf to set up CDPATH properly. meillo@0: AC_PREREQ([2.50]) meillo@0: meillo@0: AC_DEFUN([AM_AUX_DIR_EXPAND], [ meillo@0: # expand $ac_aux_dir to an absolute path meillo@0: am_aux_dir=`cd $ac_aux_dir && pwd` meillo@0: ]) meillo@0: meillo@0: # AM_PROG_INSTALL_SH meillo@0: # ------------------ meillo@0: # Define $install_sh. meillo@0: meillo@0: # Copyright 2001 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: AC_DEFUN([AM_PROG_INSTALL_SH], meillo@0: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl meillo@0: install_sh=${install_sh-"$am_aux_dir/install-sh"} meillo@0: AC_SUBST(install_sh)]) meillo@0: meillo@0: # AM_PROG_INSTALL_STRIP meillo@0: meillo@0: # Copyright 2001 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # One issue with vendor `install' (even GNU) is that you can't meillo@0: # specify the program used to strip binaries. This is especially meillo@0: # annoying in cross-compiling environments, where the build's strip meillo@0: # is unlikely to handle the host's binaries. meillo@0: # Fortunately install-sh will honor a STRIPPROG variable, so we meillo@0: # always use install-sh in `make install-strip', and initialize meillo@0: # STRIPPROG with the value of the STRIP variable (set by the user). meillo@0: AC_DEFUN([AM_PROG_INSTALL_STRIP], meillo@0: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl meillo@0: # Installed binaries are usually stripped using `strip' when the user meillo@0: # run `make install-strip'. However `strip' might not be the right meillo@0: # tool to use in cross-compilation environments, therefore Automake meillo@0: # will honor the `STRIP' environment variable to overrule this program. meillo@0: dnl Don't test for $cross_compiling = yes, because it might be `maybe'. meillo@0: if test "$cross_compiling" != no; then meillo@0: AC_CHECK_TOOL([STRIP], [strip], :) meillo@0: fi meillo@0: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" meillo@0: AC_SUBST([INSTALL_STRIP_PROGRAM])]) meillo@0: meillo@0: # -*- Autoconf -*- meillo@0: # Copyright (C) 2003 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # serial 1 meillo@0: meillo@0: # Check whether the underlying file-system supports filenames meillo@0: # with a leading dot. For instance MS-DOS doesn't. meillo@0: AC_DEFUN([AM_SET_LEADING_DOT], meillo@0: [rm -rf .tst 2>/dev/null meillo@0: mkdir .tst 2>/dev/null meillo@0: if test -d .tst; then meillo@0: am__leading_dot=. meillo@0: else meillo@0: am__leading_dot=_ meillo@0: fi meillo@0: rmdir .tst 2>/dev/null meillo@0: AC_SUBST([am__leading_dot])]) meillo@0: meillo@0: # serial 5 -*- Autoconf -*- meillo@0: meillo@0: # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: meillo@0: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be meillo@0: # written in clear, in which case automake, when reading aclocal.m4, meillo@0: # will think it sees a *use*, and therefore will trigger all it's meillo@0: # C support machinery. Also note that it means that autoscan, seeing meillo@0: # CC etc. in the Makefile, will ask for an AC_PROG_CC use... meillo@0: meillo@0: meillo@0: meillo@0: # _AM_DEPENDENCIES(NAME) meillo@0: # ---------------------- meillo@0: # See how the compiler implements dependency checking. meillo@0: # NAME is "CC", "CXX", "GCJ", or "OBJC". meillo@0: # We try a few techniques and use that to set a single cache variable. meillo@0: # meillo@0: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was meillo@0: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular meillo@0: # dependency, and given that the user is not expected to run this macro, meillo@0: # just rely on AC_PROG_CC. meillo@0: AC_DEFUN([_AM_DEPENDENCIES], meillo@0: [AC_REQUIRE([AM_SET_DEPDIR])dnl meillo@0: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl meillo@0: AC_REQUIRE([AM_MAKE_INCLUDE])dnl meillo@0: AC_REQUIRE([AM_DEP_TRACK])dnl meillo@0: meillo@0: ifelse([$1], CC, [depcc="$CC" am_compiler_list=], meillo@0: [$1], CXX, [depcc="$CXX" am_compiler_list=], meillo@0: [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], meillo@0: [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], meillo@0: [depcc="$$1" am_compiler_list=]) meillo@0: meillo@0: AC_CACHE_CHECK([dependency style of $depcc], meillo@0: [am_cv_$1_dependencies_compiler_type], meillo@0: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then meillo@0: # We make a subdir and do the tests there. Otherwise we can end up meillo@0: # making bogus files that we don't know about and never remove. For meillo@0: # instance it was reported that on HP-UX the gcc test will end up meillo@0: # making a dummy file named `D' -- because `-MD' means `put the output meillo@0: # in D'. meillo@0: mkdir conftest.dir meillo@0: # Copy depcomp to subdir because otherwise we won't find it if we're meillo@0: # using a relative directory. meillo@0: cp "$am_depcomp" conftest.dir meillo@0: cd conftest.dir meillo@0: # We will build objects and dependencies in a subdirectory because meillo@0: # it helps to detect inapplicable dependency modes. For instance meillo@0: # both Tru64's cc and ICC support -MD to output dependencies as a meillo@0: # side effect of compilation, but ICC will put the dependencies in meillo@0: # the current directory while Tru64 will put them in the object meillo@0: # directory. meillo@0: mkdir sub meillo@0: meillo@0: am_cv_$1_dependencies_compiler_type=none meillo@0: if test "$am_compiler_list" = ""; then meillo@0: am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` meillo@0: fi meillo@0: for depmode in $am_compiler_list; do meillo@0: # Setup a source with many dependencies, because some compilers meillo@0: # like to wrap large dependency lists on column 80 (with \), and meillo@0: # we should not choose a depcomp mode which is confused by this. meillo@0: # meillo@0: # We need to recreate these files for each test, as the compiler may meillo@0: # overwrite some of them when testing with obscure command lines. meillo@0: # This happens at least with the AIX C compiler. meillo@0: : > sub/conftest.c meillo@0: for i in 1 2 3 4 5 6; do meillo@0: echo '#include "conftst'$i'.h"' >> sub/conftest.c meillo@0: : > sub/conftst$i.h meillo@0: done meillo@0: echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf meillo@0: meillo@0: case $depmode in meillo@0: nosideeffect) meillo@0: # after this tag, mechanisms are not by side-effect, so they'll meillo@0: # only be used when explicitly requested meillo@0: if test "x$enable_dependency_tracking" = xyes; then meillo@0: continue meillo@0: else meillo@0: break meillo@0: fi meillo@0: ;; meillo@0: none) break ;; meillo@0: esac meillo@0: # We check with `-c' and `-o' for the sake of the "dashmstdout" meillo@0: # mode. It turns out that the SunPro C++ compiler does not properly meillo@0: # handle `-M -o', and we need to detect this. meillo@0: if depmode=$depmode \ meillo@0: source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ meillo@0: depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ meillo@0: $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ meillo@0: >/dev/null 2>conftest.err && meillo@0: grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && meillo@0: grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && meillo@0: ${MAKE-make} -s -f confmf > /dev/null 2>&1; then meillo@0: # icc doesn't choke on unknown options, it will just issue warnings meillo@0: # (even with -Werror). So we grep stderr for any message meillo@0: # that says an option was ignored. meillo@0: if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else meillo@0: am_cv_$1_dependencies_compiler_type=$depmode meillo@0: break meillo@0: fi meillo@0: fi meillo@0: done meillo@0: meillo@0: cd .. meillo@0: rm -rf conftest.dir meillo@0: else meillo@0: am_cv_$1_dependencies_compiler_type=none meillo@0: fi meillo@0: ]) meillo@0: AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) meillo@0: AM_CONDITIONAL([am__fastdep$1], [ meillo@0: test "x$enable_dependency_tracking" != xno \ meillo@0: && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) meillo@0: ]) meillo@0: meillo@0: meillo@0: # AM_SET_DEPDIR meillo@0: # ------------- meillo@0: # Choose a directory name for dependency files. meillo@0: # This macro is AC_REQUIREd in _AM_DEPENDENCIES meillo@0: AC_DEFUN([AM_SET_DEPDIR], meillo@0: [AC_REQUIRE([AM_SET_LEADING_DOT])dnl meillo@0: AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl meillo@0: ]) meillo@0: meillo@0: meillo@0: # AM_DEP_TRACK meillo@0: # ------------ meillo@0: AC_DEFUN([AM_DEP_TRACK], meillo@0: [AC_ARG_ENABLE(dependency-tracking, meillo@0: [ --disable-dependency-tracking Speeds up one-time builds meillo@0: --enable-dependency-tracking Do not reject slow dependency extractors]) meillo@0: if test "x$enable_dependency_tracking" != xno; then meillo@0: am_depcomp="$ac_aux_dir/depcomp" meillo@0: AMDEPBACKSLASH='\' meillo@0: fi meillo@0: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) meillo@0: AC_SUBST([AMDEPBACKSLASH]) meillo@0: ]) meillo@0: meillo@0: # Generate code to set up dependency tracking. -*- Autoconf -*- meillo@0: meillo@0: # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: #serial 2 meillo@0: meillo@0: # _AM_OUTPUT_DEPENDENCY_COMMANDS meillo@0: # ------------------------------ meillo@0: AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], meillo@0: [for mf in $CONFIG_FILES; do meillo@0: # Strip MF so we end up with the name of the file. meillo@0: mf=`echo "$mf" | sed -e 's/:.*$//'` meillo@0: # Check whether this is an Automake generated Makefile or not. meillo@0: # We used to match only the files named `Makefile.in', but meillo@0: # some people rename them; so instead we look at the file content. meillo@0: # Grep'ing the first line is not enough: some people post-process meillo@0: # each Makefile.in and add a new line on top of each file to say so. meillo@0: # So let's grep whole file. meillo@0: if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then meillo@0: dirpart=`AS_DIRNAME("$mf")` meillo@0: else meillo@0: continue meillo@0: fi meillo@0: grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue meillo@0: # Extract the definition of DEP_FILES from the Makefile without meillo@0: # running `make'. meillo@0: DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` meillo@0: test -z "$DEPDIR" && continue meillo@0: # When using ansi2knr, U may be empty or an underscore; expand it meillo@0: U=`sed -n -e '/^U = / s///p' < "$mf"` meillo@0: test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" meillo@0: # We invoke sed twice because it is the simplest approach to meillo@0: # changing $(DEPDIR) to its actual value in the expansion. meillo@0: for file in `sed -n -e ' meillo@0: /^DEP_FILES = .*\\\\$/ { meillo@0: s/^DEP_FILES = // meillo@0: :loop meillo@0: s/\\\\$// meillo@0: p meillo@0: n meillo@0: /\\\\$/ b loop meillo@0: p meillo@0: } meillo@0: /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ meillo@0: sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do meillo@0: # Make sure the directory exists. meillo@0: test -f "$dirpart/$file" && continue meillo@0: fdir=`AS_DIRNAME(["$file"])` meillo@0: AS_MKDIR_P([$dirpart/$fdir]) meillo@0: # echo "creating $dirpart/$file" meillo@0: echo '# dummy' > "$dirpart/$file" meillo@0: done meillo@0: done meillo@0: ])# _AM_OUTPUT_DEPENDENCY_COMMANDS meillo@0: meillo@0: meillo@0: # AM_OUTPUT_DEPENDENCY_COMMANDS meillo@0: # ----------------------------- meillo@0: # This macro should only be invoked once -- use via AC_REQUIRE. meillo@0: # meillo@0: # This code is only required when automatic dependency tracking meillo@0: # is enabled. FIXME. This creates each `.P' file that we will meillo@0: # need in order to bootstrap the dependency handling code. meillo@0: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], meillo@0: [AC_CONFIG_COMMANDS([depfiles], meillo@0: [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], meillo@0: [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) meillo@0: ]) meillo@0: meillo@0: # Check to see how 'make' treats includes. -*- Autoconf -*- meillo@0: meillo@0: # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # serial 2 meillo@0: meillo@0: # AM_MAKE_INCLUDE() meillo@0: # ----------------- meillo@0: # Check to see how make treats includes. meillo@0: AC_DEFUN([AM_MAKE_INCLUDE], meillo@0: [am_make=${MAKE-make} meillo@0: cat > confinc << 'END' meillo@0: am__doit: meillo@0: @echo done meillo@0: .PHONY: am__doit meillo@0: END meillo@0: # If we don't find an include directive, just comment out the code. meillo@0: AC_MSG_CHECKING([for style of include used by $am_make]) meillo@0: am__include="#" meillo@0: am__quote= meillo@0: _am_result=none meillo@0: # First try GNU make style include. meillo@0: echo "include confinc" > confmf meillo@0: # We grep out `Entering directory' and `Leaving directory' meillo@0: # messages which can occur if `w' ends up in MAKEFLAGS. meillo@0: # In particular we don't look at `^make:' because GNU make might meillo@0: # be invoked under some other name (usually "gmake"), in which meillo@0: # case it prints its new name instead of `make'. meillo@0: if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then meillo@0: am__include=include meillo@0: am__quote= meillo@0: _am_result=GNU meillo@0: fi meillo@0: # Now try BSD make style include. meillo@0: if test "$am__include" = "#"; then meillo@0: echo '.include "confinc"' > confmf meillo@0: if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then meillo@0: am__include=.include meillo@0: am__quote="\"" meillo@0: _am_result=BSD meillo@0: fi meillo@0: fi meillo@0: AC_SUBST([am__include]) meillo@0: AC_SUBST([am__quote]) meillo@0: AC_MSG_RESULT([$_am_result]) meillo@0: rm -f confinc confmf meillo@0: ]) meillo@0: meillo@0: # AM_CONDITIONAL -*- Autoconf -*- meillo@0: meillo@0: # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. meillo@0: meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2, or (at your option) meillo@0: # any later version. meillo@0: meillo@0: # This program is distributed in the hope that it will be useful, meillo@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the meillo@0: # GNU General Public License for more details. meillo@0: meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA meillo@0: # 02111-1307, USA. meillo@0: meillo@0: # serial 5 meillo@0: meillo@0: AC_PREREQ(2.52) meillo@0: meillo@0: # AM_CONDITIONAL(NAME, SHELL-CONDITION) meillo@0: # ------------------------------------- meillo@0: # Define a conditional. meillo@0: AC_DEFUN([AM_CONDITIONAL], meillo@0: [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], meillo@0: [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl meillo@0: AC_SUBST([$1_TRUE]) meillo@0: AC_SUBST([$1_FALSE]) meillo@0: if $2; then meillo@0: $1_TRUE= meillo@0: $1_FALSE='#' meillo@0: else meillo@0: $1_TRUE='#' meillo@0: $1_FALSE= meillo@0: fi meillo@0: AC_CONFIG_COMMANDS_PRE( meillo@0: [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then meillo@0: AC_MSG_ERROR([conditional "$1" was never defined. meillo@0: Usually this means the macro was only invoked conditionally.]) meillo@0: fi])]) meillo@0: meillo@0: # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- meillo@0: # meillo@0: # Copyright © 2004 Scott James Remnant . meillo@0: # meillo@0: # This program is free software; you can redistribute it and/or modify meillo@0: # it under the terms of the GNU General Public License as published by meillo@0: # the Free Software Foundation; either version 2 of the License, or meillo@0: # (at your option) any later version. meillo@0: # meillo@0: # This program is distributed in the hope that it will be useful, but meillo@0: # WITHOUT ANY WARRANTY; without even the implied warranty of meillo@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU meillo@0: # General Public License for more details. meillo@0: # meillo@0: # You should have received a copy of the GNU General Public License meillo@0: # along with this program; if not, write to the Free Software meillo@0: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. meillo@0: # meillo@0: # As a special exception to the GNU General Public License, if you meillo@0: # distribute this file as part of a program that contains a meillo@0: # configuration script generated by Autoconf, you may include it under meillo@0: # the same distribution terms that you use for the rest of that program. meillo@0: meillo@0: # PKG_PROG_PKG_CONFIG([MIN-VERSION]) meillo@0: # ---------------------------------- meillo@0: AC_DEFUN([PKG_PROG_PKG_CONFIG], meillo@0: [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) meillo@0: m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) meillo@0: AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl meillo@0: if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then meillo@0: AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) meillo@0: fi meillo@0: if test -n "$PKG_CONFIG"; then meillo@1: _pkg_min_version=m4_default([$1], [0.9.0]) meillo@0: AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) meillo@0: if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then meillo@0: AC_MSG_RESULT([yes]) meillo@0: else meillo@0: AC_MSG_RESULT([no]) meillo@0: PKG_CONFIG="" meillo@0: fi meillo@0: meillo@0: fi[]dnl meillo@0: ])# PKG_PROG_PKG_CONFIG meillo@0: meillo@0: # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) meillo@0: # meillo@0: # Check to see whether a particular set of modules exists. Similar meillo@0: # to PKG_CHECK_MODULES(), but does not set variables or print errors. meillo@0: # meillo@0: # meillo@0: # Similar to PKG_CHECK_MODULES, make sure that the first instance of meillo@0: # this or PKG_CHECK_MODULES is called, or make sure to call meillo@0: # PKG_CHECK_EXISTS manually meillo@0: # -------------------------------------------------------------- meillo@0: AC_DEFUN([PKG_CHECK_EXISTS], meillo@0: [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl meillo@0: if test -n "$PKG_CONFIG" && \ meillo@0: AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then meillo@0: m4_ifval([$2], [$2], [:]) meillo@0: m4_ifvaln([$3], [else meillo@0: $3])dnl meillo@0: fi]) meillo@0: meillo@0: meillo@0: # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) meillo@0: # --------------------------------------------- meillo@0: m4_define([_PKG_CONFIG], meillo@0: [if test -n "$PKG_CONFIG"; then meillo@1: if test -n "$$1"; then meillo@1: pkg_cv_[]$1="$$1" meillo@1: else meillo@0: PKG_CHECK_EXISTS([$3], meillo@0: [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], meillo@0: [pkg_failed=yes]) meillo@1: fi meillo@0: else meillo@0: pkg_failed=untried meillo@0: fi[]dnl meillo@0: ])# _PKG_CONFIG meillo@0: meillo@1: # _PKG_SHORT_ERRORS_SUPPORTED meillo@1: # ----------------------------- meillo@1: AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], meillo@1: [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) meillo@1: if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then meillo@1: _pkg_short_errors_supported=yes meillo@1: else meillo@1: _pkg_short_errors_supported=no meillo@1: fi[]dnl meillo@1: ])# _PKG_SHORT_ERRORS_SUPPORTED meillo@1: meillo@1: meillo@0: # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], meillo@0: # [ACTION-IF-NOT-FOUND]) meillo@0: # meillo@0: # meillo@0: # Note that if there is a possibility the first call to meillo@0: # PKG_CHECK_MODULES might not happen, you should be sure to include an meillo@0: # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac meillo@0: # meillo@0: # meillo@0: # -------------------------------------------------------------- meillo@0: AC_DEFUN([PKG_CHECK_MODULES], meillo@0: [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl meillo@0: AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl meillo@0: AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl meillo@0: meillo@0: pkg_failed=no meillo@0: AC_MSG_CHECKING([for $1]) meillo@0: meillo@0: _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) meillo@0: _PKG_CONFIG([$1][_LIBS], [libs], [$2]) meillo@0: meillo@1: m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS meillo@1: and $1[]_LIBS to avoid the need to call pkg-config. meillo@1: See the pkg-config man page for more details.]) meillo@1: meillo@0: if test $pkg_failed = yes; then meillo@1: _PKG_SHORT_ERRORS_SUPPORTED meillo@1: if test $_pkg_short_errors_supported = yes; then meillo@1: $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` meillo@1: else meillo@1: $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` meillo@1: fi meillo@0: # Put the nasty error message in config.log where it belongs meillo@1: echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD meillo@0: meillo@0: ifelse([$4], , [AC_MSG_ERROR(dnl meillo@1: [Package requirements ($2) were not met: meillo@1: meillo@1: $$1_PKG_ERRORS meillo@1: meillo@0: Consider adjusting the PKG_CONFIG_PATH environment variable if you meillo@0: installed software in a non-standard prefix. meillo@0: meillo@1: _PKG_TEXT meillo@1: ])], meillo@1: [AC_MSG_RESULT([no]) meillo@1: $4]) meillo@0: elif test $pkg_failed = untried; then meillo@0: ifelse([$4], , [AC_MSG_FAILURE(dnl meillo@0: [The pkg-config script could not be found or is too old. Make sure it meillo@0: is in your PATH or set the PKG_CONFIG environment variable to the full meillo@0: path to pkg-config. meillo@0: meillo@1: _PKG_TEXT meillo@0: meillo@1: To get pkg-config, see .])], meillo@0: [$4]) meillo@0: else meillo@0: $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS meillo@0: $1[]_LIBS=$pkg_cv_[]$1[]_LIBS meillo@0: AC_MSG_RESULT([yes]) meillo@0: ifelse([$3], , :, [$3]) meillo@0: fi[]dnl meillo@0: ])# PKG_CHECK_MODULES meillo@0: