1285
1285
AC_SUBST([am__untar])
1286
1286
]) # _AM_PROG_TAR
1288
# nls.m4 serial 3 (gettext-0.15)
1289
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
1290
dnl This file is free software; the Free Software Foundation
1291
dnl gives unlimited permission to copy and/or distribute it,
1292
dnl with or without modifications, as long as this notice is preserved.
1294
dnl This file can can be used in projects which are not available under
1295
dnl the GNU General Public License or the GNU Library General Public
1296
dnl License but which still want to provide support for the GNU gettext
1298
dnl Please note that the actual code of the GNU gettext library is covered
1299
dnl by the GNU Library General Public License, and the rest of the GNU
1300
dnl gettext package package is covered by the GNU General Public License.
1301
dnl They are *not* in the public domain.
1304
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1305
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1311
AC_MSG_CHECKING([whether NLS is requested])
1312
dnl Default is enabled NLS
1314
[ --disable-nls do not use Native Language Support],
1315
USE_NLS=$enableval, USE_NLS=yes)
1316
AC_MSG_RESULT($USE_NLS)
1320
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1321
# serial 1 (pkg-config-0.24)
1323
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1325
# This program is free software; you can redistribute it and/or modify
1326
# it under the terms of the GNU General Public License as published by
1327
# the Free Software Foundation; either version 2 of the License, or
1328
# (at your option) any later version.
1330
# This program is distributed in the hope that it will be useful, but
1331
# WITHOUT ANY WARRANTY; without even the implied warranty of
1332
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1333
# General Public License for more details.
1335
# You should have received a copy of the GNU General Public License
1336
# along with this program; if not, write to the Free Software
1337
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1339
# As a special exception to the GNU General Public License, if you
1340
# distribute this file as part of a program that contains a
1341
# configuration script generated by Autoconf, you may include it under
1342
# the same distribution terms that you use for the rest of that program.
1344
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1345
# ----------------------------------
1346
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1347
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1348
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1349
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1350
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1351
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1353
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1354
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1356
if test -n "$PKG_CONFIG"; then
1357
_pkg_min_version=m4_default([$1], [0.9.0])
1358
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1359
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1360
AC_MSG_RESULT([yes])
1366
])# PKG_PROG_PKG_CONFIG
1368
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1370
# Check to see whether a particular set of modules exists. Similar
1371
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1373
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1374
# only at the first occurence in configure.ac, so if the first place
1375
# it's called might be skipped (such as if it is within an "if", you
1376
# have to call PKG_CHECK_EXISTS manually
1377
# --------------------------------------------------------------
1378
AC_DEFUN([PKG_CHECK_EXISTS],
1379
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1380
if test -n "$PKG_CONFIG" && \
1381
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1382
m4_default([$2], [:])
1383
m4_ifvaln([$3], [else
1387
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1388
# ---------------------------------------------
1389
m4_define([_PKG_CONFIG],
1390
[if test -n "$$1"; then
1392
elif test -n "$PKG_CONFIG"; then
1393
PKG_CHECK_EXISTS([$3],
1394
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1401
# _PKG_SHORT_ERRORS_SUPPORTED
1402
# -----------------------------
1403
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1404
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1405
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1406
_pkg_short_errors_supported=yes
1408
_pkg_short_errors_supported=no
1410
])# _PKG_SHORT_ERRORS_SUPPORTED
1413
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1414
# [ACTION-IF-NOT-FOUND])
1417
# Note that if there is a possibility the first call to
1418
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1419
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1422
# --------------------------------------------------------------
1423
AC_DEFUN([PKG_CHECK_MODULES],
1424
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1425
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1426
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1429
AC_MSG_CHECKING([for $1])
1431
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1432
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1434
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1435
and $1[]_LIBS to avoid the need to call pkg-config.
1436
See the pkg-config man page for more details.])
1438
if test $pkg_failed = yes; then
1440
_PKG_SHORT_ERRORS_SUPPORTED
1441
if test $_pkg_short_errors_supported = yes; then
1442
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1444
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1446
# Put the nasty error message in config.log where it belongs
1447
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1449
m4_default([$4], [AC_MSG_ERROR(
1450
[Package requirements ($2) were not met:
1454
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1455
installed software in a non-standard prefix.
1459
elif test $pkg_failed = untried; then
1461
m4_default([$4], [AC_MSG_FAILURE(
1462
[The pkg-config script could not be found or is too old. Make sure it
1463
is in your PATH or set the PKG_CONFIG environment variable to the full
1468
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1471
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1472
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1473
AC_MSG_RESULT([yes])
1476
])# PKG_CHECK_MODULES
1288
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1290
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
1291
# Written by Scott James Remnant, 2004.
1293
# This file is free software; the Free Software Foundation gives
1294
# unlimited permission to copy and/or distribute it, with or without
1295
# modifications, as long as this notice is preserved.
1297
# serial 5 lt~obsolete.m4
1299
# These exist entirely to fool aclocal when bootstrapping libtool.
1301
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
1302
# which have later been changed to m4_define as they aren't part of the
1303
# exported API, or moved to Autoconf or Automake where they belong.
1305
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
1306
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
1307
# using a macro with the same name in our local m4/libtool.m4 it'll
1308
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
1309
# and doesn't know about Autoconf macros at all.)
1311
# So we provide this file, which has a silly filename so it's always
1312
# included after everything else. This provides aclocal with the
1313
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
1314
# because those macros already exist, or will be overwritten later.
1315
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
1317
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
1318
# Yes, that means every name once taken will need to remain here until
1319
# we give up compatibility with versions before 1.7, at which point
1320
# we need to keep only those names which we still refer to.
1322
# This is to help aclocal find these macros, as it can't see m4_define.
1323
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
1325
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
1326
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
1327
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
1328
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
1329
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
1330
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
1331
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
1332
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
1333
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
1334
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
1335
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
1336
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
1337
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
1338
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
1339
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
1340
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
1341
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
1342
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
1343
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
1344
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
1345
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
1346
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
1347
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
1348
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
1349
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
1350
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
1351
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
1352
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
1353
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
1354
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
1355
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
1356
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
1357
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
1358
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
1359
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
1360
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
1361
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
1362
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
1363
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
1364
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
1365
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
1366
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
1367
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
1368
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
1369
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
1370
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
1371
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
1372
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
1373
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
1374
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
1375
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
1376
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
1377
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
1378
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
1379
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
1380
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
1381
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
1382
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
1383
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
1384
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
1385
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
1478
1387
dnl AM_GCONF_SOURCE_2
1479
1388
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
2151
2060
AC_SUBST(WARN_CXXFLAGS)
2064
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
2065
dnl the schema should be compiled
2068
AC_DEFUN([GLIB_GSETTINGS],
2070
m4_pattern_allow([AM_V_GEN])
2071
AC_ARG_ENABLE(schemas-compile,
2072
AC_HELP_STRING([--disable-schemas-compile],
2073
[Disable regeneration of gschemas.compiled on install]),
2074
[case ${enableval} in
2075
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
2076
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
2077
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
2079
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
2080
PKG_PROG_PKG_CONFIG([0.16])
2081
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
2082
if test x$cross_compiling != xyes; then
2083
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
2085
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
2087
AC_SUBST(GLIB_COMPILE_SCHEMAS)
2088
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
2089
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
2091
ifelse([$1],,[:],[$1])
2095
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
2097
mostlyclean-am: clean-gsettings-schemas
2099
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
2101
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
2102
$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
2104
all-am: $(gsettings_SCHEMAS:.xml=.valid)
2105
uninstall-am: uninstall-gsettings-schemas
2106
install-data-am: install-gsettings-schemas
2108
.SECONDARY: $(gsettings_SCHEMAS)
2110
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
2112
if test -n "$^"; then \
2113
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
2114
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
2115
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
2118
uninstall-gsettings-schemas:
2119
@$(NORMAL_UNINSTALL)
2120
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
2121
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
2122
test -n "$$files" || exit 0; \
2123
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
2124
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
2125
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
2127
clean-gsettings-schemas:
2128
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
2130
ifdef gsettings_ENUM_NAMESPACE
2131
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
2132
$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
2135
_GSETTINGS_SUBST(GSETTINGS_RULES)
2138
dnl _GSETTINGS_SUBST(VARIABLE)
2139
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
2140
AC_DEFUN([_GSETTINGS_SUBST],
2143
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
2154
2147
dnl -*- mode: autoconf -*-
2155
2148
dnl Copyright 2009 Johan Dahlin
2246
2239
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
2242
# nls.m4 serial 5 (gettext-0.18)
2243
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
2245
dnl This file is free software; the Free Software Foundation
2246
dnl gives unlimited permission to copy and/or distribute it,
2247
dnl with or without modifications, as long as this notice is preserved.
2249
dnl This file can can be used in projects which are not available under
2250
dnl the GNU General Public License or the GNU Library General Public
2251
dnl License but which still want to provide support for the GNU gettext
2253
dnl Please note that the actual code of the GNU gettext library is covered
2254
dnl by the GNU Library General Public License, and the rest of the GNU
2255
dnl gettext package package is covered by the GNU General Public License.
2256
dnl They are *not* in the public domain.
2259
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
2260
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
2266
AC_MSG_CHECKING([whether NLS is requested])
2267
dnl Default is enabled NLS
2268
AC_ARG_ENABLE([nls],
2269
[ --disable-nls do not use Native Language Support],
2270
USE_NLS=$enableval, USE_NLS=yes)
2271
AC_MSG_RESULT([$USE_NLS])
2275
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2276
# serial 1 (pkg-config-0.24)
2278
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2280
# This program is free software; you can redistribute it and/or modify
2281
# it under the terms of the GNU General Public License as published by
2282
# the Free Software Foundation; either version 2 of the License, or
2283
# (at your option) any later version.
2285
# This program is distributed in the hope that it will be useful, but
2286
# WITHOUT ANY WARRANTY; without even the implied warranty of
2287
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2288
# General Public License for more details.
2290
# You should have received a copy of the GNU General Public License
2291
# along with this program; if not, write to the Free Software
2292
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2294
# As a special exception to the GNU General Public License, if you
2295
# distribute this file as part of a program that contains a
2296
# configuration script generated by Autoconf, you may include it under
2297
# the same distribution terms that you use for the rest of that program.
2299
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2300
# ----------------------------------
2301
AC_DEFUN([PKG_PROG_PKG_CONFIG],
2302
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2303
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2304
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
2305
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
2306
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
2308
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2309
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2311
if test -n "$PKG_CONFIG"; then
2312
_pkg_min_version=m4_default([$1], [0.9.0])
2313
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2314
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2315
AC_MSG_RESULT([yes])
2321
])# PKG_PROG_PKG_CONFIG
2323
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2325
# Check to see whether a particular set of modules exists. Similar
2326
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2328
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2329
# only at the first occurence in configure.ac, so if the first place
2330
# it's called might be skipped (such as if it is within an "if", you
2331
# have to call PKG_CHECK_EXISTS manually
2332
# --------------------------------------------------------------
2333
AC_DEFUN([PKG_CHECK_EXISTS],
2334
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2335
if test -n "$PKG_CONFIG" && \
2336
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2337
m4_default([$2], [:])
2338
m4_ifvaln([$3], [else
2342
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2343
# ---------------------------------------------
2344
m4_define([_PKG_CONFIG],
2345
[if test -n "$$1"; then
2347
elif test -n "$PKG_CONFIG"; then
2348
PKG_CHECK_EXISTS([$3],
2349
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2356
# _PKG_SHORT_ERRORS_SUPPORTED
2357
# -----------------------------
2358
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2359
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2360
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2361
_pkg_short_errors_supported=yes
2363
_pkg_short_errors_supported=no
2365
])# _PKG_SHORT_ERRORS_SUPPORTED
2368
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2369
# [ACTION-IF-NOT-FOUND])
2372
# Note that if there is a possibility the first call to
2373
# PKG_CHECK_MODULES might not happen, you should be sure to include an
2374
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2377
# --------------------------------------------------------------
2378
AC_DEFUN([PKG_CHECK_MODULES],
2379
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2380
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2381
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2384
AC_MSG_CHECKING([for $1])
2386
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2387
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2389
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2390
and $1[]_LIBS to avoid the need to call pkg-config.
2391
See the pkg-config man page for more details.])
2393
if test $pkg_failed = yes; then
2395
_PKG_SHORT_ERRORS_SUPPORTED
2396
if test $_pkg_short_errors_supported = yes; then
2397
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2399
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2401
# Put the nasty error message in config.log where it belongs
2402
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2404
m4_default([$4], [AC_MSG_ERROR(
2405
[Package requirements ($2) were not met:
2409
Consider adjusting the PKG_CONFIG_PATH environment variable if you
2410
installed software in a non-standard prefix.
2414
elif test $pkg_failed = untried; then
2416
m4_default([$4], [AC_MSG_FAILURE(
2417
[The pkg-config script could not be found or is too old. Make sure it
2418
is in your PATH or set the PKG_CONFIG environment variable to the full
2423
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
2426
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2427
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2428
AC_MSG_RESULT([yes])
2431
])# PKG_CHECK_MODULES
2249
2433
m4_include([m4/d-type.m4])
2250
2434
m4_include([m4/gnome-doc-utils.m4])
2251
2435
m4_include([m4/gtk-doc.m4])