6775
6775
AC_MSG_RESULT([$SED])
6779
dnl AC_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
6780
# serial 1 AC_PROG_INTLTOOL
6781
AC_DEFUN([AC_PROG_INTLTOOL],
6784
if test -n "$1"; then
6785
AC_MSG_CHECKING(for intltool >= $1)
6787
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
6788
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${ac_aux_dir}/intltool-update.in`
6790
INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
6793
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
6794
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
6796
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
6801
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6802
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6803
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6804
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6805
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
6806
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6807
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6808
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6809
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6810
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6811
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6812
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6813
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6814
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6815
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6816
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
6818
AC_SUBST(INTLTOOL_DESKTOP_RULE)
6819
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
6820
AC_SUBST(INTLTOOL_KEYS_RULE)
6821
AC_SUBST(INTLTOOL_PROP_RULE)
6822
AC_SUBST(INTLTOOL_OAF_RULE)
6823
AC_SUBST(INTLTOOL_PONG_RULE)
6824
AC_SUBST(INTLTOOL_SERVER_RULE)
6825
AC_SUBST(INTLTOOL_SHEET_RULE)
6826
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
6827
AC_SUBST(INTLTOOL_UI_RULE)
6828
AC_SUBST(INTLTOOL_XAM_RULE)
6829
AC_SUBST(INTLTOOL_KBD_RULE)
6830
AC_SUBST(INTLTOOL_XML_RULE)
6831
AC_SUBST(INTLTOOL_CAVES_RULE)
6832
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
6833
AC_SUBST(INTLTOOL_THEME_RULE)
6835
# Use the tools built into the package, not the ones that are installed.
6837
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
6838
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
6839
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
6841
AC_SUBST(INTLTOOL_EXTRACT)
6842
AC_SUBST(INTLTOOL_MERGE)
6843
AC_SUBST(INTLTOOL_UPDATE)
6845
AC_PATH_PROG(INTLTOOL_PERL, perl)
6846
if test -z "$INTLTOOL_PERL"; then
6847
AC_MSG_ERROR([perl not found; required for intltool])
6849
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
6850
AC_MSG_ERROR([perl 5.x required for intltool])
6852
if test "x$2" != "xno-xml"; then
6853
AC_MSG_CHECKING([for XML::Parser])
6854
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
6857
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
6861
AC_PATH_PROG(ICONV, iconv, iconv)
6862
AC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
6863
AC_PATH_PROG(MSGMERGE, msgmerge, msgmerge)
6864
AC_PATH_PROG(XGETTEXT, xgettext, xgettext)
6866
# Remove file type tags (using []) from po/POTFILES.
6868
ifdef([AC_DIVERSION_ICMDS],[
6869
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
6871
mv -f po/POTFILES po/POTFILES.tmp
6872
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
6873
rm -f po/POTFILES.tmp
6877
ifdef([AC_CONFIG_COMMANDS_PRE],[
6878
AC_CONFIG_COMMANDS_PRE([
6880
mv -f po/POTFILES po/POTFILES.tmp
6881
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
6882
rm -f po/POTFILES.tmp
6888
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
6890
AC_OUTPUT_COMMANDS([
6892
intltool_edit="-e \"s:@INTLTOOL_EXTRACT@:${INTLTOOL_EXTRACT}:g\" \
6893
-e \"s:@INTLTOOL_ICONV@:${ICONV}:g\" \
6894
-e \"s:@INTLTOOL_MSGFMT@:${MSGFMT}:g\" \
6895
-e \"s:@INTLTOOL_MSGMERGE@:${MSGMERGE}:g\" \
6896
-e \"s:@INTLTOOL_XGETTEXT@:${XGETTEXT}:g\" \
6897
-e \"s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:g\""
6899
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
6900
> intltool-extract.out
6901
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
6902
rm -f intltool-extract.out
6904
mv -f intltool-extract.out intltool-extract
6906
chmod ugo+x intltool-extract
6907
chmod u+w intltool-extract
6909
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
6910
> intltool-merge.out
6911
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
6912
rm -f intltool-merge.out
6914
mv -f intltool-merge.out intltool-merge
6916
chmod ugo+x intltool-merge
6917
chmod u+w intltool-merge
6919
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
6920
> intltool-update.out
6921
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
6922
rm -f intltool-update.out
6924
mv -f intltool-update.out intltool-update
6926
chmod ugo+x intltool-update
6927
chmod u+w intltool-update
6929
], INTLTOOL_PERL=${INTLTOOL_PERL} ac_aux_dir=${ac_aux_dir}
6930
INTLTOOL_EXTRACT=${INTLTOOL_EXTRACT} ICONV=${ICONV}
6931
MSGFMT=${MSGFMT} MSGMERGE=${MSGMERGE} XGETTEXT=${XGETTEXT})
6935
6778
# iconv.m4 serial AM4 (gettext-0.11.3)
6936
6779
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
6937
6780
dnl This file is free software, distributed under the terms of the GNU
7855
7698
AC_LIB_PROG_LD_GNU
7701
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7703
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7705
# This program is free software; you can redistribute it and/or modify
7706
# it under the terms of the GNU General Public License as published by
7707
# the Free Software Foundation; either version 2 of the License, or
7708
# (at your option) any later version.
7710
# This program is distributed in the hope that it will be useful, but
7711
# WITHOUT ANY WARRANTY; without even the implied warranty of
7712
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7713
# General Public License for more details.
7715
# You should have received a copy of the GNU General Public License
7716
# along with this program; if not, write to the Free Software
7717
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7719
# As a special exception to the GNU General Public License, if you
7720
# distribute this file as part of a program that contains a
7721
# configuration script generated by Autoconf, you may include it under
7722
# the same distribution terms that you use for the rest of that program.
7724
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7725
# ----------------------------------
7726
AC_DEFUN([PKG_PROG_PKG_CONFIG],
7727
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7728
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7729
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7730
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7731
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7733
if test -n "$PKG_CONFIG"; then
7734
_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
7735
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7736
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7737
AC_MSG_RESULT([yes])
7744
])# PKG_PROG_PKG_CONFIG
7746
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7748
# Check to see whether a particular set of modules exists. Similar
7749
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
7752
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
7753
# this or PKG_CHECK_MODULES is called, or make sure to call
7754
# PKG_CHECK_EXISTS manually
7755
# --------------------------------------------------------------
7756
AC_DEFUN([PKG_CHECK_EXISTS],
7757
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7758
if test -n "$PKG_CONFIG" && \
7759
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7760
m4_ifval([$2], [$2], [:])
7761
m4_ifvaln([$3], [else
7766
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7767
# ---------------------------------------------
7768
m4_define([_PKG_CONFIG],
7769
[if test -n "$PKG_CONFIG"; then
7770
PKG_CHECK_EXISTS([$3],
7771
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7778
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7779
# [ACTION-IF-NOT-FOUND])
7782
# Note that if there is a possibility the first call to
7783
# PKG_CHECK_MODULES might not happen, you should be sure to include an
7784
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7787
# --------------------------------------------------------------
7788
AC_DEFUN([PKG_CHECK_MODULES],
7789
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7790
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7791
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7794
AC_MSG_CHECKING([for $1])
7796
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7797
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
7799
if test $pkg_failed = yes; then
7800
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7801
# Put the nasty error message in config.log where it belongs
7802
echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
7804
ifelse([$4], , [AC_MSG_ERROR(dnl
7805
[Package requirements ($2) were not met.
7806
Consider adjusting the PKG_CONFIG_PATH environment variable if you
7807
installed software in a non-standard prefix.
7809
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7810
to avoid the need to call pkg-config. See the pkg-config man page for
7813
elif test $pkg_failed = untried; then
7814
ifelse([$4], , [AC_MSG_FAILURE(dnl
7815
[The pkg-config script could not be found or is too old. Make sure it
7816
is in your PATH or set the PKG_CONFIG environment variable to the full
7819
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7820
to avoid the need to call pkg-config. See the pkg-config man page for
7823
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
7826
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7827
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7828
AC_MSG_RESULT([yes])
7829
ifelse([$3], , :, [$3])
7831
])# PKG_CHECK_MODULES
7833
AC_DEFUN([AC_CXX_NAMESPACES],
7834
[AC_CACHE_CHECK(whether the compiler implements namespaces,
7835
ac_cv_cxx_namespaces,
7838
AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
7839
[using namespace Outer::Inner; return i;],
7840
ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
7843
if test "$ac_cv_cxx_namespaces" = yes; then
7844
AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
7851
AC_DEFUN([AC_CXX_HAVE_STL],
7852
[AC_CACHE_CHECK(whether the compiler supports Standard Template Library,
7854
[AC_REQUIRE([AC_CXX_NAMESPACES])
7857
AC_TRY_COMPILE([#include <list>
7859
#ifdef HAVE_NAMESPACES
7860
using namespace std;
7861
#endif],[list<int> x; x.push_back(5);
7862
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;],
7863
ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no)
7866
if test "$ac_cv_cxx_have_stl" = yes; then
7867
AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library])
7872
dnl Copyright (c) 2002 Henrik Kinnunen (fluxgen at linuxmail.org)
7873
dnl Large changes for xine-ui usage: 2004 Daniel Caujolle-Bert (f1rmb@users.sourceforge.net)
7875
dnl Permission is hereby granted, free of charge, to any person obtaining a
7876
dnl copy of this software and associated documentation files (the "Software"),
7877
dnl to deal in the Software without restriction, including without limitation
7878
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
7879
dnl and/or sell copies of the Software, and to permit persons to whom the
7880
dnl Software is furnished to do so, subject to the following conditions:
7882
dnl The above copyright notice and this permission notice shall be included in
7883
dnl all copies or substantial portions of the Software.
7885
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7886
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7887
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
7888
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7889
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
7890
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
7891
dnl DEALINGS IN THE SOFTWARE.
7893
dnl AM_PATH_XFT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
7894
AC_DEFUN([AM_PATH_XFT2],
7897
if test "x$PKG_CONFIG" = "xno" ; then
7898
AC_PATH_PROG(XFT_CONFIG, xft-config, no)
7899
if test "x$XFT_CONFIG" = "xno" ; then
7900
ifelse([$2], , :, [$2])
7902
XFT_CFLAGS=`$XFT_CONFIG --cflags`
7903
XFT_LIBS=`$XFT_CONFIG --libs`
7904
ifelse([$1], , :, [$1])
7907
XFT_CFLAGS=`$PKG_CONFIG --cflags xft`
7908
XFT_LIBS=`$PKG_CONFIG --libs xft`
7909
ifelse([$1], , :, [$1])
7914
dnl AM_PATH_XFT(default-value, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
7915
dnl Test for Xft, and define XFT_CFLAGS and XFT_LIBS
7916
AC_DEFUN([AM_PATH_XFT],
7919
AS_HELP_STRING([--with-xft],
7920
[Xft (antialias) support (default=$1)]),
7921
[ if test "x$enableval" = "xyes"; then
7930
if test "x$TRY_XFT" = "xyes"; then
7934
AC_MSG_RESULT([Cant find Xft libraries! Disabling Xft]))
7940
AC_SUBST(XFT_CFLAGS)
7944
# codeset.m4 serial AM1 (gettext-0.10.40)
7945
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
7946
dnl This file is free software, distributed under the terms of the GNU
7947
dnl General Public License. As a special exception to the GNU General
7948
dnl Public License, this file may be distributed as part of a program
7949
dnl that contains a configuration script generated by Autoconf, under
7950
dnl the same distribution terms as the rest of that program.
7952
dnl From Bruno Haible.
7954
AC_DEFUN([AM_LANGINFO_CODESET],
7956
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
7957
[AC_TRY_LINK([#include <langinfo.h>],
7958
[char* cs = nl_langinfo(CODESET);],
7959
am_cv_langinfo_codeset=yes,
7960
am_cv_langinfo_codeset=no)
7962
if test $am_cv_langinfo_codeset = yes; then
7963
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
7964
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
7858
7968
# gettext.m4 serial 20 (gettext-0.12)
7859
7969
dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
7860
7970
dnl This file is free software, distributed under the terms of the GNU
8981
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
8982
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
8983
dnl also defines GSTUFF_PKG_ERRORS on error
8984
AC_DEFUN(PKG_CHECK_MODULES, [
8987
if test -z "$PKG_CONFIG"; then
8988
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
8991
if test "$PKG_CONFIG" = "no" ; then
8992
echo "*** The pkg-config script could not be found. Make sure it is"
8993
echo "*** in your path, or set the PKG_CONFIG environment variable"
8994
echo "*** to the full path to pkg-config."
8995
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
8997
PKG_CONFIG_MIN_VERSION=0.9.0
8998
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8999
AC_MSG_CHECKING(for $2)
9001
if $PKG_CONFIG --exists "$2" ; then
9005
AC_MSG_CHECKING($1_CFLAGS)
9006
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
9007
AC_MSG_RESULT($$1_CFLAGS)
9009
AC_MSG_CHECKING($1_LIBS)
9010
$1_LIBS=`$PKG_CONFIG --libs "$2"`
9011
AC_MSG_RESULT($$1_LIBS)
9015
## If we have a custom action on failure, don't print errors, but
9016
## do set a variable so people can do so.
9017
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
9018
ifelse([$4], ,echo $$1_PKG_ERRORS,)
9024
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9025
echo "*** See http://www.freedesktop.org/software/pkgconfig"
9029
if test $succeeded = yes; then
9030
ifelse([$3], , :, [$3])
9032
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
9067
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
9068
# serial 2 IT_PROG_INTLTOOL
9069
AC_DEFUN([IT_PROG_INTLTOOL],
9072
if test -n "$1"; then
9073
AC_MSG_CHECKING(for intltool >= $1)
9075
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
9076
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${ac_aux_dir}/intltool-update.in`
9078
INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
9081
if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
9082
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
9084
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
9089
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9090
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9091
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9092
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9093
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
9094
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9095
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9096
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9097
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9098
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9099
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9100
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
9101
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9102
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9103
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9104
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9105
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
9107
AC_SUBST(INTLTOOL_DESKTOP_RULE)
9108
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
9109
AC_SUBST(INTLTOOL_KEYS_RULE)
9110
AC_SUBST(INTLTOOL_PROP_RULE)
9111
AC_SUBST(INTLTOOL_OAF_RULE)
9112
AC_SUBST(INTLTOOL_PONG_RULE)
9113
AC_SUBST(INTLTOOL_SERVER_RULE)
9114
AC_SUBST(INTLTOOL_SHEET_RULE)
9115
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
9116
AC_SUBST(INTLTOOL_UI_RULE)
9117
AC_SUBST(INTLTOOL_XAM_RULE)
9118
AC_SUBST(INTLTOOL_KBD_RULE)
9119
AC_SUBST(INTLTOOL_XML_RULE)
9120
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
9121
AC_SUBST(INTLTOOL_CAVES_RULE)
9122
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
9123
AC_SUBST(INTLTOOL_THEME_RULE)
9125
# Use the tools built into the package, not the ones that are installed.
9127
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
9128
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
9129
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
9131
AC_SUBST(INTLTOOL_EXTRACT)
9132
AC_SUBST(INTLTOOL_MERGE)
9133
AC_SUBST(INTLTOOL_UPDATE)
9135
AC_PATH_PROG(INTLTOOL_PERL, perl)
9136
if test -z "$INTLTOOL_PERL"; then
9137
AC_MSG_ERROR([perl not found; required for intltool])
9139
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
9140
AC_MSG_ERROR([perl 5.x required for intltool])
9142
if test "x$2" != "xno-xml"; then
9143
AC_MSG_CHECKING([for XML::Parser])
9144
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
9147
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
9151
AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
9152
AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
9153
AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
9154
AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
9156
# Remove file type tags (using []) from po/POTFILES.
9158
ifdef([AC_DIVERSION_ICMDS],[
9159
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
9160
[mv -f po/POTFILES po/POTFILES.tmp
9161
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
9162
rm -f po/POTFILES.tmp
9166
ifdef([AC_CONFIG_COMMANDS_PRE],[
9167
AC_CONFIG_COMMANDS_PRE([
9168
[mv -f po/POTFILES po/POTFILES.tmp
9169
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
9170
rm -f po/POTFILES.tmp
9176
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
9178
AC_CONFIG_COMMANDS([intltool], [
9180
intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
9181
-e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
9182
-e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
9183
-e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
9184
-e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
9185
-e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
9187
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
9188
> intltool-extract.out
9189
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
9190
rm -f intltool-extract.out
9192
mv -f intltool-extract.out intltool-extract
9194
chmod ugo+x intltool-extract
9195
chmod u+w intltool-extract
9197
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
9198
> intltool-merge.out
9199
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
9200
rm -f intltool-merge.out
9202
mv -f intltool-merge.out intltool-merge
9204
chmod ugo+x intltool-merge
9205
chmod u+w intltool-merge
9207
eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
9208
> intltool-update.out
9209
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
9210
rm -f intltool-update.out
9212
mv -f intltool-update.out intltool-update
9214
chmod ugo+x intltool-update
9215
chmod u+w intltool-update
9217
], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
9218
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
9219
MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
9220
XGETTEXT='${INTLTOOL_XGETTEXT}')
9225
AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)])