1016
1051
AC_SUBST([am__untar])
1017
1052
]) # _AM_PROG_TAR
1019
# nls.m4 serial 3 (gettext-0.15)
1020
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
1021
dnl This file is free software; the Free Software Foundation
1022
dnl gives unlimited permission to copy and/or distribute it,
1023
dnl with or without modifications, as long as this notice is preserved.
1025
dnl This file can can be used in projects which are not available under
1026
dnl the GNU General Public License or the GNU Library General Public
1027
dnl License but which still want to provide support for the GNU gettext
1029
dnl Please note that the actual code of the GNU gettext library is covered
1030
dnl by the GNU Library General Public License, and the rest of the GNU
1031
dnl gettext package package is covered by the GNU General Public License.
1032
dnl They are *not* in the public domain.
1035
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1036
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1042
AC_MSG_CHECKING([whether NLS is requested])
1043
dnl Default is enabled NLS
1045
[ --disable-nls do not use Native Language Support],
1046
USE_NLS=$enableval, USE_NLS=yes)
1047
AC_MSG_RESULT($USE_NLS)
1051
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1052
# serial 1 (pkg-config-0.24)
1054
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1056
# This program is free software; you can redistribute it and/or modify
1057
# it under the terms of the GNU General Public License as published by
1058
# the Free Software Foundation; either version 2 of the License, or
1059
# (at your option) any later version.
1061
# This program is distributed in the hope that it will be useful, but
1062
# WITHOUT ANY WARRANTY; without even the implied warranty of
1063
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1064
# General Public License for more details.
1066
# You should have received a copy of the GNU General Public License
1067
# along with this program; if not, write to the Free Software
1068
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1070
# As a special exception to the GNU General Public License, if you
1071
# distribute this file as part of a program that contains a
1072
# configuration script generated by Autoconf, you may include it under
1073
# the same distribution terms that you use for the rest of that program.
1075
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1076
# ----------------------------------
1077
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1078
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1079
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1080
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1081
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1082
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1084
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1085
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1087
if test -n "$PKG_CONFIG"; then
1088
_pkg_min_version=m4_default([$1], [0.9.0])
1089
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1090
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1091
AC_MSG_RESULT([yes])
1097
])# PKG_PROG_PKG_CONFIG
1099
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1101
# Check to see whether a particular set of modules exists. Similar
1102
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1104
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1105
# only at the first occurence in configure.ac, so if the first place
1106
# it's called might be skipped (such as if it is within an "if", you
1107
# have to call PKG_CHECK_EXISTS manually
1108
# --------------------------------------------------------------
1109
AC_DEFUN([PKG_CHECK_EXISTS],
1110
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1111
if test -n "$PKG_CONFIG" && \
1112
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1113
m4_default([$2], [:])
1114
m4_ifvaln([$3], [else
1118
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1119
# ---------------------------------------------
1120
m4_define([_PKG_CONFIG],
1121
[if test -n "$$1"; then
1123
elif test -n "$PKG_CONFIG"; then
1124
PKG_CHECK_EXISTS([$3],
1125
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1132
# _PKG_SHORT_ERRORS_SUPPORTED
1133
# -----------------------------
1134
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1135
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1136
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1137
_pkg_short_errors_supported=yes
1139
_pkg_short_errors_supported=no
1141
])# _PKG_SHORT_ERRORS_SUPPORTED
1144
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1145
# [ACTION-IF-NOT-FOUND])
1148
# Note that if there is a possibility the first call to
1149
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1150
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1153
# --------------------------------------------------------------
1154
AC_DEFUN([PKG_CHECK_MODULES],
1155
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1156
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1157
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1160
AC_MSG_CHECKING([for $1])
1162
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1163
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1165
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1166
and $1[]_LIBS to avoid the need to call pkg-config.
1167
See the pkg-config man page for more details.])
1169
if test $pkg_failed = yes; then
1171
_PKG_SHORT_ERRORS_SUPPORTED
1172
if test $_pkg_short_errors_supported = yes; then
1173
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1175
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1177
# Put the nasty error message in config.log where it belongs
1178
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1180
m4_default([$4], [AC_MSG_ERROR(
1181
[Package requirements ($2) were not met:
1185
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1186
installed software in a non-standard prefix.
1190
elif test $pkg_failed = untried; then
1192
m4_default([$4], [AC_MSG_FAILURE(
1193
[The pkg-config script could not be found or is too old. Make sure it
1194
is in your PATH or set the PKG_CONFIG environment variable to the full
1199
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1202
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1203
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1204
AC_MSG_RESULT([yes])
1207
])# PKG_CHECK_MODULES
1054
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1056
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
1057
# Written by Scott James Remnant, 2004.
1059
# This file is free software; the Free Software Foundation gives
1060
# unlimited permission to copy and/or distribute it, with or without
1061
# modifications, as long as this notice is preserved.
1063
# serial 5 lt~obsolete.m4
1065
# These exist entirely to fool aclocal when bootstrapping libtool.
1067
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
1068
# which have later been changed to m4_define as they aren't part of the
1069
# exported API, or moved to Autoconf or Automake where they belong.
1071
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
1072
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
1073
# using a macro with the same name in our local m4/libtool.m4 it'll
1074
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
1075
# and doesn't know about Autoconf macros at all.)
1077
# So we provide this file, which has a silly filename so it's always
1078
# included after everything else. This provides aclocal with the
1079
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
1080
# because those macros already exist, or will be overwritten later.
1081
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
1083
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
1084
# Yes, that means every name once taken will need to remain here until
1085
# we give up compatibility with versions before 1.7, at which point
1086
# we need to keep only those names which we still refer to.
1088
# This is to help aclocal find these macros, as it can't see m4_define.
1089
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
1091
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
1092
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
1093
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
1094
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
1095
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
1096
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
1097
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
1098
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
1099
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
1100
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
1101
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
1102
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
1103
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
1104
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
1105
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
1106
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
1107
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
1108
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
1109
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
1110
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
1111
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
1112
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
1113
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
1114
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
1115
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
1116
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
1117
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
1118
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
1119
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
1120
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
1121
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
1122
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
1123
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
1124
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
1125
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
1126
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
1127
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
1128
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
1129
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
1130
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
1131
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
1132
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
1133
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
1134
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
1135
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
1136
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
1137
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
1138
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
1139
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
1140
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
1141
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
1142
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
1143
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
1144
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
1145
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
1146
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
1147
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
1148
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
1149
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
1150
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
1151
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
1209
1153
dnl AM_GCONF_SOURCE_2
1210
1154
dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
1882
1826
AC_SUBST(WARN_CXXFLAGS)
1830
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
1831
dnl the schema should be compiled
1834
AC_DEFUN([GLIB_GSETTINGS],
1836
m4_pattern_allow([AM_V_GEN])
1837
AC_ARG_ENABLE(schemas-compile,
1838
AC_HELP_STRING([--disable-schemas-compile],
1839
[Disable regeneration of gschemas.compiled on install]),
1840
[case ${enableval} in
1841
yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
1842
no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
1843
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
1845
AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
1846
PKG_PROG_PKG_CONFIG([0.16])
1847
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
1848
if test x$cross_compiling != xyes; then
1849
GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
1851
AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
1853
AC_SUBST(GLIB_COMPILE_SCHEMAS)
1854
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
1855
ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
1857
ifelse([$1],,[:],[$1])
1861
.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
1863
mostlyclean-am: clean-gsettings-schemas
1865
gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
1867
%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
1868
$(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 [$]@
1870
all-am: $(gsettings_SCHEMAS:.xml=.valid)
1871
uninstall-am: uninstall-gsettings-schemas
1872
install-data-am: install-gsettings-schemas
1874
.SECONDARY: $(gsettings_SCHEMAS)
1876
install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
1878
if test -n "$^"; then \
1879
test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
1880
$(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
1881
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
1884
uninstall-gsettings-schemas:
1885
@$(NORMAL_UNINSTALL)
1886
@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
1887
files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
1888
test -n "$$files" || exit 0; \
1889
echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
1890
cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
1891
test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
1893
clean-gsettings-schemas:
1894
rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
1896
ifdef gsettings_ENUM_NAMESPACE
1897
$(gsettings__enum_file): $(gsettings_ENUM_FILES)
1898
$(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 [$]@
1901
_GSETTINGS_SUBST(GSETTINGS_RULES)
1904
dnl _GSETTINGS_SUBST(VARIABLE)
1905
dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1906
AC_DEFUN([_GSETTINGS_SUBST],
1909
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1913
# nls.m4 serial 5 (gettext-0.18)
1914
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1916
dnl This file is free software; the Free Software Foundation
1917
dnl gives unlimited permission to copy and/or distribute it,
1918
dnl with or without modifications, as long as this notice is preserved.
1920
dnl This file can can be used in projects which are not available under
1921
dnl the GNU General Public License or the GNU Library General Public
1922
dnl License but which still want to provide support for the GNU gettext
1924
dnl Please note that the actual code of the GNU gettext library is covered
1925
dnl by the GNU Library General Public License, and the rest of the GNU
1926
dnl gettext package package is covered by the GNU General Public License.
1927
dnl They are *not* in the public domain.
1930
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1931
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1937
AC_MSG_CHECKING([whether NLS is requested])
1938
dnl Default is enabled NLS
1939
AC_ARG_ENABLE([nls],
1940
[ --disable-nls do not use Native Language Support],
1941
USE_NLS=$enableval, USE_NLS=yes)
1942
AC_MSG_RESULT([$USE_NLS])
1946
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1947
# serial 1 (pkg-config-0.24)
1949
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1951
# This program is free software; you can redistribute it and/or modify
1952
# it under the terms of the GNU General Public License as published by
1953
# the Free Software Foundation; either version 2 of the License, or
1954
# (at your option) any later version.
1956
# This program is distributed in the hope that it will be useful, but
1957
# WITHOUT ANY WARRANTY; without even the implied warranty of
1958
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1959
# General Public License for more details.
1961
# You should have received a copy of the GNU General Public License
1962
# along with this program; if not, write to the Free Software
1963
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1965
# As a special exception to the GNU General Public License, if you
1966
# distribute this file as part of a program that contains a
1967
# configuration script generated by Autoconf, you may include it under
1968
# the same distribution terms that you use for the rest of that program.
1970
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1971
# ----------------------------------
1972
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1973
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1974
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1975
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1976
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1977
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1979
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1980
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1982
if test -n "$PKG_CONFIG"; then
1983
_pkg_min_version=m4_default([$1], [0.9.0])
1984
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1985
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1986
AC_MSG_RESULT([yes])
1992
])# PKG_PROG_PKG_CONFIG
1994
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1996
# Check to see whether a particular set of modules exists. Similar
1997
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1999
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2000
# only at the first occurence in configure.ac, so if the first place
2001
# it's called might be skipped (such as if it is within an "if", you
2002
# have to call PKG_CHECK_EXISTS manually
2003
# --------------------------------------------------------------
2004
AC_DEFUN([PKG_CHECK_EXISTS],
2005
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2006
if test -n "$PKG_CONFIG" && \
2007
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2008
m4_default([$2], [:])
2009
m4_ifvaln([$3], [else
2013
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2014
# ---------------------------------------------
2015
m4_define([_PKG_CONFIG],
2016
[if test -n "$$1"; then
2018
elif test -n "$PKG_CONFIG"; then
2019
PKG_CHECK_EXISTS([$3],
2020
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2027
# _PKG_SHORT_ERRORS_SUPPORTED
2028
# -----------------------------
2029
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2030
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2031
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2032
_pkg_short_errors_supported=yes
2034
_pkg_short_errors_supported=no
2036
])# _PKG_SHORT_ERRORS_SUPPORTED
2039
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2040
# [ACTION-IF-NOT-FOUND])
2043
# Note that if there is a possibility the first call to
2044
# PKG_CHECK_MODULES might not happen, you should be sure to include an
2045
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2048
# --------------------------------------------------------------
2049
AC_DEFUN([PKG_CHECK_MODULES],
2050
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2051
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2052
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2055
AC_MSG_CHECKING([for $1])
2057
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2058
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2060
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2061
and $1[]_LIBS to avoid the need to call pkg-config.
2062
See the pkg-config man page for more details.])
2064
if test $pkg_failed = yes; then
2066
_PKG_SHORT_ERRORS_SUPPORTED
2067
if test $_pkg_short_errors_supported = yes; then
2068
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2070
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2072
# Put the nasty error message in config.log where it belongs
2073
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2075
m4_default([$4], [AC_MSG_ERROR(
2076
[Package requirements ($2) were not met:
2080
Consider adjusting the PKG_CONFIG_PATH environment variable if you
2081
installed software in a non-standard prefix.
2085
elif test $pkg_failed = untried; then
2087
m4_default([$4], [AC_MSG_FAILURE(
2088
[The pkg-config script could not be found or is too old. Make sure it
2089
is in your PATH or set the PKG_CONFIG environment variable to the full
2094
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
2097
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2098
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2099
AC_MSG_RESULT([yes])
2102
])# PKG_CHECK_MODULES
1885
2104
m4_include([m4/intltool.m4])
1886
2105
m4_include([m4/libtool.m4])
1887
2106
m4_include([m4/ltoptions.m4])