1# generated automatically by aclocal 1.15.1 -*- Autoconf -*- 2 3# Copyright (C) 1996-2017 Free Software Foundation, Inc. 4 5# This file is free software; the Free Software Foundation 6# gives unlimited permission to copy and/or distribute it, 7# with or without modifications, as long as this notice is preserved. 8 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12# PARTICULAR PURPOSE. 13 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15# lcmessage.m4 serial 7 (gettext-0.18.2) 16dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software 17dnl Foundation, Inc. 18dnl This file is free software; the Free Software Foundation 19dnl gives unlimited permission to copy and/or distribute it, 20dnl with or without modifications, as long as this notice is preserved. 21dnl 22dnl This file can be used in projects which are not available under 23dnl the GNU General Public License or the GNU Library General Public 24dnl License but which still want to provide support for the GNU gettext 25dnl functionality. 26dnl Please note that the actual code of the GNU gettext library is covered 27dnl by the GNU Library General Public License, and the rest of the GNU 28dnl gettext package is covered by the GNU General Public License. 29dnl They are *not* in the public domain. 30 31dnl Authors: 32dnl Ulrich Drepper <drepper@cygnus.com>, 1995. 33 34# Check whether LC_MESSAGES is available in <locale.h>. 35 36AC_DEFUN([gt_LC_MESSAGES], 37[ 38 AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], 39 [AC_LINK_IFELSE( 40 [AC_LANG_PROGRAM( 41 [[#include <locale.h>]], 42 [[return LC_MESSAGES]])], 43 [gt_cv_val_LC_MESSAGES=yes], 44 [gt_cv_val_LC_MESSAGES=no])]) 45 if test $gt_cv_val_LC_MESSAGES = yes; then 46 AC_DEFINE([HAVE_LC_MESSAGES], [1], 47 [Define if your <locale.h> file defines LC_MESSAGES.]) 48 fi 49]) 50 51dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 52dnl serial 11 (pkg-config-0.29) 53dnl 54dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 55dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 56dnl 57dnl This program is free software; you can redistribute it and/or modify 58dnl it under the terms of the GNU General Public License as published by 59dnl the Free Software Foundation; either version 2 of the License, or 60dnl (at your option) any later version. 61dnl 62dnl This program is distributed in the hope that it will be useful, but 63dnl WITHOUT ANY WARRANTY; without even the implied warranty of 64dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 65dnl General Public License for more details. 66dnl 67dnl You should have received a copy of the GNU General Public License 68dnl along with this program; if not, write to the Free Software 69dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 70dnl 02111-1307, USA. 71dnl 72dnl As a special exception to the GNU General Public License, if you 73dnl distribute this file as part of a program that contains a 74dnl configuration script generated by Autoconf, you may include it under 75dnl the same distribution terms that you use for the rest of that 76dnl program. 77 78dnl PKG_PREREQ(MIN-VERSION) 79dnl ----------------------- 80dnl Since: 0.29 81dnl 82dnl Verify that the version of the pkg-config macros are at least 83dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 84dnl installed version of pkg-config, this checks the developer's version 85dnl of pkg.m4 when generating configure. 86dnl 87dnl To ensure that this macro is defined, also add: 88dnl m4_ifndef([PKG_PREREQ], 89dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 90dnl 91dnl See the "Since" comment for each macro you use to see what version 92dnl of the macros you require. 93m4_defun([PKG_PREREQ], 94[m4_define([PKG_MACROS_VERSION], [0.29]) 95m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 96 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 97])dnl PKG_PREREQ 98 99dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 100dnl ---------------------------------- 101dnl Since: 0.16 102dnl 103dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 104dnl first found in the path. Checks that the version of pkg-config found 105dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 106dnl used since that's the first version where most current features of 107dnl pkg-config existed. 108AC_DEFUN([PKG_PROG_PKG_CONFIG], 109[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 110m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 111m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 112AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 113AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 114AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 115 116if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 117 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 118fi 119if test -n "$PKG_CONFIG"; then 120 _pkg_min_version=m4_default([$1], [0.9.0]) 121 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 122 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 123 AC_MSG_RESULT([yes]) 124 else 125 AC_MSG_RESULT([no]) 126 PKG_CONFIG="" 127 fi 128fi[]dnl 129])dnl PKG_PROG_PKG_CONFIG 130 131dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 132dnl ------------------------------------------------------------------- 133dnl Since: 0.18 134dnl 135dnl Check to see whether a particular set of modules exists. Similar to 136dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 137dnl 138dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 139dnl only at the first occurence in configure.ac, so if the first place 140dnl it's called might be skipped (such as if it is within an "if", you 141dnl have to call PKG_CHECK_EXISTS manually 142AC_DEFUN([PKG_CHECK_EXISTS], 143[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 144if test -n "$PKG_CONFIG" && \ 145 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 146 m4_default([$2], [:]) 147m4_ifvaln([$3], [else 148 $3])dnl 149fi]) 150 151dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 152dnl --------------------------------------------- 153dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 154dnl pkg_failed based on the result. 155m4_define([_PKG_CONFIG], 156[if test -n "$$1"; then 157 pkg_cv_[]$1="$$1" 158 elif test -n "$PKG_CONFIG"; then 159 PKG_CHECK_EXISTS([$3], 160 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 161 test "x$?" != "x0" && pkg_failed=yes ], 162 [pkg_failed=yes]) 163 else 164 pkg_failed=untried 165fi[]dnl 166])dnl _PKG_CONFIG 167 168dnl _PKG_SHORT_ERRORS_SUPPORTED 169dnl --------------------------- 170dnl Internal check to see if pkg-config supports short errors. 171AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 172[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 173if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 174 _pkg_short_errors_supported=yes 175else 176 _pkg_short_errors_supported=no 177fi[]dnl 178])dnl _PKG_SHORT_ERRORS_SUPPORTED 179 180 181dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 182dnl [ACTION-IF-NOT-FOUND]) 183dnl -------------------------------------------------------------- 184dnl Since: 0.4.0 185dnl 186dnl Note that if there is a possibility the first call to 187dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 188dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 189AC_DEFUN([PKG_CHECK_MODULES], 190[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 191AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 192AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 193 194pkg_failed=no 195AC_MSG_CHECKING([for $1]) 196 197_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 198_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 199 200m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 201and $1[]_LIBS to avoid the need to call pkg-config. 202See the pkg-config man page for more details.]) 203 204if test $pkg_failed = yes; then 205 AC_MSG_RESULT([no]) 206 _PKG_SHORT_ERRORS_SUPPORTED 207 if test $_pkg_short_errors_supported = yes; then 208 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 209 else 210 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 211 fi 212 # Put the nasty error message in config.log where it belongs 213 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 214 215 m4_default([$4], [AC_MSG_ERROR( 216[Package requirements ($2) were not met: 217 218$$1_PKG_ERRORS 219 220Consider adjusting the PKG_CONFIG_PATH environment variable if you 221installed software in a non-standard prefix. 222 223_PKG_TEXT])[]dnl 224 ]) 225elif test $pkg_failed = untried; then 226 AC_MSG_RESULT([no]) 227 m4_default([$4], [AC_MSG_FAILURE( 228[The pkg-config script could not be found or is too old. Make sure it 229is in your PATH or set the PKG_CONFIG environment variable to the full 230path to pkg-config. 231 232_PKG_TEXT 233 234To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 235 ]) 236else 237 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 238 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 239 AC_MSG_RESULT([yes]) 240 $3 241fi[]dnl 242])dnl PKG_CHECK_MODULES 243 244 245dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 246dnl [ACTION-IF-NOT-FOUND]) 247dnl --------------------------------------------------------------------- 248dnl Since: 0.29 249dnl 250dnl Checks for existence of MODULES and gathers its build flags with 251dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 252dnl and VARIABLE-PREFIX_LIBS from --libs. 253dnl 254dnl Note that if there is a possibility the first call to 255dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 256dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 257dnl configure.ac. 258AC_DEFUN([PKG_CHECK_MODULES_STATIC], 259[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 260_save_PKG_CONFIG=$PKG_CONFIG 261PKG_CONFIG="$PKG_CONFIG --static" 262PKG_CHECK_MODULES($@) 263PKG_CONFIG=$_save_PKG_CONFIG[]dnl 264])dnl PKG_CHECK_MODULES_STATIC 265 266 267dnl PKG_INSTALLDIR([DIRECTORY]) 268dnl ------------------------- 269dnl Since: 0.27 270dnl 271dnl Substitutes the variable pkgconfigdir as the location where a module 272dnl should install pkg-config .pc files. By default the directory is 273dnl $libdir/pkgconfig, but the default can be changed by passing 274dnl DIRECTORY. The user can override through the --with-pkgconfigdir 275dnl parameter. 276AC_DEFUN([PKG_INSTALLDIR], 277[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 278m4_pushdef([pkg_description], 279 [pkg-config installation directory @<:@]pkg_default[@:>@]) 280AC_ARG_WITH([pkgconfigdir], 281 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 282 [with_pkgconfigdir=]pkg_default) 283AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 284m4_popdef([pkg_default]) 285m4_popdef([pkg_description]) 286])dnl PKG_INSTALLDIR 287 288 289dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 290dnl -------------------------------- 291dnl Since: 0.27 292dnl 293dnl Substitutes the variable noarch_pkgconfigdir as the location where a 294dnl module should install arch-independent pkg-config .pc files. By 295dnl default the directory is $datadir/pkgconfig, but the default can be 296dnl changed by passing DIRECTORY. The user can override through the 297dnl --with-noarch-pkgconfigdir parameter. 298AC_DEFUN([PKG_NOARCH_INSTALLDIR], 299[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 300m4_pushdef([pkg_description], 301 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 302AC_ARG_WITH([noarch-pkgconfigdir], 303 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 304 [with_noarch_pkgconfigdir=]pkg_default) 305AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 306m4_popdef([pkg_default]) 307m4_popdef([pkg_description]) 308])dnl PKG_NOARCH_INSTALLDIR 309 310 311dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 312dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 313dnl ------------------------------------------- 314dnl Since: 0.28 315dnl 316dnl Retrieves the value of the pkg-config variable for the given module. 317AC_DEFUN([PKG_CHECK_VAR], 318[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 319AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 320 321_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 322AS_VAR_COPY([$1], [pkg_cv_][$1]) 323 324AS_VAR_IF([$1], [""], [$5], [$4])dnl 325])dnl PKG_CHECK_VAR 326 327m4_include([m4/libtool.m4]) 328m4_include([m4/ltoptions.m4]) 329m4_include([m4/ltsugar.m4]) 330m4_include([m4/ltversion.m4]) 331m4_include([m4/lt~obsolete.m4]) 332