6934
6934
ifdef([AC_DIVERSION_ICMDS],[
6935
6935
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
6937
mv -f po/POTFILES po/POTFILES.tmp
6938
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
6936
[mv -f po/POTFILES po/POTFILES.tmp
6937
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
6939
6938
rm -f po/POTFILES.tmp
6941
6940
AC_DIVERT_POP()
6943
6942
ifdef([AC_CONFIG_COMMANDS_PRE],[
6944
6943
AC_CONFIG_COMMANDS_PRE([
6946
mv -f po/POTFILES po/POTFILES.tmp
6947
sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
6944
[mv -f po/POTFILES po/POTFILES.tmp
6945
sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES
6948
6946
rm -f po/POTFILES.tmp
6953
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6954
# Keeping the `.' argument allows $(mkdir_p) to be used without
6955
# argument. Indeed, we sometimes output rules like
6956
# $(mkdir_p) $(somedir)
6957
# where $(somedir) is conditionally defined.
6958
# (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
6959
# expensive solution, as it forces Make to start a sub-shell.)
6960
mkdir_p='mkdir -p -- .'
6962
# On NextStep and OpenStep, the `mkdir' command does not
6963
# recognize any option. It will interpret all options as
6964
# directories to create, and then abort because `.' already
6966
for d in ./-p ./--version;
6968
test -d $d && rmdir $d
6970
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6971
if test -f "$ac_aux_dir/mkinstalldirs"; then
6972
mkdir_p='$(mkinstalldirs)'
6974
mkdir_p='$(install_sh) -d'
6980
6952
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
7428
7400
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
7432
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
7433
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
7434
dnl also defines GSTUFF_PKG_ERRORS on error
7435
AC_DEFUN(PKG_CHECK_MODULES, [
7438
if test -z "$PKG_CONFIG"; then
7439
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
7442
if test "$PKG_CONFIG" = "no" ; then
7443
echo "*** The pkg-config script could not be found. Make sure it is"
7444
echo "*** in your path, or set the PKG_CONFIG environment variable"
7445
echo "*** to the full path to pkg-config."
7446
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
7448
PKG_CONFIG_MIN_VERSION=0.9.0
7449
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7450
AC_MSG_CHECKING(for $2)
7452
if $PKG_CONFIG --exists "$2" ; then
7456
AC_MSG_CHECKING($1_CFLAGS)
7457
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
7458
AC_MSG_RESULT($$1_CFLAGS)
7460
AC_MSG_CHECKING($1_LIBS)
7461
$1_LIBS=`$PKG_CONFIG --libs "$2"`
7462
AC_MSG_RESULT($$1_LIBS)
7466
## If we have a custom action on failure, don't print errors, but
7467
## do set a variable so people can do so.
7468
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7469
ifelse([$4], ,echo $$1_PKG_ERRORS,)
7475
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
7476
echo "*** See http://www.freedesktop.org/software/pkgconfig"
7480
if test $succeeded = yes; then
7481
ifelse([$3], , :, [$3])
7483
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])
7403
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7405
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7407
# This program is free software; you can redistribute it and/or modify
7408
# it under the terms of the GNU General Public License as published by
7409
# the Free Software Foundation; either version 2 of the License, or
7410
# (at your option) any later version.
7412
# This program is distributed in the hope that it will be useful, but
7413
# WITHOUT ANY WARRANTY; without even the implied warranty of
7414
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7415
# General Public License for more details.
7417
# You should have received a copy of the GNU General Public License
7418
# along with this program; if not, write to the Free Software
7419
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7421
# As a special exception to the GNU General Public License, if you
7422
# distribute this file as part of a program that contains a
7423
# configuration script generated by Autoconf, you may include it under
7424
# the same distribution terms that you use for the rest of that program.
7426
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7427
# ----------------------------------
7428
AC_DEFUN([PKG_PROG_PKG_CONFIG],
7429
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7430
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7431
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7432
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7433
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7435
if test -n "$PKG_CONFIG"; then
7436
_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
7437
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7438
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7439
AC_MSG_RESULT([yes])
7446
])# PKG_PROG_PKG_CONFIG
7448
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7450
# Check to see whether a particular set of modules exists. Similar
7451
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
7454
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
7455
# this or PKG_CHECK_MODULES is called, or make sure to call
7456
# PKG_CHECK_EXISTS manually
7457
# --------------------------------------------------------------
7458
AC_DEFUN([PKG_CHECK_EXISTS],
7459
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7460
if test -n "$PKG_CONFIG" && \
7461
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7462
m4_ifval([$2], [$2], [:])
7463
m4_ifvaln([$3], [else
7468
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7469
# ---------------------------------------------
7470
m4_define([_PKG_CONFIG],
7471
[if test -n "$PKG_CONFIG"; then
7472
PKG_CHECK_EXISTS([$3],
7473
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7480
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7481
# [ACTION-IF-NOT-FOUND])
7484
# Note that if there is a possibility the first call to
7485
# PKG_CHECK_MODULES might not happen, you should be sure to include an
7486
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7489
# --------------------------------------------------------------
7490
AC_DEFUN([PKG_CHECK_MODULES],
7491
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7492
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7493
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7496
AC_MSG_CHECKING([for $1])
7498
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7499
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
7501
if test $pkg_failed = yes; then
7502
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7503
# Put the nasty error message in config.log where it belongs
7504
echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
7506
ifelse([$4], , [AC_MSG_ERROR(dnl
7507
[Package requirements ($2) were not met.
7508
Consider adjusting the PKG_CONFIG_PATH environment variable if you
7509
installed software in a non-standard prefix.
7511
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7512
to avoid the need to call pkg-config. See the pkg-config man page for
7515
elif test $pkg_failed = untried; then
7516
ifelse([$4], , [AC_MSG_FAILURE(dnl
7517
[The pkg-config script could not be found or is too old. Make sure it
7518
is in your PATH or set the PKG_CONFIG environment variable to the full
7521
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
7522
to avoid the need to call pkg-config. See the pkg-config man page for
7525
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
7528
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7529
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7530
AC_MSG_RESULT([yes])
7531
ifelse([$3], , :, [$3])
7533
])# PKG_CHECK_MODULES