20
20
If you have problems, you may need to regenerate the build system entirely.
21
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23
# nls.m4 serial 5 (gettext-0.18)
24
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
26
dnl This file is free software; the Free Software Foundation
27
dnl gives unlimited permission to copy and/or distribute it,
28
dnl with or without modifications, as long as this notice is preserved.
30
dnl This file can can be used in projects which are not available under
31
dnl the GNU General Public License or the GNU Library General Public
32
dnl License but which still want to provide support for the GNU gettext
34
dnl Please note that the actual code of the GNU gettext library is covered
35
dnl by the GNU Library General Public License, and the rest of the GNU
36
dnl gettext package package is covered by the GNU General Public License.
37
dnl They are *not* in the public domain.
40
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
41
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
47
AC_MSG_CHECKING([whether NLS is requested])
48
dnl Default is enabled NLS
50
[ --disable-nls do not use Native Language Support],
51
USE_NLS=$enableval, USE_NLS=yes)
52
AC_MSG_RESULT([$USE_NLS])
56
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
57
# serial 1 (pkg-config-0.24)
59
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
61
# This program is free software; you can redistribute it and/or modify
62
# it under the terms of the GNU General Public License as published by
63
# the Free Software Foundation; either version 2 of the License, or
64
# (at your option) any later version.
66
# This program is distributed in the hope that it will be useful, but
67
# WITHOUT ANY WARRANTY; without even the implied warranty of
68
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
69
# General Public License for more details.
71
# You should have received a copy of the GNU General Public License
72
# along with this program; if not, write to the Free Software
73
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
75
# As a special exception to the GNU General Public License, if you
76
# distribute this file as part of a program that contains a
77
# configuration script generated by Autoconf, you may include it under
78
# the same distribution terms that you use for the rest of that program.
80
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
81
# ----------------------------------
82
AC_DEFUN([PKG_PROG_PKG_CONFIG],
83
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
84
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
85
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
86
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
87
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
88
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
90
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
91
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
93
if test -n "$PKG_CONFIG"; then
94
_pkg_min_version=m4_default([$1], [0.9.0])
95
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
96
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
103
])# PKG_PROG_PKG_CONFIG
105
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
107
# Check to see whether a particular set of modules exists. Similar
108
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
110
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
111
# only at the first occurence in configure.ac, so if the first place
112
# it's called might be skipped (such as if it is within an "if", you
113
# have to call PKG_CHECK_EXISTS manually
114
# --------------------------------------------------------------
115
AC_DEFUN([PKG_CHECK_EXISTS],
116
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
117
if test -n "$PKG_CONFIG" && \
118
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
119
m4_default([$2], [:])
120
m4_ifvaln([$3], [else
124
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
125
# ---------------------------------------------
126
m4_define([_PKG_CONFIG],
127
[if test -n "$$1"; then
129
elif test -n "$PKG_CONFIG"; then
130
PKG_CHECK_EXISTS([$3],
131
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
132
test "x$?" != "x0" && pkg_failed=yes ],
139
# _PKG_SHORT_ERRORS_SUPPORTED
140
# -----------------------------
141
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
142
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
143
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
144
_pkg_short_errors_supported=yes
146
_pkg_short_errors_supported=no
148
])# _PKG_SHORT_ERRORS_SUPPORTED
151
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
152
# [ACTION-IF-NOT-FOUND])
155
# Note that if there is a possibility the first call to
156
# PKG_CHECK_MODULES might not happen, you should be sure to include an
157
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
160
# --------------------------------------------------------------
161
AC_DEFUN([PKG_CHECK_MODULES],
162
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
163
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
164
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
167
AC_MSG_CHECKING([for $1])
169
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
170
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
172
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
173
and $1[]_LIBS to avoid the need to call pkg-config.
174
See the pkg-config man page for more details.])
176
if test $pkg_failed = yes; then
178
_PKG_SHORT_ERRORS_SUPPORTED
179
if test $_pkg_short_errors_supported = yes; then
180
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
182
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
184
# Put the nasty error message in config.log where it belongs
185
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
187
m4_default([$4], [AC_MSG_ERROR(
188
[Package requirements ($2) were not met:
192
Consider adjusting the PKG_CONFIG_PATH environment variable if you
193
installed software in a non-standard prefix.
197
elif test $pkg_failed = untried; then
199
m4_default([$4], [AC_MSG_FAILURE(
200
[The pkg-config script could not be found or is too old. Make sure it
201
is in your PATH or set the PKG_CONFIG environment variable to the full
206
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
209
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
210
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
214
])# PKG_CHECK_MODULES
217
# PKG_INSTALLDIR(DIRECTORY)
218
# -------------------------
219
# Substitutes the variable pkgconfigdir as the location where a module
220
# should install pkg-config .pc files. By default the directory is
221
# $libdir/pkgconfig, but the default can be changed by passing
222
# DIRECTORY. The user can override through the --with-pkgconfigdir
224
AC_DEFUN([PKG_INSTALLDIR],
225
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
226
m4_pushdef([pkg_description],
227
[pkg-config installation directory @<:@]pkg_default[@:>@])
228
AC_ARG_WITH([pkgconfigdir],
229
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
230
[with_pkgconfigdir=]pkg_default)
231
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
232
m4_popdef([pkg_default])
233
m4_popdef([pkg_description])
234
]) dnl PKG_INSTALLDIR
237
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
238
# -------------------------
239
# Substitutes the variable noarch_pkgconfigdir as the location where a
240
# module should install arch-independent pkg-config .pc files. By
241
# default the directory is $datadir/pkgconfig, but the default can be
242
# changed by passing DIRECTORY. The user can override through the
243
# --with-noarch-pkgconfigdir parameter.
244
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
245
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
246
m4_pushdef([pkg_description],
247
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
248
AC_ARG_WITH([noarch-pkgconfigdir],
249
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
250
[with_noarch_pkgconfigdir=]pkg_default)
251
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
252
m4_popdef([pkg_default])
253
m4_popdef([pkg_description])
254
]) dnl PKG_NOARCH_INSTALLDIR
257
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
258
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
259
# -------------------------------------------
260
# Retrieves the value of the pkg-config variable for the given module.
261
AC_DEFUN([PKG_CHECK_VAR],
262
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
263
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
265
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
266
AS_VAR_COPY([$1], [pkg_cv_][$1])
268
AS_VAR_IF([$1], [""], [$5], [$4])dnl
23
271
# Configure paths for GLIB
24
272
# Owen Taylor 1997-2001
933
# nls.m4 serial 5 (gettext-0.18)
934
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
936
dnl This file is free software; the Free Software Foundation
937
dnl gives unlimited permission to copy and/or distribute it,
938
dnl with or without modifications, as long as this notice is preserved.
940
dnl This file can can be used in projects which are not available under
941
dnl the GNU General Public License or the GNU Library General Public
942
dnl License but which still want to provide support for the GNU gettext
944
dnl Please note that the actual code of the GNU gettext library is covered
945
dnl by the GNU Library General Public License, and the rest of the GNU
946
dnl gettext package package is covered by the GNU General Public License.
947
dnl They are *not* in the public domain.
950
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
951
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
957
AC_MSG_CHECKING([whether NLS is requested])
958
dnl Default is enabled NLS
960
[ --disable-nls do not use Native Language Support],
961
USE_NLS=$enableval, USE_NLS=yes)
962
AC_MSG_RESULT([$USE_NLS])
966
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
967
# serial 1 (pkg-config-0.24)
969
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
971
# This program is free software; you can redistribute it and/or modify
972
# it under the terms of the GNU General Public License as published by
973
# the Free Software Foundation; either version 2 of the License, or
974
# (at your option) any later version.
976
# This program is distributed in the hope that it will be useful, but
977
# WITHOUT ANY WARRANTY; without even the implied warranty of
978
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
979
# General Public License for more details.
981
# You should have received a copy of the GNU General Public License
982
# along with this program; if not, write to the Free Software
983
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
985
# As a special exception to the GNU General Public License, if you
986
# distribute this file as part of a program that contains a
987
# configuration script generated by Autoconf, you may include it under
988
# the same distribution terms that you use for the rest of that program.
990
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
991
# ----------------------------------
992
AC_DEFUN([PKG_PROG_PKG_CONFIG],
993
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
994
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
995
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
996
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
997
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
998
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1000
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1001
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1003
if test -n "$PKG_CONFIG"; then
1004
_pkg_min_version=m4_default([$1], [0.9.0])
1005
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1006
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1007
AC_MSG_RESULT([yes])
1013
])# PKG_PROG_PKG_CONFIG
1015
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1017
# Check to see whether a particular set of modules exists. Similar
1018
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1020
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1021
# only at the first occurence in configure.ac, so if the first place
1022
# it's called might be skipped (such as if it is within an "if", you
1023
# have to call PKG_CHECK_EXISTS manually
1024
# --------------------------------------------------------------
1025
AC_DEFUN([PKG_CHECK_EXISTS],
1026
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1027
if test -n "$PKG_CONFIG" && \
1028
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1029
m4_default([$2], [:])
1030
m4_ifvaln([$3], [else
1034
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1035
# ---------------------------------------------
1036
m4_define([_PKG_CONFIG],
1037
[if test -n "$$1"; then
1039
elif test -n "$PKG_CONFIG"; then
1040
PKG_CHECK_EXISTS([$3],
1041
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1042
test "x$?" != "x0" && pkg_failed=yes ],
1049
# _PKG_SHORT_ERRORS_SUPPORTED
1050
# -----------------------------
1051
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1052
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1053
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1054
_pkg_short_errors_supported=yes
1056
_pkg_short_errors_supported=no
1058
])# _PKG_SHORT_ERRORS_SUPPORTED
1061
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1062
# [ACTION-IF-NOT-FOUND])
1065
# Note that if there is a possibility the first call to
1066
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1067
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1070
# --------------------------------------------------------------
1071
AC_DEFUN([PKG_CHECK_MODULES],
1072
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1073
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1074
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1077
AC_MSG_CHECKING([for $1])
1079
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1080
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1082
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1083
and $1[]_LIBS to avoid the need to call pkg-config.
1084
See the pkg-config man page for more details.])
1086
if test $pkg_failed = yes; then
1088
_PKG_SHORT_ERRORS_SUPPORTED
1089
if test $_pkg_short_errors_supported = yes; then
1090
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1092
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1094
# Put the nasty error message in config.log where it belongs
1095
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1097
m4_default([$4], [AC_MSG_ERROR(
1098
[Package requirements ($2) were not met:
1102
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1103
installed software in a non-standard prefix.
1107
elif test $pkg_failed = untried; then
1109
m4_default([$4], [AC_MSG_FAILURE(
1110
[The pkg-config script could not be found or is too old. Make sure it
1111
is in your PATH or set the PKG_CONFIG environment variable to the full
1116
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1119
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1120
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1121
AC_MSG_RESULT([yes])
1124
])# PKG_CHECK_MODULES
1127
# PKG_INSTALLDIR(DIRECTORY)
1128
# -------------------------
1129
# Substitutes the variable pkgconfigdir as the location where a module
1130
# should install pkg-config .pc files. By default the directory is
1131
# $libdir/pkgconfig, but the default can be changed by passing
1132
# DIRECTORY. The user can override through the --with-pkgconfigdir
1134
AC_DEFUN([PKG_INSTALLDIR],
1135
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1136
m4_pushdef([pkg_description],
1137
[pkg-config installation directory @<:@]pkg_default[@:>@])
1138
AC_ARG_WITH([pkgconfigdir],
1139
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1140
[with_pkgconfigdir=]pkg_default)
1141
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1142
m4_popdef([pkg_default])
1143
m4_popdef([pkg_description])
1144
]) dnl PKG_INSTALLDIR
1147
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
1148
# -------------------------
1149
# Substitutes the variable noarch_pkgconfigdir as the location where a
1150
# module should install arch-independent pkg-config .pc files. By
1151
# default the directory is $datadir/pkgconfig, but the default can be
1152
# changed by passing DIRECTORY. The user can override through the
1153
# --with-noarch-pkgconfigdir parameter.
1154
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1155
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1156
m4_pushdef([pkg_description],
1157
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1158
AC_ARG_WITH([noarch-pkgconfigdir],
1159
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1160
[with_noarch_pkgconfigdir=]pkg_default)
1161
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1162
m4_popdef([pkg_default])
1163
m4_popdef([pkg_description])
1164
]) dnl PKG_NOARCH_INSTALLDIR
1167
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1168
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1169
# -------------------------------------------
1170
# Retrieves the value of the pkg-config variable for the given module.
1171
AC_DEFUN([PKG_CHECK_VAR],
1172
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1173
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1175
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
1176
AS_VAR_COPY([$1], [pkg_cv_][$1])
1178
AS_VAR_IF([$1], [""], [$5], [$4])dnl
1181
1181
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
1183
1183
# This file is free software; the Free Software Foundation